:root {
  --ink: #202825;
  --muted: #5e6863;
  --line: #dce2de;
  --paper: #ffffff;
  --band: #f5f7f5;
  --green: #197352;
  --green-soft: #edf7f1;
  --red: #b54741;
  --red-soft: #fcf0ee;
  --blue: #3866a7;
  --blue-soft: #eef3fb;
  --gold: #946819;
}
* { box-sizing: border-box; letter-spacing: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.18; font-weight: 600; text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
svg.lucide { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.7; }
sup, sub { line-height: 0; }
.container { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 12px; padding: 10px 16px; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { position: sticky; top: 0; z-index: 20; background: #fffffff5; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1340px; margin: auto; height: 72px; padding: 0 40px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand-symbol { width: 30px; height: 30px; display: grid; place-items: center; background: var(--green); color: white; font-size: 12px; border-radius: 4px; }
.nav-links { display: flex; gap: 28px; margin: auto; font-size: 13px; }
.nav-links a { padding-block: 24px; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--green); }
.header-paper { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.header-paper svg:last-child { width: 14px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: white; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.icon-button:hover { background: var(--band); border-color: #a9b6ad; }
.menu-toggle { display: none; }
.eyebrow, .small-label { font-size: 11px; font-weight: 650; text-transform: uppercase; color: var(--green); }
.eyebrow { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.eyebrow-divider { color: #a3aba5; padding-inline: 2px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.masthead { text-align: center; padding: 56px 0 40px; }
.masthead .eyebrow { justify-content: center; }
.masthead h1 {
  font-size: clamp(24px, 3.1vw, 43px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.025em;
  white-space: nowrap;
  text-align: center;
}
.abstract-line { margin: 22px auto; color: var(--muted); font-size: 17px; line-height: 1.7; }
.paper-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; padding: 11px 18px; min-height: 45px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; font-weight: 600; background: white; }
.button:hover { border-color: var(--green); background: var(--green-soft); }
.button-primary { background: var(--green); color: white; border-color: var(--green); }
.button-primary:hover { background: #125c40; color: white; }
.button svg:last-child { width: 14px; height: 14px; }
.overview { padding: 12px 0 52px; }
.figure-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 17px; border-top: 1px solid var(--line); }
.figure-heading h2 { font-size: 17px; }
.figure-heading > span { white-space: nowrap; font-size: 11px; color: var(--muted); }
.figure-button { position: relative; display: block; width: 100%; border: 0; padding: 0; background: white; cursor: zoom-in; }
.figure-button img { width: 100%; object-fit: contain; }
.expand-icon { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: #ffffffeb; color: var(--muted); opacity: .7; }
.figure-button:hover .expand-icon { opacity: 1; color: var(--green); }
.expand-icon svg { width: 15px; }
.overview-takeaways { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 18px; padding-top: 23px; gap: 35px; }
.overview-takeaways p { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.overview-takeaways strong { display: block; margin-bottom: 3px; font-size: 13px; color: var(--ink); }
.number { color: var(--green); font-size: 11px; padding-top: 2px; font-family: Consolas, monospace; }
.section { padding: 80px 0; scroll-margin-top: 0; }
.band { background: var(--band); border-block: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 80px; margin-bottom: 42px; }
.section-heading h2 { font-size: 35px; }
.section-heading > p { font-size: 15px; color: var(--muted); line-height: 1.8; max-width: 510px; padding-bottom: 2px; }
.section-heading .eyebrow { margin-bottom: 14px; }
.diagnostic-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; align-items: center; }
figcaption { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 12px; }
.diagnostic-copy { display: grid; gap: 22px; }
.diagnostic-copy h3 { margin: 5px 0 7px; font-size: 16px; }
.diagnostic-copy p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.key-insight { border-left: 2px solid var(--green); padding-left: 15px; }
.key-insight .small-label { display: block; margin-bottom: 6px; }
.key-insight strong { color: var(--ink); }

/* Figure 3 keeps a stable three-row comparison while stages highlight the active computation. */
.method-player { border: 1px solid #ccd8cf; border-radius: 8px; overflow: hidden; background: white; --duration: 8500ms; }
.player-top { padding: 23px 25px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.player-top h3 { font-size: 19px; margin-top: 6px; }
.player-controls { display: flex; gap: 7px; flex-shrink: 0; }
.step-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid var(--line); background: #fafcfb; }
.step-tabs button { min-width: 0; border: 0; border-right: 1px solid var(--line); padding: 14px 8px; font-size: 12px; background: transparent; position: relative; }
.step-tabs button:last-child { border-right: 0; }
.step-tabs button span { font: 10px Consolas, monospace; margin-right: 6px; color: #76827a; }
.step-tabs button[aria-selected="true"] { background: var(--green-soft); color: var(--green); font-weight: 650; box-shadow: inset 0 -2px var(--green); }
.step-tabs button:hover { background: #eff4f0; }
.pipeline-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b0c4b7 transparent; }
.pipeline { display: grid; grid-template-columns: 145px 170px minmax(252px, 1fr) 244px; grid-template-rows: 24px 120px 120px 120px 46px 40px; gap: 18px 27px; padding: 24px; min-width: 960px; position: relative; }
.column-head { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--muted); align-self: start; }
.head-vision { grid-area: 1 / 1; }.head-model { grid-area: 1 / 2; }.head-tokens { grid-area: 1 / 3; }.head-objective { grid-area: 1 / 4; }
.student-input { grid-area: 2 / 1; }.positive-input { grid-area: 3 / 1; }.negative-input { grid-area: 4 / 1; }
.student-policy { grid-area: 2 / 2; }.positive-policy { grid-area: 3 / 2; }.negative-policy { grid-area: 4 / 2; }
.student-tokens { grid-area: 2 / 3; }.positive-tokens { grid-area: 3 / 3; }.negative-tokens { grid-area: 4 / 3; }
.visual-input { padding: 6px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 5px; background: white; }
.visual-input img { width: 120px; height: 83px; object-fit: contain; }
.visual-input span { font-size: 10px; color: var(--muted); }
.visual-input b { font-family: Georgia, serif; font-size: 13px; margin-right: 4px; }
.positive-input { border-color: #add2bd; }.negative-input { border-color: #e0b9b3; }
.policy { position: relative; border: 1px solid #bed0e6; border-radius: 5px; background: var(--blue-soft); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.policy-kind { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; }
.policy-kind svg { width: 14px; height: 14px; }
.policy > strong { font-family: Georgia, serif; font-size: 28px; line-height: 1.2; margin: 8px 0 5px; font-weight: 400; }
.policy small { font-size: 10px; color: var(--muted); }
.positive-policy { background: var(--green-soft); border-color: #add2bd; color: var(--green); }
.negative-policy { background: var(--red-soft); border-color: #e0b9b3; color: var(--red); }
.policy::before, .token-row::before { content: ""; position: absolute; left: -25px; top: 50%; width: 22px; height: 1px; background: #a9b8ae; }
.policy::after, .token-row::after { content: ""; position: absolute; left: -8px; top: calc(50% - 3px); width: 6px; height: 6px; border-top: 1px solid #a9b8ae; border-right: 1px solid #a9b8ae; transform: rotate(45deg); }
.token-row { position: relative; padding: 12px 8px; border: 1px solid transparent; border-radius: 5px; display: flex; flex-direction: column; justify-content: center; }
.distribution-label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; margin-bottom: 10px; }
.distribution-label b { font: 16px Georgia, serif; padding-right: 4px; }
.tokens { display: flex; gap: 4px; align-items: center; min-height: 27px; }
.tokens > span { background: #f2f4f2; padding: 4px 5px; font-size: 11px; line-height: 18px; border-radius: 3px; white-space: nowrap; }
.tokens .token-error { background: #fff3d7; color: #80590d; }
.tokens .token-positive { background: #d7eddf; color: #155f40; }
.tokens .token-negative { background: #f8ded9; color: #9e3931; }
.tokens .token-eos { font-size: 8px; color: #6d7670; }
.token-row > small { font-size: 9px; color: var(--muted); margin-top: 9px; }
.shared-prefix { grid-area: 5 / 2 / 6 / 4; display: flex; align-items: center; justify-content: center; gap: 10px; border-top: 1px dashed #afbeb3; font-size: 11px; border-radius: 4px; }
.shared-prefix small { display: block; font-size: 10px; color: var(--muted); }
.shared-prefix strong { font-family: Georgia, serif; font-weight: 400; }
.shared-prefix svg { width: 17px; color: var(--green); }
.objectives { grid-area: 2 / 4 / 6 / 5; display: grid; grid-template-rows: 118px 147px 160px; gap: 14px; border-left: 1px solid var(--line); padding-left: 16px; }
.objective { border: 1px solid var(--line); border-radius: 5px; padding: 11px 12px; position: relative; }
.objective-name { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.objective-name b { color: var(--green); font-size: 11px; }
.objective > p { font: 21px Georgia, serif; margin: 11px 0 9px; }
.objective small { color: var(--muted); font-size: 9px; line-height: 1.5; display: block; }
.gate-positions { display: flex; gap: 5px; margin-top: 12px; }
.gate-positions span { height: 10px; flex: 1; background: #e7ebe8; border-radius: 2px; }
.gate-positions .selected { background: #23815b; }
.pull-push { display: flex; justify-content: space-between; gap: 8px; font-size: 9px; margin-top: 10px; }
.pull-push > span:first-child { color: var(--green); }.pull-push > span:last-child { color: var(--red); }
.distribution-motion { position: relative; height: 29px; margin-top: 8px; font: 13px Georgia, serif; }
.distribution-motion::before { content: ""; position: absolute; top: 8px; left: 10%; right: 10%; height: 1px; background: var(--line); }
.distribution-motion > span { position: absolute; top: 0; width: 20px; padding-top: 13px; text-align: center; transform: translateX(-50%); }
.distribution-motion > span::before { content: ""; position: absolute; top: 4px; left: 6px; height: 8px; width: 8px; border-radius: 50%; background: currentColor; }
.dist-positive { left: 15%; color: var(--green); }.dist-student { left: 56%; color: var(--blue); }.dist-negative { left: 85%; color: var(--red); }
.method-player[data-step="3"] .dist-student { animation: distribution-shift 4s ease-in-out infinite; }
.sample-gate { grid-area: 5 / 1 / 7 / 2; padding: 8px; background: #f7f8f5; border-radius: 4px; display: flex; gap: 6px; font-size: 9px; line-height: 1.6; border: 1px solid var(--line); }
.sample-gate svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 3px; }
.sample-gate strong { display: block; font-size: 10px; }
.ema-loop { grid-area: 6 / 2 / 7 / 5; border-top: 1px dashed #b2c6b9; display: flex; align-items: center; gap: 10px; font-size: 11px; padding: 6px 10px; border-radius: 4px; }
.ema-loop svg { width: 15px; height: 15px; color: var(--green); }
.ema-arrow { margin-inline: 14px; color: var(--green); }
.ema-loop b { margin-left: 10px; font-family: Georgia, serif; font-weight: 400; }
.pipeline [class*="stage-"] { transition: box-shadow .4s, background-color .4s; }
.method-player[data-step="0"] .stage-rollout,
.method-player[data-step="1"] .stage-teachers,
.method-player[data-step="2"] .stage-gate,
.method-player[data-step="3"] .stage-contrast,
.method-player[data-step="4"] .stage-update { box-shadow: 0 0 0 2px #23815b; }
.method-player[data-step="0"] .student-tokens .tokens > span { animation: token-arrive .7s both; }
.method-player[data-step="0"] .student-tokens .tokens > span:nth-child(2) { animation-delay: .3s; }
.method-player[data-step="0"] .student-tokens .tokens > span:nth-child(3) { animation-delay: .6s; }
.method-player[data-step="0"] .student-tokens .tokens > span:nth-child(4) { animation-delay: .9s; }
.method-player[data-step="0"] .student-tokens .tokens > span:nth-child(5) { animation-delay: 1.2s; }
.method-player[data-step="1"] .positive-policy::before, .method-player[data-step="1"] .negative-policy::before { background: var(--green); height: 2px; animation: signal-flow 1.8s infinite; }
.method-player[data-step="2"] .gate-positions .selected, .method-player[data-step="2"] .token-positive { animation: gate-pulse 2s infinite; }
.method-player[data-step="3"] .pull-push > span:first-child { animation: pull 2s infinite; }
.method-player[data-step="3"] .pull-push > span:last-child { animation: push 2s infinite; }
.method-player[data-step="4"] .ema-loop svg { animation: spin 4s linear infinite; }
.stage-detail { display: grid; grid-template-columns: 58px 1fr 105px; gap: 15px; align-items: start; background: #f5f8f5; border-top: 1px solid var(--line); padding: 23px 25px; min-height: 132px; }
.stage-index { font: 11px Consolas, monospace; color: var(--green); margin-top: 4px; }
.stage-title { font-size: 17px; margin-bottom: 7px; }
.stage-description { color: var(--muted); font-size: 13px; max-width: 790px; line-height: 1.7; }
.stage-reference { font-size: 10px; color: var(--muted); text-align: right; padding-top: 5px; }
.playback-track { height: 3px; background: #e8eee9; overflow: hidden; }
.playback-track > span { display: block; height: 100%; background: var(--green); transform-origin: left; animation: progress var(--duration) linear both; }
.method-player.is-paused *, .method-player.is-paused *::before, .method-player.is-paused *::after { animation-play-state: paused !important; }
.method-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 20px 0 28px; }
.method-notes p { font-size: 12px; color: var(--muted); line-height: 1.7; }
.method-notes strong { color: var(--ink); }
.paper-details { border-block: 1px solid var(--line); }
.paper-details summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; font-size: 13px; font-weight: 600; }
.paper-details summary::-webkit-details-marker { display: none; }
.paper-details summary > span { display: flex; align-items: center; gap: 10px; }
.paper-details[open] summary > svg { transform: rotate(180deg); }
.paper-details figure { padding: 10px 0 22px; max-width: 1050px; margin-inline: auto; }
.objective-summary { display: grid; grid-template-columns: 1fr 1.7fr; gap: 36px; padding-top: 38px; }
.objective-summary .eyebrow { margin-bottom: 10px; }
.objective-summary h3 { font-size: 26px; }
.math { font: 27px Georgia, serif; }
.loss-equation p { font-size: 13px; color: var(--muted); margin-top: 13px; line-height: 1.75; }
.result-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 36px; }
.result-metrics > div { border-top: 2px solid var(--green); padding-top: 15px; }
.result-metrics > div:nth-child(2) { border-color: var(--blue); }.result-metrics > div:nth-child(3) { border-color: var(--gold); }
.result-metrics strong { font-size: 42px; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; }
.result-metrics strong span { font-size: 22px; color: var(--muted); }
.result-metrics p { font-size: 13px; margin-top: 7px; }
.result-metrics small { font-size: 10px; color: var(--muted); }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 790px; font-size: 13px; font-variant-numeric: tabular-nums; }
caption { text-align: left; color: var(--muted); font-size: 11px; padding-bottom: 12px; }
th, td { padding: 16px 15px; border-bottom: 1px solid var(--line); text-align: right; }
thead th { font-size: 10px; color: var(--muted); font-weight: 500; border-top: 1px solid var(--line); }
th:first-child { text-align: left; }
tbody th { font-size: 12px; font-weight: 500; }
.ours { background: #e4f0e7; }
.ours th { font-weight: 700; }.ours th span { font-size: 9px; color: var(--green); margin-left: 7px; font-weight: 400; }
.ours td:last-child { color: var(--green); }
.table-note { font-size: 11px; color: var(--muted); margin-top: 14px; max-width: 940px; }
.ablation { display: grid; grid-template-columns: 1fr 1.4fr; gap: 70px; border-top: 1px solid var(--line); padding-top: 32px; margin-top: 35px; }
.ablation h3 { font-size: 22px; margin: 10px 0; }
.ablation p { color: var(--muted); font-size: 13px; }
.ablation-bars > div { display: grid; grid-template-columns: 84px 1fr 44px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 11px; }
.ablation-bars b { font-size: 11px; text-align: right; font-weight: 500; }
.bar-track { height: 12px; background: #e7ebe8; }
.bar-track > span { display: block; width: var(--value); height: 100%; background: #a5b6ac; }
.full .bar-track > span { background: var(--green); }.full { color: var(--green); font-weight: 600; }
.ablation-bars .bar-axis { color: #6a746d; font-size: 9px; }.bar-axis span:last-child { text-align: right; }
.case-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.case-tabs button { border: 0; background: none; padding: 14px 22px; font-size: 13px; color: var(--muted); }
.case-tabs button:first-child { padding-left: 0; padding-right: 28px; }
.case-tabs button span { font-size: 10px; margin-left: 8px; color: #7c857f; white-space: nowrap; }
.case-tabs button[aria-selected="true"] { color: var(--green); box-shadow: inset 0 -2px var(--green); font-weight: 600; }
.case-tabs button:hover { color: var(--green); }
.case-panel { display: grid; grid-template-columns: 1.8fr 1fr; gap: 50px; align-items: center; }
.case-figure { aspect-ratio: 1046 / 593; }.case-figure img { height: 100%; }
.case-title { font-size: 26px; margin: 10px 0 18px; }
.case-description { color: var(--muted); font-size: 14px; }
.case-conclusion { display: flex; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.case-conclusion svg { color: var(--green); margin-top: 3px; }
.case-takeaway { font-size: 13px; }
.case-caveat { color: var(--muted); font-size: 11px; margin-top: 18px; }
.resources { padding: 43px 0; }
.resource-inner { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.resource-inner .eyebrow { margin-bottom: 12px; }.resource-inner h2 { font-size: 30px; }
.resource-inner p:last-child { font-size: 13px; color: var(--muted); margin-top: 6px; }
footer { padding-block: 25px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); }
.figure-dialog { width: min(1500px, calc(100% - 40px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 7px; background: white; }
.figure-dialog::backdrop { background: #14241ddb; }
.dialog-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: white; z-index: 1; }
.dialog-caption { flex: 1; font-size: 13px; font-weight: 600; }
.dialog-image-scroll { overflow: auto; max-height: calc(100dvh - 120px); padding: 16px; }
.dialog-image { width: 100%; }
@keyframes token-arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes signal-flow { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
@keyframes gate-pulse { 0%, 100% { box-shadow: 0 0 0 0 #23815b00; } 50% { box-shadow: 0 0 0 3px #23815b30; } }
@keyframes pull { 50% { transform: translateX(-3px); } }
@keyframes push { 50% { transform: translateX(3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes distribution-shift { 0%, 15%, 100% { left: 56%; } 65%, 85% { left: 35%; } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (min-width: 1600px) { .masthead { padding-top: 68px; } }
@media (max-width: 1080px) {
  .container { width: calc(100% - 48px); }
  .header-inner { padding-inline: 24px; }.nav-links { gap: 20px; }
  .section-heading { gap: 35px; }.section-heading h2 { font-size: 31px; }
  .diagnostic-layout { grid-template-columns: 1.5fr 1fr; gap: 28px; }
  .case-panel { gap: 28px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 74px; }
  .container { width: calc(100% - 36px); }
  .header-inner { height: 62px; padding-inline: 18px; gap: 16px; }.brand { font-size: 16px; }
  .header-paper { margin-left: auto; }.header-paper > svg:first-child { display: none; }
  .menu-toggle { display: flex; width: 34px; height: 34px; }
  .nav-links { display: none; position: absolute; top: 62px; left: 0; right: 0; background: white; padding: 10px 18px 18px; border-bottom: 1px solid var(--line); }
  .menu-open .nav-links { display: flex; flex-wrap: wrap; gap: 0 24px; }.nav-links a { padding-block: 8px; }
  .masthead { padding: 35px 0 27px; }
  .masthead .eyebrow { font-size: 9px; gap: 6px; margin-bottom: 18px; }
  h1 { font-size: 43px; }h1 > span { font-size: 27px; margin-top: 12px; }
  .abstract-line { font-size: 14px; margin: 17px auto; line-height: 1.65; }.abstract-line br { display: none; }
  .button { min-height: 42px; padding: 10px 13px; font-size: 12px; }
  .overview { padding-top: 10px; padding-bottom: 32px; }
  .figure-heading { gap: 14px; padding-block: 13px; }.figure-heading h2 { font-size: 14px; }
  .overview-takeaways { gap: 15px; grid-template-columns: 1fr; margin-top: 12px; padding-top: 16px; }
  .overview-takeaways p { gap: 11px; }.overview-takeaways strong { display: inline; margin-right: 5px; }
  .section { padding: 48px 0; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; margin-bottom: 28px; }
  .section-heading h2 { font-size: 29px; }.section-heading > p { font-size: 14px; }
  .diagnostic-layout { grid-template-columns: 1fr; gap: 25px; }
  .diagnostic-copy { gap: 18px; }
  .player-top { padding: 16px 14px; gap: 12px; align-items: start; }
  .player-top h3 { font-size: 16px; }.player-top .small-label { font-size: 9px; }
  .player-controls { gap: 4px; }.player-controls .icon-button { width: 32px; height: 32px; }
  .step-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .step-tabs button { font-size: 10px; padding: 10px 4px; line-height: 1.35; min-height: 58px; }
  .step-tabs button span { display: block; margin: 0 0 4px; font-size: 9px; }
  .pipeline { min-width: 0; grid-template-columns: 82px minmax(0, 1fr); grid-template-rows: 20px repeat(3, 88px 90px) auto auto auto auto; gap: 12px 22px; padding: 18px 12px; }
  .head-vision { grid-area: 1 / 1; }.head-model { grid-area: 1 / 2; }
  .head-tokens, .head-objective { display: none; }
  .student-input { grid-area: 2 / 1 / 4 / 2; }.positive-input { grid-area: 4 / 1 / 6 / 2; }.negative-input { grid-area: 6 / 1 / 8 / 2; }
  .student-policy { grid-area: 2 / 2; }.positive-policy { grid-area: 4 / 2; }.negative-policy { grid-area: 6 / 2; }
  .student-tokens { grid-area: 3 / 2; }.positive-tokens { grid-area: 5 / 2; }.negative-tokens { grid-area: 7 / 2; }
  .visual-input { justify-content: center; gap: 13px; padding: 4px; }.visual-input img { width: 70px; height: 90px; }.visual-input span { text-align: center; font-size: 9px; }.visual-input b { display: block; margin-bottom: 4px; }
  .policy > strong { font-size: 23px; margin: 3px 0; }.policy-kind { font-size: 10px; }.policy small { font-size: 9px; }
  .token-row { padding: 3px 0; }.token-row::before, .token-row::after { display: none; }
  .distribution-label { font-size: 9px; margin-bottom: 6px; }.tokens { gap: 2px; }.tokens > span { font-size: 10px; padding: 3px; }.tokens .token-eos { font-size: 7px; }.token-row > small { font-size: 8px; margin-top: 6px; }
  .shared-prefix { grid-area: 8 / 1 / 9 / 3; padding: 13px 4px; font-size: 10px; }.shared-prefix small { font-size: 9px; }
  .objectives { grid-area: 9 / 1 / 10 / 3; border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; grid-template-rows: auto auto auto; gap: 12px; }
  .objective { padding: 14px; }.objective > p { font-size: 22px; }.objective small { font-size: 10px; }.objective-name { font-size: 11px; }.pull-push { font-size: 11px; }
  .sample-gate { grid-area: 10 / 1 / 11 / 3; font-size: 10px; padding: 10px; }.sample-gate strong { display: inline; margin-right: 5px; }
  .ema-loop { grid-area: 11 / 1 / 12 / 3; font-size: 10px; padding: 12px 4px; }.ema-loop b { display: block; margin-left: 0; margin-top: 5px; }.ema-arrow { margin-inline: 5px; }
  .stage-detail { grid-template-columns: 1fr; gap: 7px; min-height: 218px; padding: 17px 15px; }
  .stage-title { font-size: 16px; }.stage-description { font-size: 12px; }.stage-reference { text-align: left; padding-top: 0; }
  .method-notes { grid-template-columns: 1fr; gap: 14px; }
  .objective-summary { grid-template-columns: 1fr; gap: 22px; padding-top: 28px; }.math { font-size: 25px; }
  .result-metrics { gap: 16px; }.result-metrics strong { font-size: 29px; }.result-metrics strong span { font-size: 14px; }
  .result-metrics p { font-size: 11px; line-height: 1.6; }.result-metrics small { font-size: 9px; display: block; margin-top: 7px; }
  .ablation { grid-template-columns: 1fr; gap: 24px; }
  .case-tabs { display: grid; grid-template-columns: repeat(4, 1fr); }
  .case-tabs button, .case-tabs button:first-child { padding: 10px 4px; font-size: 11px; }
  .case-tabs button span { display: block; margin: 3px 0 0; font-size: 9px; }
  .case-panel { grid-template-columns: 1fr; gap: 24px; }
  .case-title { font-size: 24px; }.case-description { font-size: 13px; }.case-conclusion { margin-top: 17px; }
  .resource-inner { flex-direction: column; align-items: start; }.resources { padding: 32px 0; }
  footer { flex-direction: column; gap: 6px; padding-block: 20px; }
  .figure-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  .dialog-toolbar { padding: 10px; }.dialog-caption { font-size: 11px; }
  .dialog-image-scroll { padding: 8px; }.dialog-image { min-width: 800px; width: 100%; max-width: none; }
}
@media (max-width: 370px) {
  h1 > span { font-size: 24px; }.brand { gap: 6px; }
  .header-inner { gap: 10px; }
  .result-metrics { grid-template-columns: 1fr; gap: 22px; }
  .result-metrics strong { font-size: 34px; }
  .step-tabs button { font-size: 9px; }
  .pipeline { grid-template-columns: 64px minmax(0, 1fr); gap: 12px 18px; padding-inline: 10px; }.visual-input img { width: 54px; }.tokens > span { font-size: 9px; padding: 3px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 767px) {
  .masthead h1 {
    white-space: normal;
    font-size: clamp(24px, 5.5vw, 32px);
    overflow-wrap: normal;
  }
}
