/* OpenHands, tested like a user. A reading view with an optional slide view. */
:root {
  color-scheme: dark;
  --bg: #10110f;
  --surface: #191b17;
  --surface-raised: #22251f;
  --ink: #eee8dc;
  --muted: #b0aba0;
  --gold: #d8bb70;
  --teal: #86cdbb;
  --line: #373b31;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --shell: 1180px;
  --gutter: clamp(22px, 5vw, 72px);
  --bar-height: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-height) + 20px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: var(--bg); }
a { color: var(--teal); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; line-height: 1.3; }
button:hover { border-color: var(--gold); background: var(--surface-raised); }
button:disabled { opacity: .35; cursor: default; }
button:disabled:hover { border-color: var(--line); background: var(--surface); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; min-width: 0; }
figcaption { margin-top: 14px; color: var(--muted); font-size: .79rem; line-height: 1.6; }
figcaption strong { color: var(--ink); font-weight: 500; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 650; }
ul, ol { padding-left: 1.2em; }
li + li { margin-top: .45em; }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; text-wrap: balance; }
h1 { max-width: 12ch; font-size: clamp(4.1rem, 7.7vw, 7.3rem); line-height: .97; }
h1 em { color: var(--gold); font-weight: 400; }
h2 { max-width: 19ch; font-size: clamp(3rem, 5.5vw, 5.4rem); line-height: 1.03; margin-bottom: 27px; }
h3 { font-size: 1.13rem; line-height: 1.35; font-weight: 550; margin-bottom: 10px; letter-spacing: -.015em; }
code, pre { font-family: var(--mono); }
code { font-size: .8em; color: var(--gold); overflow-wrap: anywhere; }
pre { margin: 0; font-size: .76rem; line-height: 1.9; tab-size: 2; }
pre code { font-size: inherit; color: var(--ink); overflow-wrap: normal; }
.muted, .source-note { color: var(--muted); }
.small { font-size: .83rem; }
.lead { max-width: 66ch; font-size: clamp(1.06rem, 1.8vw, 1.3rem); color: #cec9bf; line-height: 1.6; }
.lead + .lead { margin-top: -.25em; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; color: var(--gold); font: 500 .68rem/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { content: ""; flex: 0 0 27px; height: 1px; background: var(--gold); }
.section-number { color: var(--muted); font: 400 .68rem/1.4 var(--mono); letter-spacing: .07em; }
.source-note { margin-top: 30px; font-size: .77rem; line-height: 1.7; }
.source-note a { white-space: normal; }
.text-link { display: inline-flex; gap: 15px; align-items: center; min-height: 44px; margin-top: 7px; font-size: .82rem; text-decoration: none; }
.text-link span { color: var(--gold); }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 20px; padding: 12px 20px; transform: translateY(-200%); border: 1px solid var(--gold); background: var(--bg); color: var(--ink); font-size: .85rem; }
.skip-link:focus { transform: translateY(0); }
.pill, .tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font: 400 .64rem/1.4 var(--mono); letter-spacing: .015em; vertical-align: middle; }
.pill { padding: 6px 11px; border-color: #5b5033; color: var(--gold); }
.tag.success { color: var(--teal); border-color: #38594c; }
.tag.proposed { color: var(--gold); border-color: #5b5033; }

/* The persistent frame stays quiet while the content carries the page. */
.topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--bar-height); padding: 14px var(--gutter); border-bottom: 1px solid var(--line); background: rgba(16, 17, 15, .97); }
.brand-link { color: var(--ink); font-size: .86rem; font-weight: 500; white-space: nowrap; text-decoration: none; }
.brand-link span { color: var(--gold); }
.chapter-links { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 28px); }
.chapter-links a { color: var(--muted); font-size: .73rem; text-decoration: none; padding: 10px 0; border-bottom: 1px solid transparent; }
.chapter-links a:hover, .chapter-links a[aria-current] { color: var(--ink); border-bottom-color: var(--gold); }
#present-toggle { color: var(--gold); border-color: #5b5033; background: transparent; font-size: .73rem; white-space: nowrap; }
#present-toggle:hover { background: #29251b; }
.reading-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 2px; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 120ms linear; }
.slide { position: relative; padding: clamp(76px, 10vw, 136px) var(--gutter); border-bottom: 1px solid var(--line); scroll-margin-top: 0; }
.slide-inner { max-width: var(--shell); margin: 0 auto; min-width: 0; }
.slide:first-child { padding-top: clamp(64px, 7vw, 108px); background: radial-gradient(ellipse at 89% 19%, rgba(122, 103, 51, .075), transparent 53%); }
.slide:nth-child(3n) { background: #141611; }
.slide-inner > .lead { margin-bottom: 42px; }
.hero-grid { display: grid; grid-template-columns: 1.03fr 1fr; align-items: center; gap: clamp(30px, 5vw, 70px); }
.hero-grid > *, .case-study-grid > *, .layer-list article > * { min-width: 0; }
.hero-grid h1 { margin-bottom: 28px; }
.hero-grid .lead { font-size: 1.08rem; max-width: 46ch; }
.hero-grid .source-note { margin-top: 28px; }
.hero-visual { min-width: 0; }
.browser-frame { border: 1px solid #535748; background: #080908; border-radius: 7px; overflow: hidden; box-shadow: 0 18px 70px #0005; }
.browser-frame img { width: 100%; }
.browser-frame > figcaption { padding: 0 16px 16px; }
.browser-top { display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 7px 12px; border-bottom: 1px solid var(--line); color: var(--muted); background: #20231d; font: 400 .58rem/1.4 var(--mono); }
.browser-top i, .browser-top .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #686b60; }
.browser-top span:last-child { margin-left: auto; }
.hero-loop { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 34px; padding: 22px 0 0; margin: 44px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font: 400 .64rem/1.7 var(--mono); }
.hero-loop li { position: relative; margin: 0; }
.hero-loop li span { color: var(--gold); margin-right: 7px; }
.hero-loop li:not(:last-child)::after { position: absolute; right: -22px; content: "→"; color: var(--gold); }
.metrics { margin-top: 54px; }
.metrics dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; }
.metrics dl > div { display: flex; flex-direction: column; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 16px; }
.metrics dt { order: 1; color: var(--muted); font-size: .75rem; }
.metrics dd { order: 0; margin: 0 0 3px; color: var(--gold); font: 400 2.7rem/1.2 var(--serif); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 38px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 38px; }
.two-col > *, .three-col > * { min-width: 0; }
.three-col > article { border-top: 1px solid var(--line); padding-top: 23px; }
.three-col p { color: var(--muted); font-size: .92rem; }

/* Product map, runnable recipes, and the maintenance contract. */
.layer-list { margin-top: 42px; border-top: 1px solid var(--line); }
.layer-list article { position: relative; display: grid; grid-template-columns: 45px minmax(0, 1fr) minmax(160px, .4fr); align-items: baseline; gap: 12px 28px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.layer-list article .number, .mechanism-list .number { color: var(--gold); font: 400 .75rem/1.5 var(--mono); }
.layer-list article h3 { margin-bottom: 8px; }
.layer-list article p { margin: 0; color: var(--muted); font-size: .91rem; }
.layer-list article > code { color: var(--teal); font-size: .7rem; }
.map-anatomy { padding: 25px 30px; border-left: 2px solid var(--gold); background: var(--surface); }
.map-anatomy pre { overflow: auto; }
.map-anatomy h3 { color: var(--gold); margin-bottom: 17px; }
.code-window.map-anatomy { padding: 0; border-left: 2px solid var(--gold); }
.map-groups { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px; }
.two-col .map-groups { grid-template-columns: 1fr; align-content: start; margin-top: 0; }
.map-groups details { min-width: 0; border-bottom: 1px solid var(--line); padding: 0 0 15px; }
.map-groups summary { min-height: 48px; padding: 14px 22px 0 0; color: var(--ink); cursor: pointer; font-size: .9rem; }
.map-groups summary::marker { color: var(--gold); }
.map-groups summary span { float: right; margin-left: 10px; color: var(--gold); font: 400 .67rem/1.9 var(--mono); }
.map-groups details p, .map-groups details ul { color: var(--muted); font-size: .8rem; margin: 12px 0 0; }
.code-window { min-width: 0; border: 1px solid var(--line); border-radius: 5px; background: #0b0d0a; overflow: hidden; }
.code-window header { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 19px; border-bottom: 1px solid var(--line); background: #1c1f19; color: var(--muted); font: 400 .63rem/1.5 var(--mono); }
.code-window header span { min-width: 0; overflow-wrap: anywhere; }
.code-window pre { padding: 23px 25px; max-width: 100%; overflow-x: auto; }
.copy-code { min-height: 44px; margin: -8px -7px -8px 0; padding: 6px 10px; border-color: transparent; background: transparent; font: 400 .62rem/1.4 var(--mono); color: var(--teal); }
.copy-code:hover { border-color: var(--line); }
.code-comment { color: #a0ac93; }
.callout { margin-top: 30px; padding: 22px 26px; border-left: 2px solid var(--gold); background: #201f16; color: #d0c9b8; font-size: .9rem; }
.callout h3 { font-size: .95rem; color: var(--gold); }
.rule-list { list-style: none; counter-reset: rule; padding: 0; margin: 36px 0 0; }
.rule-list > li { position: relative; counter-increment: rule; padding: 20px 0 20px 42px; border-top: 1px solid var(--line); margin-top: 0; }
.rule-list > li::before { content: counter(rule, decimal-leading-zero); position: absolute; left: 0; top: 23px; color: var(--gold); font: 400 .68rem/1.5 var(--mono); }
.rule-list strong { display: block; margin-bottom: 6px; font-size: 1rem; font-weight: 550; }
.rule-list p { color: var(--muted); font-size: .88rem; }
.proof-steps { display: flex; gap: 5px; margin: 34px 0 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.proof-steps button { background: transparent; color: var(--muted); border-color: transparent; font-size: .78rem; }
.proof-steps button[aria-selected="true"] { border-color: #5b5033; background: #29251b; color: var(--gold); }
.recipe-panel { margin-top: 26px; }
.recipe-panel > p { max-width: 80ch; color: var(--muted); font-size: .91rem; }
.recipe-panel .code-window { margin-top: 18px; }
.recipe-panel .code-window + p { margin-top: 15px; }
.recipe-panel:focus { outline-offset: 8px; }

/* Test evidence is shown intact; the magnifier opens the original image. */
.evidence-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.evidence-pair figure { padding-top: 13px; border-top: 1px solid var(--line); }
.evidence-pair figure.before { border-color: #9a7553; }
.evidence-pair figure.after { border-color: #6caa8d; }
.evidence-pair .tag, .evidence-pair .pill, .evidence-pair h3 { margin-bottom: 13px; }
.evidence-pair .after .pill { color: var(--teal); border-color: #38594c; }
.evidence-pair img { width: 100%; border: 1px solid var(--line); border-radius: 3px; }
.image-zoom { display: block; position: relative; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 3px; background: transparent; text-align: left; cursor: zoom-in; }
.image-zoom:hover { background: transparent; }
.js .image-zoom::after { content: "+"; position: absolute; bottom: 9px; right: 9px; display: grid; place-items: center; width: 30px; height: 30px; background: #10110fe8; border: 1px solid #747665; border-radius: 3px; color: var(--ink); font: 400 1.1rem/1 var(--sans); }
.case-study-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr); gap: 40px; align-items: start; margin-top: 34px; }
.case-study-grid > div > p { color: var(--muted); font-size: .92rem; }
.case-study-grid .evidence-pair { gap: 17px; }
.finding-list { margin-top: 25px; }
.finding-list article { padding: 18px 0; border-top: 1px solid var(--line); }
.finding-list h3 { font-size: .99rem; }
.finding-list p { font-size: .86rem; color: var(--muted); }
.finding-list .tag { margin-bottom: 9px; }
.comparison-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.comparison-controls button { font-size: .75rem; color: var(--muted); background: transparent; }
.comparison-controls button[aria-pressed="true"] { border-color: #527d6c; color: var(--teal); background: #19251e; }
#toast-image { width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.browser-frame + .small { margin-top: 18px; }
.mechanism-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 35px; }
.mechanism-list article { position: relative; padding: 25px 0 28px 37px; border-top: 1px solid var(--line); }
.mechanism-list .number { position: absolute; top: 28px; left: 0; }
.mechanism-list p { color: var(--muted); font-size: .9rem; }
.maintenance-flow { margin: 38px 0; }
ol.maintenance-flow, .maintenance-flow ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; counter-reset: flow; padding: 0; gap: 28px; }
.maintenance-flow li { position: relative; counter-increment: flow; margin: 0; padding: 26px 0 0; border-top: 1px solid #696045; color: var(--muted); font-size: .85rem; }
.maintenance-flow li > span { display: block; margin-bottom: 15px; color: var(--gold); font: 400 .68rem/1.5 var(--mono); }
.maintenance-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -19px; top: -14px; background: var(--bg); padding: 0 3px; color: var(--gold); }
.maintenance-flow strong { display: block; margin-bottom: 7px; }
.timeline { display: grid; grid-template-columns: 1fr; gap: 26px; margin-top: 38px; }
.timeline article { display: grid; grid-template-columns: 150px 1fr; gap: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.timeline .tag { margin-bottom: 13px; }
.timeline time { display: block; margin-bottom: 14px; color: var(--gold); font: 400 .68rem/1.5 var(--mono); }
.timeline h3 { font-size: 1rem; }
.timeline p { color: var(--muted); font-size: .86rem; }
.quote { padding: 26px 0 26px 28px; border-left: 2px solid var(--gold); margin: 35px 0; font: 400 clamp(1.7rem, 3vw, 2.7rem)/1.2 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.quote cite, .quote footer { display: block; margin-top: 17px; color: var(--muted); font: 400 .77rem/1.6 var(--sans); letter-spacing: 0; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 44px; margin-top: 38px; }
.source-grid article { padding-top: 21px; border-top: 1px solid var(--line); min-width: 0; }
.source-grid h3 { color: var(--gold); font-size: .92rem; }
.source-grid ul { list-style: none; margin: 16px 0 0; padding: 0; }
.source-grid li { color: var(--muted); font-size: .81rem; line-height: 1.7; }
.source-grid li + li { margin-top: 10px; }
.source-grid a { overflow-wrap: anywhere; }
.closing { background: radial-gradient(ellipse at 40% 60%, #33321b33, transparent 65%); }
.closing-title { font-size: clamp(3.8rem, 7vw, 6.6rem); max-width: 17ch; }
.closing .lead { max-width: 62ch; }
.closing .source-note { max-width: 80ch; }

/* Progressive controls disappear if the document is read without JavaScript. */
body:not(.js) #present-toggle, body:not(.js) .footer-nav, body:not(.js) .copy-code, body:not(.js) .proof-steps, body:not(.js) .comparison-controls, body:not(.js) .reading-progress { display: none; }
body:not(.js) .image-zoom { cursor: default; }
.footer-nav { display: none; }
.is-presenting .slide { display: none; }
.is-presenting .slide h1[tabindex="-1"]:focus, .is-presenting .slide h2[tabindex="-1"]:focus { outline: none; }
.is-presenting .slide.is-active { display: block; min-height: calc(100svh - var(--bar-height)); padding-top: clamp(40px, 6vh, 75px); padding-bottom: 126px; border-bottom: 0; }
.is-presenting .footer-nav { display: flex; position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; align-items: center; justify-content: center; gap: 14px; padding: 12px var(--gutter); background: #10110ff5; border-top: 1px solid var(--line); }
.footer-nav button { font-size: .75rem; min-width: 44px; }
#slide-counter { color: var(--muted); font: 400 .68rem/1.6 var(--mono); text-align: center; min-width: 92px; }
#exit-presentation { position: absolute; right: var(--gutter); color: var(--muted); background: transparent; }
.slide-hint { position: absolute; left: var(--gutter); color: var(--muted); font-size: .68rem; }
#image-dialog { width: min(1400px, 95vw); max-width: 95vw; max-height: 94svh; padding: 58px 20px 20px; border: 1px solid #686e5b; border-radius: 6px; background: var(--bg); color: var(--ink); overflow: auto; }
#image-dialog::backdrop { background: #000d; }
#close-image { position: absolute; top: 8px; right: 10px; min-width: 44px; background: transparent; color: var(--muted); font-size: .78rem; }
#expanded-image { max-height: calc(90svh - 150px); width: auto; max-width: 100%; object-fit: contain; margin: 0 auto; }
#expanded-caption { max-width: 90ch; margin: 18px auto 0; color: var(--muted); font-size: .8rem; }

/* Keep desktop slides compact enough to present, while allowing vertical
   scrolling when the viewport or a user's text size needs more room. */
@media (min-width: 1100px) and (min-height: 650px) {
  body.is-presenting { font-size: 15px; }
  .is-presenting .slide.is-active { padding-top: 30px; padding-bottom: 92px; }
  .is-presenting h1 { font-size: clamp(4.4rem, 6.2vw, 6rem); }
  .is-presenting h2, .is-presenting .closing-title { font-size: 3.5rem; max-width: 25ch; margin-bottom: 20px; }
  .is-presenting .eyebrow { margin-bottom: 20px; }
  .is-presenting .lead { font-size: 1.08rem; }
  .is-presenting .slide-inner > .lead { margin-bottom: 24px; }
  .is-presenting .two-col, .is-presenting .three-col { margin-top: 22px; gap: 30px; }
  .is-presenting .metrics { margin-top: 24px; }
  .is-presenting pre { line-height: 1.6; }
  .is-presenting .code-window pre { padding-top: 18px; padding-bottom: 18px; }
  .is-presenting .callout { padding: 15px 22px; margin-top: 22px; }
  .is-presenting .source-note { margin-top: 18px; }
  .is-presenting .case-study-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 38px; }
  .is-presenting .case-study-grid h2 { font-size: 3.25rem; }
  .is-presenting .layer-list article { padding-top: 17px; padding-bottom: 17px; }
  .is-presenting .timeline { gap: 16px; margin-top: 24px; }
  .is-presenting .timeline article { padding-top: 16px; padding-bottom: 0; }
  .is-presenting .timeline .tag { margin-bottom: 8px; }
  .is-presenting .rule-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 26px; margin-top: 24px; }
  .is-presenting .rule-list > li { padding-left: 30px; }
  .is-presenting .maintenance-flow { margin-top: 24px; margin-bottom: 24px; }
  .is-presenting .finding-list { margin-top: 16px; }
  .is-presenting .mechanism-list { margin-top: 24px; }
}

@media (min-width: 1500px) {
  :root { --shell: 1260px; }
  body { font-size: 18px; }
  .hero-grid { gap: 70px; }
}
@media (max-width: 1050px) {
  .topbar { gap: 20px; }
  .chapter-links { gap: 16px; }
  .chapter-links a { font-size: .66rem; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  h1 { font-size: clamp(3.9rem, 8vw, 6.5rem); }
  .case-study-grid { grid-template-columns: minmax(0, 1fr); }
  .case-study-grid .evidence-pair { gap: 24px; }
}
@media (max-width: 800px) {
  .slide-hint { display: none; }
  :root { --bar-height: 68px; }
  .topbar { min-height: var(--bar-height); }
  .chapter-links { display: none; }
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .hero-grid { gap: 44px; }
  .hero-grid h1 { max-width: 11ch; font-size: clamp(4.8rem, 12vw, 6.8rem); }
  .hero-grid .lead { max-width: 58ch; }
  .hero-visual { max-width: 620px; }
  .metrics { margin-top: 39px; }
  .metrics dl { gap: 20px; }
  .three-col { gap: 23px; }
  .layer-list article { grid-template-columns: 32px 1fr; column-gap: 13px; }
  .layer-list article p, .layer-list article > code { grid-column: 2; }
  .layer-list article > code { margin-top: 0; }
  ol.maintenance-flow, .maintenance-flow ol { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .maintenance-flow li:nth-child(2)::after { display: none; }
  .timeline { grid-template-columns: 1fr; gap: 20px; }
  .timeline article { display: grid; grid-template-columns: 105px 1fr; gap: 2px 24px; }
  .timeline time { grid-row: 1 / 3; }
  .timeline p { grid-column: 2; }
  #exit-presentation { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .slide { padding-top: 66px; padding-bottom: 68px; }
  .slide:first-child { padding-top: 51px; }
  .eyebrow { gap: 9px; font-size: .6rem; margin-bottom: 24px; }
  .eyebrow::before { flex-basis: 19px; }
  h1, .hero-grid h1 { font-size: clamp(3.7rem, 15vw, 5.2rem); }
  h2 { font-size: clamp(2.8rem, 11.4vw, 4.1rem); }
  h3 { font-size: 1.08rem; }
  .lead, .hero-grid .lead { font-size: 1.02rem; }
  .slide-inner > .lead { margin-bottom: 30px; }
  .metrics dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 25px; }
  .metrics dd { font-size: 2.45rem; }
  .three-col, .map-groups, .mechanism-list, .source-grid, .evidence-pair { grid-template-columns: 1fr; }
  .three-col { gap: 28px; }
  .evidence-pair { gap: 30px; }
  .evidence-pair figcaption { margin-top: 10px; }
  .case-study-grid { gap: 30px; }
  .proof-steps { gap: 4px; }
  .proof-steps button { padding: 10px 12px; font-size: .73rem; }
  .code-window pre { padding: 19px 17px; font-size: .68rem; }
  .code-window header { padding-left: 16px; }
  .map-anatomy { padding: 21px 19px; }
  .callout { padding: 20px; font-size: .85rem; }
  .source-grid { gap: 28px; }
  .timeline article { display: block; }
  .timeline time { margin-bottom: 10px; }
  .closing-title { font-size: 3.55rem; }
  .is-presenting .footer-nav { gap: 7px; padding: 9px 14px; }
  .footer-nav button { padding: 10px 12px; font-size: .68rem; }
  #slide-counter { min-width: 66px; font-size: .61rem; }
  #exit-presentation { margin-left: auto; }
  #image-dialog { padding: 60px 12px 16px; }
  #expanded-caption { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  :root { color-scheme: light; --bg: #fff; --surface: #f5f4f0; --surface-raised: #f0eee7; --ink: #181b15; --muted: #55594e; --gold: #715620; --teal: #255f50; --line: #ccd0c5; --gutter: 0px; }
  @page { size: A4; margin: 16mm; }
  html { scroll-behavior: auto; }
  body { font-size: 10pt; background: #fff; color: #181b15; }
  .topbar, .reading-progress, .footer-nav, .is-presenting .footer-nav, .proof-steps, .comparison-controls, .copy-code, #image-dialog, .js .image-zoom::after { display: none !important; }
  .slide, .is-presenting .slide, .is-presenting .slide.is-active { display: block !important; min-height: 0; padding: 22pt 0; break-before: page; border: 0; background: #fff; }
  .slide:first-child { break-before: auto; padding-top: 0; background: #fff; }
  .slide-inner { max-width: none; }
  h1, .hero-grid h1 { font-size: 43pt; }
  h2 { font-size: 32pt; max-width: none; margin-bottom: 16pt; }
  h3 { font-size: 12pt; }
  .lead, .hero-grid .lead { color: #3b4035; font-size: 11pt; }
  .eyebrow { margin-bottom: 16pt; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 22pt; }
  .hero-loop { font-size: 7pt; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 18pt; }
  .metrics { margin-top: 25pt; }
  .metrics dl { grid-template-columns: repeat(3, 1fr); }
  .metrics dd { font-size: 24pt; }
  .code-window { background: #f5f4f0; }
  .code-window header, .browser-top { background: #eee; }
  .code-window pre, pre { font-size: 7.1pt; white-space: pre-wrap; overflow-wrap: anywhere; }
  .code-comment { color: #556849; }
  .code-window, figure, .layer-list article, .mechanism-list article, .maintenance-flow li, .source-grid article { break-inside: avoid; }
  .callout { background: #f5f1e5; color: #3b4035; }
  .browser-frame { box-shadow: none; }
  .recipe-panel[hidden] { display: block !important; }
  .recipe-panel { margin-top: 24pt; }
  .case-study-grid { grid-template-columns: 1fr; }
  .evidence-pair { grid-template-columns: 1fr 1fr; gap: 16pt; }
  .map-groups { grid-template-columns: 1fr 1fr; }
  .map-groups details > :not(summary) { display: block !important; }
  .map-groups details::details-content { content-visibility: visible; }
  .mechanism-list, .source-grid { grid-template-columns: 1fr 1fr; gap: 18pt; }
  ol.maintenance-flow, .maintenance-flow ol { grid-template-columns: repeat(4, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline article { display: block; }
  .quote { font-size: 23pt; }
  a { color: #255f50; }
}
