/* VibeCode: a proof sheet on a type designer's desk (redesign/DESIGN.md). What a person says is set in EB Garamond,
   what runs in Commit Mono; the highlighter links the two. Zero radius, hairlines, no shadows. */

@font-face { font-family: "EB Garamond"; src: url("fonts/garamond.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/garamond-italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Commit Mono"; src: url("fonts/commit-mono.woff2") format("woff2"); font-weight: 200 700; font-style: oblique 0deg 10deg; font-display: swap; }
/* Metric-matched fallbacks, so the swap does not move the page. */
@font-face { font-family: "Garamond fallback"; src: local("Times New Roman"), local("Liberation Serif"), local("Tinos"); size-adjust: 89%; ascent-override: 113%; descent-override: 33%; }
@font-face { font-family: "Mono fallback"; src: local("Courier New"), local("Liberation Mono"), local("Cousine"); size-adjust: 100%; ascent-override: 90%; descent-override: 20%; }

@property --sweep { syntax: "<percentage>"; inherits: false; initial-value: 100%; }

:root {
  --paper: #fdfdfb; --ink: #191919; --quiet: #5c5c5c; --hl: #e6fb65; --blue: #2847f4; --rule: #191919;
  --serif: "EB Garamond", "Garamond fallback", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --mono: "Commit Mono", "Mono fallback", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gut: 56px;
  --pad: clamp(20px, 4vw, 64px);
  color-scheme: light dark;
}
@supports (color: oklch(0% 0 0)) {
  :root { --paper: oklch(99.3% .003 106); --ink: oklch(21.8% 0 0); --quiet: oklch(46% 0 0); --hl: oklch(95% .18 117); --blue: oklch(51.5% .25 266); --rule: var(--ink); }
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #121315; --ink: #eeeee6; --quiet: #b3b3ac; --blue: #7d93ff; }
  @supports (color: oklch(0% 0 0)) {
    :root { --paper: oklch(17% .004 265); --ink: oklch(94% .008 100); --quiet: oklch(74% .006 100); --blue: oklch(72% .15 266); }
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.25rem/1.5 var(--serif); font-variant-numeric: oldstyle-nums;
  font-feature-settings: "kern", "liga", "onum";
  padding-left: var(--gut);
}
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
a { color: inherit; }
code, kbd, textarea#code { font-family: var(--mono); font-size: .8em; font-weight: 400; }
img, video, canvas, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
::selection { background: var(--hl); color: #191919; }

/* Focus: the proofreader's mark, an ultramarine ring over the highlighter. */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; background-color: color-mix(in srgb, var(--hl) 55%, transparent); color: #191919; }
textarea:focus-visible, iframe:focus-visible, video:focus-visible { background-color: transparent; color: inherit; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--hl); color: #191919; font-family: var(--mono); font-size: 1rem; }
.skip:focus { left: calc(var(--gut) + 8px); }

/* The highlighter swipe: the one button. A chartreuse parallelogram behind ink text. */
.swipe {
  position: relative; display: inline-block; padding: .28em .9em .32em; border: 0; cursor: pointer;
  font-family: var(--mono); font-size: 1rem; font-weight: 500; letter-spacing: -.01em; text-decoration: none; color: #191919;
  background: var(--hl); clip-path: polygon(0 10%, 100% 0, 98.5% 92%, 1% 100%);
  transition: clip-path .32s var(--ease), letter-spacing .32s var(--ease);
}
.swipe:hover { clip-path: polygon(0 0, 100% 6%, 100% 100%, 0 94%); letter-spacing: .01em; }
.swipe:focus-visible { clip-path: none; outline-offset: 4px; }
.swipe:active { transform: translateY(1px); }
.under { text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: .22em; font-style: italic; }
.under:hover { text-decoration-thickness: .5em; text-decoration-color: color-mix(in srgb, var(--hl) 85%, transparent); text-underline-offset: -.18em; text-decoration-skip-ink: none; }
.fine { font-family: var(--mono); font-size: .8rem; color: var(--quiet); line-height: 1.5; }
.num { font-family: var(--mono); font-weight: 300; font-size: .5em; vertical-align: .55em; margin-right: .4em; color: var(--blue); }
.tag { font-family: var(--mono); font-size: .75rem; color: var(--quiet); }
.tag::before { content: "→ "; color: var(--blue); }

/* ── header and the line-number gutter ─────────────────────────────────────────────────────────────────────── */
.head { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--pad) 0; position: relative; z-index: 5; }
.wordmark { display: inline-block; color: var(--ink); line-height: 0; }
.wordmark svg { width: 150px; height: auto; overflow: visible; }
.head__go { font-size: .9rem; }

.gutter { position: fixed; inset: 0 auto 0 0; width: var(--gut); z-index: 20; border-right: 1px solid var(--rule); background: var(--paper); display: flex; align-items: center; }
.gutter ol { list-style: none; margin: 0; padding: 0; width: 100%; counter-reset: none; }
.gutter a {
  position: relative; display: block; padding: 7px 12px 7px 0; text-align: right; text-decoration: none;
  font: 400 .8rem/1.2 var(--mono); color: var(--quiet); font-variant-numeric: tabular-nums;
}
.gutter a::after {
  content: attr(data-label); position: absolute; left: calc(100% + 10px); top: 50%; translate: 0 -50%; white-space: nowrap;
  padding: 2px 8px; background: var(--ink); color: var(--paper); font-size: .75rem; pointer-events: none;
  clip-path: inset(0 100% 0 0); transition: clip-path .28s var(--ease);
}
.gutter a:hover::after, .gutter a:focus-visible::after { clip-path: inset(0); }
.gutter a[aria-current="true"] { color: #191919; background: var(--hl); font-weight: 600; }
.gutter a[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }

.statusbar, .toc { display: none; }

/* ── 1 the sentence ────────────────────────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px;
  min-height: calc(100svh - 60px); padding: 4vh var(--pad) 48px; align-content: center; margin-top: -60px; padding-top: 96px;
}
.hero__plate { position: absolute; inset: 0 0 0 58%; margin: 0; overflow: hidden; background: #0e1650; }
.hero__plate img, .hero__plate video, .plate__media img, .plate__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__plate video, .plate__media video { opacity: 0; transition: opacity 1.2s linear; }
.hero__plate video.is-playing, .plate__media video.is-playing { opacity: 1; }
figcaption { font: 400 .72rem/1.4 var(--mono); }
.hero__plate figcaption { position: absolute; right: 16px; bottom: 14px; left: 16px; text-align: right; color: #fdfdfb; text-shadow: 0 0 6px #0e1650; }
.hero__title { grid-column: 1 / -1; position: relative; z-index: 2; font-weight: 400; line-height: .92; margin-bottom: 36px; }
.say { display: block; font-style: italic; font-weight: 450; font-size: clamp(3.2rem, 7vw, 9rem); letter-spacing: -.025em; max-width: 7.2em; }
.run { display: block; margin-top: .12em; font-family: var(--mono); font-size: clamp(3rem, 12vw, 14rem); letter-spacing: -.06em; font-weight: 640; }
.run > span { background: var(--hl); color: #191919; padding: 0 .14em; box-decoration-break: clone; -webkit-box-decoration-break: clone; animation: set 1.6s var(--ease) .2s both; }
@keyframes set { from { font-weight: 200; letter-spacing: .04em; } to { font-weight: 640; letter-spacing: -.06em; } }
.hero__body { grid-column: 1 / span 6; position: relative; z-index: 2; display: grid; gap: 22px; max-width: 34rem; }
.lede { font-size: clamp(1.25rem, 1.6vw, 1.6rem); line-height: 1.38; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

/* ── 2 a sentence, compiled (the signature) ───────────────────────────────────────────────────────────────── */
.compile { position: relative; height: 420vh; border-top: 2px solid var(--rule); }
.compile__stage {
  position: sticky; top: 0; height: 100svh; padding: 40px var(--pad) 28px;
  display: grid; grid-template-columns: 5fr 7fr; grid-template-rows: auto 1fr auto; gap: 18px 56px; align-content: start;
}
.compile__head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.compile__head h2 { font-size: clamp(1.6rem, 2.6vw, 2.8rem); font-weight: 450; }
.sentence { align-self: center; font-style: italic; font-size: clamp(2rem, 4.4vw, 5rem); line-height: 1.12; letter-spacing: -.015em; }
.sentence button {
  display: inline; padding: 0 .06em; border: 0; background: none; cursor: pointer; font-style: italic; line-height: inherit; text-align: left; color: var(--quiet);
  background-image: linear-gradient(var(--hl), var(--hl)); background-repeat: no-repeat; background-size: 0% 100%; background-position: 0 0;
  transition: background-size .42s var(--ease), color .2s linear;
}
.sentence button.is-on { color: #191919; background-size: 100% 100%; }
.sentence button.is-now { text-decoration: underline 3px var(--blue); text-underline-offset: .12em; }
.galley { align-self: center; display: grid; gap: 4px; font-family: var(--mono); border-left: 1px solid var(--rule); counter-reset: line; }
.ln { position: relative; display: grid; padding: 10px 0 10px 64px; min-height: 3.2rem; }
.ln::before { counter-increment: line; content: counter(line); position: absolute; left: 0; top: 12px; width: 44px; text-align: right; font-size: .8rem; color: var(--quiet); }
.ln__say, .ln__code { grid-area: 1 / 1; }
.ln__say { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--quiet); transition: clip-path .42s var(--ease); clip-path: inset(0); }
.ln__say::before { content: "// "; font-family: var(--mono); font-style: normal; font-size: .8em; }
.ln__code { white-space: pre-wrap; font-size: clamp(.82rem, 1.12vw, 1.1rem); line-height: 1.55; clip-path: inset(0 100% 0 0); transition: clip-path .42s var(--ease); }
.ln.is-on .ln__say { clip-path: inset(0 0 0 100%); }
.ln.is-on .ln__code { clip-path: inset(0); }
.ln.is-now::after { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.ln.is-now .ln__code { background: color-mix(in srgb, var(--hl) 40%, transparent); }
.runner { grid-column: 1 / -1; margin: 0; display: grid; gap: 6px; }
.runner canvas { width: 100%; height: clamp(120px, 22vh, 240px); background: #191919; }
.runner figcaption { color: var(--quiet); }

/* ── plates: full-bleed film with one line on a solid ground ───────────────────────────────────────────────── */
.plate { position: relative; min-height: 100svh; display: grid; align-items: end; padding: var(--pad); overflow: hidden; }
.plate__media { position: absolute; inset: 0; margin: 0; background: #e9e9e4; }
.plate__media figcaption { position: absolute; top: 14px; right: 16px; padding: 2px 6px; background: #fdfdfb; color: #191919; }
.plate__label { position: relative; z-index: 1; max-width: min(46rem, 100%); padding: 22px 28px 26px; background: #fdfdfb; color: #191919; display: grid; gap: 12px; }
.plate__label h2 { font-style: italic; font-weight: 450; font-size: clamp(2.6rem, 6.4vw, 7rem); line-height: .95; letter-spacing: -.02em; }
.plate__label code { font-size: .85em; }
.plate--read .plate__label { border-left: 8px solid var(--hl); }
.plate--ink { align-items: center; }
.plate--ink .plate__label { border-left: 8px solid #2847f4; }

/* ── 4 the desk: the demo ──────────────────────────────────────────────────────────────────────────────────── */
.desk { padding: clamp(56px, 9vh, 120px) var(--pad); border-bottom: 2px solid var(--rule); }
.desk__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); margin-bottom: 32px; }
.desk__head h2 { font-size: clamp(2.2rem, 4.6vw, 5rem); font-weight: 450; letter-spacing: -.015em; }
.desk__head p { font-style: italic; color: var(--quiet); }
.desk__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 56px; }
.manuscript { display: grid; gap: 22px; align-content: start; }
.manuscript label { font-variant: small-caps; font-feature-settings: "smcp", "c2sc"; letter-spacing: .06em; font-size: 1rem; color: var(--quiet); }
#describe {
  width: 100%; resize: vertical; border: 0; border-bottom: 2px solid var(--rule); padding: 4px 0 8px; background:
    repeating-linear-gradient(to bottom, transparent 0 calc(1.3em - 1px), color-mix(in srgb, var(--ink) 18%, transparent) calc(1.3em - 1px) 1.3em);
  color: var(--ink); font: italic 450 clamp(1.8rem, 2.8vw, 2.8rem)/1.3 var(--serif); border-radius: 0;
}
#describe:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.examples { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; font-style: italic; }
.examples > span { font-family: var(--mono); font-style: normal; font-size: .75rem; color: var(--quiet); margin-right: 8px; }
.examples button { border: 0; background: none; padding: 2px 4px; cursor: pointer; font-style: italic; text-decoration: underline 1px color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: .2em; }
.examples button:not(:last-child)::after { content: " ·"; text-decoration: none; display: inline-block; margin-left: 6px; color: var(--quiet); }
.examples button:hover { background: var(--hl); color: #191919; }
.kbd { font-family: var(--mono); font-size: .75rem; color: var(--quiet); }
kbd { display: inline-block; padding: 0 5px; border: 1px solid currentColor; font-size: .9em; }
.note { font-size: 1.05rem; line-height: 1.45; padding-left: 16px; border-left: 3px solid var(--blue); }
.proofsheet { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; border: 1px solid var(--rule); min-width: 0; }
.codebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--rule); font: .8rem var(--mono); }
.codebar__actions { display: flex; gap: 4px; }
.codebar__actions button { border: 0; background: none; padding: 4px 6px; cursor: pointer; font: 500 .8rem var(--mono); }
.codebar__actions button::before { content: "["; color: var(--quiet); }
.codebar__actions button::after { content: "]"; color: var(--quiet); }
.codebar__actions button:hover { background: var(--hl); color: #191919; }
#code {
  width: 100%; height: clamp(220px, 34vh, 360px); resize: vertical; border: 0; border-bottom: 1px solid var(--rule); padding: 14px 16px; border-radius: 0;
  background: var(--paper); color: var(--ink); font-size: .82rem; line-height: 1.6; tab-size: 2; white-space: pre; overflow: auto;
}
#code:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
#preview { width: 100%; height: clamp(240px, 38vh, 420px); border: 0; background: #191919; }
.status { padding: 8px 12px; border-top: 1px solid var(--rule); min-height: 2.4em; font: .78rem/1.5 var(--mono); }
.status::before { content: "→ "; color: var(--blue); }

/* ── 5 three proofs ────────────────────────────────────────────────────────────────────────────────────────── */
.proofs { padding: clamp(56px, 10vh, 140px) var(--pad); }
.proofs > h2 { font-size: clamp(2.2rem, 4.6vw, 5rem); font-weight: 450; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.proofs ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proof { display: grid; grid-template-rows: auto auto 1fr; gap: 14px; padding: 28px 28px 8px; border-right: 1px solid var(--rule); min-height: 62vh; align-content: start; }
.proof:first-child { padding-left: 0; }
.proof:last-child { border-right: 0; }
.proof__glyph { font-family: var(--mono); font-weight: 200; font-size: clamp(5rem, 14vw, 15rem); line-height: .9; color: var(--blue); letter-spacing: -.08em; }
.proof h3 { display: grid; font-size: clamp(1.8rem, 3vw, 3.2rem); line-height: 1.05; }
.proof h3 > span { grid-area: 1 / 1; }
.proof .s { font-style: italic; font-weight: 450; }
.proof .m { font-family: var(--mono); font-size: .8em; font-weight: 500; background: var(--hl); color: #191919; justify-self: start; padding: 0 .12em; clip-path: inset(0 100% 0 0); }
.proof:hover .m, .proof:focus-within .m { clip-path: inset(0); }
.proof p { max-width: 22rem; color: var(--quiet); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .proof .s { animation: say-out linear both; animation-timeline: view(); animation-range: entry 70% cover 55%; }
    .proof .m { animation: code-in linear both; animation-timeline: view(); animation-range: entry 70% cover 55%; }
    .proof__glyph { animation: weigh linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  }
}
@keyframes say-out { 0%, 55% { clip-path: inset(0); } 100% { clip-path: inset(0 0 0 100%); } }
@keyframes code-in { 0%, 55% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0); } }
@keyframes weigh { from { font-weight: 200; } to { font-weight: 700; } }

/* ── 7 the specimen ────────────────────────────────────────────────────────────────────────────────────────── */
.specimen { padding: clamp(56px, 10vh, 140px) var(--pad); border-top: 2px solid var(--rule); display: grid; gap: 28px; }
.specimen header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.specimen header h2 { font-size: clamp(2.2rem, 4.6vw, 5rem); font-weight: 450; }
.specimen header p { font-style: italic; color: var(--quiet); }
.weights { display: grid; }
.weight { display: grid; grid-template-columns: 7rem minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.3fr) auto; align-items: baseline; gap: 12px 28px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.weight__axis { color: var(--quiet); }
.weight h3 { font-size: clamp(2.6rem, 6vw, 6.4rem); line-height: 1; letter-spacing: -.02em; }
.weight--400 h3 { font-weight: 400; }
.weight--600 h3 { font-weight: 600; }
.weight--800 h3 { font-weight: 800; }
.weight__price { font-family: var(--mono); font-size: 1rem; }
.weight ul { margin: 0; padding: 0; list-style: none; font-size: 1.05rem; line-height: 1.4; }
.weight li::before { content: "¶ "; color: var(--blue); }
.weight:hover h3 { background: linear-gradient(transparent 58%, var(--hl) 58% 92%, transparent 92%); color: inherit; }

/* ── 8 notes ───────────────────────────────────────────────────────────────────────────────────────────────── */
.notes { padding: clamp(56px, 9vh, 120px) var(--pad); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0 56px; border-top: 1px solid var(--rule); }
.notes h2 { font-size: clamp(2.2rem, 4.6vw, 5rem); font-weight: 450; grid-row: span 4; }
.notes details { border-bottom: 1px solid var(--rule); }
.notes summary { cursor: pointer; padding: 16px 0; font-size: clamp(1.3rem, 1.8vw, 1.7rem); font-style: italic; list-style: none; display: flex; gap: 12px; align-items: baseline; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: "+"; margin-left: auto; font: 300 1.4rem var(--mono); color: var(--blue); }
.notes details[open] summary::after { content: "−"; }
.notes sup { font: 500 .75rem var(--mono); color: var(--blue); vertical-align: .6em; }
.notes details p { padding: 0 0 20px 26px; max-width: 40rem; }
.notes a { text-decoration-color: var(--blue); }

/* ── colophon ──────────────────────────────────────────────────────────────────────────────────────────────── */
.colophon { padding: clamp(48px, 8vh, 96px) var(--pad) 28px; border-top: 2px solid var(--rule); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) auto; gap: 32px 48px; align-items: start; }
.wordmark--big svg { width: min(100%, 520px); }
.colophon__text { display: grid; gap: 14px; font-size: 1.05rem; }
.colophon__links { display: grid; gap: 6px; font-family: var(--mono); font-size: .85rem; }
.colophon__links a { text-decoration: none; }
.colophon__links a:hover { background: var(--hl); color: #191919; }
.colophon__base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--rule); font: .78rem var(--mono); color: var(--quiet); }

/* The language button and dialog (the public sites' mechanism, app/lang.js), in this site's hand. */
.lang-btn { border: 1px solid var(--rule); background: none; padding: 4px 10px; cursor: pointer; color: var(--ink); }
.lang-btn__glyph { font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.lang-btn__glyph span:first-child { margin: 0 2px; color: var(--quiet); }
.lang-links { display: flex; gap: 12px; }
.lang-dialog { border: 1px solid var(--rule); padding: 0; background: var(--paper); color: var(--ink); width: min(360px, 92vw); }
.lang-dialog::backdrop { background: color-mix(in srgb, #191919 55%, transparent); }
.lang-dialog__box { padding: 18px 20px 20px; }
.lang-dialog__head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 8px; }
.lang-dialog__head h2 { font-size: 1.4rem; font-style: italic; }
.lang-dialog__close { border: 0; background: none; cursor: pointer; font-size: 1.1rem; padding: 4px 8px; }
.lang-list { list-style: none; margin: 0; padding: 0; }
.lang-list a { display: flex; justify-content: space-between; padding: 10px 6px; text-decoration: none; font-size: 1.2rem; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.lang-list a:hover { background: var(--hl); color: #191919; }
.lang-list__check { font-family: var(--mono); color: var(--blue); }

/* Chinese has no italic: the person's voice is set upright there, never slanted by the browser. */
html:lang(zh-Hans) *:not(code) { font-style: normal !important; font-synthesis: none; }
html:lang(zh-Hans) .say { letter-spacing: 0; }

/* ── reduced motion: a designed still of every moving part ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
  .run > span { animation: none; }
  .compile { height: auto; }
  .compile__stage { position: static; height: auto; }
  .hero__plate video, .plate__media video { display: none; }
}

/* ── 768: the gutter narrows, the compile stage stacks ─────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  :root { --gut: 40px; }
  .gutter a { padding-right: 9px; }
  .compile__stage { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; gap: 14px; }
  .sentence { font-size: clamp(1.8rem, 5vw, 3rem); align-self: start; }
  .galley { align-self: start; }
  .desk__grid { grid-template-columns: 1fr; }
  .proofs ol { grid-template-columns: 1fr; }
  .proof { min-height: auto; border-right: 0; border-bottom: 1px solid var(--rule); padding: 28px 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); grid-template-rows: auto 1fr; column-gap: 24px; }
  .proof__glyph { grid-row: span 2; font-size: clamp(5rem, 18vw, 10rem); }
  .weight { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .weight__axis { grid-column: 1 / -1; }
  .notes { grid-template-columns: 1fr; }
  .notes h2 { grid-row: auto; margin-bottom: 12px; }
  .colophon { grid-template-columns: 1fr 1fr; }
  .wordmark--big { grid-column: 1 / -1; }
}

/* ── 390 and 320: the gutter becomes a status bar ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  :root { --gut: 0px; --pad: 18px; }
  body { font-size: 1.18rem; padding-bottom: 52px; }
  .gutter { display: none; }
  .statusbar {
    display: flex; gap: 10px; align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 44px; padding: 0 16px;
    border: 0; border-top: 1px solid var(--rule); background: var(--paper); font: .8rem var(--mono); cursor: pointer; text-align: left;
  }
  .statusbar b { font-weight: 600; background: var(--hl); color: #191919; padding: 0 4px; }
  .statusbar [data-sec] { color: var(--quiet); }
  .statusbar__all { margin-left: auto; color: var(--blue); }
  .toc:popover-open { display: block; }
  .toc { position: fixed; inset: auto 0 44px 0; margin: 0; width: 100%; border: 0; border-top: 2px solid var(--rule); background: var(--paper); color: var(--ink); padding: 14px 18px 18px; }
  .toc__title { font: .75rem var(--mono); color: var(--quiet); margin-bottom: 6px; }
  .toc ol { margin: 0; padding: 0 0 0 2.2em; font-style: italic; font-size: 1.3rem; }
  .toc li::marker { font: .8rem var(--mono); color: var(--quiet); }
  .toc a { display: block; padding: 6px 0; text-decoration: none; }
  .skip:focus { left: 8px; }
  .head { padding-top: 14px; }
  .wordmark svg { width: 124px; }
  .hero { display: block; min-height: 0; margin-top: 0; padding: 22px var(--pad) 40px; }
  .hero__plate { position: relative; inset: auto; height: auto; aspect-ratio: 4 / 3; margin: 22px calc(var(--pad) * -1) 22px; }
  .hero__title { display: contents; }
  .say { font-size: clamp(2.6rem, 13vw, 4rem); }
  .run { font-size: clamp(2.4rem, 15vw, 4.6rem); margin: .08em 0 .3em; }
  .hero__title .say { margin-bottom: 0; }
  .hero__body { gap: 18px; }
  .compile { height: 360vh; }
  .compile__stage { height: calc(100svh - 44px); padding: 16px var(--pad) 10px; gap: 8px; }
  .compile__head h2 { font-size: 1.4rem; }
  .compile__head .tag { font-size: .68rem; }
  .sentence { font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.15; }
  .ln { padding: 6px 0 6px 30px; min-height: 2.2rem; }
  .ln::before { width: 22px; top: 8px; font-size: .7rem; }
  .ln__say { font-size: 1.05rem; }
  .ln__code { font-size: .74rem; }
  .runner canvas { height: clamp(64px, 14svh, 120px); }
  .compile__head { padding-bottom: 6px; }
  .runner figcaption { font-size: .66rem; }
  .plate { min-height: 88svh; padding: 0; align-items: end; }
  .plate--ink { align-items: end; }
  .plate__label { margin: 0; padding: 18px var(--pad) 22px; max-width: none; }
  .plate__media figcaption { top: auto; bottom: auto; top: 10px; right: 10px; left: 10px; text-align: right; background: none; color: #191919; text-shadow: 0 0 4px #fdfdfb; }
  .desk__head p { font-size: 1.05rem; }
  .proof { grid-template-columns: 1fr; }
  .proof__glyph { grid-row: auto; font-size: 5.4rem; }
  .weight { grid-template-columns: 1fr; gap: 8px; }
  .colophon { grid-template-columns: 1fr; }
  .notes details p { padding-left: 0; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .compile { height: auto; } }
