/* BURGER project page. Plain CSS, no framework.
   Palette: ink on white with one warm accent (the pen's red ink). LIBERO/BURGER chart hues
   follow the paper's Fig. 2 (blue / red-orange) and were checked for CVD separation and contrast. */
:root {
  --ink: #17171a;
  --ink-2: #4c4b47;
  --muted: #7d7b74;
  --line: #e7e4dd;
  --line-2: #d6d2c8;
  --paper: #ffffff;
  --tint: #f7f6f2;
  --accent: #b53b25;          /* text-safe red (5.6:1 on white) */
  --lib: #3d6fb0;             /* LIBERO in charts */
  --bur: #d4553a;             /* BURGER in charts */
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c-other: #c9c6be;  /* route clusters */
  --radius: 6px;
  --maxw: 1160px;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.62 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
q { quotes: "“" "”"; font-style: normal; }
sub { font-size: .7em; line-height: 0; }
b, strong { font-weight: 600; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; border-radius: 4px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 820px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: 56px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 600 15px/1 var(--sans); letter-spacing: .16em; text-decoration: none; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.topbar ul a { display: block; padding: 7px 11px; font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: 5px; }
.topbar ul a:hover { color: var(--ink); background: var(--tint); }
.topbar ul a.active { color: var(--ink); }
.topbar ul a.active::after { content: ""; display: block; height: 2px; margin-top: 3px; background: var(--accent); border-radius: 1px; }
.nav-toggle { display: none; }
/* ---------- hero ---------- */
.hero { padding: 56px 0 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 18px; font: 500 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-weight: 400; }
.wordmark { display: block; font: 560 clamp(56px, 8.4vw, 104px)/.92 var(--serif); letter-spacing: -.02em; font-variation-settings: "opsz" 144; }
.subtitle { display: block; margin-top: 18px; font: 400 clamp(19px, 2vw, 23px)/1.35 var(--serif); color: var(--ink-2); max-width: 30ch; font-variation-settings: "opsz" 24; }
.subtitle em { font-style: normal; color: var(--accent); }
.authors { margin: 22px 0 0; font-size: 15px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.btn {
  display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 999px;
  font: 500 14px/1 var(--sans); text-decoration: none; background: var(--ink); color: #fff; border: 1px solid var(--ink);
}
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.off { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); cursor: default; }
.tldr { margin: 26px 0 0; font-size: 17.5px; color: var(--ink-2); max-width: 54ch; }
.tldr strong { color: var(--ink); }
.hero-media { margin: 0; }
.hero-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #d9d2c6; }
.hero-media figcaption, figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); margin: 56px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 22px 20px 20px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 6px 0 0; font: 500 34px/1.05 var(--sans); letter-spacing: -.02em; }
.stats span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* ---------- sections ---------- */
.sec { padding: 104px 0; }
.sec.tint { background: var(--tint); }
.kicker { margin: 0 0 12px; font: 500 13px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h2 { margin: 0 0 20px; font: 400 clamp(32px, 4vw, 46px)/1.08 var(--serif); letter-spacing: -.015em; max-width: 24ch; font-variation-settings: "opsz" 72; }
h3 { margin: 0 0 8px; font: 600 17px/1.35 var(--sans); letter-spacing: -.005em; }
p { margin: 0 0 14px; }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 66ch; margin-bottom: 40px; }
.lede b { color: var(--ink); }
.small { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.hint { color: var(--muted); font-weight: 400; font-size: .92em; }
.strip-title { margin: 0 0 12px; font-size: 14.5px; font-weight: 600; }
.math { font-family: var(--serif); white-space: nowrap; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 36px; border-top: 1px solid var(--ink); }
.three article { padding: 24px 32px 8px 0; }
.three article + article { padding-left: 32px; border-left: 1px solid var(--line); }
.three p { color: var(--ink-2); }
.num { display: inline-block; margin-bottom: 14px; font: 500 13px/1 var(--mono); color: var(--accent); }
.scope { margin-top: 36px; max-width: 72ch; font-size: 15.5px; color: var(--muted); }
/* ---------- evidence: trajectory explorer ---------- */
.explorer { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.ex-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ex-panel { margin: 0; }
.ex-panel figcaption { margin: 0 0 10px; font: 600 14.5px/1.4 var(--sans); color: var(--ink); min-height: 2.8em; }
.ex-instr { display: block; font-weight: 400; color: var(--ink-2); }
.ex-instr::before { content: "“"; } .ex-instr::after { content: "”"; }
.ex-panel canvas { width: 100%; height: auto; aspect-ratio: 1; background: #fcfcfb; border: 1px solid var(--line); border-radius: var(--radius); }
.ex-read { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); }
.ex-read b { font: 600 22px/1 var(--sans); color: var(--ink); margin-right: 2px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.sw-lib { background: var(--lib); } .sw-bur { background: var(--bur); }
.ex-controls { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.5px; }
.tog { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.tog input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.tog .hint { margin-left: 2px; }
.linkbtn { font: 500 14.5px var(--sans); background: none; border: 0; padding: 6px 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { text-decoration-color: var(--ink); }
.strip-wrap { margin-top: 26px; }
.strip { width: 100%; height: 190px; overflow: visible; touch-action: manipulation; }
.strip .axis text, .ksweep text { font: 12px var(--sans); fill: var(--muted); }
.strip .axis line, .ksweep .grid line { stroke: var(--line); }
.strip .lbl { font: 600 12.5px var(--sans); fill: var(--ink-2); }
.strip .meanlbl { font: 500 12px var(--sans); fill: var(--ink); }
.strip .xcap { font: 12px var(--sans); fill: var(--muted); }
.strip circle { stroke: #fff; stroke-width: 1.5; cursor: pointer; transition: r .12s; }
.strip circle.sel { stroke: var(--ink); stroke-width: 2; }
.strip circle:hover { r: 6; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; padding: 7px 10px; border-radius: 5px; max-width: 280px; opacity: 0; transition: opacity .1s; }
.tip.on { opacity: 1; }
.tip b { font-weight: 600; }

.evid-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.evid-notes p { color: var(--ink-2); font-size: 15.5px; }
.ksweep { margin: 4px 0 10px; }
.ksweep svg { width: 100%; height: 170px; overflow: visible; }
.ksweep .l-lib { stroke: var(--lib); } .ksweep .l-bur { stroke: var(--bur); }
.ksweep .d-lib { fill: var(--lib); } .ksweep .d-bur { fill: var(--bur); }
.ksweep .end { font: 600 12.5px var(--sans); fill: var(--ink-2); }

details.method { margin-top: 36px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
details > summary { cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 10px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; font: 400 18px/1 var(--mono); width: 14px; color: var(--accent); }
details[open] > summary::before { content: "–"; }
details.method p { color: var(--ink-2); font-size: 15.5px; max-width: 80ch; padding-bottom: 8px; }
.same { margin-top: 56px; }
/* ---------- video tiles (shared) ---------- */
.vgrid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); } .g8 { grid-template-columns: repeat(8, 1fr); gap: 8px; }
.tile { margin: 0; position: relative; }
.tile .frame { position: relative; overflow: hidden; border-radius: var(--radius); background: #e9e6df; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.tile .badge {
  position: absolute; left: 8px; top: 8px; font: 500 11px/1 var(--mono); letter-spacing: .02em;
  padding: 4px 6px; border-radius: 3px; background: rgba(23, 23, 26, .72); color: #fff;
}
.tile .play {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: 0; display: grid; place-items: center; cursor: pointer; padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
.tile .play svg { width: 11px; height: 11px; fill: var(--ink); }
.tile.playing .play .i-play, .tile:not(.playing) .play .i-pause { display: none; }

/* ---------- pipeline ---------- */
.pipe-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.chip { font: 500 13.5px/1 var(--sans); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pipe-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: .82fr 1fr 1fr 1fr 1.7fr; gap: 0; counter-reset: s; }
.pipe-stages li { padding: 0 16px; position: relative; }
.pipe-stages li:first-child { padding-left: 0; }
.pipe-stages li:last-child { padding-right: 0; }
.pipe-stages li + li::before {
  content: ""; position: absolute; left: -6px; top: 72px; width: 12px; height: 12px;
  border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg);
}
.stage-media { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; display: grid; place-items: center; margin-bottom: 14px; }
.stage-media img, .stage-media canvas { width: 92%; height: 92%; object-fit: contain; }
.stage-media.wide { aspect-ratio: 440 / 330; background: #d8d8d6; }
.stage-media.wide video { width: 100%; height: 100%; object-fit: cover; }
.prompt-card { background: var(--ink); border-color: var(--ink); }
.prompt-card .q { font: 400 21px/1.3 var(--serif); color: #fff; padding: 16px; text-align: center; }
.prompt-card .q::before { content: "“"; } .prompt-card .q::after { content: "”"; }
.pipe-stages h3 { font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.step { font: 500 12px/1 var(--mono); color: var(--accent); }
.pipe-stages p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.pipe-note { margin-top: 14px; max-width: 90ch; }
.sims { margin-top: 64px; display: grid; grid-template-columns: 1fr 2.6fr; gap: 40px; align-items: start; }
.sims-head p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- dataset ---------- */
.ds-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 8px 0 44px; }
.ds-facts p { color: var(--ink-2); font-size: 15.5px; border-top: 1px solid var(--ink); padding-top: 14px; }
.ds-facts b { color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.gallery .tile .frame { aspect-ratio: 440 / 330; }
.gallery .tile figcaption { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.gallery .tile .play { display: none; }
/* ---------- results ---------- */
.tabs [role="tablist"] { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 32px; overflow-x: auto; }
.tabs [role="tab"] {
  font: 500 15px var(--sans); padding: 12px 14px 13px; border: 0; background: none; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs [role="tabpanel"] p { color: var(--ink-2); }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.seg button { font: 500 14px var(--sans); border: 0; background: none; padding: 6px 14px; border-radius: 999px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--ink); color: #fff; }
.fig6 img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
#comp-videos { margin-bottom: 32px; }
#comp-videos .frame { aspect-ratio: 1120 / 800; }
.canvas-rows { display: grid; gap: 14px; }
.crow { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; }
.crow .t { font-size: 14px; color: var(--ink-2); }
.crow .t b { display: block; font-weight: 600; color: var(--ink); }
.crow .scroller { overflow-x: auto; border-radius: 4px; }
.crow img { height: 92px; width: auto; max-width: none; }
.tbl { border-collapse: collapse; width: 100%; font: 15px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.tbl caption { font-family: var(--sans); text-align: left; font-size: 13.5px; color: var(--muted); padding-bottom: 10px; caption-side: top; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 0; }
.tbl thead th { font-weight: 500; font-size: 13px; color: var(--muted); border-bottom-color: var(--ink); vertical-align: bottom; }
.tbl tbody th { font-weight: 500; }
.tbl tr.ours td, .tbl tr.ours th { font-weight: 600; }
.tbl tr.ours th::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: 2px; }
.tbl .u { font-weight: 400; color: var(--muted); font-size: 12px; }
.tbl tr.ref th, .tbl tr.ref td { color: var(--muted); }
.tbl td.bad { color: var(--accent); font-weight: 600; }
.tbl .web { margin-left: 8px; font: 500 11px/1 var(--mono); padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--ink-2); }
.tbl-scroll { overflow-x: auto; }
.numtbl td { white-space: nowrap; }
.numtbl th[scope=row] { white-space: nowrap; }
.numtbl tbody th .u { display: block; }
.paperfig { margin: 56px 0 0; }
.paperfig.tight { margin-top: 28px; }
.paperfig img { width: 100%; height: auto; border-radius: var(--radius); background: #fff; }
.paperfig figcaption b { color: var(--ink); font-weight: 600; }

/* ---------- diagnosis ---------- */
.circ { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.circ .frame { aspect-ratio: 1000 / 760; }
.circ figcaption { font-weight: 600; color: var(--ink); }
.circ figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.findings { margin-top: 56px; }
.findings h3 + p { margin-bottom: 26px; }
.fail { margin-top: 56px; align-items: center; grid-template-columns: 1.1fr 1fr; }
.fail figure { margin: 0; }
.fail img { width: 100%; height: auto; border-radius: var(--radius); background: #fff; }
/* ---------- real robot ---------- */
.real-rows { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.real-row { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 32px 0; border-bottom: 1px solid var(--line); align-items: start; }
.real-row header p { color: var(--ink-2); font-size: 15.5px; }
.real-row .frame, .more .frame, .collect .frame { aspect-ratio: 640 / 400; }
details.more { margin-top: 8px; border-bottom: 1px solid var(--line); }
details.more .vgrid { padding: 6px 0 24px; }
.collect { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-top: 56px; align-items: start; }
.collect p { color: var(--ink-2); font-size: 15.5px; }
.collect .frame { aspect-ratio: 1280 / 660; }

/* ---------- video / limits / cite / footer ---------- */
.ovid { margin: 0; }
.ovid video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #111; }
.limits { list-style: none; padding: 0; margin: 0; }
.limits li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.limits li:last-child { border-bottom: 1px solid var(--line); }
.limits b { color: var(--ink); }
.bib { position: relative; }
.bib pre { margin: 0; padding: 22px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; font: 13.5px/1.6 var(--mono); color: var(--ink-2); }
.copy { position: absolute; right: 10px; top: 10px; font: 500 12.5px var(--sans); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--paper); cursor: pointer; color: var(--ink-2); }
.copy:hover { border-color: var(--ink); color: var(--ink); }
.foot { padding: 36px 0 48px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.foot p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { order: -1; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .pipe-stages { grid-template-columns: repeat(4, 1fr); row-gap: 28px; }
  .pipe-stages li:nth-child(5) { grid-column: 1 / -1; padding: 0; }
  .pipe-stages li:nth-child(5)::before { display: none; }
  .stage-media.wide { max-width: 640px; }
  .sims { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 860px) {
  body { font-size: 16.5px; }
  .wrap, .topbar-in { padding: 0 20px; }
  .sec { padding: 72px 0; }
  .nav-toggle { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; font: 500 14px var(--sans); background: none; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); cursor: pointer; }
  .topbar ul { display: none; position: absolute; right: 12px; top: 52px; flex-direction: column; min-width: 190px; padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.08); }
  .topbar ul.open { display: flex; }
  .topbar ul a { padding: 10px 12px; font-size: 15px; }
  .topbar ul a.active::after { display: none; }
  .three, .evid-notes, .ds-facts { grid-template-columns: 1fr; gap: 0; }
  .three article, .three article + article { padding: 22px 0 6px; border-left: 0; border-top: 1px solid var(--line); }
  .three article:first-child { border-top: 0; }
  .evid-notes { gap: 28px; }
  .ds-facts { gap: 18px; }
  .ex-panels { gap: 14px; }
  .explorer { padding: 16px; }
  .split, .real-row, .collect, .fail { grid-template-columns: 1fr; gap: 20px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g8 { grid-template-columns: repeat(4, 1fr); }
  .circ { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .crow { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .hero { padding-top: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div { padding: 16px 0 14px; border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .stats > div:last-child { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .stats dd { font-size: 28px; }
  .lede { font-size: 17.5px; }
  .ex-panels { grid-template-columns: 1fr; }
  .ex-panel figcaption { min-height: 0; }
  .pipe-stages { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .pipe-stages li { padding: 0; }
  .pipe-stages li::before { display: none; }
  .g2 { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .g3 .tile figcaption { font-size: 12px; }
  .g3 .badge { display: none; }
  .real-row .g2, .collect .g2 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .circ { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .circ .badge { display: none; }
  .circ figcaption { font-size: 12px; }
  .circ figcaption span { font-size: 11.5px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tabs [role="tab"] { padding: 10px 10px 11px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .ex-controls, .copy, .nav-toggle { display: none !important; }
  .sec { padding: 28px 0; }
}
/* speed badges: quiet on dense grids, visible on hover / while playing */
.gallery .badge, .g8 .badge { opacity: 0; transition: opacity .15s; }
.gallery .tile:hover .badge, .gallery .tile.playing .badge { opacity: 1; }
.g8 .badge { display: none; }
.real-row .src { font: 500 12.5px/1.4 var(--mono); color: var(--muted); margin-top: 4px; }

/* ================= v2: paper-style layout (one narrative: abstract → motivation → method → experiments → real) ================= */
.center { text-align: center; }
.hero { padding: 64px 0 8px; }
.hero .center .subtitle { margin-left: auto; margin-right: auto; max-width: 34ch; }
.hero .center .links { justify-content: center; }
.hero-media { margin: 40px auto 0; max-width: 1040px; }
.hero-media figcaption { text-align: center; }
.stats { margin-top: 44px; }

.sec { padding: 88px 0; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.secnum { margin: 0 0 6px; font: 500 13px/1 var(--mono); color: var(--accent); }
.sec-head h2, #abstract h2, #video h2, #limits h2, #cite h2 { margin-left: auto; margin-right: auto; max-width: none; text-align: center; }
.sec-head .sub { font: 400 19px/1.5 var(--serif); color: var(--ink-2); margin: 0; font-variation-settings: "opsz" 24; }
.abstract { font-size: 17px; line-height: 1.7; color: var(--ink-2); text-align: justify; hyphens: auto; }
.wrap-text { max-width: 760px; margin: 0 auto 28px; color: var(--ink-2); }
.wrap-text b, .wrap-text em { color: var(--ink); }
.reasons { margin: 0 0 14px; padding-left: 1.3em; }
.reasons li { margin-bottom: 6px; padding-left: 4px; }
.reasons li::marker { color: var(--accent); font: 500 14px var(--mono); }

.subsec { max-width: 760px; margin: 64px auto 14px; font: 600 20px/1.3 var(--sans); letter-spacing: -.01em; }
.sec-head + .subsec, .sec-head + .wrap-text + .subsec { margin-top: 8px; }
.fig { margin: 0 0 28px; }
.fig > figcaption { max-width: 860px; margin: 12px auto 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.fig > figcaption b { color: var(--ink); }
.fig img.below { width: 100%; height: auto; margin-top: 14px; border-radius: var(--radius); background: #fff; }
.fig > img { width: 100%; height: auto; border-radius: var(--radius); background: #fff; }
.split2 { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: start; margin-top: 12px; }
.split2 .g4 { gap: 8px; }
.split { max-width: 1040px; margin: 0 auto 28px; align-items: center; }
.split > p { color: var(--ink-2); margin: 0; }
.fail figure { margin: 0; }
#experiments .tbl-scroll { max-width: 860px; margin: 8px auto 0; }
details.method { max-width: 860px; margin-left: auto; margin-right: auto; }

/* composition: two rollouts + four selected final canvases */
#comp-videos { max-width: 860px; margin: 0 auto 14px; }
#comp-videos .frame { aspect-ratio: 1120 / 800; }
.compsel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 1040px; margin: 0 auto; }
.compsel figure { margin: 0; }
.compsel img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #e8e8e8; }
.compsel figcaption { margin-top: 6px; font-size: 13.5px; color: var(--ink); }
.compsel figcaption span { display: block; color: var(--muted); font-size: 12.5px; }
.canvas-rows { padding: 4px 0 18px; }

.real-row { grid-template-columns: 1fr 1.8fr; }
details.more .collect { padding-top: 0; }
details.more .collect .frame { aspect-ratio: 1280 / 660; }
details.more > p.small { margin: 0 0 8px; }

@media (max-width: 860px) {
  .split2 { grid-template-columns: 1fr; gap: 24px; }
  .compsel { grid-template-columns: repeat(2, 1fr); }
  .subsec { margin-top: 48px; }
  .abstract { text-align: left; }
}

/* v2 fixes */
.subsec, .wrap-text { max-width: 860px; }
.split { max-width: 860px; align-items: start; }
.split.fail { grid-template-columns: 1fr 1.3fr; }
@media (max-width: 860px) {
  .real-row { grid-template-columns: 1fr; gap: 14px; }
  .split.fail { grid-template-columns: 1fr; }
  .bib pre { white-space: pre-wrap; word-break: break-word; }
}
@media (max-width: 560px) {
  .tbl .web { display: block; width: max-content; margin: 6px 0 0; }
  details.more > summary { flex-wrap: wrap; }
  details.more > summary .hint { flex-basis: 100%; padding-left: 24px; }
  .circ { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .circ figcaption span { display: none; }
  .circ .play { display: none; }
}
