@import url("site-brand.css?v=nav-shadow");

/* Shared homepage type, color, and control styles. */
:root {
  --home-font: Inter, "Helvetica Neue", Arial, sans-serif;
  --home-math-font: "STIX Two Math", "Cambria Math", Georgia, serif;
  --home-text: #59646c;
  --home-muted: #79858d;
  --home-accent: #397cb0;
  --home-accent-strong: #2f6895;
  --home-control-bg: #e4e5e6;
  --home-control-radius: 8px;
  --home-section-size: 44px;
  --home-subtitle-size: 30px;
  --home-body-size: 18px;
  --home-caption-size: 18px;
  --home-note-size: 12px;
  font-family: var(--home-font);
}

html { scroll-behavior: smooth; overscroll-behavior-y: none; scroll-padding-top: calc(var(--home-header-height, 68px) + 16px); }
body { margin: 0; min-width: 280px; padding-top: var(--home-header-height, 68px); }
body > .site-header { position: fixed; inset: 0 0 auto; padding: 16px 40px; }
button, select, input { font: inherit; }
button, select { color: inherit; }
a { color: inherit; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--home-accent); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 4px; }
h1 { margin: 0; font-family: inherit; font-weight: 550; font-size: 64px; line-height: 1.1; }
main { position: relative; min-width: 0; min-height: 0; }
.home-layout { position: relative; display: grid; grid-template-columns: minmax(360px, 0.75fr) minmax(0, 2fr); grid-template-rows: minmax(0, 1fr); gap: 64px; max-width: 1680px; margin-inline: auto; height: calc(100svh - 80px); min-height: 650px; padding: 48px 40px 40px; }
.intro { align-self: center; min-width: 0; }
.intro p { max-width: 25em; margin: 48px 0 0; font-size: 18px; line-height: 1.7; color: var(--home-text); }
.collection { position: relative; min-width: 0; min-height: 0; }
.scene-grid { width: 100%; height: 100%; display: grid; align-content: center; justify-content: center; gap: 10px; }
.scene { position: relative; margin: 0; min-width: 0; min-height: 0; overflow: hidden; background: #f0f2f3; isolation: isolate; transform-origin: top left; z-index: 0; transition: transform 240ms ease, width 240ms ease, height 240ms ease, z-index 0s 240ms; }
.scene.expanded-scene { z-index: 2; transition: transform 240ms ease, width 240ms ease, height 240ms ease, z-index 0s; }
.scene video { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transform: scale(1.02); }
.scene .hd-video { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.scene.hd-ready .hd-video { opacity: 1; }
.scene.hd-ready .scene-video { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .scene { transition: none; } }
/* Keep loading text and actual progress centered in the gallery area. */
#status { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; background: #f0f2f3; }
#status[hidden] { display: none; }
.room-loading { display: grid; justify-items: center; gap: 18px; width: min(180px, 80%); }
#room-loading-label { margin: 0; font-size: 22px; line-height: 1.4; font-weight: 400; color: var(--home-text); text-align: center; }
#room-loading-progress { appearance: none; width: 100%; height: 2px; border: 0; background: #dce3e1; color: #527e70; }
#room-loading-progress::-webkit-progress-bar { background: #dce3e1; }
#room-loading-progress::-webkit-progress-value { background: #527e70; }
#room-loading-progress::-moz-progress-bar { background: #527e70; }
#status[data-state="error"] progress { display: none; }
@media (min-width: 901px) and (max-width: 1199px) {
  h1 { font-size: 48px; }
  .home-layout { gap: 32px; }
  .intro p { font-size: 17px; }
}
@media (max-width: 900px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 24px; }
  .intro { align-self: start; }
  h1 { font-size: 44px; }
  .intro p { max-width: 36em; margin-top: 16px; font-size: 17px; line-height: 1.6; }
}
@media (max-width: 600px) {
  body > .site-header { padding: 12px 20px; }
  .home-layout { padding: 44px 20px 36px; }
  h1 { font-size: 40px; }
  .intro p { font-size: 16px; }
  .scene-grid { gap: 6px; }
}
@media (max-height: 500px) and (min-width: 601px) {
  body > .site-header { padding: 8px 24px; }
  .home-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.8fr); grid-template-rows: minmax(0, 1fr); gap: 24px; }
  .intro { align-self: center; }
  h1 { font-size: 36px; }
  .intro p { margin-top: 12px; font-size: 14px; line-height: 1.5; }
  .scene-grid { gap: 6px; }
}

