:root {
  --ink: #142135;
  --muted: #526174;
  --subtle: #64748b;
  --line: #e1e7ef;
  --panel: #f5f7fb;
  --blue: #234f9b;
  --blue-soft: #edf3fc;
  --paper: #fff;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, video:focus-visible, .table-wrap:focus-visible, .citation-code:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}
p { margin: 0 0 16px; }
figure { margin: 0; min-width: 0; }
img, video { display: block; max-width: 100%; width: 100%; height: auto; }
video { aspect-ratio: 16 / 9; object-fit: contain; background: #080c13; }
figcaption { margin-top: 12px; color: var(--subtle); font-size: .86rem; line-height: 1.6; }
figcaption strong { color: var(--muted); font-weight: 600; }
h1, h2, h3, h4, h5 { line-height: 1.2; text-wrap: balance; }
h2 { margin: 8px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 500; letter-spacing: -.025em; }
h3 { margin: 0 0 12px; font-size: clamp(1.45rem, 3vw, 1.85rem); font-weight: 600; letter-spacing: -.025em; }
h4 { margin: 6px 0 12px; font-size: 1.27rem; font-weight: 600; letter-spacing: -.015em; }
.container { width: calc(100% - 48px); max-width: var(--max); margin: 0 auto; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 16px; padding: 10px 16px; background: white; border-radius: 6px; clip-path: inset(50%); }
.skip-link:focus { clip-path: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Retain the project's full-screen video cover. */
.hero-cover { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 100svh; overflow: hidden; color: white; text-align: center; background: #080c13; }
.hero-background, .hero-background video, .hero-overlay { position: absolute; inset: 0; }
.hero-background video { width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
.hero-overlay { z-index: 1; background: linear-gradient(180deg, rgba(3, 11, 24, .52), rgba(3, 11, 24, .4) 50%, rgba(3, 11, 24, .7)); pointer-events: none; }
.hero-headbar, .hero-content, .hero-footbar { position: relative; z-index: 2; }
.hero-headbar { display: flex; justify-content: flex-end; padding: 22px 32px; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 7px 16px; color: white; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; backdrop-filter: blur(8px); font-size: .9rem; font-weight: 600; transition: background .2s, border-color .2s; }
.button:hover { color: white; text-decoration: none; background: rgba(0,0,0,.5); border-color: rgba(255,255,255,.6); }
.hero-content { align-self: center; width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 60px 0 80px; }
.hero-title { margin: 0 0 26px; color: white; font-family: "Google Sans", "Noto Sans", sans-serif; font-size: clamp(4.6rem, 14vw, 11rem); line-height: .92; font-weight: 700; letter-spacing: -.055em; text-shadow: 0 4px 24px rgba(0,0,0,.3); }
.hero-subtitle { max-width: 980px; margin: 0 auto 30px; font-family: "Google Sans", "Noto Sans", sans-serif; font-size: clamp(1.65rem, 4vw, 3.8rem); line-height: 1.12; font-weight: 600; letter-spacing: -.025em; text-shadow: 0 3px 18px rgba(0,0,0,.35); text-wrap: balance; }
.hero-subtitle span { display: block; }
.authors { max-width: 1040px; margin: 18px auto 12px; color: rgba(255,255,255,.95); font-size: clamp(1rem, 1.8vw, 1.4rem); font-style: italic; line-height: 1.55; text-wrap: balance; }
.authors a { color: inherit; white-space: nowrap; }
.author-name { white-space: nowrap; }
.corresponding { margin: 0; color: rgba(255,255,255,.8); font-size: .9rem; }
.venue-logo { width: min(280px, 58vw); margin: 22px auto 0; filter: drop-shadow(0 3px 18px rgba(0,0,0,.4)); }
.hero-footbar { padding: 18px 24px 24px; }
.explore-link { display: inline-flex; align-items: center; gap: 22px; color: rgba(255,255,255,.85); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.explore-link:hover { color: white; text-decoration: none; }
.explore-link span { font-size: 1.25rem; }

/* A quiet, persistent reading guide. */
.page-nav { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.nav-inner { display: flex; align-items: center; justify-content: center; min-height: 64px; }
.mini-nav { display: flex; align-items: stretch; gap: 27px; margin: 0; }
.mini-nav a { display: flex; align-items: center; min-height: 64px; color: var(--muted); border-bottom: 2px solid transparent; font-size: .86rem; font-weight: 550; white-space: nowrap; transition: color .2s, border-color .2s; }
.mini-nav a:hover, .mini-nav a[aria-current="location"] { color: var(--blue); border-bottom-color: var(--blue); text-decoration: none; }

main > section { padding: 84px 0; }
.section-heading { max-width: 100%; margin: 0 auto 36px; text-align: center; }
.eyebrow { display: block; margin: 0 0 10px; color: var(--blue); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.section-intro { margin: 0 auto; color: var(--muted); font-size: 1.06rem; line-height: 1.8; }
.section-intro, figcaption, .training-copy p, .hardware-notes dd, .finding, .result-note { text-wrap: pretty; }
.section-band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-media { margin-top: 32px; }
.feature-media video, .media-panel video, .demo-card video { border: 1px solid var(--line); border-radius: 12px; }
.feature-media video { border-radius: 16px; box-shadow: 0 16px 45px rgba(22,44,78,.08); }
.feature-media figcaption { text-align: center; }
.overview-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0 38px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.overview-points div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.overview-points strong { display: block; margin-bottom: 4px; font-size: .98rem; font-weight: 600; }
.teaser { max-width: 900px; margin: 0 auto; }
.teaser img { border-radius: 12px; }
.teaser figcaption { max-width: 760px; margin: 16px auto 0; text-align: center; }
.abstract-details { max-width: 850px; margin: 32px auto 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { width: fit-content; cursor: pointer; color: var(--blue); font-size: .9rem; font-weight: 600; }
details[open] > summary { margin-bottom: 14px; }
.abstract-details p { margin-bottom: 0; color: var(--muted); font-size: .95rem; line-height: 1.85; }
.figure-panel { padding: 16px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.figure-panel figcaption { max-width: 850px; margin: 16px auto 0; text-align: center; }
.training-layout { margin-top: 36px; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 34px; }
.training-copy h3 { font-size: 1.3rem; }
.training-copy p { color: var(--muted); font-size: .92rem; }
.mixture { margin: 22px 0 0; }
.mixture-bar { display: flex; height: 12px; overflow: hidden; border-radius: 5px; }
.mixture-base { width: 70%; background: #234f9b; }
.mixture-stall { width: 20%; background: #7798cf; }
.mixture-drift { width: 10%; background: #bfd0eb; }
.mixture-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .76rem; color: var(--muted); }
.mixture-key span { display: inline-flex; align-items: center; gap: 6px; }
.mixture-key i { width: 8px; height: 8px; border-radius: 2px; }
.hardware-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 28px 0 0; }
.hardware-notes div { border-top: 1px solid var(--line); padding-top: 18px; }
.hardware-notes dt { margin-bottom: 8px; font-size: .96rem; font-weight: 600; }
.hardware-notes dd { margin: 0; color: var(--muted); font-size: .88rem; }

/* Evidence follows the paper's real-world → simulation → ablation progression. */
.experiment-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0 0 22px; }
.experiment-index a { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #cdd9eb; color: var(--ink); font-size: .92rem; font-weight: 600; }
.experiment-index a:hover { color: var(--blue); text-decoration: none; border-color: var(--blue); }
.experiment-index span { color: var(--blue); font-size: .73rem; }
.experiment-index b { margin-left: auto; font-weight: 400; }
.results-key { color: var(--subtle); font-size: .78rem; margin: 0; }
.experiment-group { margin-top: 64px; }
.experiment-group + .experiment-group { padding-top: 48px; border-top: 1px solid var(--line); }
.group-heading { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 32px; }
.chapter-mark { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border: 1px solid #d8e4f6; border-radius: 50%; font-size: .85rem; font-weight: 650; }
.group-heading h3 { margin: 2px 0 8px; }
.group-heading p { max-width: 790px; color: var(--muted); font-size: .96rem; margin: 0; }
.experiment + .experiment { margin-top: 50px; padding-top: 36px; border-top: 1px solid var(--line); }
.experiment-heading { max-width: 850px; margin-bottom: 24px; }
.experiment-heading .eyebrow { font-size: .67rem; margin-bottom: 8px; }
.experiment-heading p { color: var(--muted); font-size: .94rem; margin-bottom: 0; }
.media-panel { margin: 22px 0 0; }
.media-heading { margin: 22px 0 12px; color: var(--muted); font-size: .82rem; font-weight: 600; }
.metric-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.metric-tags span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--muted); font-size: .76rem; }
.finding { margin: 20px 0 0; padding-left: 18px; border-left: 2px solid #8daada; color: var(--muted); font-size: .92rem; line-height: 1.75; }
.finding strong { color: var(--ink); font-weight: 600; }
.evaluation-details { margin-top: 20px; color: var(--muted); font-size: .85rem; }
.evaluation-details p { max-width: 900px; margin-bottom: 10px; }
.result-panel { margin-top: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.result-heading { padding: 20px 24px 16px; }
.result-label { color: var(--blue); font-size: .66rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.result-heading h5 { margin: 5px 0 6px; font-size: 1.05rem; font-weight: 600; }
.result-heading p { margin: 0; color: var(--muted); font-size: .85rem; }
.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: -2px; }
.results-table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.results-table th, .results-table td { padding: 13px 22px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.results-table thead th { color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); font-size: .78rem; font-weight: 600; }
.results-table th:first-child { text-align: left; }
.results-table tbody th { font-weight: 500; }
.results-table td { white-space: nowrap; }
.results-table .ours, .results-table .ours-row > * { background: var(--blue-soft); }
.results-table th.ours, .results-table .ours-row > th { color: var(--blue); font-weight: 600; }
.results-table strong { color: var(--ink); font-weight: 700; }
.results-table .task-group th { padding: 9px 22px; color: var(--muted); background: var(--panel); font-size: .73rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.results-table .sample-count { margin-left: 5px; color: var(--subtle); font-size: .78rem; font-weight: 400; }
.results-table .unit { color: var(--subtle); font-size: .74rem; font-weight: 400; white-space: nowrap; }
.results-table.execution-table { min-width: 850px; font-size: .84rem; }
.execution-table th:first-child { width: 28%; }
.result-note { margin: 0; padding: 13px 24px 17px; color: var(--subtle); font-size: .76rem; line-height: 1.7; }
.table-scroll-hint { display: none; }
.replay-results { max-width: 800px; margin-left: auto; margin-right: auto; }

.demo-group + .demo-group { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.demo-group > p { max-width: 800px; color: var(--muted); font-size: .94rem; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.demo-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.demo-card { min-width: 0; }
.demo-card figcaption { margin-top: 12px; }
.demo-card h4 { font-size: .98rem; margin: 0 0 5px; letter-spacing: 0; }
.tongs-grid .demo-card { padding: 9px; border: 1px solid var(--line); background: white; border-radius: 12px; }
.tongs-grid .demo-card h5 { margin: 2px 0 10px; text-align: center; font-size: .85rem; font-weight: 600; }
.tongs-grid .demo-card video { border-radius: 7px; }
.citation-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.citation-header h2 { margin: 0; font-size: 2rem; }
.copy-button { min-height: 38px; padding: 7px 16px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--blue); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.copy-button:hover { background: var(--blue-soft); }
.citation-code { margin: 0; padding: 22px 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .82rem; line-height: 1.8; tab-size: 2; }
.citation-code code { font: inherit; }
footer { padding: 28px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: center; }
.footer-inner a { font-size: .8rem; white-space: nowrap; }

@media (min-width: 1024px) {
  .replay-evidence { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
  .replay-evidence .media-panel, .replay-evidence .result-panel { margin-top: 0; }
  .replay-evidence .results-table th, .replay-evidence .results-table td { padding: 12px 16px; }
}
@media (max-width: 900px) {
  .training-layout { grid-template-columns: 1fr; gap: 26px; }
  .hardware-notes { gap: 20px; }
  .mini-nav { gap: 22px; }
  .table-scroll-hint { display: block; margin-top: 9px; color: var(--subtle); font-size: .74rem; }
  .tongs-grid { gap: 12px; }
}
@media (max-width: 680px) {
  html { scroll-padding-top: 56px; }
  .container { width: calc(100% - 36px); }
  h2 { font-size: clamp(1.6rem, 6.8vw, 2rem); }
  main > section { padding: 56px 0; }
  .section-heading { margin-bottom: 28px; }
  .section-intro { font-size: .98rem; }
  .hero-headbar { justify-content: center; padding: 18px 14px 0; }
  .hero-content { padding: 56px 0 60px; }
  .hero-subtitle { max-width: 520px; font-size: clamp(1.25rem, 6vw, 1.65rem); }
  .hero-footbar { padding-bottom: 20px; }
  .nav-inner { width: 100%; justify-content: center; min-height: 56px; padding: 0 18px; }
  .mini-nav { width: 100%; justify-content: space-between; gap: 12px; }
  .mini-nav a { min-height: 56px; font-size: .76rem; }
  .overview-points { gap: 12px; margin: 24px 0 30px; padding: 20px 0; text-align: center; }
  .overview-points div + div { padding-left: 0; border-left: 0; }
  .overview-points strong { font-size: .78rem; line-height: 1.4; }
  .figure-panel { padding: 10px; border-radius: 12px; }
  .hardware-notes { grid-template-columns: 1fr; gap: 22px; }
  .experiment-index { gap: 16px; }
  .experiment-index a { flex-wrap: wrap; gap: 6px; font-size: .82rem; line-height: 1.4; }
  .experiment-index span { flex-basis: 100%; }
  .experiment-index b { display: none; }
  .experiment-group { margin-top: 42px; }
  .experiment-group + .experiment-group { padding-top: 32px; }
  .group-heading { gap: 14px; margin-bottom: 24px; }
  .chapter-mark { width: 34px; height: 34px; font-size: .73rem; }
  .group-heading h3 { font-size: 1.4rem; }
  .group-heading p { font-size: .9rem; }
  .experiment + .experiment { margin-top: 34px; padding-top: 28px; }
  .experiment-heading p { font-size: .9rem; }
  .result-heading { padding: 18px 16px 14px; }
  .result-note { padding: 12px 16px 16px; }
  .results-table { min-width: 540px; }
  .results-table th, .results-table td { padding: 12px 16px; }
  .results-table.replay-table { min-width: 0; font-size: .81rem; }
  .replay-table th, .replay-table td { padding: 12px 9px; }
  .demo-grid, .demo-grid.two-up { grid-template-columns: 1fr; gap: 24px; }
  .tongs-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
