@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #30383e;
  --muted: #59646c;
  --line: #d7dde1;
  --latent: #5988ff;
  --link: var(--latent);
  --visual: #ffa332;
  --outcome-success: #23733b;
  --outcome-failure: #a63131;
  --sans: "DM Sans", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  html:focus-within { scroll-behavior: smooth; }
}
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); }
body, button, input { -webkit-font-smoothing: antialiased; }
figure, h1, h2, h3, h4, p { margin: 0; }
button, input { font: inherit; }
button, a, input[type="range"], summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
button { color: inherit; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; height: auto; }
::selection { color: var(--ink); background: #dce7ff; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
.sr-only, .skip:not(:focus) { position: absolute; overflow: hidden; clip-path: inset(50%); width: 1px; height: 1px; white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; background: white; padding: 8px 16px; z-index: 20; }
.film {
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #15181c;
  color: #fff;
  color-scheme: dark;
}
.film-poster { position: absolute; inset: 0; pointer-events: none; }
#film-video, .film-poster img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.film.enhanced :is(#film-video, .film-poster img) { object-fit: cover; }
#film-video { pointer-events: none; }
/* Keep the typing background and the moving follow camera in the same viewport crop. */
.film.enhanced #film-video { object-position: var(--rollout-origin, center); }
.film.limit-portrait-crop:not(.crop-walkthrough, .show-wall) #film-video {
  object-fit: contain;
  transform: scale(var(--follow-scale-x));
  transform-origin: right center;
}
.film.crop-walkthrough :is(#film-video, .film-poster img) {
  object-position: center var(--walk-y);
  transform: scale(var(--walk-zoom));
  transform-origin: center bottom;
}
.walkthrough-labels {
  position: absolute;
  inset: var(--walk-margin) 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: none;
}
.walkthrough-labels img { height: var(--walk-label-height); width: auto; margin-left: var(--walk-margin); }
.rollout-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform-origin: top right;
  pointer-events: none;
}
.rollout-inset { display: block; }
.scroll-cue {
  position: absolute;
  inset: auto 0 max(18px, env(safe-area-inset-bottom)) 0;
  width: max-content;
  min-height: 68px;
  padding-top: 24px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  color: white;
  font: 600 11px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.scroll-cue-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding-inline: 15px;
  background: rgb(20 24 28 / 78%);
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 999px;
}
.scroll-cue:is(:hover, :focus-visible) .scroll-cue-label {
  background: rgb(20 24 28 / 92%);
  border-color: currentColor;
}
.scroll-cue:focus-visible { outline-color: currentColor; border-radius: 999px; }
.scroll-arrow { position: relative; width: 10px; height: 12px; }
.scroll-arrow::before, .scroll-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
}
.scroll-arrow::before { inset-block: 0 1px; border-left: 1.5px solid currentColor; }
.scroll-arrow::after {
  bottom: 1px;
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateX(-45%) rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .film.has-looped .scroll-cue-label { animation: scroll-bounce 1.8s ease-in-out infinite; }
}
@keyframes scroll-bounce {
  0%, 36%, 64%, 100% { transform: translateY(0); }
  18% { transform: translateY(-24px); }
  49% { transform: translateY(-8px); }
}
.film.show-wall #film-video {
  object-fit: fill;
  transform: scale(var(--wall-scale-x, 1), var(--wall-scale-y, 1));
  transform-origin: var(--rollout-origin);
}

.article-layout {
  display: grid;
  grid-template-columns: clamp(160px, 16vw, 194px) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 64px);
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
}
.article-layout > :not(.contents) { grid-column: 2; }
.wrap { width: min(100%, 744px); }
.contents {
  grid-column: 1;
  grid-row: 1 / span 7;
  align-self: start;
  position: sticky;
  top: 32px;
  margin-top: 48px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  color: var(--muted);
}
.contents summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
  list-style: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}