/* A full-height introduction leads into ordinary, freely scrollable sections. */
.eyebrow, .intro .eyebrow { margin: 0 0 22px; font-size: 11px; line-height: 1.5; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #167e70; }
.intro .hero-description { margin-top: 24px; font-size: 28px; line-height: 1.3; letter-spacing: -0.6px; color: #171c20; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 56px; }

/* Compact rounded buttons keep the introduction's two actions simple. */
.hero-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 16px; border: 1px solid var(--home-accent-strong); border-radius: var(--home-control-radius); background: var(--home-accent-strong); color: #fff; text-decoration: none; font-size: 13px; font-weight: 500; }
.hero-button:hover { background: #275b84; }
.hero-button-secondary { border-color: var(--home-control-bg); background: var(--home-control-bg); color: var(--home-text); }
.hero-button-secondary:hover { border-color: #dadddf; background: #dadddf; }
.hero-button:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 4px; }

/* Shared controls for the demonstrations below the introduction. */
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 44px; padding: 12px 20px; border: 1px solid var(--home-accent-strong); border-radius: var(--home-control-radius); background: var(--home-accent-strong); color: #fff; text-decoration: none; font-size: 13px; font-weight: 500; cursor: pointer; }
.home-button:hover { background: #275b84; }
.text-link { font-size: 13px; font-weight: 500; text-decoration: none; text-underline-offset: 5px; }
.text-link:hover { color: var(--home-accent); text-decoration: underline; }
.text-link span { margin-left: 8px; }
.intro .hero-note { margin-top: 24px; font-size: 12px; color: var(--home-muted); }
.scroll-cue { position: absolute; bottom: 24px; left: 40px; display: flex; align-items: center; gap: 28px; color: var(--home-text); text-decoration: none; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.scroll-cue span { font-size: 18px; color: #167e70; }

/* Text roles share definitions; sentence case is written in the template. */
.home-section h2 {
  margin: 0;
  font-size: var(--home-section-size);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.trajectory-copy h3, .encoding-layout .section-heading h3,
.vision-pipeline > h3, .mesh-encoding-heading h3 {
  margin: 0;
  font-size: var(--home-subtitle-size);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--home-text);
}
.home-section.home-next h2, .home-section.home-references h2 {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.5px;
}
.home-section figcaption, .home-section figcaption h3 {
  font-size: var(--home-caption-size);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--home-text);
  text-align: center;
}
.home-section figcaption h3 { margin: 0; }
.section-heading > p, .mesh-encoding-heading > p {
  margin: 24px 0 0;
  font-size: var(--home-body-size);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--home-text);
}

/* Larger demonstrations use the same restrained palette as the room gallery. */
.home-section { max-width: 1440px; margin: 0 auto; padding: 100px 40px; scroll-margin-top: 24px; }
.home-section.room-section { padding-bottom: 60px; }
.section-heading { max-width: 760px; margin-bottom: 40px; }
.section-heading > p:last-child { max-width: 610px; }
/* Synchronized room and response-space views share an unboxed canvas layout. */
#neural-demo { border-top: 0; }
#neural-demo .section-heading, #neural-demo .section-heading > p { max-width: none; }
#neural-demo .section-heading a { color: var(--home-accent); }
.neural-demo { min-width: 0; }
/* Preview tabs retain native multi-select checkboxes and full clickable areas. */
.sensor-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-width: 1240px; border: 0; padding: 0; margin: 0 auto 28px; }
.sensor-options label { position: relative; display: flex; align-items: center; gap: 10px; min-height: 72px; min-width: 0; padding: 12px 10px; border: 0; border-radius: var(--home-control-radius); background: var(--home-control-bg); font-size: 14px; line-height: 1.4; color: #62686d; cursor: pointer; }
.sensor-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sensor-preview { display: block; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 4px; }
.sensor-copy strong, .sensor-copy small { display: block; }
.sensor-copy strong { font-size: 14px; font-weight: 600; }
.sensor-copy small { margin-top: 3px; font-size: 12px; font-weight: 400; }

/* Keep previews and two-line labels readable as the viewport narrows. */
@media (max-width: 1250px) {
  .sensor-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sensor-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .sensor-options { grid-template-columns: minmax(0, 1fr); }
}

/* Selected fill, hover, and keyboard focus remain distinct without extra icons. */
.sensor-options label:has(input:checked) { background: #bfd4e5; color: #225f98; }
.sensor-options label:has(input:focus-visible) { outline: 2px solid #527d9f; outline-offset: 3px; }
.sensor-options label:has(input:disabled) { opacity: 0.5; }
.sensor-options input:disabled { cursor: wait; }
@media (hover: hover) {
  .sensor-options label:has(input:enabled):hover { background: #dadddf; }
  .sensor-options label:has(input:checked:enabled):hover { background: #afc9de; }
}

.sensory-views { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, .95fr) minmax(0, .95fr) minmax(0, 1.6fr); gap: clamp(4px, 1.25vw, 20px); }

/* Equal-height stages keep all four captions centered on the same baseline. */
.sensory-view { min-width: 0; margin: 0; container-type: inline-size; }
.sensory-view figcaption { text-align: center; color: var(--home-text); margin-top: 12px; }
.sensory-canvas { width: 100%; height: min(23vw, 360px); }
.sensory-canvas canvas { display: block; width: 100%; height: 100%; }

/* Small optical offsets retain the shared row and caption baseline. */
.sensory-views > .sensory-view:nth-child(-n + 3) { position: relative; left: 48px; }
.response-stage, .encoding-stage { transform: translateX(min(.6vw, 10px)); }

/* An omitted middle group makes the field stack explicitly illustrative. */
#field-plot { position: relative; }
.field-dimensions, .field-ellipsis { position: absolute; color: var(--home-muted); pointer-events: none; }
.field-dimensions { top: 50%; left: 15%; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); font-size: min(1vw, 16px); }
.field-ellipsis { top: 0; left: 0; font-size: min(6.2cqw, 20px); line-height: 1; }

/* Captions state what is shown and how the recorded motion is replayed. */
.sensory-view p, .sensory-status { font-size: 11px; line-height: 1.6; color: var(--home-muted); margin: 8px 0 0; }
.sensory-status { margin-top: 24px; }

/* Explain movement and sampling before the combined interactive example. */
.explanation-section { border-top: 0; }
.explanation-section .section-heading, .explanation-section .section-heading > p { max-width: none; }
.simulation-subsection + .simulation-subsection { margin-top: clamp(64px, 7vw, 100px); }
.simulation-subsection .section-heading > p:first-child { margin-top: 0; }
.trajectory-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr); align-items: center; gap: 48px; }
.trajectory-copy { margin-bottom: 0; }
.trajectory-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 92%; justify-self: start; gap: 4px; }
.trajectory-examples figure, .encoding-explanation figure { margin: 0; min-width: 0; }
.trajectory-examples video { display: block; width: 100%; height: auto; }
.trajectory-examples figcaption, .encoding-explanation figcaption { text-align: center; margin-top: 12px; }
.trajectory-examples figcaption p { margin: 6px 0 0; font-size: 14px; color: var(--home-muted); }

/* Put the explanation beside the two synchronized sampling diagrams. */
.encoding-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr); align-items: center; column-gap: 48px; }
.encoding-layout .section-heading { margin-bottom: 0; }
.encoding-layout > .explanation-note, .encoding-layout > .explanation-status { grid-column: 1 / -1; }
.encoding-explanation { --field-shift: 36px; display: grid; grid-template-columns: minmax(0, .4fr) repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }

/* Small field previews select the population shown in both diagrams. */
.encoding-explanation .field-picker { transform: translateX(var(--field-shift)); }
.encoding-explanation .field-picker-stage { display: flex; align-items: center; justify-content: center; }
.field-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 52px; max-width: 100%; transform: translateY(12px); }
.field-options button { padding: 4px; border: 0; border-radius: 6px; background: var(--home-control-bg); aspect-ratio: 1; cursor: pointer; min-width: 0; }
.field-options button[aria-pressed="true"] { background: #bfd4e5; box-shadow: 0 0 0 2px var(--home-accent); }
.field-options button:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 4px; }
.field-options button:hover { background: #cfdce6; }
.field-options canvas { border-radius: 2px; }
.encoding-explanation .field-picker h3 { white-space: nowrap; }
.encoding-explanation figure:has(.field-canvas) { transform: translateX(calc(var(--field-shift) + min(1vw, 12px))); }
.explanation-canvas { position: relative; width: 100%; height: 360px; }
.explanation-canvas canvas { display: block; width: 100%; height: 100%; }
.explanation-canvas .field-dimensions { font-size: clamp(9px, 1vw, 16px); }
.explanation-note, .explanation-status { margin: 28px 0 0; color: var(--home-text); font-size: 15px; line-height: 1.7; }
.explanation-note a { color: var(--home-accent); }
.explanation-status:empty { display: none; }

@media (max-width: 700px) {
  :root { --home-section-size: 34px; --home-subtitle-size: 26px; --home-body-size: 16px; --home-caption-size: 12px; }
  .trajectory-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .encoding-layout { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .trajectory-examples { gap: 4px; }
  .trajectory-examples video { max-width: 460px; margin-inline: auto; }
  .encoding-explanation { --field-shift: 12px; grid-template-columns: minmax(0, .5fr) repeat(2, minmax(0, 1fr)); gap: 8px; }
  .field-options { gap: 5px; width: 32px; }
  .field-options button { padding: 2px; }
  .explanation-canvas { height: min(55vw, 300px); }
}

/* Pair each camera recording with its synchronized room trajectory. */
.realistic-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: none; }
.realistic-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.realistic-pair { margin: 0; min-width: 0; }
.realistic-videos { display: grid; gap: 12px; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.realistic-videos:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 5px; border-radius: var(--home-control-radius); }
.realistic-pair video { display: block; width: 100%; height: auto; border-radius: var(--home-control-radius); }
.realistic-pair figcaption { margin-top: 16px; text-align: center; }

/* Enlarge the existing pair so its playback position is preserved. */
.room-lightbox { width: min(1360px, calc(100vw - 64px)); max-width: none; max-height: calc(100dvh - 48px); padding: 24px; border: 0; border-radius: 12px; background: #f0f2f3; color: var(--home-text); }
.room-lightbox::backdrop { background: rgb(20 28 35 / 58%); }
.room-lightbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.room-lightbox-heading h3 { margin: 0; font-size: 20px; font-weight: 500; }
.room-lightbox-close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--home-control-radius); background: var(--home-control-bg); color: var(--home-text); font-size: 26px; cursor: pointer; }
.room-lightbox .realistic-videos { grid-template-columns: 1.25fr 1fr; align-items: center; gap: 20px; cursor: default; }
.room-lightbox figcaption { display: none; }
body.room-lightbox-open { overflow: hidden; }

