/* Editorial concepts, paired reconstructions, and report cases. */
.method-pair > .method-article {
  min-width: 0;
}
.concept-illustration {
  display: block;
  min-height: 0;
  max-width: 100%;
  margin-inline: 0;
  padding: 36px 8px 28px;
  overflow: hidden;
}
.concept-illustration img {
  display: block;
  width: 100%;
  height: auto;
}
.concept-zoom {
  display: block;
  cursor: zoom-in;
}
.concept-zoom:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.concept-illustration .concept-zoom-icon {
  position: absolute;
  top: 11px;
  right: 16px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #a9afc3;
  stroke-width: 1.5;
}
.method-scene {
  display: block;
  height: auto;
}
/* Four real slice pairs: both volumes and both differences change together. */
.motion-ready .slidr-frame {
  animation: slidr-slices 16s linear infinite;
  animation-delay: var(--frame-delay);
}
.motion-ready .slidr-flow { animation: slidr-difference 4s linear infinite; }
.motion-ready .slidr-match { animation: slidr-pair 4s linear infinite; }
.motion-ready .slidr-map-edge { animation: slidr-edge 4s ease-in-out infinite; }
.motion-ready .slidr-match-point { animation: slidr-point 4s ease-in-out infinite; }
@keyframes slidr-slices {
  0%, 22% { opacity: 1; }
  25%, 97% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes slidr-difference {
  0%, 8% { opacity: 0; stroke-dashoffset: 28; }
  14% { opacity: .95; stroke-dashoffset: 28; }
  48% { opacity: .95; stroke-dashoffset: var(--travel); }
  54%, 100% { opacity: 0; stroke-dashoffset: var(--travel); }
}
@keyframes slidr-pair {
  0%, 48% { opacity: 0; stroke-dashoffset: 28; }
  54% { opacity: .9; stroke-dashoffset: 28; }
  76% { opacity: .9; stroke-dashoffset: var(--travel); }
  82%, 100% { opacity: 0; stroke-dashoffset: var(--travel); }
}
@keyframes slidr-edge {
  0%, 32%, 90%, 100% { stroke-opacity: .3; }
  50%, 75% { stroke-opacity: .85; }
}
@keyframes slidr-point {
  0%, 58%, 96%, 100% { opacity: .4; }
  76% { opacity: 1; }
}

/* Alternating directions explain joint training objectives, not stages. */
.motion-ready .mera-in { animation: mera-to-shared 10s linear infinite; }
.motion-ready .mera-surface-flow { animation: mera-through-shared 10s linear infinite; }
.motion-ready .mera-surface-return { animation: mera-from-shared 10s linear infinite; }
.motion-ready .mera-out { animation: mera-to-experts 10s linear infinite; }
.motion-ready .mera-expert-detail { animation: mera-expertise 10s ease-in-out infinite; }
@keyframes mera-to-shared {
  0% { opacity: 0; stroke-dashoffset: 28; }
  5% { opacity: 1; stroke-dashoffset: 28; }
  28% { opacity: 1; stroke-dashoffset: var(--travel); }
  34%, 100% { opacity: 0; stroke-dashoffset: var(--travel); }
}
@keyframes mera-through-shared {
  0%, 23% { opacity: 0; stroke-dashoffset: 42; }
  28% { opacity: .9; stroke-dashoffset: 42; }
  43% { opacity: .9; stroke-dashoffset: var(--travel); }
  48%, 100% { opacity: 0; stroke-dashoffset: var(--travel); }
}
@keyframes mera-to-experts {
  0%, 58% { opacity: 0; stroke-dashoffset: 28; }
  62% { opacity: 1; stroke-dashoffset: 28; }
  86% { opacity: 1; stroke-dashoffset: var(--travel); }
  92%, 100% { opacity: 0; stroke-dashoffset: var(--travel); }
}
@keyframes mera-from-shared {
  0%, 45% { opacity: 0; stroke-dashoffset: 42; }
  49% { opacity: .9; stroke-dashoffset: 42; }
  62% { opacity: .9; stroke-dashoffset: var(--travel); }
  67%, 100% { opacity: 0; stroke-dashoffset: var(--travel); }
}
@keyframes mera-expertise {
  0%, 100% { opacity: .76; }
  5% { opacity: .9; }
  20%, 65% { opacity: .58; }
  88%, 94% { opacity: 1; }
}
.motion-ready :is(.slidr-frame, .method-flow, .slidr-map-edge, .slidr-match-point, .mera-expert-detail) {
  animation-play-state: paused;
}
.is-playing :is(.slidr-frame, .method-flow, .slidr-map-edge, .slidr-match-point, .mera-expert-detail) {
  animation-play-state: running;
}
@media (prefers-reduced-motion: reduce) {
  [data-method-motion]:not(.motion-enabled) .method-scene * { animation: none !important; }
}

/* The common space takes the visual lead; all imagery remains legible. */
.interface-map.interface-landscape {
  --flow-duration: 8s;
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.05fr) minmax(0, .95fr);
  gap: 26px;
  padding: 42px 0 36px;
  border: 0;
  border-block: 1px solid #30303a;
  border-radius: 0;
  background: transparent;
}
.interface-landscape > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.interface-landscape > .interface-flow {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.flow-guide,
.flow-packet {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
}
.flow-guide {
  stroke-width: 1;
  opacity: .22;
}
.flow-packet {
  stroke-width: 1.6;
  stroke-dasharray: 1 199;
  stroke-dashoffset: 2;
  opacity: 0;
}
.interface-landscape .interface-input,
.interface-landscape .interface-output {
  grid-column: auto;
  grid-row: auto;
}
.interface-landscape .interface-core {
  display: block;
  grid-column: auto;
  grid-row: auto;
  text-align: center;
}
.interface-landscape .interface-core .diagram-label {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.04em;
  text-transform: none;
  color: #e0e5f4;
}
.visual-token-stage {
  position: relative;
  margin: 10px -10px 0;
}
.visual-token-module {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
}
.interface-landscape .interface-core h3 {
  margin-top: 0;
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -.025em;
}
.interface-landscape .interface-core > p:last-child {
  margin-top: 8px;
  font-size: 10px;
  color: #969bae;
  line-height: 1.6;
}
.interface-landscape .modality-mosaic {
  gap: 6px;
}
.interface-landscape .modality-mosaic figure {
  border-radius: 3px;
}
.interface-landscape .modality-mosaic img {
  opacity: .92;
}
.interface-landscape .modality-mosaic figcaption {
  font-size: 8px;
  padding: 17px 5px 5px;
}
.interface-landscape .interface-output {
  border: 0;
  padding: 0;
}
.interface-landscape .interface-output ul {
  display: block;
}
.interface-landscape .interface-output li {
  position: relative;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #2e2f39;
  gap: 14px;
  padding-block: 9px;
  font-size: 11px;
}
.interface-landscape .task-vignette {
  display: block;
  flex: 0 0 auto;
  width: 94px;
  height: auto;
}
.interface-landscape .interface-output .task-output-label {
  min-width: 0;
  padding: 0;
  color: #d2d6e4;
  font-size: 11px;
  line-height: 1.55;
}
.interface-landscape .interface-output li:first-child {
  border-top: 1px solid #2e2f39;
}
.interface-caption {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
}
.interface-caption .interface-note {
  margin: 0;
  text-align: left;
  max-width: 690px;
  font-size: 13px;
}
.flow-ready .modality-mosaic figure::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #bac6eb;
  border-radius: inherit;
  background-image: linear-gradient(#bac6eb80 1px, transparent 1px), linear-gradient(90deg, #bac6eb80 1px, transparent 1px);
  background-size: 20% 20%;
  pointer-events: none;
  opacity: 0;
  animation: interface-source var(--flow-duration) ease-in-out infinite;
  animation-play-state: paused;
}
.flow-ready .interface-output li::after {
  content: "";
  position: absolute;
  inset: 3px -6px;
  border: 1px solid var(--flow-color);
  border-radius: 4px;
  background: linear-gradient(90deg, #bac6eb0a, transparent);
  pointer-events: none;
  opacity: 0;
  animation: interface-task var(--flow-duration) ease-in-out infinite;
  animation-play-state: paused;
}
.flow-ready .flow-packet {
  animation: interface-transit var(--flow-duration) linear infinite,
    interface-particle-visibility var(--flow-duration) ease-in-out infinite;
  animation-play-state: paused;
}
.flow-ready .flow-packet-branch {
  animation-name: interface-transit, interface-branch-visibility;
}
.visual-token-activation {
  opacity: 0;
}
.flow-ready .visual-token-activation {
  animation: visual-token-encode var(--flow-duration) ease-in-out infinite;
  animation-delay: var(--token-delay, 0s);
  animation-play-state: paused;
}
/* Every stage shares one clock, including pause and offscreen suspension. */
.is-flowing .flow-packet,
.is-flowing .visual-token-activation,
.is-flowing .modality-mosaic figure::after,
.is-flowing .interface-output li::after {
  animation-play-state: running;
}
@keyframes interface-source {
  0%, 24%, 100% { opacity: 0; }
  8% { opacity: .2; }
}
@keyframes interface-transit {
  0% { stroke-dashoffset: 2; }
  4% { stroke-dashoffset: 0; }
  30% { stroke-dashoffset: var(--flow-entry); }
  58% { stroke-dashoffset: var(--flow-exit); }
  92% { stroke-dashoffset: -100; }
  100% { stroke-dashoffset: -102; }
}
@keyframes visual-token-encode {
  0%, 28%, 44%, 100% { opacity: 0; }
  35% { opacity: .28; }
}
@keyframes interface-particle-visibility {
  0%, 100% { opacity: 0; }
  5%, 90% { opacity: .55; }
}
@keyframes interface-branch-visibility {
  0%, 30%, 100% { opacity: 0; }
  36%, 90% { opacity: .55; }
}
@keyframes interface-task {
  0%, 85%, 100% { opacity: 0; }
  94% { opacity: .22; }
}
@media (max-width: 1000px) and (min-width: 601px) {
  .interface-map.interface-landscape {
    grid-template-columns: minmax(180px, .75fr) minmax(0, 1.65fr);
    gap: 30px;
  }
  .interface-landscape .interface-output {
    grid-column: 1 / -1;
    border-top: 1px solid #2e2f39;
    padding-top: 25px;
  }
  .interface-landscape .interface-output ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 24px;
  }
  .interface-landscape .interface-output li:first-child {
    border-top: 0;
  }
  .interface-landscape .task-vignette {
    width: 80px;
  }
}
@media (max-width: 600px) {
  .interface-map.interface-landscape {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 28px 0;
  }
  .interface-landscape .modality-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .interface-landscape .modality-mosaic img {
    aspect-ratio: 4 / 3;
  }
  .interface-landscape .modality-mosaic figcaption {
    font-size: 9px;
  }
  .interface-landscape .interface-core {
    padding-block: 9px 18px;
  }
  .visual-token-module {
    aspect-ratio: 6 / 5;
  }
  .interface-landscape .interface-core .diagram-label {
    font-size: 25px;
  }
  .interface-landscape .interface-core h3 {
    margin-top: 0;
    font-size: 16px;
  }
  .interface-landscape .interface-core > p:last-child {
    font-size: 10px;
  }
  .interface-landscape .interface-output ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
  .interface-landscape .interface-output li:first-child {
    border-top: 0;
  }
  .interface-landscape .interface-output li {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding-block: 15px;
  }
  .interface-landscape .task-vignette {
    width: 112px;
    max-width: 100%;
  }
  .interface-landscape .interface-output .task-output-label {
    font-size: 11px;
  }
  .interface-caption {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }
  .interface-caption .interface-note {
    font-size: 12px;
  }
}
@media (max-width: 800px) {
  .method-pair {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }
  .interface-landscape .interface-output ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-ready:not(.motion-enabled) .visual-token-activation,
  .flow-ready:not(.motion-enabled) .flow-packet,
  .flow-ready:not(.motion-enabled) .modality-mosaic figure::after,
  .flow-ready:not(.motion-enabled) .interface-output li::after {
    animation: none !important;
  }
}
#panel-recon2d, #panel-recon3d {
  overflow: visible;
}
.recon-2d-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 22px;
  margin-top: 28px;
}
.recon-case {
  min-width: 0;
  border-top: 1px solid #40414e;
  padding-top: 16px;
}
.recon-case-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.recon-case-header h3 {
  font-size: 15px;
  line-height: 1.5;
}
.recon-case-header > span {
  color: var(--faint);
  font-size: 10px;
}
.recon-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.recon-image {
  min-width: 0;
}
.recon-2d-grid .figure-link {
  padding: 0;
  min-width: 0;
  border: 1px solid #35353f;
  border-radius: 8px;
  overflow: hidden;
  background: #060609;
}
.result-panel .recon-2d-grid .figure-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #060609;
}
.recon-image figcaption {
  color: #adb2c8;
  font-size: 10px;
  margin-top: 9px;
  padding-left: 1px;
}
.recon-image:last-child figcaption {
  color: var(--accent);
}
.recon-gallery-note {
  margin-top: 22px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.8;
}
.volume-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 26px 0 22px;
}
.volume-case-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.volume-case-buttons button, .volume-reset {
  background: #1a1a23;
  border: 1px solid #41414e;
  border-radius: 999px;
  padding: 8px 16px;
  color: #acb1c9;
  font: inherit;
  font-size: 11px;
  line-height: 1.6;
}
.volume-case-buttons button[aria-pressed='true'] {
  background: #303548;
  border-color: #939fC5;
  color: #e1e7fb;
}
.volume-case-buttons button:hover, .volume-reset:hover {
  color: #fff;
  border-color: var(--accent);
}
.volume-case-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
#volume-case-label {
  font-size: 12px;
  color: #c4cbE3;
}
#volume-window-label {
  font-size: 10px;
  color: var(--faint);
}
.volume-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.volume-card {
  min-width: 0;
  padding: 18px 18px 12px;
  border: 1px solid #353641;
  border-radius: 16px;
  background: #0a0a0e;
}
.volume-card > h3 {
  font-size: 12px;
  font-weight: 500;
  color: #b7bdd5;
  letter-spacing: 0;
}
.volume-card:last-child > h3 {
  color: var(--accent);
}
.recon-volume-stage {
  --volume-w: 0px;
  --volume-h: 0px;
  --volume-d: 0px;
  --sagittal-position: 0px;
  --coronal-position: 0px;
  --axial-position: 0px;
  position: relative;
  width: 100%;
  height: 350px;
  min-width: 0;
  perspective: 900px;
  perspective-origin: 50% 45%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.recon-volume-stage.is-dragging {
  cursor: grabbing;
}
.recon-volume {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  visibility: hidden;
  pointer-events: none;
}
.volume-comparison.is-ready .recon-volume {
  visibility: visible;
}
.volume-fallback {
  position: absolute;
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  pointer-events: none;
}
.volume-comparison.is-ready .volume-fallback {
  display: none;
}
.cube-wire, .recon-plane {
  position: absolute;
  left: 0;
  top: 0;
  backface-visibility: visible;
  pointer-events: none;
}
.cube-wire {
  border: 1px solid #7e8cb680;
}
.cube-wire.front, .cube-wire.back, .recon-plane.coronal {
  width: var(--volume-w);
  height: var(--volume-h);
}
.cube-wire.right, .cube-wire.left, .recon-plane.sagittal {
  width: var(--volume-d);
  height: var(--volume-h);
}
.cube-wire.top, .cube-wire.bottom, .recon-plane.axial {
  width: var(--volume-w);
  height: var(--volume-d);
}
.cube-wire.front {
  transform: translate(-50%, -50%) translateZ(calc(var(--volume-d) / 2));
}
.cube-wire.back {
  transform: translate(-50%, -50%) translateZ(calc(var(--volume-d) / -2));
}
.cube-wire.right {
  transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--volume-w) / 2));
}
.cube-wire.left {
  transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--volume-w) / 2));
}
.cube-wire.top {
  transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--volume-h) / 2));
}
.cube-wire.bottom {
  transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--volume-h) / 2));
}
.recon-plane.coronal {
  transform: translate(-50%, -50%) translateZ(var(--coronal-position));
}
.recon-plane.sagittal {
  transform: translate(-50%, -50%) translateX(var(--sagittal-position)) rotateY(-90deg);
}
.recon-plane.axial {
  transform: translate(-50%, -50%) translateY(var(--axial-position)) rotateX(-90deg);
}
.volume-axis-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 22px;
  padding: 22px;
  background: #1a1a22;
  border: 1px solid #363641;
  border-radius: 13px;
}
.volume-axis-controls label {
  display: block;
  min-width: 0;
}
.volume-axis-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #c2c9e2;
  font-size: 11px;
}
.volume-axis-label output {
  font-size: 10px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.volume-axis-controls input {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  accent-color: var(--accent);
}
#volume-status {
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}
#volume-status:empty {
  display: none;
}
.volume-instructions {
  color: var(--faint);
  font-size: 11px;
  line-height: 1.8;
  margin: 19px 0 0;
}
.report-case-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.report-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  min-width: 700px;
}
.report-case-grid .paper-figure {
  min-width: 0;
  width: auto;
}
.report-case-grid .figure-link {
  min-width: 0;
  padding: 10px;
}
.report-case-grid .figure-link img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
}
.report-case-grid figcaption {
  font-size: 11px;
  color: #59607d;
  padding: 0 16px 14px;
}
@media (max-width: 1000px) {
  .recon-2d-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recon-volume-stage {
    height: 300px;
  }
}
@media (max-width: 600px) {
  .recon-2d-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .recon-case-header h3 {
    font-size: 15px;
  }
  .recon-image figcaption {
    font-size: 11px;
  }
  .recon-gallery-note, .volume-instructions {
    font-size: 10px;
  }
  .volume-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .volume-card {
    padding: 16px;
  }
  .recon-volume-stage {
    height: 280px;
  }
  .volume-toolbar {
    align-items: start;
    margin-top: 22px;
  }
  .volume-case-buttons {
    gap: 7px;
  }
  .volume-case-buttons button, .volume-reset {
    font-size: 10px;
    padding: 7px 12px;
  }
  .volume-axis-controls {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 20px;
  }
  .volume-axis-controls input {
    margin-top: 12px;
  }
  .report-case-grid {
    gap: 16px;
  }
}