.contents summary::-webkit-details-marker { display: none; }
.contents summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(-45deg);
}
.contents details[open] > summary::after { transform: translateY(-2px) rotate(45deg); }
.contents ol { list-style: none; padding: 0; margin: 8px 0 0 4px; border-inline-start: 1px solid var(--line); }
.contents a { display: flex; gap: .45em; margin-inline-start: -1px; padding: 6px 12px; border-inline-start: 2px solid transparent; font-size: 14px; }
.contents a span { font-variant-numeric: tabular-nums; }
.contents a:hover, .contents summary:hover { color: var(--link); text-decoration: underline; text-underline-offset: .2em; }
.contents a[aria-current="location"] { border-color: var(--link); color: var(--link); font-weight: 650; }
.contents :focus-visible { outline-offset: -3px; }

.overview { padding-block: 48px 36px; container-type: inline-size; }
.overview:focus-visible { outline: none; }
.overview:focus-visible h1 { text-decoration: underline; text-decoration-color: var(--link); text-decoration-thickness: 2px; text-underline-offset: .12em; }
h1, h2, h3 { font-weight: 650; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(32px, 3.2vw, 44px); }
.subtitle {
  display: block;
  margin-top: 8px;
  /* The full subtitle measures 30em in DM Sans at this x-height. */
  font-size: max(1rem, calc(100cqi / 30));
  font-size-adjust: .51;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: 0;
  text-wrap: balance;
}
.credits { margin-top: 20px; }
.authors, .affiliations { display: flex; flex-wrap: wrap; gap: 3px 14px; }
.authors { font-size: 15px; }
.authors a, .paper-link, .footer-inner a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.authors a:hover, .paper-link:hover, .footer-inner a:hover { text-decoration-thickness: 2px; }
.affiliations { margin-top: 5px; font-size: 13px; color: var(--muted); }
.credits sup { color: var(--muted); font-size: .72em; line-height: 0; }
.authors sup { margin-left: 2px; }
.tldr { margin-top: 22px; }
.tldr > strong:first-child { margin-right: .3em; }
.paper-link { display: inline-block; margin-top: 12px; }
.chapter { scroll-margin-top: 18px; padding-block: 32px; }
h2 { font-size: clamp(25px, 2.2vw, 30px); margin-bottom: 14px; }
#spatial-vqa { container-type: inline-size; }
#spatial-vqa-heading {
  /* The full heading measures just over 25.3em in DM Sans. */
  font-size: clamp(25px, min(2.2vw, calc(100cqi / 25.5)), 30px);
}
h3 { font-size: 22px; margin-bottom: 12px; }
.body-copy + .body-copy, .result-panel p + p { margin-top: .85em; }
.chapter figure { margin-top: 24px; scroll-margin-top: 52px; }
.motivation-subtitle { list-style-type: disc; margin: 0; padding-inline-start: 1.25rem; }
.motivation-animation + .motivation-subtitle { margin-top: 24px; }
.chapter figure video { width: 100%; background: white; color-scheme: dark; }
.motivation-animation video { aspect-ratio: auto 16 / 9; }
@media (max-width: 680px) {
  .motivation-animation video { aspect-ratio: auto 2 / 3; }
}
.chapter figcaption, #method-viewer figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }
.figure-caption { width: fit-content; margin-inline: auto; }
#navigation-context-caption .error-bar-marks { display: inline-block; width: 1.7em; margin: 0; vertical-align: -.15em; }
#spatial-decoder { margin-block: 0 24px; }
#approach :is(.body-copy, figure) + h3,
#conclusion .body-copy + h3 { margin-top: 24px; }
.decoder-question { margin: .85em 0; padding-inline-start: .85em; border-inline-start: 2px solid var(--link); }
.decoder-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.decoder-panel-title { margin: 0 0 5px; font-size: 14px; font-weight: 650; }
.decoder-layout video, .decoder-stage { overflow: hidden; border-radius: 6px; }
.decoder-stage { position: relative; aspect-ratio: 8 / 5; background: #e9f1ff; isolation: isolate; }
.decoder-viewport, .decoder-poster, .decoder-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.decoder-poster { object-fit: cover; pointer-events: none; }
.decoder-viewport canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.decoder-viewport canvas:active { cursor: grabbing; }
.decoder-viewport canvas:focus-visible { outline-offset: -3px; }
.decoder-drag-hint {
  position: absolute; z-index: 1; top: 7px; left: 7px;
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px;
  border-radius: 4px; background: rgb(255 255 255 / 94%); color: var(--ink);
  font-size: 11px; font-weight: 650; line-height: 1.3; user-select: none; pointer-events: none;
}
.decoder-drag-hint svg { color: var(--link); }
.decoder-inset { position: absolute; top: 7px; right: 7px; width: max(84px, 28%); border: 2px solid white; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 5px #182f4d3d; pointer-events: none; }
.decoder-inset img { width: 100%; aspect-ratio: 16 / 9; }
.decoder-inset span { position: absolute; bottom: 0; left: 0; padding: 1px 4px; border-radius: 0 3px 0 0; color: white; background: #152438bd; font-size: 10px; line-height: 1.4; }
.decoder-status { position: absolute; bottom: 9px; left: 9px; max-width: calc(100% - 18px); padding: 5px 10px; border-radius: 4px; background: white; line-height: 1.4; font-size: 12px; color: var(--muted); pointer-events: none; }
.decoder-controls { display: flex; align-items: center; gap: 9px; min-height: 38px; }
.decoder-play { display: grid; place-items: center; flex: 0 0 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; color: #3a64b3; }
.decoder-play::before { content: ""; width: 0; height: 0; margin-left: 2px; border-block: 5px solid transparent; border-left: 8px solid currentColor; }
.decoder-play.is-playing::before { width: 7px; height: 10px; margin: 0; border: 0; border-inline: 2px solid currentColor; }
.decoder-range { flex: 1; min-width: 0; margin: 0; height: 28px; cursor: pointer; accent-color: var(--latent); }
.decoder-time { min-width: 3.5em; text-align: right; color: var(--muted); font: 12px/1 var(--mono); }
.decoder-options { display: flex; justify-content: flex-end; font-size: 12px; }
.decoder-reset { padding: 2px 0; border: 0; background: transparent; color: var(--link); font: inherit; }
@media (max-width: 590px) {
  .decoder-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .decoder-layout > :first-child video { max-width: 360px; }
}
@media (pointer: coarse) {
  .decoder-play { flex-basis: 44px; height: 44px; }
  .decoder-range { height: 44px; }
  .decoder-reset { min-height: 44px; }
}
.method-artwork { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.method-artwork img { width: 100%; }
:is(#method-viewer, #rollout-viewer) {
  width: min(1600px, calc(100% - 16px));
  max-width: none;
  max-height: calc(100dvh - 16px);
  margin: auto;
  padding: clamp(8px, 1.25vw, 20px);
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: contain;
}
:is(#method-viewer, #rollout-viewer)::backdrop { background: rgb(21 24 28 / 72%); }
html:has(#method-viewer[open], #rollout-viewer[open]) { overflow: hidden; }
#method-viewer form { display: flex; justify-content: flex-end; margin-bottom: 8px; }
:is(#method-viewer, #rollout-viewer) form button {
  min-height: 44px;
  padding: 4px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--link);
  font-weight: 600;
}
:is(#method-viewer, #rollout-viewer) form button:hover { border-color: currentColor; }
.method-viewer-artwork { overflow-x: auto; }
.method-viewer-artwork img { width: 100%; min-width: 48rem; max-width: none; max-height: calc(100dvh - 124px); object-fit: contain; }
.method-query { margin-bottom: 8px; color: var(--ink); font-size: .8125rem; letter-spacing: -.015em; text-align: center; text-wrap: balance; }
.method-query sub { line-height: 0; }
:is(.query-source, .query-target) sub { font-style: normal; }
.query-point { color: #b33838; }
.query-source { color: #FFA332; }
.query-target { color: #87B572; }
.citations { white-space: nowrap; color: var(--link); }
.cite:hover, .references a:hover, .citation-preview a:hover { text-decoration: underline; text-underline-offset: .18em; }
.citation-box {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f6fa;
}
.citation-tools { float: inline-end; margin-block-start: -4px; margin-inline: 4px -8px; font-size: 13px; }
.citation-tools [role="status"] {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 4px);
  max-width: 60%;
  color: var(--muted);
  line-height: 1.35;
  text-align: end;
}
.citation-tools button {
  display: block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.35;
}
.citation-tools button:hover, .citation-tools button:focus-visible { border-color: var(--link); }
#citation pre {
  margin: 0;
  font: 14px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#citation code { font: inherit; }
.references { margin: 0; padding-inline-start: 2em; font-size: 15px; color: var(--muted); }
.references li { scroll-margin-top: 60px; }
.references li + li { margin-top: 8px; }
.references li:target::marker { color: var(--link); font-weight: 650; }
.citation-preview {
  position: fixed;
  z-index: 3;
  width: max-content;
  max-width: min(24rem, calc(100vw - 16px));
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 6px 22px rgb(48 56 62 / 10%);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
}
.results { min-height: calc(100svh - 76px); }
.result-panel { padding-top: 24px; }
.result-panel h3 { scroll-margin-top: 52px; }
.result-panel figure + .body-copy { margin-top: .85em; }
.results-table {
  width: 100%;
  margin-block: 24px .85em;
  scroll-margin-top: 52px;
  border-collapse: collapse;
  font-size: clamp(13px, 2.3cqi, 16px);
  font-variant-numeric: tabular-nums;
}
.results-table :is(th, td) { padding: .35em 1cqi; border-bottom: 1px solid var(--line); text-align: center; }
.results-table th { font-weight: 550; }
.results-table :is(th[scope="row"], th[rowspan]) { text-align: left; }
.results-table th.sft { width: 16%; border-bottom: 2px solid var(--visual); }
.results-table th.ours { border-bottom: 2px solid var(--latent); }
.results-table colgroup:last-of-type { border-left: 1px solid var(--line); }
#vqa-results tbody:first-of-type, #vqa-results th[scope="rowgroup"] { background: #f3f6fa; }
#vqa-results th[scope="rowgroup"] { font-weight: 650; }
@container (max-width: 355px) {
  #vqa-results :is(th, td) { padding-inline: 1px; }
  #vqa-results th { hyphens: auto; }
}
.vqa-comparison thead th:first-child { text-align: left; }
.vqa-comparison .sft-row th { border-inline-start: 3px solid var(--visual); }
.vqa-comparison .ours-row th { border-inline-start: 3px solid var(--latent); }
#vqa-reasoning-cost .ours-row th { width: 22.5em; text-wrap: balance; }
.token-counts { display: grid; grid-template-columns: 3em .5em 5.5em; column-gap: .25em; justify-content: center; }
.token-counts > :first-child { text-align: right; }
.token-counts > :last-child { text-align: left; }
@container (max-width: 33rem) {
  #vqa-reasoning-cost .token-counts { grid-template-columns: 2.4em .5em 3.6em; }
}
@container (max-width: 17rem) {
  .results-table { table-layout: fixed; }
  .results-table th { overflow-wrap: anywhere; }
  #vqa-results th.sft, #vqa-reasoning-cost .ours-row th { width: auto; }
  #vqa-reasoning-cost thead th:first-child { width: 31%; }
  #vqa-reasoning-cost thead th:nth-child(3) { width: 33%; }
  #vqa-reasoning-cost .token-counts { grid-template-columns: auto auto auto; column-gap: .15em; }
}
.results-table caption { caption-side: bottom; padding-top: 8px; color: var(--muted); font-size: 13px; text-align: left; }
#real-results { container-type: inline-size; scroll-margin-top: 52px; }
.real-analysis-heading { margin-block: 22px 6px; font-size: 19px; }
#navigation-context-results img, #real-world-distance img { margin-inline: auto; }
#navigation-context-results img { width: 100%; }
/* Scale both SVG viewBoxes equally so their labels stay the same size. */
#real-world-distance img { width: calc(100% * 540 / 744); }
#paired-outcomes img { width: 100%; margin-inline: auto; }
@media (max-width: 680px) {
  #navigation-context-results img, #real-world-distance img { width: min(100%, 420px); }
  #paired-outcomes img { max-width: 420px; }
}
.rollout-gallery { margin-top: 24px; scroll-margin-top: 60px; }
.rollout-gallery > figure { margin-bottom: 14px; }
.rollout-area { border-top: 1px solid var(--line); }
.rollout-area:last-of-type { border-bottom: 1px solid var(--line); }
.rollout-area summary { padding: 10px 4px; }
.rollout-area summary span { float: right; font-size: 14px; color: var(--muted); }
.rollout-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 16px 20px; padding-block: 4px 16px; }
.rollout-goal h5 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.rollout-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rollout-card a { display: block; font-size: 13px; }
.rollout-primary { color: var(--muted); }
.rollout-primary:hover { color: var(--link); }
[data-outcome="Success"] { --outcome-color: var(--outcome-success); }
[data-outcome="Stopped short"], [data-outcome="Wrong stop"] { --outcome-color: var(--outcome-failure); }
.rollout-outcome { color: var(--outcome-color); }
.rollout-still { display: block; position: relative; margin-bottom: 3px; border-radius: 4px; overflow: hidden; background: #edf0f2; }
.rollout-still img { width: 100%; }
.rollout-still::after {
  content: "▶";
  position: absolute;
  inset: auto auto 5px 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  background: rgb(20 24 28 / 75%);
  font: 12px/1 var(--sans);
}
.rollout-gallery.enhanced .rollout-baseline { display: none; }
#rollout-viewer { width: min(960px, calc(100% - 24px)); }
#rollout-viewer header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#rollout-viewer h4 { font-size: clamp(16px, 2vw, 20px); line-height: 1.3; }
.rollout-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-block: 10px; }
.rollout-speed-control { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.rollout-controls select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: white; font: inherit; }
.rollout-policies { display: flex; gap: 6px; }
.rollout-policies button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 4px; background: white; font-size: 14px; }
.rollout-policies [aria-pressed="true"] { border-color: var(--latent); background: #edf3ff; font-weight: 650; }
.rollout-policies [data-policy="sft"][aria-pressed="true"] { border-color: var(--visual); background: #fff1df; }
#rollout-viewer video { width: 100%; aspect-ratio: 16 / 9; max-height: 66dvh; background: #15181c; }
#rollout-viewer-status { margin-top: 8px; text-align: center; font-size: 14px; font-weight: 650; }
.footer-inner { margin-inline: auto; padding-block: 24px 36px; text-align: center; font-size: 14px; }
@media (max-width: 900px) {
  .article-layout { display: block; width: 100%; }
  .wrap { width: min(744px, calc(100% - 40px)); margin-inline: auto; }
  .contents {
    position: static;
    margin: 0;
    max-height: none;
    padding: 6px 4%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .contents.enhanced { position: sticky; top: 0; z-index: 2; max-height: 60dvh; }
  .contents summary { padding: 7px 0; }
  .contents ol { display: flex; flex-wrap: wrap; column-gap: 16px; margin: 0; border: 0; }
  .contents a { margin: 0; padding: 6px 0; border: 0; border-bottom: 2px solid transparent; }
  .article-layout > section { scroll-margin-top: 52px; }
}
@media (max-width: 760px) {
  .authors { gap: 3px 12px; }
  .affiliations { gap: 3px 12px; font-size: 12px; }
  .chapter { padding-block: 26px; }
  .overview { padding-block: 32px 24px; }
}
@media (max-width: 440px) {
  .wrap { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (prefers-contrast: more) {
  :root { --link: #345ab0; }
}