/* Smaller screens keep each camera and trajectory together as one gallery item. */
@media (max-width: 700px) {
  .realistic-gallery { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .realistic-heading { align-items: flex-start; }
  .room-lightbox { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; }
  .room-lightbox .realistic-videos { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Keep the full flow together; narrow screens can scroll within this diagram. */
.vision-pipeline { margin-top: 80px; overflow-x: auto; }
.vision-pipeline > h3 { margin-bottom: 52px; }
.vision-pipeline:focus-visible { outline: 2px solid #92afc5; outline-offset: 4px; }
.pipeline-diagram { position: relative; display: grid; grid-template-columns: 1.4fr 1.1fr .65fr .55fr 1.25fr .85fr; gap: 38px; min-width: 1080px; padding: 70px 8px 100px; isolation: isolate; }
.pipeline-stage { margin: 0; min-width: 0; }
.pipeline-stage-content { height: 310px; display: flex; align-items: center; justify-content: center; }
.pipeline-room-image { display: block; width: 100%; height: auto; border-radius: var(--home-control-radius); }
.pipeline-stage figcaption { margin-top: 28px; white-space: nowrap; }

/* Small mathematical labels identify observations, features, and the action. */
.pipeline-math { font-family: var(--home-math-font); font-size: 19px; font-style: italic; font-weight: 400; color: #607587; line-height: 1.2; }
.pipeline-math sub { font-size: 65%; }
.image-symbol { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); }
.encoder-function { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #8e7da5; }
.pipeline-connections .action-path { stroke-width: 1.8; stroke: #79978d; }
.pipeline-connections .math-label { font-family: var(--home-math-font); font-size: 21px; font-style: italic; font-weight: 700; fill: #58786d; }

/* Connections sit behind the stages and follow their measured positions. */
.pipeline-connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: -1; pointer-events: none; }
.pipeline-connections path { fill: none; stroke: #91a6b6; stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; }
.pipeline-connections text { fill: #687b89; font-size: 13px; text-anchor: middle; }
.pipeline-connections .optional-path { stroke-dasharray: 4 5; }

/* Offset sheets indicate a sequence while keeping the camera image compact. */
.camera-image-stack { position: relative; width: calc(100% - 22px); margin-right: 22px; isolation: isolate; }
.camera-image-stack::before, .camera-image-stack::after { content: ''; position: absolute; inset: 0; border: 1px solid #c5d0da; border-radius: 5px; background: #dce4eb; }
.camera-image-stack::before { transform: translate(18px, -16px); z-index: -2; }
.camera-image-stack::after { transform: translate(9px, -8px); z-index: -1; background: #e6ebf0; }
.camera-image-stack img { display: block; width: 100%; height: auto; border-radius: 5px; }

/* A quiet lavender encoder feeds a short sequence of feature tokens. */
.encoder-diagram { position: relative; }
.encoder-trapezoid { display: block; width: 76px; max-width: 100%; height: 194px; }
.encoder-trapezoid .encoder-body { fill: #ded9e9; stroke: #afa3c2; stroke-width: 1; }
.decoder-node svg path { fill: #eaded3; stroke: #c3a98f; stroke-width: 1; }
.encoder-annotation { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--home-muted); white-space: nowrap; font-size: var(--home-note-size); }
.encoder-annotation svg { width: 10px; height: 20px; fill: none; stroke: #7895ad; stroke-width: 1.2; }
.encoding-vector-stack { position: relative; display: flex; gap: 5px; }
.encoding-vector { --token-color: #698eae; display: grid; grid-template-rows: repeat(6, 1fr); gap: 2px; width: 20px; height: 84px; padding: 3px; border: 1px solid #b9cbd8; background: #e7eef3; border-radius: 4px; }
.encoding-vector:nth-child(2) { --token-color: #9983ad; border-color: #cdc1d7; background: #eeebf3; }
.encoding-vector:nth-child(3) { --token-color: #6f9a8c; border-color: #b7cec4; background: #e7efeb; }
.encoding-vector i { display: block; border-radius: 1px; background: var(--token-color); opacity: var(--level); }

/* The world model feeds an external policy; the biological model is a separate branch. */
.downstream-models { flex-direction: column; gap: 34px; }
.downstream-model { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 14px; border-radius: 7px; text-align: left; }
.model-world { --model-ink: #8e7da5; --model-fill: #ddd4e8; background: #eae6f0; }
.model-policy { width: 78%; align-self: flex-end; --model-ink: #6a9588; --model-fill: #c7dcd2; background: #e2ece6; }
.model-neural { --model-ink: #b18d75; --model-fill: #e5d1be; background: #efe7df; }
.model-icon { flex: 0 0 34px; width: 34px; height: 42px; fill: none; stroke: var(--model-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.model-icon rect, .model-icon circle { fill: var(--model-fill); }
.model-icon .policy-symbol { stroke-width: 2.4; }
.downstream-model > div { min-width: 0; }
.downstream-model span { display: block; color: #405969; font-size: 14px; }
.downstream-model small { display: block; margin-top: 4px; color: #768590; font-size: var(--home-note-size); }
.reconstruction-diagram { flex-direction: column; gap: 15px; }
.decoder-node { position: relative; width: 86px; height: 76px; }
.decoder-node svg { width: 100%; height: 100%; }
.decoder-node span { position: absolute; inset: 0; display: grid; place-items: center; color: #90765e; font-size: var(--home-note-size); }
.reconstruction-arrow { color: #91a6b6; font-size: 22px; line-height: 1; }
/* A lightly blurred source frame illustrates reconstruction in this static diagram. */
.reconstruction-image { width: 130px; max-width: 100%; overflow: hidden; border-radius: 5px; }
.reconstruction-image img { display: block; width: 100%; height: auto; filter: blur(.8px); transform: scale(1.025); }

@media (max-width: 700px) {
  .vision-pipeline { margin-top: 56px; }
}

/* A synchronized, unboxed explanation of geometry-conditioned latent prediction. */
.mesh-encoding-demo { margin-top: 100px; }
.mesh-encoding-heading > p { max-width: 900px; margin-bottom: 12px; }
.mesh-flow-scroll { overflow-x: auto; margin-top: 20px; }
.mesh-flow-scroll:focus-visible { outline: 2px solid #92afc5; outline-offset: 4px; }
.mesh-flow { display: grid; grid-template-columns: 1.2fr 1fr 1.1fr .8fr; gap: 32px; min-width: 1000px; }
.mesh-flow figure { position: relative; min-width: 0; margin: 0; }
.mesh-flow figure:not(:last-child)::after { content: '→'; position: absolute; top: 150px; right: -27px; color: #94a8b6; font-size: 24px; }
.mesh-view { position: relative; height: 320px; }
.mesh-view > canvas { display: block; }
/* CSS dimensions stay in layout pixels even on high-density displays. */
.mesh-room-view, .mesh-planes-view { overflow: hidden; }
.mesh-room-view > canvas, .mesh-planes-view > canvas { width: 100%; height: 100%; }
.mesh-flow figcaption { margin-top: 14px; }
.mesh-flow figure > p { margin: 10px 0 0; text-align: center; color: var(--home-muted); font-size: 13px; }
.mesh-flow figure > p .pipeline-math { font-size: 15px; }

/* Coordinate and feature colors stay soft, while the sampled point is shared. */
.mesh-surface-view, .mesh-output-view { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mesh-surface-map { width: 88%; aspect-ratio: 4 / 3; border-radius: 5px; }
.mesh-coordinate-key { position: absolute; bottom: 24px; font-size: var(--home-note-size); color: var(--home-muted); white-space: nowrap; }
.mesh-coordinate-key i { display: inline-block; width: 24px; height: 5px; margin: 0 5px 2px 0; border-radius: 2px; background: linear-gradient(90deg, #caabba, #accbb5, #a7b9d8); }
.mesh-plane-label { position: absolute; font: italic 14px var(--home-math-font); color: #718496; pointer-events: none; transform: translate(-50%, -50%); }
.mesh-readout { padding: 13px 18px; border-radius: 6px; background: #e9e4ef; color: #88779b; font-size: 13px; white-space: nowrap; }
.mesh-readout-arrow { margin: 8px 0; color: #95a8b7; font-size: 22px; }
.mesh-latent-tokens { width: 132px; height: 90px; }
.mesh-latent-symbol { margin-top: 10px; }
.mesh-demo-status { color: var(--home-muted); font-size: 13px; }
.mesh-demo-status:empty { display: none; }

@media (max-width: 700px) {
  .mesh-encoding-demo { margin-top: 64px; }
}

.home-section.home-next { margin-top: 18px; padding-top: 0; padding-bottom: 28px; }
.home-next { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.home-next p:not(.eyebrow) { font-size: 15px; }
.next-links { position: relative; top: -8px; display: flex; flex-wrap: wrap; gap: 24px; }
.next-links .text-link { color: var(--home-accent); text-decoration: underline; }
/* Inline citation numbers jump to a compact bibliography below Documentation. */
.paper-citation { color: var(--home-accent); text-decoration: none; white-space: nowrap; font-size: .85em; }
.paper-citation:hover, .paper-citation:focus-visible { text-decoration: underline; }
.home-section.home-references { margin-top: 18px; padding-top: 0; padding-bottom: 64px; }
.home-section.home-references h2 { margin-bottom: 16px; }
.reference-list { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; }
.reference-list li { display: flex; gap: 8px; align-items: baseline; scroll-margin-top: 24px; font-size: 12px; line-height: 1.5; }
.reference-number { flex: 0 0 20px; color: var(--home-muted); font-variant-numeric: tabular-nums; }
.reference-list a { color: var(--home-accent); text-decoration: none; }
.reference-list a:hover, .reference-list a:focus-visible { text-decoration: underline; }
.reference-list p { display: inline; margin: 0 0 0 7px; color: var(--home-muted); font-size: inherit; }
.reference-venue { color: var(--home-text); white-space: nowrap; }
.reference-list li:target { background: #e7edf3; border-radius: 4px; }

.home-footer { max-width: 1440px; margin: 0 auto; padding: 28px 40px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--home-muted); }
.home-footer a { text-decoration: none; flex: none; }
.noscript-note { padding: 20px 40px; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.reveal-section { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal-section.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .home-layout { min-height: 920px; height: auto; grid-template-rows: auto 440px; }
  .intro .hero-description { font-size: 25px; }
  .hero-actions { margin-top: 24px; }
  .home-section { padding: 72px 28px; }
  .home-section.room-section { padding-bottom: 32px; }
  .home-section.home-next { padding-block: 4px; }
  .home-next { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .home-layout { min-height: 820px; grid-template-rows: auto 320px; gap: 20px; }
  .intro .eyebrow { font-size: 10px; margin-bottom: 18px; }
  .intro .hero-description { font-size: 24px; }
  .scroll-cue { left: 20px; }
  .home-section { padding: 60px 20px; }
  .home-section.room-section { padding-bottom: 20px; }
  .home-section.home-next { padding-block: 0; }
  .home-footer { padding: 24px 20px; flex-wrap: wrap; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-section { opacity: 1; transform: none; transition: none; }
}

/* Drag the response space independently of the physical room view. */
#sensory-plot canvas { cursor: grab; }
#sensory-plot.is-rotating canvas { cursor: grabbing; }

/* Loading and error messages take no space once the demo is ready. */
#projection-caption:empty, #demo-status:empty { display: none; }
