:root {
  --ink: #1d2126;
  --ink-2: #4a525c;
  --ink-3: #7a838e;
  --rule: #e3e6ea;
  --paper: #ffffff;
  --paper-alt: #f6f7f9;
  --accent: #0070c0;        /* Fig. 1 training trajectory */
  --accent-soft: #e6f1fa;
  --navy: #042433;          /* Fig. 1 CFG velocity */
  --warn: #b4462b;          /* conditional-velocity terms */
  --warn-soft: #fbeee9;
  --c0: #1f77b4; --c1: #ff7f0e; --c2: #2ca02c; --c3: #d62728;  /* tab10, as in the paper plots */
  --serif: "Castoro", "Times New Roman", serif;
  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 64px; background: var(--paper); }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.7; }
a { color: var(--accent); }
a:hover { color: var(--navy); }
.katex { font-size: 1.04em; }

/* ------------------------------------------------------------ hero */
.hero .hero-body { padding: 4.5rem 1.5rem 1.5rem; }
.venue { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .25rem .9rem; margin-bottom: 1.4rem; }
.publication-title { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.18 !important;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem) !important; letter-spacing: -.005em; }
.publication-authors { font-size: 1.2rem; margin-top: 1.4rem; color: var(--ink); }
.author-block { display: inline-block; margin: 0 .2rem; }
.publication-affil { color: var(--ink-2); margin-top: .2rem; }
.publication-note { color: var(--ink-3); font-size: .8rem; margin-top: .15rem; }
.publication-authors a { color: inherit; }
.publication-links { margin-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.link-pill { display: inline-flex; align-items: center; gap: .5rem; background: #24292f; color: #fff !important;
  border-radius: 999px; padding: .5rem 1.15rem; font-weight: 500; font-size: .95rem; transition: transform .2s, background .2s; }
.link-pill:hover { background: var(--accent); transform: translateY(-1px); }
.hf-icon { font-size: 1rem; line-height: 1; }

/* ------------------------------------------------------------ teaser (Fig. 1) */
.teaser { padding: 1.5rem 1.5rem 2.5rem; }
.fig1-wrap { margin: 0 auto; max-width: 1180px; }
.fig1-stage { width: 100%; aspect-ratio: 658 / 166; }
.fig1-stage svg, .fig1-stage img { width: 100%; height: 100%; display: block; }
.fig1-bar { display: flex; align-items: flex-start; gap: .8rem; margin-top: .9rem; }
.fig1-steps { flex: 1; list-style: none; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.fig1-steps li { position: relative; font-size: .78rem; color: var(--ink-3); text-align: center; padding-top: .65rem; transition: color .4s; }
.fig1-steps li::before { content: ""; position: absolute; left: 8%; right: 8%; top: 0; height: 3px; border-radius: 3px;
  background: var(--rule); }
.fig1-steps li::after { content: ""; position: absolute; left: 8%; top: 0; height: 3px; border-radius: 3px; width: 0;
  background: var(--accent); width: calc(84% * var(--p, 0)); }
.fig1-steps li.on { color: var(--ink); }
.fig1-wrap .caption { max-width: 860px; margin: 1.1rem auto 0; }

/* ------------------------------------------------------------ toc */
.toc { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc .container { display: flex; justify-content: center; gap: .3rem; overflow-x: auto; padding: 0 1rem; scrollbar-width: none; }
.toc a { color: var(--ink-2); font-size: .9rem; font-weight: 500; padding: .7rem .8rem; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------ sections */
.section { padding: 4.5rem 1.5rem; }
.section.alt { background: var(--paper-alt); }
.eyebrow { font-family: var(--mono); font-size: .78rem; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .3rem; }
.sec-title { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; line-height: 1.25; margin-bottom: 1.5rem; color: var(--ink); }
.sub-title { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin: 3.2rem 0 1.1rem; color: var(--ink); }
.sub-title .num { font-family: var(--mono); font-size: .95rem; color: var(--ink-3); margin-right: .55rem; vertical-align: .12em; }
.factor { margin: 2.8rem 0 1rem; }
.factor-tag { display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--navy);
  border: 1.5px solid var(--navy); border-radius: 6px; padding: .15rem .7rem; }

.prose p { margin-bottom: 1.05em; text-align: justify; hyphens: auto; }
.prose p.lead { font-size: 1.06rem; color: var(--ink); }
.abstract p { font-size: 1.04rem; }
.eq { position: relative; overflow-x: auto; overflow-y: hidden; margin: .4rem 0 1.2rem; padding: .2rem 0; }
.eq-key { background: var(--accent-soft); border-radius: 10px; padding: .55rem .8rem; }
.hl { background: linear-gradient(transparent 58%, #cfe5f6 58%); padding: 0 .1em; }

/* propositions */
.prop { border-left: 3px solid var(--accent); background: var(--paper-alt); border-radius: 0 10px 10px 0; padding: 1rem 1.3rem .3rem;
  margin: 1.2rem 0 1.6rem; }
.section.alt .prop { background: #fff; }
.prop p { margin-bottom: .8em; }
.prop-head { font-weight: 700; color: var(--accent); }
.prop-head span { font-weight: 500; color: var(--ink-2); }

.summary { border: 1px solid var(--rule); border-radius: 12px; padding: 1.3rem 1.5rem .4rem; margin-top: 2.6rem; background: #fff; }
.summary-head { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.summary p { margin-bottom: .9em; }

/* captions */
figure { margin: 1.8rem 0 2rem; }
.caption { font-size: .9rem; color: var(--ink-2); line-height: 1.6; margin-top: .8rem; text-align: left; }
.cap-num { font-weight: 600; color: var(--ink); }
.anim-note { display: block; margin-top: .35rem; font-size: .8rem; color: var(--ink-3); font-style: italic; }
.sub-caption { font-size: .82rem; color: var(--ink-2); text-align: center; margin-top: .2rem; }

/* tables */
.table-wrap { position: relative; overflow-x: auto; margin: 1.6rem 0 2rem; }
.paper-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.paper-table th { font-weight: 600; color: var(--ink); border-top: 1.6px solid var(--ink); border-bottom: 1px solid var(--ink); padding: .45rem .6rem; text-align: left; white-space: nowrap; }
.paper-table td { padding: .38rem .6rem; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
.paper-table tbody tr:last-child td { border-bottom: 1.6px solid var(--ink); }
.paper-table .num { text-align: right; }
.paper-table tr.group td { font-style: italic; color: var(--ink-3); background: var(--paper-alt); font-size: .82rem; padding: .25rem .6rem; }
.section.alt .paper-table tr.group td { background: #eef0f3; }
.paper-table tr.rule td { border-top: 1px solid #c9ced4; }
.paper-table tr.ours td { background: var(--accent-soft); }
.paper-table tr.diverge td { color: var(--warn); }
.paper-table tr.diverge .num { font-weight: 700; }
.paper-table tr.ref td { color: var(--ink-3); }
.paper-table.compact { font-size: .86rem; }
.gen-table td:nth-child(3) { white-space: nowrap; }
.tr-cond { color: var(--warn); }
.tr-self { color: var(--accent); }
.tr-teacher { color: var(--ink-2); }
.design-table td.heat { transition: background-color .8s ease; }
.design-table td.best { font-weight: 700; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* paper plots: background (axes, grid, legend) stays, plotted data is revealed left to right */
.pw { position: relative; display: block; }
.pw img { width: 100%; display: block; }
.pw .pw-fg { position: absolute; inset: 0; clip-path: inset(0 100% 0 0); }
.wipe.in .pw-fg { clip-path: inset(0 0 0 0); transition: clip-path 1.8s cubic-bezier(.35, .1, .25, 1); }
.wipe.in > :nth-child(2) .pw-fg { transition-delay: .15s; }
.wipe.in > :nth-child(3) .pw-fg { transition-delay: .3s; }

/* ------------------------------------------------------------ toy figures */
.toy-grid { display: grid; gap: 1rem; max-width: 640px; margin: 0 auto; }
.toy-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.toy-cell { position: relative; }
.toy-cell canvas { width: 100%; aspect-ratio: 1; display: block; image-rendering: pixelated; border-radius: 4px; background: #440154; }
.toy-label { display: block; text-align: center; font-size: .9rem; margin-top: .35rem; color: var(--ink); }
.toy-ctrl { display: flex; align-items: center; gap: .7rem; max-width: 640px; margin: 1rem auto 0; font-size: .82rem; color: var(--ink-2); }
#toy-batch .toy-ctrl { max-width: none; }
.toy-ctrl .lbl { white-space: nowrap; }
.toy-ctrl output { font-family: var(--mono); min-width: 3.2em; text-align: right; color: var(--ink); }
.toy-ctrl input[type=range] { flex: 1; }
.ctl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-size: .8rem;
  cursor: pointer; background: #fff; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: .3rem .65rem; white-space: nowrap; }
.ctl-btn:hover { border-color: var(--accent); color: var(--accent); }
.ctl-btn.icon { width: 2rem; height: 2rem; padding: 0; border-radius: 50%; }
.fig1-replay { opacity: 0; pointer-events: none; transition: opacity .4s; }
.fig1-replay.show { opacity: 1; pointer-events: auto; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: var(--rule); outline: none; accent-color: var(--accent); cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--accent); }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--accent); }

.batch-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: center; }
.batch-grid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: .55rem; align-items: center; }
.row-label { width: 1.3rem; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.row-label > span { transform: rotate(-90deg); white-space: nowrap; }


/* ------------------------------------------------------------ charts */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--sans); fill: var(--ink-2); font-size: 11px; }
.chart .axis line, .chart .axis path { stroke: #9aa2ab; }
.chart .grid line { stroke: #e7e9ec; stroke-dasharray: 3 3; }
.chart .ax-label { fill: var(--ink); font-size: 12px; }
.chart-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: center; margin-top: .6rem; font-size: .85rem; color: var(--ink); }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.ed-legend { font-size: .78rem; }

/* time-condition coefficient demo */
.ts-demo { max-width: 640px; margin: .4rem auto 1.8rem; border: 1px solid var(--rule); border-radius: 12px; padding: 1rem 1.3rem 1.1rem; background: #fff; }
.ts-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-size: .85rem; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: .82rem; border: 0; background: #fff; color: var(--ink-2); padding: .3rem .8rem; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button.on { background: var(--accent); color: #fff; }
.ts-sliders { display: flex; align-items: center; gap: .7rem; margin-top: .9rem; }
.ts-sliders label { flex: 1; display: grid; grid-template-columns: 2.4rem 1fr 3.4rem; align-items: center; gap: .7rem; font-size: .9rem; }
.ts-eq .katex-display { margin: .4em 0; }
.ts-sliders output { font-family: var(--mono); font-size: .8rem; text-align: right; color: var(--ink); }
.ts-bars { margin-top: 1rem; display: grid; gap: .5rem; }
.ts-row { display: grid; grid-template-columns: 9.5rem 1fr 3.4rem; align-items: center; gap: .7rem; font-size: .88rem; }
.ts-name em { font-style: normal; color: var(--ink-3); margin-left: .45rem; font-size: .78rem; font-family: var(--mono); }
.ts-bar { position: relative; height: 12px; background: var(--paper-alt); border-radius: 6px; overflow: hidden; }
.ts-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 6px; transition: width .15s linear; }
.ts-bar i.a2 { background: var(--ink-3); }
.ts-bar i.a1 { background: var(--accent); }
.ts-bar i.a0 { background: var(--warn); }
.ts-val { font-family: var(--mono); font-size: .8rem; text-align: right; color: var(--ink); }

/* tabs + appendix cards */
.apx { border: 1px solid var(--rule); border-radius: 12px; background: #fff; margin: 1.2rem 0 1.8rem; }
.section:not(.alt) .apx { background: var(--paper-alt); }
.apx-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; cursor: pointer; list-style: none; }
.apx-head::-webkit-details-marker { display: none; }
.apx-head::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .75rem; color: var(--ink-3);
  margin-left: auto; transition: transform .25s ease; }
.apx[open] > .apx-head::after { transform: rotate(180deg); }
.apx-head:hover .apx-title { color: var(--accent); }
.apx { padding: .7rem 1.2rem; }
.apx[open] { padding-bottom: 1rem; }
.apx-body { margin-top: .8rem; }
.apx-body > .tab-list { margin-bottom: .7rem; }
.apx-tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--navy); border-radius: 4px; padding: .1rem .45rem; }
.apx-title { font-weight: 600; font-size: .92rem; color: var(--ink); }
.apx .eq { margin: .2rem 0 .6rem; }
.tab-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.tab-list button { font: inherit; font-size: .82rem; cursor: pointer; background: transparent; color: var(--ink-2); border: 1px solid transparent; border-radius: 999px; padding: .22rem .75rem; }
.tab-list button:hover { color: var(--accent); }
.tab-list button[aria-selected=true] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.landscape-fig > .tab-list { justify-content: center; margin-bottom: .8rem; }
.img-row { display: grid; gap: .7rem; }
.img-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.img-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.img-row.compact-row { max-width: 600px; margin: 0 auto; }
.img-row > div > span:not(.pw) { display: block; text-align: center; font-size: .85rem; color: var(--ink); margin-top: .2rem; }
.legend-img { display: block; width: 78%; margin: .4rem auto 0; }
.mini-tables { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
.mini-tables.four { grid-template-columns: 1fr 1fr; }
.mini-tables .table-wrap { margin: 0; }
.table-wrap.narrow { max-width: 460px; margin: .4rem auto .6rem; }
.apx-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; align-items: center; }
.apx-split.cfg50 { grid-template-columns: 250px 300px; justify-content: center; gap: 2rem; }
.apx-split.cfg50 .table-wrap { margin: 0; }

/* landscapes / design figures */
.landscape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.landscape-grid.seven { grid-template-columns: repeat(8, 1fr); row-gap: 1rem; }
.landscape-grid.seven > div { grid-column: span 2; }
.landscape-grid.seven > div:first-child { grid-column: 2 / span 2; }
.landscape-grid img { width: 100%; display: block; }
.landscape-grid > div > span { display: block; text-align: center; font-size: .82rem; color: var(--ink); margin-top: .2rem; }

/* bar charts (tables with σ) */
.bars-pair { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.6rem; }
.bars-head { font-size: .8rem; font-weight: 600; color: var(--ink-2); margin-bottom: .5rem; padding-left: var(--label-w); }
.bars { --label-w: 0px; }
.bars-pair .bars:first-child { --label-w: 15.5rem; }
.bar-row { display: grid; grid-template-columns: var(--label-w) 1fr; align-items: center; gap: .6rem; height: 34px; }
.bars-pair .bars:last-child .bar-label { display: none; }
.bars-pair .bars:last-child .bar-row { grid-template-columns: 1fr; }
.bar-label { font-size: .84rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { position: relative; height: 18px; margin-right: 7.4rem; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 0 4px 4px 0; background: #9fb3c4;
  transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.bar-err { position: absolute; top: 50%; height: 0; border-top: 1.5px solid var(--ink); opacity: 0; transition: opacity .4s ease; }
.bar-err::before, .bar-err::after { content: ""; position: absolute; top: -6px; height: 11px; border-left: 1.5px solid var(--ink); }
.bar-err::before { left: 0; } .bar-err::after { right: 0; }
.bar-val { position: absolute; top: -1px; font-size: .78rem; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .4s ease; font-variant-numeric: tabular-nums; }
.bar-val b { font-weight: 600; }
.bar-val small { color: var(--ink-3); font-size: .74rem; }
.bar-row.ours .bar-fill { background: var(--accent); }
.bar-row.ours .bar-label { font-weight: 600; }
.bar-row.wide .bar-val small { color: var(--warn); font-weight: 600; }
.bars.in .bar-err, .bars.in .bar-val { opacity: 1; }

/* samples */
.sample-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin-bottom: .8rem; }
.sample-tabs button { font: inherit; font-size: .8rem; cursor: pointer; background: #fff; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: .2rem .7rem; }
.sample-tabs button[aria-selected=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.sample-view img { width: 100%; display: block; border-radius: 6px; transition: opacity .25s ease; }
.sample-view img.fading { opacity: 0; }

/* policy */
.videos { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.videos figure { margin: 0; }
.videos video { width: 100%; border-radius: 8px; display: block; background: #eee; }
.videos figure > span { display: block; text-align: center; font-size: .85rem; margin-top: .3rem; }
.policy .table-wrap { margin-top: 0; }

/* preliminary + algorithm (collapsible) */
#preliminary { padding-top: 2.2rem; padding-bottom: 2.2rem; border-top: 1px solid var(--rule); }
.fold-head { display: flex; align-items: baseline; gap: .8rem; cursor: pointer; list-style: none; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head .eyebrow { margin: 0; }
.fold-title { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); }
.fold-head::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .8rem; color: var(--ink-3);
  margin-left: auto; align-self: center; transition: transform .25s ease; }
.fold[open] > .fold-head::after { transform: rotate(180deg); }
.fold-head:hover .fold-title { color: var(--accent); }
.fold-body { margin-top: 1.4rem; }
.algo { border: 1px solid var(--rule); border-radius: 10px; background: #fff; margin: 1rem 0; }
.algo summary { cursor: pointer; padding: .7rem 1rem; font-weight: 600; font-size: 1rem; color: var(--ink); list-style: none; }
.algo summary::-webkit-details-marker { display: none; }
.algo summary::after { content: "+"; float: right; color: var(--ink-3); font-weight: 400; }
.algo[open] summary::after { content: "−"; }
.algo summary i { color: var(--accent); margin-right: .4rem; }
.algo-body { list-style: none; margin: 0; padding: .4rem 1.3rem 1.1rem; font-size: 1rem; border-top: 1px solid var(--rule); counter-reset: ln; }
.algo-body li { position: relative; padding: .18rem 0 .18rem 2.2rem; overflow-x: auto; }
.algo-body li::before { counter-increment: ln; content: counter(ln); position: absolute; left: 0; width: 1.4rem; text-align: right; color: var(--ink-3); font-family: var(--mono); font-size: .8rem; top: .45rem; }
.algo-body li.in::before { content: ""; counter-increment: none; }
.algo-body li.i1 { padding-left: 3.6rem; }
.algo-c { color: var(--ink-3); font-size: .9rem; margin-left: .6rem; white-space: nowrap; }

/* bibtex */
.bib-head { display: flex; align-items: center; justify-content: space-between; }
.bib-head .sec-title { margin-bottom: 1rem; }
.copy-btn { display: inline-flex; align-items: center; gap: .45rem; font: inherit; font-size: .85rem; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; padding: .35rem .8rem; }
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
#bibtex pre { background: #fff; border: 1px solid var(--rule); border-radius: 10px; font-family: var(--mono); font-size: .82rem; color: var(--ink); padding: 1.1rem 1.3rem; }

.footer { background: var(--paper-alt); padding: 2.5rem 1.5rem; font-size: .85rem; color: var(--ink-2); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .batch-layout, .chart-pair { grid-template-columns: 1fr; }
  .bars-pair { grid-template-columns: 1fr; }
  .bars-pair .bars:last-child .bar-label { display: block; }
  .bars-pair .bars:last-child .bar-row { grid-template-columns: var(--label-w) 1fr; }
  .bars-pair .bars:last-child { --label-w: 15.5rem; }
  .landscape-grid { grid-template-columns: repeat(2, 1fr); }
  .landscape-grid.seven { grid-template-columns: repeat(2, 1fr); }
  .landscape-grid.seven > div, .landscape-grid.seven > div:first-child { grid-column: auto; }
  .apx-split.cfg50 { grid-template-columns: minmax(0, 260px); }
  .mini-tables, .mini-tables.four, .apx-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 3.2rem 1rem; }
  .hero .hero-body { padding: 3rem 1rem 1rem; }
  .teaser { padding: 1rem 1rem 2rem; }
  .fig1-steps li { font-size: .62rem; }
  .fig1-replay span { display: none; }
  .prose p { text-align: left; }
  .img-row.cols-3 { grid-template-columns: 1fr; }
  .bars-pair .bars:first-child, .bars-pair .bars:last-child { --label-w: 8.6rem; }
  .bar-label { font-size: .74rem; }
  .ts-row { grid-template-columns: 6.5rem 1fr 3rem; }
  .ts-name em { display: none; }
  .sec-title { font-size: 1.75rem; }
  .apx { padding: .6rem .8rem; }
  .legend-img { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pw .pw-fg { clip-path: none; transition: none; }
  .bar-fill { transition: none; }
  html { scroll-behavior: auto; }
}
