@font-face { font-family: Archivo; src: url('../fonts/archivo-regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url('../fonts/archivo-medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Archivo; src: url('../fonts/archivo-bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
/* VETO project page. Tokens follow the spec (3.1); method colors are sampled from the paper's figures. */
:root {
  --paper: #ffffff;
  --ink: #141414;
  --ink-2: #555555;
  --rule: #dcdcdc;
  --veto: #0e7e33;
  --red: #b52e39;
  --red-on-dark: #f06d75;
  --wash: #f7f7f5;
  --logo: Archivo, "Helvetica Neue", Arial, sans-serif;
  --qtd: #a6aaac;
  --qtd-text: #6b7073;
  --qbon: #686868;
  --hret: #565d61;
  --rseq: #868d91;
  --rseq-text: #6e7579;
  --tmrl: #7a5c42;
  --dsrl: #cda780;
  --dsrl-text: #8a6a3e;
  --newt: #8064a2;
  --fowm: #315c9a;
  --dyna: #2fd4e2;
  --dyna-text: #137780;
  --base: #b0b0b0;
  --cand: #85939e;
  --unguided: #565d61;
  --warmup: #777777;
  --veto-2: #408a58;
  --veto-2-text: #3a7c4f;
  --veto-3: #71977e;
  --veto-3-text: #577762;
  --k16: #a3a3a3;
  --k16-text: #707070;
  --veto-q: #46a35b;
  --veto-q-text: #367e46;
  --veto-r: #075a25;
  --goal: #e3b63f;
  --maze: #e9e8e2;
  --body: Archivo, Arial, sans-serif;
  --mono: 'Inconsolata', ui-monospace, Menlo, Consolas, monospace;
  --col: 720px;
  --wide: 1280px;
  --nav-height: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-padding-top: var(--nav-height); }
body { margin: 0; background: var(--paper); font-family: var(--body); font-size: 17px; line-height: 1.6; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
img, video, svg { max-width: 100%; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--veto); outline-offset: 3px; }
button { font: 600 15px/1.2 var(--mono); color: inherit; background: transparent; border: 1px solid currentColor; padding: 4px 12px; cursor: pointer; }

.m { font-family: var(--mono); font-weight: 700; font-size: 1.04em; }
.m.veto { color: var(--veto); }
.m.qtd { color: var(--qtd-text); }
.m.qbon { color: var(--qbon); }
.m.tmrl { color: var(--tmrl); }
.m.dsrl { color: var(--dsrl-text); }
.m.dyna { color: var(--dyna-text); }

.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 12px; z-index: 100; background: var(--paper); padding: 6px 10px; }

main { display: block; min-width: 0; }
.section { max-width: var(--wide); min-height: calc(100svh - var(--nav-height)); min-height: calc(100dvh - var(--nav-height)); margin: 0 auto; padding: clamp(28px, 4vh, 48px) 20px 64px; scroll-margin-top: 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section > h2, .section > h3, .section > p, .section > .eq, .section > .caption { max-width: var(--col); margin-left: auto; margin-right: auto; }
.section > h2:first-child { margin-top: 0; }
/* Vertical settling is deliberately narrow and waits for scroll idle (toc.js). */
h2 { font-size: clamp(30px, 3.1vw, 46px); line-height: 1.12; font-weight: 500; letter-spacing: -0.042em; margin-top: 0; margin-bottom: 22px; text-wrap: balance; }
h3 { font-size: 23px; line-height: 1.3; font-weight: 500; letter-spacing: -0.025em; margin-top: 48px; margin-bottom: 12px; }
p { margin-top: 0; margin-bottom: 18px; }
.caption, figcaption { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.links { font-family: var(--mono); font-weight: 600; }

.paper-fig { margin: 36px auto; }
.paper-fig img { display: block; width: 100%; height: auto; }
.paper-fig figcaption { max-width: var(--col); margin: 12px auto 0; }
.paper-fig.narrow { max-width: 560px; }

.eq { margin-top: 20px; margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
@media (max-width: 600px) { .eq { font-size: 14px; } }
.eq.eq-fallback { font-size: 15px; color: var(--ink-2); }


/* First screen */
.hero { position: relative; height: 100svh; min-height: 720px; overflow: hidden; background: #242a29; color: #fff; }
/* Enlarge from the left edge: the robot moves right without exposing the page behind the video. */
.hero-stage { position: absolute; inset: 0 -20% 0 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Shade only behind the text (top left) and the footer, so the robot shows at full brightness. */
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
  radial-gradient(ellipse 64% 74% at 0 0, rgba(8, 14, 13, .74), rgba(8, 14, 13, .44) 46%, rgba(8, 14, 13, .12) 78%, transparent 100%),
  linear-gradient(0deg, rgba(8, 14, 13, .62), transparent 16%); }
/* Larger and further in from the edge. */
.hero-text { position: absolute; z-index: 2; left: clamp(28px, 7vw, 128px); top: clamp(24px, 5.5vh, 72px); width: max-content; max-width: min(1000px, 88vw); isolation: isolate; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
/* The wordmark's O is drawn so the veto cut can pass through it; the hidden O keeps the name readable. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Logo: "VET" in Archivo, white over the video and ink on light grounds, so VETO green stays a marker in
   the text and charts. The O is round, in the letters' color and Archivo's stroke weight, cut by a red "/" bar with a
   gap either side that shows the ground through; the bar is a lighter red over the dark video. The box, the -.026em
   T-O kern and the drop put it where Archivo's own O would be. */
.veto-o { display: inline-block; width: .793em; height: .8em; margin-left: -.026em; vertical-align: -.05em; overflow: visible; }
.veto-o .ring { fill: currentColor; }
.veto-o .cut { fill: var(--red); }
.hero .veto-o { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.hero .veto-o .cut { fill: var(--red-on-dark); }
.wordmark { font-family: var(--logo); font-weight: 700; font-size: clamp(80px, min(11.5vw, 16vh), 172px); line-height: .9; letter-spacing: -0.075em; margin: 0 0 clamp(10px, 2vh, 20px); color: #fff; }
.hero .title { font-size: clamp(25px, 2.1vw, 34px); line-height: 1.22; font-weight: 400; letter-spacing: -0.025em; margin: 0 0 23px; color: #fff; max-width: clamp(455px, 36vw, 580px); }
.authors { font-size: 14px; line-height: 1.85; margin: 0; color: #e8eeeb; max-width: 455px; }
.hero .authors { font-size: clamp(14px, 1.15vw, 18px); max-width: clamp(455px, 48vw, 800px); }
.hero .affils { margin: 10px 0 0; max-width: clamp(455px, 48vw, 800px); font-size: clamp(11px, .9vw, 14px); line-height: 1.6; color: #cbd3ce; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: clamp(14px, 2.4vh, 26px) 0 0; }
.hero-paper { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 11px 16px; background: #fff; color: var(--ink); font: 600 clamp(15px, 1.1vw, 17px)/1.2 var(--mono); text-decoration: none; text-shadow: none; }
.hero-paper:hover { background: var(--wash); }
.hero-code-soon, .hero-code-soon:hover { background: rgba(8, 14, 13, .62); color: #e1e5e3; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.hero-paper:focus-visible { outline-color: #fff; outline-offset: 4px; }
.hero .affils { width: min(clamp(455px, 48vw, 800px), 100%); }
.affiliations-row { display: block; white-space: nowrap; font-size: 8px; }
.affils .note { display: block; margin-top: 4px; }
.affils .note sub { font-size: .8em; }
.authors a { text-decoration-color: rgba(232, 238, 235, .4); }
.hero-foot { position: absolute; z-index: 2; left: clamp(20px, 4.5vw, 64px); right: clamp(20px, 4.5vw, 64px); bottom: 16px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; font-family: var(--mono); font-size: 14px; }
.hero-foot p { margin: 0; }
.hero-foot .pause { padding: 2px 10px; font-size: 13px; color: #fff; }
.hero.no-overlay .counts, .hero.no-overlay .provenance { display: none; }
.provenance { margin-left: auto !important; max-width: 34em; text-align: right; color: #fff; }
/* Linework over the footage, sized by hero.js against the video: every stroke has a dark edge, so it reads on the
   dark backdrop and on the pale table alike. */
.overlay .ol, .overlay .arcl { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.overlay .ol { stroke: #0d1413; opacity: .8; }
.overlay .dot { fill: #edf0f2; stroke: #222b2e; opacity: 0; }
.overlay .tip { fill: #b8f8d1; stroke: #17503b; }
.overlay .org { fill: #f3f2ed; stroke: #173a2c; opacity: 0; }
.overlay .sel { fill: none; stroke: #dcffe9; opacity: 0; }
.overlay .burst { fill: none; stroke: #f0545c; opacity: 0; }
@media (max-aspect-ratio: 1/1) {
  .hero { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  .hero::after { display: none; }
  .hero-text { position: relative; left: auto; top: auto; width: 100%; min-width: 0; max-width: none; padding: 20px 20px 16px; order: 1; }
  .provenance { max-width: none; }
  .hero-stage { position: relative; inset: auto; transform: none; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%); mask-image: linear-gradient(to bottom, transparent, #000 28%); aspect-ratio: 16 / 9; width: 100%; order: 2; }
  .hero-foot { position: relative; left: auto; right: auto; bottom: auto; padding: 14px 20px 20px; order: 3; }
  .provenance { margin-left: 0 !important; text-align: left; }
}
@media (max-width: 720px) {
  .hero .title { font-size: clamp(18px, 5.1vw, 20px); max-width: 490px; margin-bottom: 15px; }
  .hero .authors { font-size: 12px; line-height: 1.75; max-width: 490px; }
  .hero .affils { font-size: 10px; margin-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .overlay * { transition: none; }
}

/* Credit-assignment lag: recorded episodes replayed in two maze panels beside a count of repeated failures; the
   tallies are HTML so they stay readable at any width. */
.why { margin: 28px 0 0; }
.why-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 28px; }
.why-panel { display: grid; gap: 8px; align-content: start; --side: var(--ink); }
.why-panel[data-side="qtd"] { --side: var(--qtd-text); }
.why-panel[data-side="veto"] { --side: var(--veto); }
.why-panel h3 { margin: 0; font: 700 18px/1.3 var(--mono); color: var(--side); }
.why-scene { display: block; width: 100%; height: auto; border-radius: var(--radius-control, 4px); }
.why-scene .maze { fill: var(--maze); }
.why-scene .start { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.why-scene .goal { fill: var(--goal); stroke: #8a6a1a; stroke-width: 1; }
.why-scene .trace { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .13; }
.why-scene .live { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.why-scene .hit { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }
.why-scene .traces .hit { stroke-width: 1.8; opacity: .5; }
.why-tally { margin: 0; font: 600 15px/1.3 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.why-tally b { color: var(--side); }
.why-chart .series { --c: var(--veto); }
.why-chart .series[data-side="qtd"] { --c: var(--qtd); }
.why figcaption { max-width: var(--col); margin: 16px auto 0; }
.why + p { margin-top: 28px; }
.why-failed .why { display: none; }
@media (max-width: 760px) { .why-panels { grid-template-columns: minmax(0, 1fr); } }

/* Quiet side contents, revealed after the landing section. */
.page-layout { width: 100%; padding-left: 210px; }
.toc { position: fixed; top: 64px; left: 24px; width: 166px; max-height: calc(100dvh - 96px); overflow-y: auto; z-index: 20; font: 14px/1.4 var(--mono); background: var(--paper); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
.toc.is-visible { visibility: visible; opacity: 1; pointer-events: auto; }
.toc { color: var(--ink); transition: opacity 160ms ease, background-color 360ms ease, color 360ms ease, border-color 360ms ease; }
.toc.is-dark { --paper: #131817; --ink: #eceeea; --ink-2: #a8afab; --rule: #313735; --veto: #5cc27f; }
.toc-link, .toc-paper, .toc-brand { transition: color 360ms ease, border-color 360ms ease; }
@media (prefers-reduced-motion: reduce) { .toc-link, .toc-paper, .toc-brand { transition: none; } }

@media (prefers-reduced-motion: reduce) { .toc { transition: none; } }
.toc-brand { display: inline-block; margin-bottom: 24px; font: 700 24px/.9 var(--logo); letter-spacing: -.075em; text-decoration: none; }
.toc summary { display: none; cursor: pointer; font-weight: 600; }
.toc-links { list-style: none; margin: 0; padding: 0; }
.toc-links li { margin: 0; }
.toc-link { display: block; padding: 8px 12px; border-left: 2px solid var(--rule); color: var(--ink-2); text-decoration: none; }
.toc-link:hover { color: var(--ink); border-left-color: var(--ink-2); }
.toc-link[aria-current="location"] { color: var(--veto); border-left-color: var(--veto); font-weight: 700; }
.toc-paper { display: block; border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 20px; color: var(--ink-2); }
@media (max-width: 1279px) {
  .page-layout { padding-left: 0; }
  .toc { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); left: max(16px, env(safe-area-inset-left)); width: auto; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border: 1px solid var(--rule); box-shadow: 0 4px 20px #00000014; }
  .toc-brand { display: none; }
  .toc summary { display: list-item; padding: 12px 18px; }
  .toc-body { width: 230px; padding: 0 16px 8px; }
  .toc-link { padding-top: 10px; padding-bottom: 10px; }
  .toc-paper { display: none; }
  .toc:has(details[open]) .toc-paper { display: block; margin: 0 16px 16px; }
}

/* Citation */
#cite { padding-bottom: 64px; }
.bib { position: relative; max-width: var(--col); margin: 0 auto; }
.bib pre { margin: 0; font: 14px/1.55 var(--mono); border: 1px solid var(--rule); padding: 16px 18px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: break-word; }
.bib button { position: absolute; top: 10px; right: 10px; background: var(--paper); }

/* Charts */
.chart { display: block; width: 100%; height: auto; font-family: var(--mono); }
.chart .grid { stroke: var(--grid, #ececec); }
.chart .baseline, .chart .tickmark { stroke: var(--ink); }
.chart .tick { font-size: 13px; fill: var(--ink-2); }
.chart .axis-label { font-size: 13px; fill: var(--ink); }
.chart .series .line { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linejoin: round; }
.chart .series .band { fill: var(--c); opacity: .14; stroke: none; }
.chart .series .whisker { stroke: var(--c); stroke-width: 1.4; opacity: .55; }
.chart .series .pt { fill: var(--paper); stroke: var(--c); stroke-width: 1.6; }
.chart .end-label { font-size: 13px; font-weight: 700; fill: var(--c); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.chart .chart-title { font-size: 14px; font-weight: 700; fill: var(--ink); }
.chart .region { fill: var(--ink); opacity: .045; }
.chart .region-label { font-size: 12px; fill: var(--ink-2); }
.chart .counter { font-size: 13px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .callout .bracket { fill: none; stroke: var(--veto); stroke-width: 1.2; }
.chart .callout-label { font-size: 13px; font-weight: 700; fill: var(--veto); font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.chart .s-qtd .end-label { fill: var(--qtd-text); }
.chart .s-rewardseq .end-label { fill: var(--rseq-text); }
.chart .s-dsrl .end-label { fill: var(--dsrl-text); }
.chart .s-k4 .end-label { fill: var(--veto-2-text); }
.chart .s-k8 .end-label { fill: var(--veto-3-text); }
.chart .s-k16 .end-label { fill: var(--k16-text); }
.chart .s-q_ranking .end-label { fill: var(--veto-q-text); }
.chart .ref { stroke: var(--ink-2); stroke-width: 1.6; stroke-dasharray: 1 4; stroke-linecap: round; }
.chart .ref-label { font-size: 12px; fill: var(--ink-2); }
.chart .marker line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker text { font-size: 12px; fill: var(--ink); }
.replay { margin-left: 8px; font-size: 13px; padding: 2px 10px; }
/* Animated paper figures: panels in a grid; the paper's image only if the data fails. */
.afig { margin: 24px auto; max-width: var(--wide); }
.afig-panels { display: grid; gap: 20px 32px; }
.afig-panels.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.afig-panels.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.afig figcaption { max-width: var(--col); margin: 12px auto 0; }
.afig.narrow { max-width: 640px; }
.section.wide { max-width: 1440px; }
.afig.full { max-width: none; }
.afig-panels.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 20px; }
@media (max-width: 1279px) {
  .afig.full { max-width: var(--wide); }
  .afig-panels.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
}
@media (max-width: 999px) { .afig-panels.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.afig-rows { display: grid; gap: 28px; }
.afig-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px 28px; align-items: center; }
.afig-photo { width: 100%; height: auto; border-radius: 8px; }
.afig-key { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-family: var(--mono); font-size: 14px; }
.afig-key li { display: flex; align-items: center; gap: 6px; }
.afig-key svg { width: 34px; height: 12px; overflow: visible; }
.afig-key line { stroke: var(--c); stroke-width: 2.2; }
.afig-key :is(rect, circle, path) { fill: var(--paper); stroke: var(--c); stroke-width: 1.6; }
.afig-fallback { display: none; width: 100%; height: auto; }
.figs-failed .afig-fallback { display: block; }
.figs-failed .afig-panels, .figs-failed .afig-rows, .figs-failed .afig-key, .figs-failed .afig .replay { display: none; }

@media (max-width: 1000px) { .afig-panels.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .afig-panels.cols-2, .afig-panels.cols-3, .afig-panels.cols-5, .afig-row { grid-template-columns: 1fr; }
  .afig-photo { max-width: 320px; }
}

/* Method animation, drawn by method.js. The wide drawing needs 880 px to keep its labels at 11 px or more,
   so below 920 px a tall drawing of the same parts replaces it. */
#method { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 16px; max-width: var(--wide); height: calc(100svh - var(--nav-height)); height: calc(100dvh - var(--nav-height)); min-height: 680px; padding-bottom: 32px; }
#method > h2 { width: 100%; margin-bottom: 0; }
.method-anim { display: flex; align-items: center; justify-content: center; min-height: 0; width: 100%; margin: 0; }
.mfig { display: block; width: 100%; height: 100%; font-family: var(--mono); }
.mfig-tall { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 919px) {
  #method { min-height: calc(100svh - var(--nav-height)); min-height: calc(100dvh - var(--nav-height)); height: auto; grid-template-rows: auto auto auto auto; align-content: start; }
  .method-anim { min-height: 0; height: auto; max-width: 420px; aspect-ratio: 3 / 5; margin-inline: auto; }
  #method > .method-steps { grid-row: 2; }
  .method-anim { grid-row: 3; }
  .method-step, .method-pause { min-height: 44px; }
  .mfig-wide { display: none; }
  .mfig-tall { display: block; }
}
.mfig .lab { font-size: 15px; font-weight: 400; fill: var(--ink); }
.mfig .note { font-size: 14px; fill: var(--ink-2); }
.mfig .training-label { font-size: 14px; font-weight: 400; letter-spacing: 0; }
.mfig .tiny { font-size: 12.5px; fill: var(--ink-2); }
.mfig .learner { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.mfig .frame { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.mfig .flow { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.mfig .latent-space { fill: #eff5f0; }
.mfig .latent-grid { stroke: #809b86; stroke-width: .6; opacity: .13; }
.mfig .score-link { fill: none; stroke: var(--ink-2); stroke-width: .8; }
.mfig .score-bar { fill: #6e7c86; }
.mfig .latent-label { font-size: 12.5px; font-weight: 400; fill: var(--veto); }
.mfig .chain, .mfig .rollout-guide { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.mfig .zdot, .mfig .z-origin { fill: var(--ink); }
.mfig .rollout-tip { fill: var(--ink); }
.mfig .tick, .mfig .seg { fill: #6e7c86; }
.mfig .seg.kept { fill: var(--veto); }
.mfig .seg.vetoed { fill: none; stroke: var(--cand); stroke-width: 1; stroke-dasharray: 2 2; }
.mfig .bracket { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.mfig .pickbox { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.mfig .sel, .mfig .tok { fill: var(--veto); }
.mfig .gauge { fill: none; stroke: var(--rule); stroke-width: 7; }
.mfig .gauge-on { fill: none; stroke: var(--veto); stroke-width: 7; }
.mfig .needle { stroke: var(--ink); stroke-width: 2; }
.mfig .buf { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.mfig .buf-in { fill: none; stroke: var(--ink); stroke-width: 1; }
.mfig .lane-wm { fill: none; stroke: var(--veto); stroke-width: 1.6; stroke-dasharray: 8 5; }
.mfig .lane-rl { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 3 4; }
.mfig .tok-frame { fill: var(--ink-2); }
.mfig .tok-r { fill: var(--paper); stroke: var(--veto); stroke-width: 1.6; }
.mfig .tok-rt { font-size: 12px; font-weight: 700; fill: var(--veto); }
.method-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 6px; align-items: end; margin-top: 0; }
.method-step { border: 0; padding: 6px 0 0; text-align: left; font: 400 14px/1.3 var(--mono); color: var(--ink-2); }
.method-step[aria-current="step"] { color: var(--ink); font-weight: 700; }
.method-step .prog { display: block; height: 3px; margin-top: 6px; background: var(--rule); position: relative; overflow: hidden; }
.method-step .prog i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); }
.method-pause { margin-left: 10px; font-size: 14px; }
.section > .method-caption { width: 100%; margin-top: 0; margin-bottom: 0; min-height: 4.86em; }
@media (max-width: 600px) {
  #method { gap: 14px; }
  .method-steps { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
  .method-pause { grid-column: 4; grid-row: 1 / span 2; align-self: center; margin-left: 6px; }
  .section > .method-caption { min-height: 9em; font-size: 16px; line-height: 1.5; }
}

@media (min-width: 920px) and (max-height: 760px) {
  #method { min-height: 560px; }
}

/* Real robots */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 960px; margin: 20px auto 8px; }
.pair figure { margin: 0; }
.pair video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0b0d12; }
.pair figcaption { margin-top: 6px; font-family: var(--mono); font-size: 15px; color: var(--ink); }
.section > .pair-controls { max-width: 960px; text-align: right; margin-bottom: 0; }
/* Pair each task's plot with its recordings, without narrowing the article around a sidebar. */
.robot-experiment { margin-top: 32px; }
.robot-experiment + .robot-experiment { border-top: 1px solid var(--rule); padding-top: 28px; }
.robot-experiment > h3 { margin: 0 0 10px; }
.robot-experiment > p { max-width: 900px; font-size: 17px; margin-bottom: 20px; }
.robot-result-row { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.robot-chart.afig { width: 100%; min-width: 0; margin: 0; }
.robot-recordings { min-width: 0; }
.robot-recordings .pair, .robot-recordings .episodes { margin: 0; max-width: none; }
.robot-recordings .pair-controls { text-align: right; margin: 8px 0 0; }
.media-shot { position: relative; }
.media-shot:has(video[hidden]) { display: none; }
.video-open { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; }
.video-open span, .clip-expand { position: absolute; bottom: 8px; right: 8px; display: grid; place-items: center; width: 30px; height: 30px; background: #ffffffed; color: var(--ink); font: 20px/1 var(--mono); }
.video-open:hover span, .video-open:focus-visible span { color: var(--veto); background: white; }
@media (max-width: 1000px) {
  .robot-result-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .robot-chart.afig { max-width: 600px; }
}


@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr; }
}

/* Recovery: synchronized camera insets are composed into the video, with quiet labels below the footage. */
.recovery-shot { position: relative; }
.recovery-camera { position: absolute; left: 3%; top: 4%; padding: 1px 4px; background: #0008; color: #fff; font: 12px/1.3 var(--mono); pointer-events: none; }
#recovery figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.recovery-status { display: grid; text-align: right; color: var(--ink-2); }
.recovery-status > span { grid-area: 1 / 1; opacity: 0; transition: opacity 240ms ease; }
#recovery:not([data-phase="observe"]) .recovery-bon [data-state="stuck"],
#recovery[data-phase="stuck"] .recovery-veto [data-state="stuck"],
#recovery[data-phase="recovering"] [data-state="recovering"],
#recovery[data-phase="recovered"] [data-state="recovered"] { opacity: 1; }
.recovery-veto [data-state="recovered"] { color: var(--veto); }
.recovery-controls { display: flex; align-items: baseline; gap: 14px; max-width: 960px; margin: 12px auto 0; font-size: 15px; }
.recovery-caption { flex: 1; margin: 0; min-height: 3.2em; max-width: 42em; }
.recovery-controls .episodes-speed { white-space: nowrap; }
.recovery-play { min-width: 76px; }
@media (max-width: 600px) {
  .recovery-controls { flex-wrap: wrap; }
  .recovery-caption { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .recovery-status > span { transition: none; } }

/* Shaded grounds: full-width bands for Method and Robots, flat panels for the two diagram blocks. */
.section.band { border-image: linear-gradient(var(--wash) 0 0) fill 0 / 0 / 0 100vmax; }
.shaded { background: var(--wash); padding: clamp(16px, 3vw, 32px); }

/* One demonstration per online RL task, matching Fig. 7's widths, gaps and order. */
.tasks { max-width: none; margin: 20px auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 28px; }
#fig-7 { margin-top: 20px; }
.tasks .tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.task-tile { position: relative; margin: 0; min-width: 0; }
.task-tile:has(.is-active) { z-index: 2; }
.task-preview { position: relative; aspect-ratio: 1; transform-origin: center bottom; transition: transform .22s ease, box-shadow .22s ease; }
.task-tile video, .task-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #0b0d12; }
.task-preview .task-poster { position: absolute; inset: 0; pointer-events: none; }
.task-preview.has-frame .task-poster { opacity: 0; }
.task-control { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.task-control:focus-visible { outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .task-preview.is-active { transform: scale(1.06); box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
}
@media (prefers-reduced-motion: reduce) { .task-preview { transition: none; } }
.task-tile figcaption { margin-top: 6px; font-size: 15px; line-height: 1.35; }
.task-tile .name { display: block; font-weight: 600; }
.task-tile .kind { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
@media (max-width: 1279px) {
  .tasks { max-width: var(--wide); }
  .tasks .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
}
@media (max-width: 999px) { .tasks .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .tasks .tiles { grid-template-columns: 1fr; } }

/* DROID episodes: three runs side by side at the same episode number, in the order collected;
   the episode number is the figure's title, big enough to follow while it plays. */
.episodes { margin: 20px 0 24px; }
.episodes-controls { display: grid; grid-template-columns: auto 3ch minmax(120px, 1fr) auto; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.episodes-controls label { font: 600 20px/1.2 var(--body); color: var(--ink); }
.episodes-readout { font: 700 28px/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.episodes-controls input { width: 100%; margin: 0; min-height: 24px; accent-color: var(--veto); }
.episodes-buttons { display: flex; align-items: center; gap: 12px; }
.episodes-buttons button { min-width: 72px; min-height: 40px; }
.episodes-speed { font: 14px var(--mono); color: var(--ink-2); }
.episodes-runs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.episodes-run { display: grid; gap: 6px; align-content: start; }
.episodes-run h4 { margin: 0; font: 700 15px/1.3 var(--mono); }
.episodes-run video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0b0d12; }
.episodes-run video[hidden] { display: none; }
.episodes-missing { margin: 0; display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 12px; background: var(--paper); border: 1px dashed var(--rule); font: 14px/1.4 var(--mono); color: var(--ink-2); text-align: center; }
.episodes-missing[hidden] { display: none; }
.episodes figcaption { max-width: var(--col); margin: 10px auto 0; }
.episodes-failed .episodes { display: none; }
@media (max-width: 760px) { .episodes-runs { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .episodes-controls { grid-template-columns: auto 1fr auto; }
  .episodes-controls input { grid-column: 1 / -1; grid-row: 2; }
  .episodes-buttons { grid-column: 3; grid-row: 1; }
}

/* Real-world learning: matched method views above a shared training timeline. */
.learning-comparison { margin: 32px 0 0; }
.learning-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.learning-method h3 { margin: 0 0 12px; font: 600 18px/1.3 var(--body); }
.learning-recording { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--wash); border: 1px dashed var(--rule); color: var(--ink-2); font: 14px/1.4 var(--body); }
.learning-timeline { margin-top: 28px; }
.learning-timeline p { margin: 0 0 18px; font: 600 15px/1.4 var(--body); }
.learning-checkpoints { display: flex; justify-content: space-between; gap: 16px; position: relative; list-style: none; padding: 0; margin: 0; color: var(--ink-2); font: 14px/1.4 var(--body); }
.learning-checkpoints::before { content: ''; position: absolute; top: 4px; left: 5px; right: 5px; height: 1px; background: var(--rule); }
.learning-checkpoints li { position: relative; padding-top: 20px; flex: 1; }
.learning-checkpoints li::before { content: ''; position: absolute; top: 0; left: 0; width: 9px; height: 9px; border: 1px solid var(--ink-2); border-radius: 50%; background: var(--paper); }
.learning-checkpoints li:nth-child(2) { text-align: center; }
.learning-checkpoints li:nth-child(2)::before { left: calc(50% - 4px); }
.learning-checkpoints li:last-child { text-align: right; }
.learning-checkpoints li:last-child::before { left: auto; right: 0; }
.learning-comparison figcaption { margin: 28px 0 0; max-width: 72ch; color: var(--ink-2); font: 14px/1.6 var(--body); }
.learning-comparison figcaption strong { font-weight: 500; color: var(--ink); }
@media (max-width: 680px) {
  .learning-methods { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .learning-checkpoints { gap: 8px; font-size: 12px; }
}

.video-dialog { width: min(1120px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); }
.video-dialog::backdrop { background: #080b10d9; }
.video-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.video-dialog h2 { margin: 0; font-size: clamp(18px, 2.4vw, 26px); line-height: 1.3; }
.video-close { flex: none; min-height: 36px; }
.video-dialog video { display: block; width: 100%; max-height: calc(100dvh - 200px); background: #0b0d12; }
.video-dialog-note { font: 14px/1.4 var(--mono); color: var(--ink-2); margin: 12px 0 0; }
html:has(.video-dialog[open]), body:has(.video-dialog[open]) { overflow: hidden; }
@media (max-width: 600px) { .video-dialog { width: calc(100vw - 20px); padding: 12px; } }

/* Give introductory copy breathing room before the visual it introduces. */
.section p + :is(figure, .pair, .robot-result-row, img, video) {
  margin-top: clamp(32px, 4vw, 48px);
}

.veto-glyph .veto-ring { fill: var(--ink); stroke: none; }
.veto-glyph .veto-cut { fill: var(--red); stroke: none; }
.overlay .veto-glyph .veto-ring { fill: #fff; stroke: #121818; stroke-width: 11; stroke-linejoin: round; paint-order: stroke fill; }
.overlay .veto-glyph .veto-cut { fill: #ee545d; stroke: #360f13; stroke-width: 9; stroke-linejoin: round; paint-order: stroke fill; }

.mfig .distillation-funnel { fill: #f1f3f1; stroke: var(--ink-2); stroke-width: 1.2; stroke-linejoin: round; }
.mfig .pretrain-token { fill: #7c8d83; }



.toc-code { display: block; margin-top: 12px; color: var(--ink-2); transition: color 360ms ease; }
@media (max-width: 1279px) { .toc-code { display: none; } .toc:has(details[open]) .toc-code { display: block; margin: 0 16px 16px; } }
@media (prefers-reduced-motion: reduce) { .toc-code { transition: none; } }

/* Desktop contents have no backing panel: contrast follows the page per pixel,
   so a section boundary can pass through the text without a rectangular flash. */
@media (min-width: 1280px) {
  .toc, .toc.is-dark { background: transparent; mix-blend-mode: difference; --ink: #ffffff; --ink-2: #bbbbbb; --rule: #777777; --veto: #ffffff; color: var(--ink); }
  .toc-link, .toc-paper, .toc-brand, .toc-code { transition: none; }
  /* Compensate for difference blending: the visible slash remains coral/red. */
  .toc .veto-o .cut { fill: #4ad1c6; }
  .toc.is-logo-dark .veto-o .cut { fill: #ff858c; }
  .toc-link[aria-current="location"] { border-left-width: 3px; padding-left: 11px; }
}

/* The end card: the page
   ends the way it opens, the wordmark over the run's footage on dark. Once on arrival, the run's last 5 s play while
   VET rises, the ring turns in, and the cut slices the O as the arm lifts away from the zipped case (closer.js). The
   footage sits right of the words: the arms and the case span 26% to 65% of the frame. */
.closer { position: relative; height: 400px; margin: 40px 0 0; overflow: hidden; background: #101118; color: #fff; }
.closer-video { position: absolute; left: 28.44%; bottom: 0; width: 106%; max-width: none; height: auto; aspect-ratio: 16 / 9; }
.closer::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, #101118 0, #101118 28.44%, rgba(16, 17, 24, .55) calc(28.44% + 150px), rgba(16, 17, 24, 0) calc(28.44% + 270px)); }
.closer-copy { position: absolute; z-index: 1; left: 44px; top: 50%; transform: translateY(-50%); }
.closer-word { margin: 0; font: 700 104px/.9 var(--logo); letter-spacing: -0.075em; white-space: nowrap; }
.closer-vet { display: inline-block; }
.closer .veto-o { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.closer .veto-o .ring { transform-box: fill-box; transform-origin: 50% 50%; }
/* the cut grows along its own diagonal from its lower end */
.closer .veto-o .cut { fill: var(--red-on-dark); transform-box: fill-box; transform-origin: 6.84% 93.16%; }
.closer-title { margin: 18px 0 0; max-width: 330px; font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; }
.closer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.closer.is-armed :is(.closer-vet, .closer-title, .closer-actions, .ring) { opacity: 0; }
.closer.is-armed .cut { transform: rotate(-45deg) scaleX(.001) rotate(45deg); }
.closer.is-playing .closer-vet { animation: closer-rise .45s cubic-bezier(.33, 1, .68, 1) .25s both; }
.closer.is-playing .ring { animation: closer-ring .55s cubic-bezier(.33, 1, .68, 1) .55s both; }
.closer.is-playing .cut { animation: closer-cut .22s cubic-bezier(.33, 1, .68, 1) 1.3s both; }
.closer.is-playing .closer-title { animation: closer-settle .5s cubic-bezier(.33, 1, .68, 1) 1.8s both; }
.closer.is-playing .closer-actions { animation: closer-fade .5s cubic-bezier(.33, 1, .68, 1) 2.05s both; }
@keyframes closer-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes closer-ring { from { opacity: 0; transform: rotate(-70deg) scale(.86); } }
@keyframes closer-cut { from { transform: rotate(-45deg) scaleX(.001) rotate(45deg); } to { transform: rotate(-45deg) scaleX(1) rotate(45deg); } }
@keyframes closer-settle { from { opacity: 0; transform: translateY(10px); } }
@keyframes closer-fade { from { opacity: 0; } }
/* narrow columns: the footage on top, the words under it */
@media (max-width: 919px) {
  .closer { height: auto; }
  .closer-video { position: static; display: block; width: 100%; }
  .closer::after { content: none; }
  .closer-copy { position: static; transform: none; padding: 22px 20px 26px; }
  .closer-word { font-size: 64px; }
  .closer-title { font-size: 17px; }
}


.section.film { --paper: #131817; --ink: #eceeea; --ink-2: #a8afab; --rule: #313735; --wash: #1b201f; --grid: #262c2a; --veto: #5fe08d; --unguided: #b6bec4; --qbon: #c5bab0; color: var(--ink); background-color: var(--paper); border-top: 0; border-image: linear-gradient(var(--paper) 0 0) fill 0 / 0 / 0 100vmax; }
.section.film + .section { border-top: 0; }

/* DROID: continuous training first, compact evaluation beneath it. */
.training-toolbar, .training-rounds, .training-playback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.training-toolbar { justify-content: space-between; gap: 14px; margin: 24px 0 18px; }
.training-rounds > span, .training-playback label { color: var(--ink-2); font: 14px var(--mono); }
.training-toolbar button, .eval-tabs button { min-height: 44px; }
.training-rounds button, .eval-tabs button { border: 0; border-bottom: 2px solid transparent; color: var(--ink-2); }
.training-rounds button[aria-pressed="true"], .eval-tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.training-speed { font: inherit; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); min-height: 44px; padding: 6px; }
.training-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.training-run { min-width: 0; }
.training-heading { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.training-heading h4 { font-size: 19px; margin: 0; font-weight: 600; }
.training-round { font: 600 14px var(--mono); }
[data-training-method="veto"] h4, [data-eval-method="veto"] .eval-method, [data-eval-method="veto"] .eval-rate { color: var(--veto); }
.training-shot { aspect-ratio: 16 / 9; background: #0b0d12; display: grid; place-items: center; }
.training-shot video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.training-shot video[hidden], .training-empty[hidden] { display: none; }
.training-empty { margin: 0; padding: 20px; text-align: center; color: var(--ink-2); }
.training-current { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 8px; font: 14px var(--mono); }
.training-current button { min-height: 44px; padding: 4px 8px; border-color: var(--rule); }
.training-run progress { display: block; width: 100%; height: 4px; margin: 8px 0; accent-color: var(--veto); }
.training-note, .training-explainer, .eval-note { color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.training-note { margin: 0; min-height: 2.5em; }
.training-explainer { max-width: 90ch; margin: 18px 0 0; }
.droid-evaluation { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); }
.droid-evaluation > h4 { margin: 0 0 12px; font: 500 21px var(--body); }
.droid-eval-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 36px; align-items: start; }
.droid-eval-layout .afig { width: 100%; margin: 0; }
.droid-eval-layout figcaption { font-size: 13px; }
.eval-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.eval-budget { font-size: 14px; color: var(--ink-2); margin: 12px 0; }
.eval-results { display: grid; gap: 0; }
.eval-result { position: relative; display: grid; grid-template-columns: minmax(80px, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.eval-method { font-weight: 600; grid-row: span 2; }
.eval-rate { font: 700 20px var(--mono); }
.eval-count { grid-column: 2; font: 12px var(--mono); color: var(--ink-2); }
.eval-note { margin-top: 14px; }
@media (max-width: 919px) {
  .training-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .training-note { min-height: 0; }
  .droid-eval-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

.training-trial-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 20px; }
.training-trial-label { font: 600 17px var(--mono); }
.training-speed-label { color: var(--ink-2); font: 14px var(--mono); }
.training-trial-controls button { min-height: 44px; font-size: 13px; }
.training-trial-controls button:disabled { opacity: .4; cursor: default; }

/* Evaluation clip gallery: outcome borders and bounded inline enlargement. */
.eval-gallery-help, .eval-outcome-key { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin: 10px 0; }
.eval-outcome-key { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.eval-key-success { color: var(--outcome-success); }
.eval-key-failure { color: var(--outcome-failure); }
.eval-thumbnails { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.eval-thumb { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 9; min-height: 44px; border: 2px solid #a8afab; background: #0b0d12; transform-origin: center; transition: transform .2s ease, box-shadow .2s ease; }
.eval-thumb[data-outcome="success"] { border-color: var(--outcome-success); }
.eval-thumb[data-outcome="failure"] { border-color: var(--outcome-failure); }
.eval-thumb img, .eval-thumb video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.eval-thumb.has-frame img { opacity: 0; }
.eval-thumb-badge { position: absolute; left: 2px; bottom: 2px; background: #07100de6; color: #fff; padding: 1px 3px; font: 10px/1.3 var(--mono); pointer-events: none; }
.eval-thumb.is-active { z-index: 5; transform: translate(var(--zoom-x), var(--zoom-y)) scale(var(--zoom-scale)); box-shadow: 0 8px 24px #0009; }
.eval-result:has(.eval-thumb.is-active) { z-index: 5; }
.eval-clip-summary { grid-column: 1 / -1; margin: 8px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.eval-missing { display: grid; place-items: center; min-height: 44px; aspect-ratio: 16 / 9; border: 1px dashed var(--rule); color: var(--ink-2); text-align: center; font: 11px var(--mono); }
@media (max-width: 919px) { .eval-thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .eval-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .eval-thumb { transition: none; } }

/* Task storyboards explain the goal before the comparison starts. */
.task-guide { margin: 24px 0 30px; max-width: 1080px; }
.task-guide-title { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.task-guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.task-guide-steps li { min-width: 0; }
.task-guide-steps img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.task-guide-steps li > span { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; font-size: 15px; line-height: 1.4; }
.task-guide-steps b { display: inline-grid; place-items: center; flex: 0 0 23px; height: 23px; border: 1px solid currentColor; border-radius: 50%; font: 13px/1 var(--mono); }
@media (max-width: 600px) {
  .task-guide-steps { grid-template-columns: 1fr; gap: 12px; }
  .task-guide-steps li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 12px; }
  .task-guide-steps li > span { margin: 0; font-size: 14px; }
}

/* Training and evaluation share teal/orange outcomes, reinforced by labels and symbols. */
.training-shot { position: relative; border: 2px solid #748079; }
.training-run[data-outcome="success"] .training-shot { border-color: var(--outcome-success); }
.training-run[data-outcome="failure"] .training-shot { border-color: var(--outcome-failure); }
.training-outcome { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 4px 7px; background: #101512e8; color: #c2cbc5; font: 12px/1.3 var(--mono); }
.training-run[data-outcome="success"] .training-outcome { color: var(--outcome-success); }
.training-run[data-outcome="failure"] .training-outcome { color: var(--outcome-failure); }
.training-history { margin: 24px 0 32px; max-width: 960px; }
.training-history > figcaption { font-size: 17px; font-weight: 600; }
.training-history-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 12px 0; font: 13px/1.5 var(--mono); }
.training-history-legend span { color: var(--history-color); }
.training-history svg { display: block; width: 100%; overflow: visible; }
.training-history-axes line { stroke: #ffffff1a; }
.training-history-axes text { fill: #b8c2bb; font: 12px var(--mono); }
.training-history p { color: var(--ink-2); font-size: 13px; line-height: 1.5; max-width: 90ch; margin: 8px 0; }
@media (max-width: 600px) {
  .training-history svg { min-height: 180px; }
  .training-history-legend { gap: 6px 16px; }
}

/* Real-robot comparisons read consistently: footage, then its plot. */
.training-comparison { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.training-comparison .training-history { width: 100%; margin: 0; min-width: 0; }
.robot-result-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (min-width: 1280px) {
  .training-comparison { grid-template-columns: minmax(0, 3fr) minmax(300px, 1.15fr); gap: 24px; }
  .training-comparison .training-grid { gap: 16px; }
  .training-comparison .training-heading { display: block; }
  .training-comparison .training-round { display: block; margin-top: 5px; }
  .training-comparison .training-current { align-items: flex-start; font-size: 12px; }
  .training-comparison .training-current button { font-size: 12px; white-space: nowrap; }
  .training-comparison .training-history-legend { gap: 4px 14px; font-size: 12px; }
  .training-comparison .training-history p { font-size: 12px; }
}
@media (max-width: 1000px) {
  .robot-result-row { grid-template-columns: minmax(0, 1fr); }
}

/* Reuse the paper's original annotated panels without raster edits. */
.task-paper { max-width: 800px; margin-inline: auto; }
.task-paper > .task-guide-title { color: var(--ink); font-size: 15px; font-weight: 600; }
.task-paper-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; list-style: none; padding: 0; margin: 10px 0 0; }
.task-paper-droid .task-paper-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.task-paper-panels li { min-width: 0; }
.task-paper-frame { position: relative; overflow: hidden; aspect-ratio: 800 / 448.5; }
.task-paper-frame img { position: absolute; width: 300%; height: 200%; max-width: none; left: calc(var(--panel-x) * -100%); top: calc(var(--panel-y) * -100%); }
.task-paper-droid .task-paper-frame { aspect-ratio: 16 / 9; }
.task-paper-droid .task-paper-frame img { width: 200%; }
.task-paper-panels li > span { display: block; margin-top: 7px; font-size: 14px; line-height: 1.4; }
@media (max-width: 600px) {
  .task-paper-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 8px; }
  .task-paper-panels li > span { font-size: 13px; }
}

/* Clean camera stills with crisp vector annotations; motion remains in the experiments below. */
.droid-task { max-width: 800px; margin-inline: auto; }
.droid-task-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.droid-task-head .task-guide-title { margin: 0; color: var(--ink); }
.droid-task-head span { color: var(--ink-2); font-size: 13px; }
.droid-task-stage { background: #0b0d12; aspect-ratio: 852 / 480; }
.droid-task-panel { position: relative; }
.droid-task-panel[hidden] { display: none; }
.droid-task-panel img { display: block; width: 100%; height: auto; }
.droid-task-panel svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.droid-task-arrow-shadow { fill: none; stroke: #101512; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.droid-task-arrow { fill: none; stroke: white; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.droid-task-panel circle { fill: #101512; stroke: white; stroke-width: 2; }
.droid-task-panel text { fill: white; font: 600 24px sans-serif; text-anchor: middle; dominant-baseline: central; }
.droid-task-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.droid-task-steps button { display: flex; gap: 8px; align-items: center; text-align: left; min-height: 48px; padding: 10px; font: 14px/1.3 var(--body); border: 1px solid var(--rule); }
.droid-task-steps button[aria-pressed="true"] { background: #edf0ed; color: #111815; border-color: #edf0ed; }
.droid-task-steps b { font: 14px var(--mono); }
.droid-task-caption { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin: 12px 0 0; min-height: 3em; }
@media (max-width: 600px) {
  .droid-task-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .droid-task-head { display: block; }
  .droid-task-head span { display: block; margin-top: 5px; }
}

.yam-task .droid-task-stage { aspect-ratio: 16 / 9; }
.yam-task .droid-task-panel text { font-size: 18px; }
.yam-task .droid-task-arrow-shadow { stroke-width: 5; }
.yam-task .droid-task-arrow { stroke-width: 2.5; }

/* All task phases remain visible together, using the full-resolution stills. */
.task-static { max-width: 960px; margin-inline: auto; }
.task-static > .task-guide-title { color: var(--ink); }
.task-static-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; list-style: none; padding: 0; margin: 10px 0 0; }
.task-static-panels li { min-width: 0; }
.task-static-panels p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 600px) {
  .task-static-panels { gap: 16px 8px; }
  .task-static-panels p { font-size: 13px; }
}

/* Small annotations sit within the gripper gaps; captions retain readable step numbers. */
.task-static .droid-task-panel circle { stroke-width: 1.4; }
.task-static .droid-task-panel text { font-size: 14px; }
.task-static.yam-task .droid-task-panel text { font-size: 11px; }
.task-static .droid-task-arrow-shadow { stroke-width: 4; }
.task-static .droid-task-arrow { stroke-width: 1.8; }
.task-static.yam-task .droid-task-arrow-shadow { stroke-width: 3.5; }
.task-static.yam-task .droid-task-arrow { stroke-width: 1.5; }
.task-static-panels .task-initial { grid-column: 1 / -1; width: calc(50% - 7px); justify-self: center; }
@media (max-width: 600px) {
  .task-static-panels .task-initial { width: calc(50% - 4px); }
}

/* Paper-style closing credits. */
.paper-credits { max-width: 900px; margin: 32px auto 40px; text-align: center; }
.paper-credits h3 { margin: 0 auto 26px; max-width: 840px; font-size: clamp(25px, 2.3vw, 34px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.paper-author-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 25px; margin: 0 auto 22px; max-width: 820px; font-size: 18px; line-height: 1.6; }
.paper-author-list > span { white-space: nowrap; }
.paper-author-list a { text-decoration-color: var(--rule); }
.paper-author-list a:hover { text-decoration-color: var(--ink); }
.paper-credits sup { font-size: .65em; line-height: 0; }
.paper-affiliations p { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 8px 0; font-size: 14px; color: var(--ink-2); }
.paper-affiliations span { white-space: nowrap; }
.paper-affiliations .paper-contributions { font-size: 13px; }
.paper-credit-links { margin: 24px 0 0; }
.paper-credit-links a { display: inline-block; padding: 11px 18px; border: 1px solid var(--ink); text-decoration: none; min-height: 44px; font-size: 15px; }
.paper-credits.is-ready:not(.is-visible) > * { opacity: 0; transform: translateY(12px); }
.paper-credits.is-visible > * { animation: paper-credit-reveal .6s ease both; }
.paper-credits.is-visible > :nth-child(2) { animation-delay: .1s; }
.paper-credits.is-visible > :nth-child(3) { animation-delay: .2s; }
.paper-credits.is-visible > :nth-child(4) { animation-delay: .3s; }
@keyframes paper-credit-reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) {
  .paper-credits { margin-top: 26px; }
  .paper-author-list { font-size: 16px; gap: 9px 18px; }
  .paper-affiliations p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .paper-credits.is-ready:not(.is-visible) > * { opacity: 1; transform: none; }
  .paper-credits.is-visible > * { animation: none; }
}
.paper-author-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; }
.paper-affiliations .paper-contributions { display: block; }
@media (max-width: 760px) {
  .paper-author-list { grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: 16px; }
}

/* Citation and paper credits above the closing visual. */
#cite { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-height: 100svh; padding-top: 28px; padding-bottom: 28px; }
#cite .paper-credits { width: 100%; margin: 0 auto; }
#cite .paper-credits h3 { margin-bottom: 22px; font-weight: 700; }
#cite .paper-author-list { margin-bottom: 16px; }
.citation-tools { width: 100%; max-width: 760px; margin-inline: auto; }
.citation-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.citation-actions a, .citation-actions button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); font: 15px/1.3 var(--body); text-decoration: none; }
.citation-actions button { background: var(--ink); color: var(--paper); min-width: 122px; }
.citation-tools .bib { max-width: none; margin: 0 0 14px; }
.citation-tools .bib pre { font-size: 12px; line-height: 1.5; padding: 12px 16px; }
@media (max-width: 760px) {
  #cite { gap: 16px; padding-top: 20px; padding-bottom: 76px; }
  #cite .paper-credits h3 { font-size: 22px; line-height: 1.15; margin-bottom: 18px; }
  #cite .paper-author-list { gap: 7px 12px; line-height: 1.4; margin-bottom: 14px; }
  #cite .paper-affiliations p { font-size: 12px; line-height: 1.4; gap: 5px 16px; margin: 6px 0; }
  #cite .paper-affiliations .paper-contributions { font-size: 12px; }
  .citation-tools .bib { margin-bottom: 12px; }
  .citation-tools .bib pre { white-space: pre; overflow-wrap: normal; }
}
@media (max-height: 600px) and (min-width: 761px) {
  #cite { gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  #cite .paper-credits h3 { font-size: 24px; margin-bottom: 14px; }
  #cite .paper-author-list { font-size: 15px; gap: 6px 14px; margin-bottom: 10px; }
  #cite .paper-affiliations p { font-size: 12px; margin: 5px 0; }
}

@media (max-width: 380px) {
  .citation-actions { gap: 8px; }
  .citation-actions a, .citation-actions button { padding-inline: 10px; font-size: 14px; }
  .citation-actions button { min-width: 112px; }
}

/* Read the YAM task left to right across two rows. */
.yam-task .task-static-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.yam-task .task-static-panels .task-initial { grid-column: auto; width: auto; justify-self: stretch; }
@media (max-width: 600px) {
  .yam-task .task-static-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



.citation-tools .bib pre { padding: 12px 76px 12px 16px; }
.citation-tools .bib button { top: 8px; right: 8px; min-height: 28px; padding: 5px 8px; border: 1px solid var(--rule); font: 13px/1.2 var(--mono); cursor: pointer; }
.citation-tools .bib button:hover { border-color: var(--ink); }

/* The closing visual is a full-width background beyond the content column. */
body > .closer { width: 100%; margin: 0; height: clamp(400px, 48vw, 620px); }
body > .closer .closer-copy { left: max(44px, calc((100% - 1120px) / 2)); }
@media (min-width: 1280px) {
  body > .closer .closer-copy { left: max(240px, calc((100% - 1120px) / 2)); }
}
@media (max-width: 919px) {
  body > .closer { height: 480px; }
  body > .closer .closer-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  body > .closer::after { content: ""; background: linear-gradient(0deg, #101118 0%, rgba(16,17,24,.9) 35%, rgba(16,17,24,.1) 100%); }
  body > .closer .closer-copy { position: absolute; left: 0; right: 0; top: auto; bottom: 0; padding: 28px 24px 76px; }
}

/* Equal breathing room on either side of the citation box. */
#cite { --citation-gap: 22px; min-height: 0; gap: var(--citation-gap); padding-bottom: var(--citation-gap); }
#cite .paper-affiliations .paper-contributions { margin-bottom: 0; }
#cite .bib { margin-bottom: 0; }
@media (max-width: 760px) {
  #cite { --citation-gap: 16px; }
}

/* Crop the closing footage to the space left below the paper credits. */
body > .closer { height: clamp(140px, calc(100svh - var(--credits-height, 440px)), 620px); container-type: size; container-name: closing-visual; }
@container closing-visual (max-height: 330px) {
  body > .closer .closer-copy { top: 50%; bottom: auto; transform: translateY(-50%); padding: 0 24px; }
  .closer .closer-word { font-size: 56px; }
  .closer .closer-title { margin-top: 12px; font-size: 16px; }
}
@container closing-visual (max-height: 200px) {
  .closer .closer-word { font-size: 44px; }
  .closer .closer-title { font-size: 14px; margin-top: 8px; }
}
@media (max-width: 380px) and (max-height: 650px) {
  #cite { --citation-gap: 12px; padding-top: 12px; }
  #cite .paper-credits h3 { font-size: 20px; margin-bottom: 12px; }
  #cite .paper-author-list { font-size: 14px; gap: 5px 8px; margin-bottom: 10px; }
  #cite .bib pre { font-size: 11px; line-height: 1.35; }
}
/* A quiet brand sign-off, rather than another content section. */
body > .closer { height: clamp(140px, calc(100svh - var(--credits-height, 440px)), 220px); }
body > .closer .closer-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; opacity: .45; }
body > .closer::after { content: ""; background: linear-gradient(90deg, #101118 0%, rgba(16,17,24,.9) 35%, rgba(16,17,24,.25) 100%); }
body > .closer .closer-copy { top: 50%; bottom: auto; transform: translateY(-50%); padding: 0; }
body > .closer .closer-word { font-size: 54px; }
body > .closer .closer-title { max-width: none; margin-top: 14px; font-size: 14px; line-height: 1.4; color: #d6d7db; }
@media (max-width: 919px) {
  body > .closer .closer-copy { left: 24px; right: 24px; }
  body > .closer .closer-word { font-size: 44px; }
  body > .closer .closer-title { max-width: 420px; font-size: 13px; margin-top: 10px; }
}

.method-filter { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 20px; font: 14px/1.3 var(--mono); color: var(--ink-2); }
.method-filter[hidden], .afig-key li[hidden] { display: none; }
.method-switch { display: flex; gap: 22px; }
.method-switch button { min-height: 44px; padding: 6px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; font: 400 15px/1.3 var(--mono); color: var(--ink-2); }
.method-switch button:hover { color: var(--ink); }
.method-switch button[aria-pressed="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }

/* Separate the brand footer from the paper citation. */
#cite { padding-bottom: clamp(112px, 16vh, 192px); }

/* The sign-off uses the wordmark itself as its only animation. */
body > .closer { background: #000; }
body > .closer::after { content: none; }

.training-shared-progress { display: block; width: 100%; height: 5px; margin: -8px 0 20px; accent-color: var(--veto); }

/* Compact footer proportions. */
body > .closer { height: 120px; }
body > .closer .closer-word { font-size: 38px; }
body > .closer .closer-title { margin-top: 8px; font-size: 12px; }
@media (max-width: 600px) {
  body > .closer { height: 140px; }
  body > .closer .closer-word { font-size: 34px; }
}

body > .closer { height: 80px; }
body > .closer .closer-word { font-size: 32px; }

/* Recovery ends with its controls, without a viewport-sized empty tail. */
#recovery { min-height: 0; padding-bottom: 24px; }
/* The citation fills a screen; the footer follows below it. */
#cite { min-height: 100svh; justify-content: flex-start; padding-bottom: 32px; }
#cite .paper-credits h3 { line-height: 1.3; letter-spacing: -.015em; margin-bottom: 36px; }
@media (max-width: 760px) {
  #cite .paper-credits h3 { margin-bottom: 28px; }
}

.sim-panel { min-width: 0; }
.sim-head { display: flex; align-items: center; gap: 12px; min-height: 64px; margin-bottom: 2px; }
.sim-thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 3.2px; outline: 1px solid var(--rule); transition: outline-color 0s 240ms; }
/* The resting frame steps aside while the preview is enlarged (its small corner showed past the big rounded one at
   the shared top left) and returns once the preview has shrunk back. */
.sim-thumb:has(.task-preview.is-active) { outline-color: transparent; transition: none; }
/* The preview is laid out at its enlarged size and scaled down at rest, so the zoom is a compositor-only transform
   (nothing reflows while it runs) and the clip is sharp at both sizes. It grows with a long ease-out and shrinks a
   little faster; it stays on top until it has shrunk back. */
.sim-thumb .task-preview { position: absolute; left: 0; top: 0; z-index: 1; width: 240px; height: 240px; overflow: hidden; border-radius: 12px; background: #0b0d12; outline: 1px solid transparent; transform: scale(.266667); transform-origin: 0 0; will-change: transform; transition: transform 240ms cubic-bezier(.4, 0, .2, 1), outline-color 240ms ease, z-index 0s 240ms; }
.sim-thumb .task-preview.is-active { z-index: 6; transform: none; outline-color: var(--ink-2); transition: transform 360ms cubic-bezier(.16, 1, .3, 1), outline-color 360ms ease, z-index 0s; }
.sim-thumb :is(video, img) { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.sim-thumb .task-poster { pointer-events: none; transition: opacity 200ms ease; }
.sim-thumb .has-frame .task-poster { opacity: 0; }
.sim-thumb .task-control { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.sim-thumb .task-control:focus-visible { outline-offset: 2px; }
.sim-name { margin: 0; font-size: 14px; line-height: 1.3; }
.sim-name .name { display: block; font-weight: 600; }
.sim-name .kind { display: block; font: 13px/1.3 var(--mono); color: var(--ink-2); }
#fig-7 .chart-title { display: none; } /* the task's name sits beside its thumbnail */
@media (prefers-reduced-motion: reduce) { .sim-thumb, .sim-thumb :is(.task-preview, .task-preview.is-active, .task-poster) { transition: none; } }

:root { --outcome-success: #56c4ad; --outcome-failure: #f29a76; }

.training-run .training-playback { margin-top: 8px; justify-content: flex-start; }
.training-playback button { min-height: 44px; }

.training-outcome[hidden] { display: none; }

/* Keep zooming previews and chart redraws on independent compositing layers. */
#fig-7 .chart { transform: translateZ(0); }
.sim-thumb .task-preview { transform: translateZ(0) scale(.266667); transition: transform 360ms cubic-bezier(.25,.1,.25,1); }
.sim-thumb .task-preview.is-active { transform: translateZ(0) scale(1); transition: transform 420ms cubic-bezier(.25,.1,.25,1); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .sim-thumb .task-preview, .sim-thumb .task-preview.is-active { transition: none; } }

.eval-result[hidden] { display: none; }
.eval-method-tabs { margin-bottom: 12px; }
.eval-detail { min-width: 0; }
#fig-9-droid figcaption { margin-top: 12px; }
@media (min-width: 920px) {
  .eval-detail { min-height: 380px; }
}

.chart .round-guide { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 5; opacity: .4; }
.chart .round-label { fill: var(--ink-2); font: 11px var(--mono); }
/* Filled outcome badges remain distinct through both color and symbols. */
.training-run[data-outcome="success"] .training-outcome,
.eval-thumb[data-outcome="success"] .eval-thumb-badge,
.eval-key-success { background: var(--outcome-success); color: #071510; }
.training-run[data-outcome="failure"] .training-outcome,
.eval-thumb[data-outcome="failure"] .eval-thumb-badge,
.eval-key-failure { background: var(--outcome-failure); color: #271008; }
.training-outcome { font-weight: 700; padding: 5px 9px; border-radius: 3px; }
.eval-thumb-badge { font-weight: 700; padding: 2px 4px; border-radius: 2px; }
.eval-key-success, .eval-key-failure { padding: 3px 7px; border-radius: 3px; font-weight: 600; }
/* Five evaluation recordings per row at every screen size. */
.eval-thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* A stable square evaluation panel keeps method switches from shifting the plot. */
.eval-detail { aspect-ratio: 1; min-height: 0; display: flex; flex-direction: column; }
.eval-results { flex: 1; }
.eval-result { align-content: start; border-bottom: 0; }
.eval-thumbnails { grid-template-rows: repeat(4, auto); align-content: start; }
.eval-clip-summary { margin-bottom: 0; }

.eval-tabs button { border-radius: 4px; transition: background-color .15s ease, color .15s ease; }
.eval-tabs button[aria-pressed="true"] { background: #e5ece7; color: #131817; border-bottom-color: transparent; }
.eval-tabs button small { display: block; font-size: 11px; opacity: .75; margin-top: 3px; }
#fig-9-droid .series { opacity: .85; transition: opacity .2s ease; }
#fig-9-droid[data-selected-method="veto"] .s-veto,
#fig-9-droid[data-selected-method="unguided"] .s-unguided,
#fig-9-droid[data-selected-method="criticbon"] .s-criticbon { opacity: 1; }
#fig-9-droid[data-selected-x="15"] .round-label[data-x="15"] { fill: var(--ink); font-weight: 700; }
#fig-9-droid[data-selected-x="15"] .round-guide[data-x="15"] { opacity: .85; stroke: var(--ink); }
#fig-9-droid[data-selected-x="15"] .pt[data-x="15"] { fill: var(--c); stroke-width: 3; }
#fig-9-droid[data-selected-x="30"] .round-label[data-x="30"] { fill: var(--ink); font-weight: 700; }
#fig-9-droid[data-selected-x="30"] .round-guide[data-x="30"] { opacity: .85; stroke: var(--ink); }
#fig-9-droid[data-selected-x="30"] .pt[data-x="30"] { fill: var(--c); stroke-width: 3; }
#fig-9-droid[data-selected-x="45"] .round-label[data-x="45"] { fill: var(--ink); font-weight: 700; }
#fig-9-droid[data-selected-x="45"] .round-guide[data-x="45"] { opacity: .85; stroke: var(--ink); }
#fig-9-droid[data-selected-x="45"] .pt[data-x="45"] { fill: var(--c); stroke-width: 3; }
/* Match the plot to the gallery's visible content, without square-panel filler. */
.eval-detail { aspect-ratio: auto; display: block; min-height: 0; }
.eval-thumbnails { grid-template-rows: none; }

.training-comparison { grid-template-columns: minmax(0, 1fr); }
/* The same clean square crop at rest and zoomed; no hover outline or frame. */
.sim-thumb { border-radius: 0; outline: none; }
.sim-thumb .task-preview,
.sim-thumb .task-preview.is-active { border-radius: 0; outline: none; box-shadow: none; background: transparent; }
.sim-thumb :is(video, img) { border: 0; border-radius: 0; }
.sim-thumb .task-control:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
/* Task stages form one left-to-right sequence on every screen. */
.task-static { max-width: none; }
.task-static .task-static-panels { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); gap: 14px; }
.task-static .task-static-panels .task-initial { grid-column: auto; width: auto; justify-self: stretch; }
@media (max-width: 919px) {
  .task-static .task-static-panels { grid-auto-columns: minmax(200px, 42vw); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 12px; }
  .task-static-panels li { scroll-snap-align: start; }
}

/* Rounded crops scale consistently, without adding an outline on hover. */
.sim-thumb { border-radius: 3.2px; }
.sim-thumb .task-preview, .sim-thumb .task-preview.is-active { border-radius: 12px; }
/* Shared corner treatment: media panels, compact controls, and outcome badges. */
:root { --radius-panel: 8px; --radius-control: 4px; }
button, select, .hero-paper { border-radius: var(--radius-control); }
.media-shot, .training-shot, .recovery-shot, .droid-task-panel { border-radius: var(--radius-panel); overflow: hidden; }
.bib pre, .video-dialog { border-radius: var(--radius-panel); }
.eval-thumb { border-radius: var(--radius-control); overflow: hidden; }
.training-outcome, .eval-thumb-badge { border-radius: var(--radius-control); }
/* A narrower reading column keeps the experiments from spreading across a monitor. */
:root { --wide: 1120px; }
.section.wide { max-width: var(--wide); }
#results > h2, #results > p, #robots > h2, #robots > p { max-width: 900px; margin-left: 0; margin-right: 0; }
#fig-7-panels { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px 24px; }
#fig-7-panels > .sim-panel { grid-column: span 2; }
#fig-7-panels > .sim-panel:nth-child(4) { grid-column: 2 / span 2; }
#fig-7-panels > .sim-panel:nth-child(5) { grid-column: 4 / span 2; }
@media (max-width: 999px) {
  #fig-7-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #fig-7-panels > .sim-panel:nth-child(n) { grid-column: auto; }
}
@media (max-width: 600px) {
  #fig-7-panels { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
/* A subtle hover preview signals that task stills can be opened. */
@media (hover: hover) and (pointer: fine) {
  .task-static-panels li { position: relative; }
  .task-static-panels li:hover { z-index: 5; }
  .task-static .droid-task-panel { transform: scale(1); transform-origin: center center; transition: transform 320ms cubic-bezier(.25,.1,.25,1); }
  .task-static-panels li:first-child .droid-task-panel { transform-origin: left center; }
  .task-static-panels li:last-child .droid-task-panel { transform-origin: right center; }
  .task-static .droid-task-panel:hover { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .task-static .droid-task-panel { transition: none; }
}

/* Restrained finishing details and accessible image viewing. */
html { scrollbar-gutter: stable; }
.task-static-panels p { line-height: 1.5; text-wrap: pretty; }
.robot-experiment + .robot-experiment { margin-top: 44px; padding-top: 36px; }
.training-trial-label, .eval-rate, .eval-count { font-variant-numeric: tabular-nums; }
.training-playback { row-gap: 10px; }
.training-playback label { display: inline-flex; align-items: center; gap: 8px; }
.training-trial-controls button, .training-playback button, .replay, #copy-bib { transition: background-color 160ms ease, border-color 160ms ease; }
.training-trial-controls button:not(:disabled):hover, .training-playback button:hover, .replay:hover, #copy-bib:hover { background: var(--wash); }
button:disabled { cursor: default; }
.task-image-open { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.task-image-open:focus-visible { outline: 3px solid white; outline-offset: -5px; }
.task-image-dialog { width: min(1000px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 20px; border: 1px solid #39403d; border-radius: 12px; background: #131817; color: #eceeea; box-shadow: 0 24px 80px #0005; }
.task-image-dialog::backdrop { background: rgb(0 0 0 / .72); }
.task-image-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.task-image-header h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.task-image-close { min-height: 44px; padding: 8px 14px; color: inherit; border-color: #626a66; }
.task-image-close:hover { background: #29302c; }
.task-image-view { width: min(100%, calc((100dvh - 210px) * 16 / 9)); margin: 0 auto; }
.task-image-dialog .droid-task-panel, .task-image-dialog .droid-task-panel:hover { transform: none; transition: none; }
#task-image-caption { margin: 16px 0 0; font-size: 15px; line-height: 1.5; color: #d3dbd6; }
@media (max-width: 600px) {
  .task-image-dialog { padding: 14px; }
  .task-image-header { margin-bottom: 12px; }
  .task-image-header h2 { font-size: 18px; }
  #task-image-caption { font-size: 14px; }
  .task-static-panels { scrollbar-width: thin; }
}
@media (prefers-reduced-motion: reduce) {
  .training-trial-controls button, .training-playback button, .replay, #copy-bib { transition: none; }
}
/* Center the text blocks while keeping their contents left-aligned. */
.section > h2, .section > h3, .section > p,
#results > h2, #results > p, #robots > h2, #robots > p {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.robot-experiment > h3, .robot-experiment > p,
.method-caption,
.task-guide-title, .task-static-panels p,
.afig > figcaption, .why > figcaption,
.droid-evaluation > h4, .training-heading h4,
.sim-name, #task-image-caption { text-align: left; }
.robot-experiment > p { margin-left: auto; margin-right: auto; }
.sim-head { justify-content: center; }
.sim-name { flex: 1; }
.training-heading { justify-content: center; }
.task-image-header h2 { text-align: left; }
/* Restore the published site's content widths, with extra breathing room on the right. */
:root { --wide: 1280px; }
.section.wide { max-width: 1440px; }
#results > h2, #results > p, #robots > h2, #robots > p { max-width: var(--col); }
@media (min-width: 1280px) {
  .page-layout { padding-right: clamp(40px, 4vw, 80px); }
}
@media (min-width: 920px) and (max-width: 1279px) {
  .page-layout { padding-right: 32px; }
}

/* The method fills one screen. The drawing keeps its proportions and takes the largest size the
   window allows, past the text column when there is room; heading, drawing, steps and caption sit together in the
   middle of the screen, and nothing of the next section shares it. --method-chrome is everything but the drawing. */
#method { --method-chrome: 300px; max-width: none; height: auto; min-height: calc(100svh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height)); grid-template-rows: auto auto auto auto; align-content: center;
  justify-items: center; gap: 14px; padding-top: 24px; padding-bottom: 24px; }
#method > h2, #method > .method-caption { width: 100%; }
/* halfway between the earlier size (capped at 1240px) and the largest that fits the screen */
.method-anim, #method > .method-steps { width: calc((min(100%, 1240px) + min(100%, (100svh - var(--method-chrome)) * 1000 / 392)) / 2); }
/* the step names and the caption under the drawing read at the page's new sizes */
@media (min-width: 920px) {
  .method-step { font-size: 16px; }
  .method-pause { font-size: 15px; }
  #method > .method-caption { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.5; }
}
.method-anim { aspect-ratio: 1000 / 392; height: auto; }
/* the ring around Robometer's logo is not part of its link: clicks go through to the logo */
.mfig .reward-ring-track { fill: none; stroke: var(--rule); stroke-width: 1; pointer-events: none; }
.mfig .reward-ring { fill: none; stroke: var(--veto); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.mfig .reward-pulse { fill: none; stroke: var(--veto); stroke-width: 1.5; pointer-events: none; }
#fig-9-droid { --unguided: #b6bec4; --qbon: #c5bab0; }
@media (max-width: 919px) {
  .method-anim { aspect-ratio: 3 / 5; }
}

/* Layout: each idea gets a large, short headline and a lead in
   larger type, two ideas do not share a screen, and figures that measure the same thing sit side by side. */
h2 { font-size: clamp(34px, 3.9vw, 56px); line-height: 1.06; letter-spacing: -0.045em; margin-bottom: 20px; }
/* a headline keeps the text column's left edge but may run past its right edge, so it breaks into two lines, not three */
.section > h2, #results > h2, #robots > h2 { max-width: min(100%, 880px); margin-left: max(0px, calc((100% - var(--col)) / 2)); margin-right: auto; }
.section > h2 + p, #why > p { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; }
.section { padding-top: clamp(40px, 7vh, 88px); }
/* Each real-robot experiment, DROID's evaluation and the recovery start their own screen, and their titles read as the
   headlines of those ideas. */
.robot-experiment > h3 { max-width: 900px; margin-left: auto; margin-right: auto; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.15; letter-spacing: -0.03em; }
.droid-evaluation > h4 { font-size: clamp(21px, 1.9vw, 26px); }
.robot-experiment, .droid-evaluation { min-height: calc(100svh - 120px); }
.robot-experiment + .robot-experiment, .droid-evaluation { margin-top: clamp(64px, 10vh, 112px); }
#recovery { min-height: calc(100svh - var(--nav-height)); }
/* Combined comparisons: both runs in one video, cropped to where the robot meets the object.
   The moments that decide each run are marked on the frame, numbered as in the paper's keyframes (dark for the
   baseline, green for VETO), and named under that half with the teal ✓ and orange × used by the training and
   evaluation clips (compare.js). */
.compare { min-width: 0; margin: 0; }
.compare-labels, .compare-lines { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--compare-gap, .5%); }
.compare-labels { margin-bottom: 8px; font: 600 17px/1.3 var(--body); color: var(--ink); }
.compare-stage { position: relative; }
.compare-stage video { display: block; width: 100%; height: auto; background: #0b0d0c; border-radius: var(--radius-control); }
.compare-marks { position: absolute; inset: 0; pointer-events: none; }
.compare-dot { position: absolute; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 2px solid #fff; border-radius: 50%; background: #141414; color: #fff; font: 700 14px/1 var(--mono);
  box-shadow: 0 1px 6px #000a; opacity: 0; transform: scale(.6); transition: opacity .25s ease, transform .25s ease; }
.compare-dot[data-side="1"] { background: #0e7e33; }
.compare-dot.is-on { opacity: 1; transform: none; }
.compare-inset-label { position: absolute; margin: -22px 0 0 2px; padding: 2px 6px; background: #000b; color: #fff; font: 12px/1.3 var(--mono); }
.compare-lines { margin-top: 10px; min-height: 3em; }
.compare-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; font: 16px/1.4 var(--body); color: var(--ink); }
.compare-n { display: inline-grid; flex: none; place-items: center; width: 22px; height: 22px; border: 1.5px solid #fff; border-radius: 50%;
  background: #141414; color: #fff; font: 700 12px/1 var(--mono); }
.compare-n[data-side="1"] { background: #0e7e33; }
.compare-badge { padding: 2px 8px; border-radius: var(--radius-control); font: 700 13px/1.3 var(--mono); }
.compare-badge[data-kind="fail"] { background: var(--outcome-failure); color: #271008; }
.compare-badge[data-kind="ok"] { background: var(--outcome-success); color: #071510; }
.compare-bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.compare-track { position: relative; flex: 1; height: 4px; background: var(--rule); }
.compare-progress { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); }
.compare-speed { font: 13px/1.3 var(--mono); color: var(--ink-2); }
@media (max-width: 640px) {
  .compare-line { font-size: 14px; }
  .compare-dot { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .compare-dot { transition: none; } }
/* Hovering a comparison lifts its video a little and shows a hint; a click grows it into a larger view over the dimmed
   page (compare.js), with both runs, their marks and lines as large as the window allows. */
.compare-stage { cursor: zoom-in; border-radius: var(--radius-control); transition: transform 240ms cubic-bezier(.2, .7, .2, 1), box-shadow 240ms ease; }
.compare-stage::after { content: 'Enlarge'; position: absolute; top: 10px; right: 10px; padding: 5px 9px 5px 27px; border-radius: var(--radius-control);
  background: #000000b3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9'/%3E%3C/svg%3E") 9px 50% / 13px no-repeat;
  color: #fff; font: 12px/1.3 var(--mono); opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.compare-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.compare-stage:focus-visible::after { opacity: 1; }
@media (hover: hover) {
  .compare:not(.is-expanded) .compare-stage:hover { transform: translateY(-3px) scale(1.012); box-shadow: 0 12px 32px #0009; }
  .compare:not(.is-expanded) .compare-stage:hover::after { opacity: 1; }
}
.compare-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  display: grid; place-items: center; overflow: auto; background: #090c0be6; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink);
  --paper: #131817; --ink: #eceeea; --ink-2: #a8afab; --rule: #313735; --veto: #5cc27f; }
.compare-dialog:not([open]) { display: none; }
.compare-dialog::backdrop { background: transparent; }
html:has(.compare-dialog[open]) { overflow: hidden; }
.compare-close { position: fixed; top: 14px; right: 16px; min-height: 40px; }
.compare.is-expanded { width: min(calc(100vw - 48px), calc((100svh - 236px) * var(--compare-ar))); padding: 60px 0 28px; cursor: zoom-out; }
.compare.is-expanded .compare-stage { cursor: zoom-out; }
.compare.is-expanded .compare-stage::after { content: none; }
.compare.is-expanded :is(.compare-labels, .compare-line) { font-size: 19px; }
@media (max-width: 600px) { .compare.is-expanded { width: min(calc(100vw - 24px), calc((100svh - 236px) * var(--compare-ar))); } }
@media (max-height: 520px) {
  .compare.is-expanded { width: min(calc(100vw - 24px), calc((100svh - 150px) * var(--compare-ar))); padding: 48px 0 10px; }
  .compare.is-expanded :is(.compare-labels, .compare-line) { font-size: 15px; }
  .compare.is-expanded .compare-lines { min-height: 2.2em; margin-top: 6px; }
  .compare.is-expanded .compare-bar { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .compare-stage, .compare-stage::after { transition: none; } }
/* The DROID clips are cropped to the rack and the arm (droid/crop/build.py): their boxes take the clips' shape, with
   no black bars at the sides. */
.training-shot, .training-shot video, .eval-thumb, .eval-missing { aspect-ratio: 380 / 360; }
/* All three methods' evaluations show at once, so each row is a compact strip of its 20 trials. */
.eval-result { padding: 8px 0 12px; }
.eval-thumbnails { grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: none; gap: 4px; margin-top: 6px; }
@media (max-width: 600px) { .eval-thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Spacing, on phones / from 735px / from 1069px wide: sections keep 100 / 140 / 160px of space
   above and below their contents; a headline sits 32 / 40px over its lead, and a lead 64 / 80px over the figure it
   introduces; the parts of one section are 72 / 100px apart; a caption sits 12 / 16px under its figure; the side
   gutter is 24 / 40px; and text runs 830px wide. The method is a screen of its own and keeps its tighter stage
   spacing. */
:root { --gut: 24px; --sec: 100px; --gap-lede: 32px; --gap-fig: 64px; --gap-part: 72px; --gap-cap: 12px; --col: 830px; }
@media (min-width: 735px) { :root { --gut: 40px; --sec: 140px; --gap-lede: 40px; --gap-fig: 80px; --gap-part: 100px; --gap-cap: 16px; } }
@media (min-width: 1069px) { :root { --sec: 160px; } }
.section, #recovery { padding: var(--sec) var(--gut); }
#method { padding-left: var(--gut); padding-right: var(--gut); }
#cite { padding-top: var(--sec); padding-left: var(--gut); padding-right: var(--gut); }
/* headline, lead, figure */
.section > h2, #results > h2, #robots > h2 { margin-bottom: var(--gap-lede); }
#method > h2 { margin-bottom: 0; }
.section > p + :is(figure, div, .compare, .afig), .section > p + #fig-7 { margin-top: var(--gap-fig); }
/* the parts of a section: each real-robot experiment and DROID's evaluation */
.robot-experiment + .robot-experiment, .droid-evaluation { margin-top: var(--gap-part); }
.robot-experiment > h3 { margin-top: 0; margin-bottom: 16px; }
.robot-experiment > p + :is(div, figure, .robot-result-row) { margin-top: var(--gap-lede); }
.droid-evaluation > h4 { margin-bottom: 24px; }
/* captions under their figures */
:is(.afig, .why, .paper-fig, .episodes) > figcaption { margin-top: var(--gap-cap); }
/* inside a comparison: names over the video, what happens under it, then its controls */
.compare-labels { margin-bottom: 14px; }
.compare-lines { margin-top: var(--gap-cap); }
.compare-bar { margin-top: 24px; }
/* the citation: title, authors, affiliations, then the BibTeX well below */
#cite .paper-credits h3 { margin-bottom: 28px; }
#cite .paper-author-list { margin-bottom: 8px; }
#cite { gap: 64px; }
@media (max-width: 734px) { #cite { gap: 48px; } }

/* The citation at the end, larger: the title, names,
   affiliations and BibTeX fill more of their screen, on phones / from 735px / from 1069px wide. Short landscape
   screens keep the phone sizes. */
#cite .paper-credits { max-width: 1040px; }
#cite .paper-credits h3 { max-width: 1000px; font-size: 26px; line-height: 1.18; letter-spacing: -.02em; margin-bottom: var(--gap-lede); }
#cite .paper-author-list { max-width: 1000px; font-size: clamp(15px, 4.6vw, 18px); gap: 10px 8px; margin-bottom: 16px; }
#cite .paper-affiliations p { font-size: 15px; gap: 6px 22px; margin: 10px 0; }
#cite .paper-affiliations .paper-contributions { font-size: 14px; }
#cite .citation-tools { max-width: 1000px; }
#cite .bib pre { font-size: 13px; line-height: 1.6; padding: 18px 92px 18px 20px; }
#cite #copy-bib { top: 10px; right: 10px; min-height: 32px; padding: 4px 12px; font-size: 14px; }
@media (min-width: 735px) and (min-height: 521px) {
  #cite { gap: var(--gap-fig); }
  #cite .paper-credits h3 { font-size: 40px; }
  #cite .paper-author-list { font-size: 20px; gap: 14px 20px; }
  #cite .paper-affiliations p { font-size: 17px; }
  #cite .paper-affiliations .paper-contributions { font-size: 15px; }
  #cite .bib pre { font-size: 15px; padding: 24px 108px 24px 28px; }
  #cite #copy-bib { top: 16px; right: 16px; min-height: 36px; padding: 6px 14px; font-size: 15px; }
}
@media (min-width: 1069px) and (min-height: 521px) {
  #cite .paper-credits h3 { font-size: 48px; }
  #cite .paper-author-list { font-size: 22px; gap: 16px 24px; }
}
/* four names to a row once they fit, two before */
@media (max-width: 899px) { #cite .paper-author-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Three-way DROID training: the trials play as one combined video in the recovery comparison's
   format, three columns wide; each trial's outcome shows on its column as the teal ✓ or orange × chip. The YAM
   comparison runs the full width like the recovery one, with its chart under it. */
.compare-labels, .compare-lines { grid-template-columns: repeat(var(--compare-n, 2), minmax(0, 1fr)); }
#training-compare .compare-dot, #yam-compare .compare-dot:is([data-kind="ok"], [data-kind="fail"]) { border-color: #101512; }
:is(#training-compare, #yam-compare) .compare-dot[data-kind="ok"] { background: var(--outcome-success); color: #071510; }
:is(#training-compare, #yam-compare) .compare-dot[data-kind="fail"] { background: var(--outcome-failure); color: #271008; }
#training-compare .compare-dot { transition-duration: .12s; }
.compare-speed { white-space: nowrap; font-variant-numeric: tabular-nums; }
.robot-result-row { grid-template-columns: minmax(0, 1fr); gap: 48px; }
.robot-under { display: grid; grid-template-columns: minmax(0, 640px) minmax(240px, 1fr); gap: 48px 64px; align-items: center; }
.robot-under .robot-chart.afig { max-width: 640px; }
@media (max-width: 899px) {
  .robot-under { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  #training-compare .compare-line { font-size: 13px; }
  #training-compare .compare-bar { flex-wrap: wrap; row-gap: 10px; }
  #training-compare .compare-speed { flex-basis: 100%; }
}

/* Tighter and wider. Sections end with their contents instead of each filling
   a screen; only the method keeps a screen of its own, now starting near the top with a larger drawing. On large
   screens figures and videos run up to 1760px wide while text keeps its 830px column, and a video is never taller
   than the window leaves room for. */
:root { --wide: clamp(1280px, 90vw, 1760px); }
@media (min-width: 1069px) { :root { --sec: 112px; } }
.section, .section.wide { max-width: var(--wide); }
.section:not(#method):not(#cite), #recovery, .robot-experiment, .droid-evaluation { min-height: 0; }
#method { align-content: start; padding-top: clamp(32px, 5vh, 64px); }
.method-anim, #method > .method-steps { width: calc((min(100%, 1640px) + min(100%, (100svh - var(--method-chrome)) * 1000 / 392)) / 2); }
.compare { max-width: min(100%, calc((100svh - 240px) * var(--compare-ar, 99))); margin-inline: auto; }
.compare { width: 100%; }
@media (min-width: 1069px) { :root { --gut: 32px; } }
@media (min-width: 1280px) { .page-layout { padding-right: 16px; } }
.method-anim, #method > .method-steps { width: calc((min(100%, 1900px) + min(100%, (100svh - var(--method-chrome)) * 1000 / 392)) / 2); }
@media (min-width: 900px) {
  .robot-under { grid-template-columns: minmax(0, 900px) minmax(240px, 1fr); }
  .robot-under .robot-chart.afig { max-width: 900px; }
}
/* DROID evaluation: 10 sample trials per method and round, five to a row, so every round's
   block has the same size. */
.eval-thumbnails, .eval-result .eval-thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* The progress bar is a slider (compare.js): a taller hit area than the 4px bar, and a knob while it is in use. */
.compare-track { cursor: pointer; touch-action: none; }
.compare-track::before { content: ''; position: absolute; inset: -12px 0; }
.compare-knob { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--paper); opacity: 0; transition: opacity .15s; pointer-events: none; }
.compare-track:is(:hover, :focus-visible, .is-dragging) .compare-knob { opacity: 1; }
.compare-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }

/* Simulation: the two Robomimic tasks on the first row, the three LIBERO tasks on the second. */
@media (min-width: 1000px) {
  #fig-7-panels > .sim-panel:nth-child(n) { grid-column: span 2; }
  #fig-7-panels > .sim-panel:nth-child(1) { grid-column: 2 / span 2; }
  #fig-7-panels > .sim-panel:nth-child(2) { grid-column: 4 / span 2; }
}
/* Larger small text: chart
   ticks, axis names and line labels, the method keys, the task names under them, and the labels in the PointMaze,
   real-robot and evaluation figures. */
.chart .tick, .chart .axis-label, .chart .counter { font-size: 15px; }
.chart .end-label, .chart .callout-label { font-size: 15px; }
.chart .chart-title { font-size: 16px; }
.chart .marker text, .chart .ref-label, .chart .region-label { font-size: 14px; }
.afig-key { font-size: 16px; gap: 8px 22px; }
.method-filter { font-size: 16px; }
.method-switch button { font-size: 17px; }
.sim-name { font-size: 17px; }
.sim-name .kind { font-size: 14px; }
.compare-speed { font-size: 14px; }
.eval-method { font-size: 19px; }
.eval-rate { font-size: 22px; }
.eval-count { font-size: 14px; }
.eval-thumb-badge { font-size: 12px; }
.eval-tabs button { font-size: 16px; }
/* Real-robot charts keep a chart's proportions (main.js sizes them about 1.6:1), and DROID's evaluation clips take the
   narrower column beside its chart. */
@media (min-width: 920px) {
  .droid-eval-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px 48px; }
}
@media (min-width: 900px) {
  .robot-under { grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); }
  .robot-under .robot-chart.afig { max-width: 760px; }
}
/* Simulation in one row: the section runs wider than the others, and each panel's line labels show values only, with the key
   above naming the lines (paper_figures.js valueRoom). Below 1100px the panels wrap as before. */
@media (min-width: 1100px) {
  #results.section { max-width: 2000px; }
  #fig-7-panels { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px 18px; }
  #fig-7-panels > .sim-panel:nth-child(n) { grid-column: auto; }
  #fig-7 .sim-head { gap: 10px; }
  #fig-7 .sim-name { font-size: 16px; }
}
/* the evaluation block sits at the right edge of its column, as tall as the chart beside it (droid_training.js) */
@media (min-width: 920px) {
  .droid-eval-layout > .eval-detail { justify-self: end; width: 100%; }
}
/* YAM: the chart and the final rates sit together in the middle of the row */
@media (min-width: 900px) {
  .robot-under { grid-template-columns: minmax(0, 760px) minmax(260px, 380px); justify-content: center; }
}
/* Simulation in one row: task names take the same height, so every chart starts on the same line */
@media (min-width: 1100px) { #fig-7 .sim-head { min-height: 86px; align-items: flex-start; } }
/* beside the chart, each method's name and rate sit left of its 5 x 2 clips, so the height goes to the clips */
@media (min-width: 920px) {
  .droid-eval-layout .eval-result { grid-template-columns: minmax(96px, 120px) minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-items: start; gap: 2px 14px; padding: 6px 0; }
  .droid-eval-layout .eval-method { grid-row: 1; grid-column: 1; }
  .droid-eval-layout .eval-rate { grid-row: 2; grid-column: 1; }
  .droid-eval-layout .eval-count { grid-row: 3; grid-column: 1; }
  .droid-eval-layout .eval-thumbnails { grid-row: 1 / span 3; grid-column: 2; margin-top: 0; }
}
/* Simulation panels closer to square by running wider: the figure reaches into the section's side gutters and the
   panels sit closer together */
@media (min-width: 1100px) {
  #fig-7 { margin-inline: calc(8px - var(--gut)); }
  #fig-7-panels { column-gap: 12px; }
}
/* The step bar and its sentence sit at the foot of the method's screen, like a caption, with space between them and
   the drawing. */
@media (min-width: 920px) {
  #method { grid-template-rows: auto auto minmax(0, 1fr) auto; padding-bottom: clamp(32px, 5vh, 56px); }
  #method > .method-steps { align-self: end; margin-top: clamp(28px, 4vh, 48px); }
}
/* Contents: "Real robots" always lists each robot under it; its own entry darkens while that chapter is read. */
.toc-sub { list-style: none; margin: 0; padding: 0; }
.toc-chapter.is-open > .toc-link:not([aria-current]) { color: var(--ink); border-left-color: var(--ink-2); }
.toc .toc-sub-link { padding: 5px 12px 5px 24px; font-size: 13px; }
/* The recovery clip closes the Franka experiment, as its last part. */
.droid-recovery { margin-top: var(--gap-part); }
.droid-recovery > h4 { font-size: clamp(21px, 1.9vw, 26px); margin: 0 0 16px; }
.droid-recovery > p { max-width: var(--col); font-size: 17px; margin: 0 auto; }
.droid-recovery > h4 { max-width: var(--col); margin-inline: auto; } /* heading and lede in the text column, like every other part */
.droid-recovery > p + .compare { margin-top: var(--gap-lede); }
/* The real recordings and the replay in simulation share one slot, switched above it. */
.droid-recovery > p + .compare-views { margin-top: var(--gap-lede); }
.droid-recovery > .compare-views { max-width: var(--col); margin-inline: auto; } /* the switch sits in the text column too */
.droid-recovery > .compare-views + .compare, .droid-recovery > .compare[hidden] + .compare { margin-top: 16px; }
.droid-recovery > .compare[hidden] { display: none; }
#replay-compare .compare-lines, #yam-compare .compare-lines, #recovery-compare .compare-lines { display: none; }

/* A contents link lands with its heading near the top of the window, as "How VETO works" does:
   each section scrolls past its top padding, to the method's padding. */
:root { --land: clamp(32px, 5vh, 64px); }
.section:not(#method) { scroll-margin-top: calc(var(--land) - var(--sec)); }
#yam { scroll-margin-top: var(--land); }
#learning, #dexterous { scroll-margin-top: calc(var(--land) - 36px); }
/* Each contents entry on one line, "Dexterous manipulation" included. */
.toc .toc-sub-link { white-space: nowrap; padding-right: 0; }
@media (min-width: 1280px) { .toc { width: 172px; } }

/* The chart on its own, centred in the row. */
.robot-under { display: block; }
.robot-under .robot-chart.afig { margin-inline: auto; }
figcaption[hidden], .replay[hidden] { display: none; }

/* Hover definitions: <span class="term" tabindex="0" aria-describedby="def-x">term<span class="term-def" role="tooltip" id="def-x">…</span></span> */
.term { position: relative; cursor: help; text-decoration: underline dotted var(--ink-2); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.term:focus-visible { outline: 2px solid var(--veto); outline-offset: 2px; border-radius: 2px; }
.term-def {
  position: absolute; z-index: 30; left: 50%; top: calc(100% + 8px);
  width: max-content; max-width: min(340px, 86vw); padding: 10px 14px;
  background: var(--ink); color: var(--paper); border-radius: var(--radius-control, 4px);
  font: 400 0.82rem/1.45 var(--body); font-style: normal; text-align: left; text-decoration: none;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.18);
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity 0.15s, transform 0.15s, visibility 0s 0.15s;
}
.term:is(:hover, :focus, :focus-within) .term-def { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
@media (max-width: 720px) {
  /* Narrow screens: anchor to the paragraph so the popup never runs off the edge. */
  p:has(> .term) { position: relative; }
  .term { position: static; }
  .term-def { left: 0; right: 0; top: auto; width: auto; max-width: none; margin-top: 1.7em; transform: translateY(4px); }
  .term:is(:hover, :focus, :focus-within) .term-def { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .term-def { transition: none; } }

/* Simulation results: larger switch, key, task names, thumbnails and chart text. */
#fig-7 .method-filter { font-size: 18px; margin-bottom: 24px; }
#fig-7 .method-switch button { font-size: 19px; }
#fig-7 .afig-key { font-size: 18px; gap: 8px 26px; margin-bottom: 20px; }
#fig-7 .afig-key svg { width: 42px; height: 15px; }
#fig-7 .sim-name { font-size: 18px; }
#fig-7 .sim-name .kind { font-size: 15px; }
#fig-7 .sim-thumb { width: 78px; height: 78px; }
#fig-7 .sim-thumb .task-preview:not(.is-active) { transform: translateZ(0) scale(.325); }
#fig-7 .sim-head { min-height: 78px; }
#fig-7 .chart :is(.tick, .axis-label, .end-label) { font-size: 15px; }
@media (min-width: 1100px) { #fig-7 .sim-head { min-height: 100px; } }
/* Task names wrap to different heights: each chart sits at the bottom of its panel so the row of charts stays level. */
#fig-7-panels > .sim-panel { display: flex; flex-direction: column; }
#fig-7-panels > .sim-panel > .sim-head { flex: 1 0 auto; }
@media (min-width: 1100px) and (max-width: 1599px) { #fig-7 .sim-name { font-size: 16px; } #fig-7 .sim-thumb { width: 68px; height: 68px; } #fig-7 .sim-thumb .task-preview:not(.is-active) { transform: translateZ(0) scale(.283333); } }
/* A task instruction quoted in running text. */
.instr { font-family: var(--mono); font-size: 1.02em; letter-spacing: -.01em; }

/* Simulation task clips enlarge like the real-robot comparisons: a small lift on hover, then a click grows the clip
   out of its thumbnail into a larger view over the dimmed page. */
.sim-thumb { transition: transform 240ms cubic-bezier(.2, .7, .2, 1), box-shadow 240ms ease; }
@media (hover: hover) { .sim-thumb:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 8px 20px #0003; } }
.sim-thumb.is-zoomed { visibility: hidden; }
.task-zoom { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  display: grid; place-items: center; overflow: auto; background: #090c0be6; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); cursor: zoom-out;
  --paper: #131817; --ink: #eceeea; --ink-2: #a8afab; --rule: #313735; --veto: #5cc27f; }
.task-zoom:not([open]) { display: none; }
.task-zoom::backdrop { background: transparent; }
html:has(.task-zoom[open]) { overflow: hidden; }
.task-zoom-figure { width: min(calc(100vw - 48px), calc(100svh - 190px), 760px); margin: 0; }
.task-zoom-stage { aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: #0b0d0c; }
.task-zoom-stage video { display: block; width: 100%; height: 100%; object-fit: cover; }
.task-zoom figcaption { margin-top: 14px; font: 600 19px/1.3 var(--body); color: var(--ink); text-align: left; }
.task-zoom figcaption .kind { display: block; margin-top: 2px; font: 400 14px/1.3 var(--mono); color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .sim-thumb { transition: none; } }

/* The comparison's time bar is a scrubber: a thicker track, a wide grab area and a knob that is always there. */
.compare-track { height: 6px; border-radius: 3px; }
.compare-progress { border-radius: 3px; }
.compare-track::before { inset: -16px 0; }
.compare-knob { width: 16px; height: 16px; margin: -8px 0 0 -8px; opacity: 1; box-shadow: 0 0 0 3px var(--paper), 0 1px 4px #0005; transition: transform .15s; }
.compare-track:is(:hover, .is-dragging) .compare-knob { transform: scale(1.25); }
.compare-track.is-dragging { cursor: grabbing; }
.why-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 26px; margin: 0 0 18px; padding: 0; list-style: none; font: 600 15px/1.3 var(--mono); color: var(--ink-2); }
.why-key li { display: flex; align-items: center; gap: 7px; }
.why-key svg { height: 20px; width: auto; overflow: visible; }
.why-key .start { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6; }
.why-key .goal { fill: var(--goal); stroke: #8a6a1a; stroke-width: 1; }
.why-key .hit { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }
/* under each maze, one mark per episode in the verifier's colour: a check if it reached the goal, a veto sign if it
   ran out of steps; the same veto sign marks where the running episode stopped */
.why-row { display: block; width: 100%; height: auto; overflow: visible; }
.why-row .todo circle { fill: var(--rule); }
.why-row .reached path { fill: none; stroke: var(--side); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.why-row .missed :is(circle, path) { fill: none; stroke: var(--side); stroke-width: 1.3; stroke-linecap: round; }
.why-scene .out circle { fill: var(--paper); stroke: var(--side); stroke-width: 2; }
.why-scene .out path { fill: none; stroke: var(--side); stroke-width: 2; stroke-linecap: round; }
/* the count under each maze starts with the maze's red × */
.why-tally svg { height: .7em; width: auto; margin-right: .45em; overflow: visible; }
.why-tally .hit { fill: none; stroke: var(--red); stroke-width: 2.6; stroke-linecap: round; }
/* the link to the trainer page: beside the buttons, or on its own line on a phone */
.why-lab { margin-left: 16px; font: 600 13px/1.2 var(--mono); color: var(--ink); white-space: nowrap; }
@media (max-width: 760px) { .why-lab { display: block; width: fit-content; margin: 8px 0 0 8px; padding: 6px 0; } }

/* Simulation panels: a larger thumbnail, and each chart close under its task's name. The thumbnail is the poster at
   its own size; the clip plays in the enlarged view. */
#fig-7 .sim-thumb { width: 96px; height: 96px; }
@media (min-width: 1100px) { #fig-7 .sim-thumb { width: clamp(72px, 6.4vw, 108px); height: clamp(72px, 6.4vw, 108px); } }
#fig-7 .sim-thumb .task-preview, #fig-7 .sim-thumb .task-preview:not(.is-active) { width: 100%; height: 100%; transform: none; border-radius: 6px; }
#fig-7 .sim-head { min-height: 0; align-items: flex-start; margin-bottom: 0; }

/* Under a comparison's progress bar: which chapter to watch, and how fast. */
.compare-options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; margin-top: 14px; }
.compare-options .eval-tabs { align-items: center; }
.compare-options-label { font: 13px/1.3 var(--mono); color: var(--ink-2); margin-right: 4px; }

/* Training-target schematic: what each verifier is fitted to, and a track of one score over updates. */
.targets { max-width: var(--col); margin: 28px auto 0; }
.targets-failed .targets { display: none; }
.targets figcaption { margin-top: 16px; }
.targets .why-key { justify-content: flex-start; margin-bottom: 14px; }
.targets .why-key .mark-target, .targets-svg .mark-target { fill: var(--paper); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.targets .why-key .mark-pred { fill: var(--ink-2); }
.targets-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.targets-count b { color: var(--ink); }
.targets-svg { display: block; width: 100%; height: auto; overflow: visible; }
.targets-row { --side: var(--veto); --side-text: var(--veto); }
.targets-row[data-side="qtd"] { --side: var(--qtd); --side-text: var(--qtd-text); }
.targets-svg text { font-family: var(--mono); fill: var(--ink); }
.targets-svg .tick { fill: var(--ink-2); }
.targets-svg .track { fill: none; stroke: var(--rule); stroke-width: 2; stroke-linecap: round; }
.targets-svg .truth { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.targets-svg .mark-pred { fill: var(--side-text); }

/* Dexterous manipulation: one clip per task, side by side above the chart. */
.dex-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; width: 100%; max-width: 1100px; margin: 0 auto; }
.dex-videos figure { margin: 0; min-width: 0; }
.dex-videos video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; border-radius: var(--radius-control, 4px); }
.dex-videos figcaption { margin-top: 8px; font: 600 16px/1.3 var(--mono); color: var(--ink); }
@media (max-width: 700px) { .dex-videos { grid-template-columns: minmax(0, 1fr); } }

/* Dexterous manipulation: one column per task, the task's clip with its chart under it. */
.dex-task { min-width: 0; }
.dex-task .afig { width: 100%; max-width: none; margin: 24px 0 0; }

/* Training-target schematic: per method, its objective and a track from the first prediction to the recorded outcome.
   The thick bar is the gap the prediction still has to close. */
.targets-row + .targets-row { margin-top: 26px; }
.targets-name { margin: 0; font: 700 18px/1.3 var(--mono); color: var(--side-text); }
.targets .eq { margin: 8px 0 12px; }
.targets .eq .katex-display { margin: 0; text-align: left; }
.targets .eq .katex-display > .katex { text-align: left; }
.targets-svg .gap { fill: none; stroke: var(--side); stroke-width: 7; stroke-linecap: round; opacity: .28; }
.targets-svg .truth { stroke-width: 2.5; }
/* Q-TD's brace from its target to the recorded outcome, named "credit-assignment lag" */
.targets-svg .brace { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.targets-svg .lag { fill: var(--ink); font-weight: 600; }

/* A term in a panel title: the definition reads as body text, and opens leftward so it stays inside the page. */
h3 .term-def { left: auto; right: 0; font: 400 15px/1.45 var(--body); letter-spacing: 0; transform: translateY(4px); }
h3 .term:is(:hover, :focus, :focus-within) .term-def { transform: none; }
@media (max-width: 760px) { h3:has(> .term) { position: relative; } h3 .term-def { left: 0; } }

/* A chart drawn from sample numbers says so. */
.dex-task .afig { position: relative; }
.dex-placeholder { position: absolute; top: 0; right: 0; z-index: 1; margin: 0; padding: 2px 8px; border: 1px dashed var(--qtd, #d9822b); border-radius: 3px; font: 600 12px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }

/* A comparison's written caption, under its controls. */
.compare-note { margin-top: 14px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }

/* #why: one even gap between its blocks (the lede, the replay figure, the paragraph, the targets figure, the closing
   line). It grows with the window so each animation mostly has the screen to itself, and main.js has the two take
   turns. */
#why { --why-gap: clamp(72px, 13vh, 150px); }
#why > p + .why, #why > .why + p, #why > p + .targets, #why > .targets + p { margin-top: var(--why-gap); }

/* Single clips that enlarge like the real-robot comparisons: a lift and an Enlarge tag on hover, then the clip grows
   out of its place into a larger view (task_zoom.js). */
.zoom-stage { position: relative; cursor: zoom-in; border-radius: var(--radius-control, 4px); transition: transform 240ms cubic-bezier(.2, .7, .2, 1), box-shadow 240ms ease; }
.zoom-stage::after { content: 'Enlarge'; position: absolute; top: 10px; right: 10px; padding: 5px 9px 5px 27px; border-radius: var(--radius-control, 4px);
  background: #000000b3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 2.5h4v4M13.5 2.5 9 7M6.5 13.5h-4v-4M2.5 13.5 7 9'/%3E%3C/svg%3E") 9px 50% / 13px no-repeat;
  color: #fff; font: 12px/1.3 var(--mono); opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.zoom-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.zoom-stage:focus-visible::after { opacity: 1; }
@media (hover: hover) {
  .zoom-stage:hover { transform: translateY(-3px) scale(1.012); box-shadow: 0 12px 32px #0009; }
  .zoom-stage:hover::after { opacity: 1; }
}
.zoom-stage.is-zoomed { visibility: hidden; }
.task-zoom[data-shape="wide"] .task-zoom-figure { width: min(calc(100vw - 48px), calc((100svh - 190px) * 16 / 9), 1280px); }
.task-zoom[data-shape="wide"] .task-zoom-stage { aspect-ratio: 16 / 9; }
@media (prefers-reduced-motion: reduce) { .zoom-stage, .zoom-stage::after { transition: none; } }

/* Dexterous manipulation, larger: the two tasks fill the section's width. */
.dex-videos { max-width: none; gap: 28px 32px; }
.dex-videos figcaption { font-size: 18px; }

/* The method section fits one screen: the drawing takes the height left after the heading, step bar and caption
   (measured into --method-chrome by method_fit.js), never wider than its column and never too small to read; the step
   bar keeps the drawing's width. Short windows tighten the heading, spacing and caption first. */
#method { --method-chrome: 440px; }
@media (min-width: 920px) {
  .method-anim, #method > .method-steps { width: min(100%, 1900px, max(560px, (100svh - var(--method-chrome)) * 1000 / 392)); }
}
@media (min-width: 600px) and (max-width: 919px) {
  .method-anim { width: min(100%, 420px, max(330px, (100svh - var(--method-chrome)) * 3 / 5)); max-width: none; }
}
@media (min-width: 920px) and (max-height: 820px) {
  #method { gap: 10px; padding-top: 16px; padding-bottom: 16px; }
  #method > h2 { font-size: clamp(28px, 4.6vh, 40px); }
  #method > .method-steps { margin-top: 10px; }
  #method > .method-caption { font-size: 16px; line-height: 1.45; min-height: 0; }
  #method .method-step { font-size: 15px; }
  #method .method-phase { font-size: 12px; padding-bottom: 3px; }
}

/* Simulation panels name each axis once: "Success rate" down the left of the grid, "Environment steps" under it. In one
   row the first panel's y numbers sit in the gutter beside the label, and every plot is the same width. */
.sim-axes { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; }
.sim-ylabel { grid-row: 1; grid-column: 1; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font: 15px/1.2 var(--mono); color: var(--ink); }
.sim-axes > #fig-7-panels { grid-row: 1; grid-column: 2; }
.sim-xlabel { grid-row: 2; grid-column: 2; margin-top: 10px; text-align: center; font: 15px/1.2 var(--mono); color: var(--ink); }
@media (min-width: 1100px) {
  .sim-axes { column-gap: 52px; }
  .sim-ylabel { align-self: end; height: clamp(230px, 17vw, 390px); }
  #fig-7 .chart { overflow: visible; }
}
/* The task clips lift further on hover. */
@media (hover: hover) { .sim-thumb:hover { position: relative; z-index: 3; transform: translateY(-3px) scale(1.18); box-shadow: 0 12px 28px #0004; } }
/* Each robot's heading and lede sit in the same text column as the section's own. */
.robot-experiment > h3, .robot-experiment > p { max-width: var(--col); margin-left: auto; margin-right: auto; }

/* The tally under each maze is just the legend's cross and a count, centred under the maze. */
.why-tally { text-align: center; }
.why-tally svg { margin-right: .15em; vertical-align: -.02em; }

/* Every contents entry stays on one line. */
.toc .toc-link { white-space: nowrap; padding-right: 0; }

/* Simulation panels in one row sit closer together. */
@media (min-width: 1100px) { #fig-7-panels { column-gap: 6px; } }

/* Body text reads at one size everywhere: each robot's paragraphs match the section ledes. */
.robot-experiment > p, .droid-recovery > p { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.5; }
