/* Hallmark · genre: editorial · macrostructure: Type Specimen (landing) / Catalogue (indexes) / Long Document (reference)
 * theme: custom (brand-anchored: Aurum) · design-system: tooling/gallery/design.md · designed-as-app
 * paper oklch(97.6% 0.005 300) · ink oklch(21% 0.02 300) · accent oklch(48.3% 0.228 296) = #7029CC (brand)
 * lens (iOS) oklch(52% 0.205 260) = Aurum visual.blue.600 — the sanctioned per-portal divergence
 * display: Frank Ruhl Libre · body: Inter (Aurum's own body face — deliberate, the portal is a specimen of its system)
 * mono: JetBrains Mono (data register: values, paths, counts, colophon)
 * nav: N6 masthead (issue-line = version) · footer: Ft4 colophon · enrichment: none — real baselines are the imagery
 * axes: light / high-contrast-serif / cool-violet · motion: hover + focus only, no reveals
 * pre-emit critique: P5 H4 E4 S5 R5 V5 · contrast: pass (40–41) · slop: pass (42–45) · honest: pass (46)
 * chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50–57)
 */

:root {
  /* Paper & ink — violet-tinted neutrals, no pure extremes */
  --color-paper:       oklch(97.6% 0.005 300);
  --color-paper-2:     oklch(94.8% 0.008 300);
  --color-rule:        oklch(88% 0.012 300);
  --color-rule-strong: oklch(72% 0.02 300);
  --color-ink:         oklch(21% 0.02 300);
  --color-ink-2:       oklch(38% 0.018 300);
  --color-muted:       oklch(47% 0.016 300);
  /* Accent — Aurum brand purple #7029CC. A highlighter, ≤3% of any view. */
  --color-accent:      oklch(48.3% 0.228 296.3);
  --color-focus:       oklch(48.3% 0.228 296.3);
  /* Platform lens — from the system's own palette (visual.blue.600 #055FDC) */
  --color-lens:        oklch(52% 0.205 259.7);
  /* Snapshot mats match the baseline PNGs' white background (functional),
     so everything painted ON a mat uses fixed on-plate values, not the
     theme-relative inks. */
  --color-plate:          #FFFFFF;
  --color-on-plate-muted: oklch(50% 0.012 300);
  --color-on-plate-faint: oklch(65% 0.018 300);
  --color-on-swatch-ink:  oklch(15% 0.02 300);
  --color-on-swatch-paper: oklch(97% 0.005 300);
  --checker-a:            oklch(85% 0.005 300);
  --checker-b:            oklch(97% 0.005 300);
  --shadow-edge:          inset 0 0 0 1px oklch(30% 0.01 300 / 0.15);
  /* Do/Don't glyph marks — darkened Aurum feedback hues; shape+label carry
     the meaning, colour is reinforcement only. */
  --color-do:          oklch(48% 0.13 148);
  --color-dont:        oklch(48% 0.17 33);

  --font-display: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale — major third on a 16px base */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.25rem;
  --text-lg:   1.5625rem;
  --text-xl:   1.953rem;
  --text-2xl:  2.441rem;
  --text-display-s: clamp(1.9rem, 1.2rem + 2vw, 2.75rem);
  --text-display:   clamp(2.75rem, 5vw + 1rem, 5.25rem);
  /* Single short word only (the wordmark-as-specimen) */
  --text-specimen:  clamp(4rem, 9vw + 1rem, 7rem);

  /* 4-pt spacing, named by role */
  --space-3xs: 0.125rem; --space-2xs: 0.25rem; --space-xs: 0.5rem;
  --space-sm: 0.75rem;   --space-md: 1rem;     --space-lg: 1.5rem;
  --space-xl: 2.5rem;    --space-2xl: 4rem;    --space-3xl: 6rem;
  --space-4xl: 9rem;

  --rule-hair: 1px;
  --radius-plate: 2px;
  --radius-chip: 3px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;

  --z-base: 1; --z-raised: 10; --z-sticky: 200;

  --page-gutter: clamp(1rem, 4vw, 2.5rem);
  --page-max: 1160px;
}

/* Dark — the ink room. Same hues; only lightness and chroma move. */
html[data-theme="dark"] {
  --color-paper:       oklch(19% 0.014 300);
  --color-paper-2:     oklch(23.5% 0.016 300);
  --color-rule:        oklch(32% 0.014 300);
  --color-rule-strong: oklch(46% 0.02 300);
  --color-ink:         oklch(93.5% 0.008 300);
  --color-ink-2:       oklch(78% 0.012 300);
  --color-muted:       oklch(70% 0.014 300);
  --color-accent:      oklch(72.2% 0.168 298.7);
  --color-focus:       oklch(72.2% 0.168 298.7);
  --color-lens:        oklch(64% 0.19 259.9);
  --color-do:          oklch(72% 0.14 148);
  --color-dont:        oklch(70% 0.16 33);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --color-paper:       oklch(19% 0.014 300);
    --color-paper-2:     oklch(23.5% 0.016 300);
    --color-rule:        oklch(32% 0.014 300);
    --color-rule-strong: oklch(46% 0.02 300);
    --color-ink:         oklch(93.5% 0.008 300);
    --color-ink-2:       oklch(78% 0.012 300);
    --color-muted:       oklch(70% 0.014 300);
    --color-accent:      oklch(72.2% 0.168 298.7);
    --color-focus:       oklch(72.2% 0.168 298.7);
    --color-lens:        oklch(64% 0.19 259.9);
    --color-do:          oklch(72% 0.14 148);
    --color-dont:        oklch(70% 0.16 33);
  }
}

/* ── Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--space-xl); }
body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11";
}

::selection {
  background: color-mix(in oklab, var(--color-lens) 26%, transparent);
}

.mono, code, kbd, pre { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

code {
  font-size: 0.86em;
  color: var(--color-ink-2);
  background: var(--color-paper-2);
  padding: var(--space-3xs) var(--space-2xs);
  border-radius: var(--radius-chip);
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

kbd {
  font-size: var(--text-xs);
  color: var(--color-muted);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-chip);
  padding: var(--space-3xs) var(--space-xs);
}

button[disabled], button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-color var(--dur-micro) var(--ease-out);
}
a:hover { text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }
a:active { opacity: 0.85; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 1px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }

.skip-link {
  position: absolute; inset-block-start: -100px; inset-inline-start: var(--space-sm);
  background: var(--color-ink); color: var(--color-paper);
  padding: var(--space-xs) var(--space-md); z-index: var(--z-sticky);
  text-decoration: none; white-space: nowrap;
}
.skip-link:focus-visible { inset-block-start: var(--space-sm); }

.wrap { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-gutter); }

img { max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: clip; white-space: nowrap;
}

/* ── Masthead (N6 — the version is the issue line) ────────────────── */

.mast { padding: var(--space-lg) var(--page-gutter) 0; text-align: center; }
.mast-line {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-xs);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.09em;
  color: var(--color-muted);
}
.mast-line .mono { font-variant-caps: normal; letter-spacing: 0; font-size: var(--text-xs); }
.lens-mark {
  display: inline-block; width: 9px; height: 9px;
  background: var(--color-lens);
  margin-inline-end: var(--space-xs);
  vertical-align: 1px;
}
.mast-name {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.5vw + 1rem, 3.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--color-ink);
}
.mast-name:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--color-accent); text-underline-offset: 4px; }
.mast-nav {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: var(--space-xs) var(--space-lg);
  margin-block-start: var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
}
.mast-nav a {
  text-decoration: none; white-space: nowrap; color: var(--color-ink-2);
  padding-block: var(--space-2xs);
}
.mast-nav a:hover { color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--color-rule-strong); text-underline-offset: 4px; }
.mast-nav a[aria-current="page"] {
  color: var(--color-ink);
  text-decoration: underline; text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.mast-gap { inline-size: var(--space-lg); }
.lens-link { text-decoration-color: color-mix(in oklab, var(--color-lens) 55%, transparent); }
.lens-link:hover { text-decoration-color: var(--color-lens); }
.theme-cycle {
  font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2);
  white-space: nowrap; padding-block: var(--space-2xs);
}
.theme-cycle:hover { color: var(--color-ink); }
.theme-cycle:active { opacity: 0.8; }
.mast-rule {
  margin-block-start: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-ink);
  border-block-end: var(--rule-hair) solid var(--color-ink);
  height: 5px;
}

/* ── Colophon (Ft4) ───────────────────────────────────────────────── */

.colophon {
  margin-block-start: var(--space-4xl);
  border-block-start: var(--rule-hair) solid var(--color-rule-strong);
  padding: var(--space-lg) var(--page-gutter) var(--space-2xl);
  max-width: var(--page-max); margin-inline: auto;
}
.colophon-block {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--color-muted);
  max-width: 72ch;
}
.colophon-links {
  margin: var(--space-md) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.colophon-links a { white-space: nowrap; }

/* ── Landing · specimen hero ──────────────────────────────────────── */

.specimen-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-2xl);
  align-items: start;
  /* end-heavy: the hero settles into the page instead of floating */
  padding-block: var(--space-xl) var(--space-2xl);
}
.hero-title {
  font-size: var(--text-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero-note {
  margin: var(--space-md) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.hero-lede {
  margin: var(--space-lg) 0 0;
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--color-ink-2);
  max-width: 46ch;
}
.hero-actions {
  margin-block-start: var(--space-xl);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-md) var(--space-lg);
}

/* C3 — typographic link CTA */
.link-cta {
  font-weight: 500;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--color-accent);
  white-space: nowrap;
}
.link-cta:hover { text-decoration-thickness: 3px; }

/* C1 — outlined chip CTA (rectangular · spacious · no adornment) */
.chip-cta {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: var(--radius-chip);
  color: var(--color-ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out);
}
.chip-cta:hover { background: var(--color-ink); color: var(--color-paper); text-decoration: none; }
.chip-cta:active { transform: translateY(1px); }

/* Live type specimen — real tokens, rendered */
.type-live {
  border-inline-start: var(--rule-hair) solid var(--color-rule);
  padding-inline-start: var(--space-2xl);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl);
  align-self: center;
}
.type-live-sample {
  margin: 0; line-height: 1.15; color: var(--color-ink);
  overflow: clip; white-space: nowrap; text-overflow: ellipsis;
  max-width: 100%;
}
.type-live-caption {
  margin: var(--space-xs) 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ── Landing · stat strip (T4, full-bleed grid-break) ─────────────── */

.stat-strip {
  border-block: var(--rule-hair) solid var(--color-rule-strong);
  padding-block: var(--space-lg);
}
.stat-strip-inner {
  max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-gutter);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
}
.stat-strip b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xl);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-strip span {
  display: block; margin-block-start: var(--space-2xs);
  font-size: var(--text-xs);
  font-variant-caps: all-small-caps; letter-spacing: 0.08em;
  color: var(--color-muted);
}

/* ── Landing · sections ───────────────────────────────────────────── */

.sec { padding-block-start: var(--space-3xl); }
.sec-tight { padding-block-start: var(--space-xl); }
.sec-head { margin: 0 0 var(--space-lg); font-size: var(--text-xl); }
.sec-lede { margin: calc(-1 * var(--space-xs)) 0 var(--space-lg); color: var(--color-muted); max-width: 60ch; }

/* What's new — a document excerpt, not a card */
.news-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-md); }
.news-date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }
.news-bullets { margin: var(--space-md) 0 var(--space-md); padding-inline-start: 1.2em; max-width: 70ch; color: var(--color-ink-2); }
.news-bullets li { margin-block-end: var(--space-xs); }

/* The loop — F4 step sequence, inline ordinals */
.loop-steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl);
  counter-reset: loop;
}
.loop-step { counter-increment: loop; }
.loop-step h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; }
.loop-step h3::before {
  content: counter(loop) ".";
  font-family: var(--font-mono); font-weight: 500;
  color: var(--color-muted);
  margin-inline-end: var(--space-xs);
}
.loop-step p { margin: var(--space-xs) 0 0; font-size: var(--text-sm); line-height: 1.6; color: var(--color-ink-2); }

/* Design ↔ code — asymmetric 5/7 prose diptych */
.bridge {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-2xl);
}
.bridge h3 { font-size: var(--text-lg); margin: 0 0 var(--space-sm); }
.bridge p { margin: 0 0 var(--space-sm); color: var(--color-ink-2); max-width: 58ch; }

/* Install — code block in a typographic frame (no fake window chrome) */
.codeframe { border-block-start: var(--rule-hair) solid var(--color-rule-strong); max-width: 72ch; }
.codeframe-label {
  display: block; margin: 0; padding-block: var(--space-xs);
  font-family: var(--font-mono); font-size: var(--text-xs);
  font-variant-caps: all-small-caps; letter-spacing: 0.08em;
  color: var(--color-muted);
}
.codeframe pre {
  margin: 0; padding: var(--space-md) 0 var(--space-lg);
  font-size: var(--text-sm); line-height: 1.7;
  color: var(--color-ink-2);
  overflow-x: auto;
  border-block-end: var(--rule-hair) solid var(--color-rule-strong);
}

/* Contents — the index rows that replace the panel grid */
.contents-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  text-decoration: none;
}
.contents-row:last-of-type { border-block-end: var(--rule-hair) solid var(--color-rule); }
.contents-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-md);
  min-width: 0; overflow-wrap: anywhere;
}
.contents-row:hover .contents-name { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--color-accent); text-underline-offset: 4px; }
.contents-note { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
@media (max-width: 46rem) {
  .contents-row { flex-direction: column; align-items: flex-start; gap: var(--space-3xs); }
  .contents-note { white-space: normal; }
}

/* ── Inner pages · document head ──────────────────────────────────── */

.page-doc-head { padding-block: var(--space-2xl) var(--space-lg); }
.crumbs {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted);
}
.crumbs a { white-space: nowrap; }
.page-title { font-size: var(--text-display-s); font-weight: 600; }
.page-lede { margin: var(--space-sm) 0 0; color: var(--color-ink-2); max-width: 65ch; }

.search-row { margin-block-start: var(--space-lg); display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-md); align-items: center; }
.search {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-chip);
  padding: var(--space-xs) var(--space-sm);
  min-width: min(100%, 380px); flex: 1; max-width: 480px;
  background: var(--color-paper);
  transition: border-color var(--dur-micro) var(--ease-out);
}
.search:hover { border-color: var(--color-ink-2); }
.search:focus-within { outline: 2px solid var(--color-focus); outline-offset: 1px; }
.search input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font: inherit; font-size: var(--text-sm); color: var(--color-ink);
}
.search input::placeholder { color: var(--color-muted); }
.result-count { margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }

/* ── Rail layout (kept docs UX, editorial dress) ──────────────────── */

.layout-rail {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: start;
  padding-block: var(--space-lg) var(--space-2xl);
}
.page-rail {
  position: sticky; inset-block-start: var(--space-lg);
  max-height: calc(100vh - var(--space-2xl)); overflow-y: auto;
  font-size: var(--text-sm);
}
.page-rail nav ul { list-style: none; margin: 0; padding: 0; }
.page-rail li { margin: 0; }
.page-rail a {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-xs);
  padding-block: var(--space-2xs);
  text-decoration: none; color: var(--color-ink-2);
}
.page-rail a:hover { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-rule-strong); }
.rail-count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }

@media (max-width: 60rem) {
  .layout-rail { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .page-rail { display: none; }
}

/* ── Catalogue · family sections + plates ─────────────────────────── */

.family-sec { padding-block-start: var(--space-2xl); scroll-margin-top: var(--space-lg); }
.family-sec:first-child { padding-block-start: 0; }
.family-head { display: flex; align-items: baseline; gap: var(--space-sm); margin: 0 0 var(--space-lg); }
.family-head h2 { font-size: var(--text-lg); }
.family-count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }

.plate-grid {
  display: grid; gap: var(--space-lg) var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.plate { text-decoration: none; min-width: 0; }
.plate-fig {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: var(--color-plate);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-plate);
  display: flex; align-items: center; justify-content: center;
  overflow: clip; padding: var(--space-sm);
  transition: border-color var(--dur-micro) var(--ease-out);
}
.plate:hover .plate-fig { border-color: var(--color-rule-strong); }
.plate-fig img { max-width: 100%; max-height: 100%; object-fit: contain; }
.plate-mono {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--text-2xl); letter-spacing: -0.02em;
  color: var(--color-on-plate-faint);
}
.plate-cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-xs);
  margin-block-start: var(--space-xs);
}
.plate-name { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); min-width: 0; overflow-wrap: anywhere; }
.plate:hover .plate-name { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--color-accent); text-underline-offset: 3px; }
.plate-count { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }

.empty-state { padding-block: var(--space-2xl); color: var(--color-muted); }

/* ── Long Document · component detail ─────────────────────────────── */

.doc { max-width: 72ch; }
.doc-wide { max-width: none; }

.spec-sheet {
  width: 100%; max-width: 72ch;
  border-collapse: collapse;
  margin-block: var(--space-lg) var(--space-xl);
  font-size: var(--text-sm);
}
.spec-sheet th {
  text-align: start; vertical-align: baseline;
  font-family: var(--font-mono); font-weight: 400;
  font-size: var(--text-xs);
  font-variant-caps: all-small-caps; letter-spacing: 0.08em;
  color: var(--color-muted);
  padding: var(--space-xs) var(--space-lg) var(--space-xs) 0;
  white-space: nowrap; width: 12ch;
}
.spec-sheet td {
  padding: var(--space-xs) 0;
  border-block-start: var(--rule-hair) solid var(--color-rule);
  color: var(--color-ink-2);
  min-width: 0; overflow-wrap: anywhere;
}
.spec-sheet tr:first-child td { border-block-start: none; }
.spec-sheet tr:first-child th { border-block-start: none; }
.spec-sheet th { border-block-start: var(--rule-hair) solid var(--color-rule); }

.doc-prose p { margin: 0 0 var(--space-md); color: var(--color-ink-2); max-width: 65ch; }
.inline-head {
  font-family: var(--font-body); font-weight: 600; letter-spacing: 0.02em;
  font-size: var(--text-base);
  margin: var(--space-2xl) 0 var(--space-sm);
}

/* Do / Don't — typographic columns, glyph-level colour only */
.dodont {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-xl);
  margin-block: var(--space-lg) var(--space-xl);
  max-width: 72ch;
}
.usage-col { border-block-start: var(--rule-hair) solid var(--color-rule-strong); padding-block-start: var(--space-sm); }
.usage-label {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono); font-size: var(--text-xs);
  font-variant-caps: all-small-caps; letter-spacing: 0.09em;
  color: var(--color-muted);
}
.usage-col ul { list-style: none; margin: 0; padding: 0; }
.usage-col li {
  position: relative; padding-inline-start: 1.5em;
  margin-block-end: var(--space-sm);
  font-size: var(--text-sm); line-height: 1.6; color: var(--color-ink-2);
}
.usage-col li::before { position: absolute; inset-inline-start: 0; font-weight: 600; }
.usage-do li::before { content: "✓"; color: var(--color-do); }
.usage-dont li::before { content: "✕"; color: var(--color-dont); }

/* Snapshot plates */
.snap-note { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); margin: 0 0 var(--space-md); }
.snap-row { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 100%; }
.snap-plate { margin: 0; min-width: 0; }
.snap-plate a { display: block; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-plate); background: var(--color-plate); transition: border-color var(--dur-micro) var(--ease-out); }
.snap-plate a:hover { border-color: var(--color-rule-strong); }
.snap-plate img { display: block; width: 100%; height: auto; }
.snap-plate figcaption {
  margin-block-start: var(--space-xs);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted);
  overflow-wrap: anywhere;
}

/* ── Tokens page ──────────────────────────────────────────────────── */

.tok-section { padding-block-start: var(--space-2xl); scroll-margin-top: var(--space-lg); }
.tok-section:first-child { padding-block-start: 0; }
.tok-head h2 { font-size: var(--text-xl); margin: 0 0 var(--space-xs); }
.tok-sub { margin: 0 0 var(--space-lg); color: var(--color-muted); max-width: 65ch; font-size: var(--text-sm); }
.tok-subsection { margin-block-start: var(--space-xl); }
.tok-subhead h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; margin: 0 0 var(--space-2xs); }
.tok-subhead p { margin: 0 0 var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }

.swatch-list { display: grid; gap: 0 var(--space-2xl); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.swatch-row {
  display: flex; align-items: center; gap: var(--space-sm);
  padding-block: var(--space-xs);
  border-block-end: var(--rule-hair) solid var(--color-rule);
  cursor: pointer;
  background: none; text-align: start; width: 100%;
}
.swatch-row:hover .swatch-name { text-decoration: underline; text-decoration-color: var(--color-rule-strong); }
.swatch-chip {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: var(--radius-plate);
  background:
    linear-gradient(var(--c), var(--c)),
    repeating-conic-gradient(var(--checker-a) 0% 25%, var(--checker-b) 0% 50%) 0 0 / 10px 10px;
  box-shadow: var(--shadow-edge);
}
.swatch-name { flex: 1; min-width: 0; font-size: var(--text-sm); color: var(--color-ink); overflow-wrap: anywhere; }
.swatch-hex { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }

.ramp {
  display: grid; grid-template-columns: repeat(11, minmax(0, 1fr));
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-plate);
  overflow: clip;
}
.ramp-step {
  background: var(--c);
  min-height: 84px;
  padding: var(--space-sm) var(--space-2xs) var(--space-xs);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  text-align: center; cursor: pointer; border: none; font: inherit;
}
.ramp-name { font-family: var(--font-mono); font-size: 0.65rem; opacity: 0.9; }
.ramp-hex { font-family: var(--font-mono); font-size: 0.62rem; opacity: 0.75; }
.ramp-light { color: var(--color-on-swatch-ink); }
.ramp-dark { color: var(--color-on-swatch-paper); }
@media (max-width: 46rem) { .ramp { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.type-list { display: block; }
.type-row {
  display: grid; grid-template-columns: 88px 220px minmax(0, 1fr);
  gap: var(--space-lg); align-items: center;
  padding-block: var(--space-md);
  border-block-end: var(--rule-hair) solid var(--color-rule);
}
.type-specimen { text-align: center; line-height: 1; letter-spacing: -0.02em; }
.type-meta strong { display: block; font-size: var(--text-sm); font-weight: 600; }
.type-sub { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); }
.type-sample { margin: 0; color: var(--color-ink-2); overflow: clip; max-height: 2.4em; min-width: 0; }
@media (max-width: 52rem) {
  .type-row { grid-template-columns: 64px minmax(0, 1fr); }
  .type-sample { display: none; }
}

.scale-list { max-width: 72ch; }
.scale-row {
  display: grid; grid-template-columns: 6ch 6ch minmax(0, 1fr); gap: var(--space-md);
  align-items: center; padding-block: var(--space-xs);
  border-block-end: var(--rule-hair) solid var(--color-rule);
}
.scale-name { font-weight: 500; font-size: var(--text-sm); }
.scale-val { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.scale-bar { height: 12px; background: color-mix(in oklab, var(--color-ink) 22%, transparent); width: var(--w); min-width: 2px; }

.shape-grid { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.shape-card { text-align: center; }
.shape-mat {
  background: var(--color-paper-2); border-radius: var(--radius-plate);
  height: 96px; display: flex; align-items: center; justify-content: center;
  margin-block-end: var(--space-xs);
}
.shape-demo { background: color-mix(in oklab, var(--color-ink) 26%, transparent); width: 56px; height: 56px; }
.shape-demo-border { width: 64px; height: 40px; background: none; border-style: solid; border-color: var(--color-ink-2); border-radius: 4px; }
.shape-card strong { display: block; font-size: var(--text-sm); font-weight: 500; }
.shape-card code { background: none; padding: 0; font-size: var(--text-xs); color: var(--color-muted); }

.elev-grid { display: grid; gap: var(--space-lg); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.elev-card { background: var(--color-paper-2); border-radius: var(--radius-plate); padding: var(--space-xl) var(--space-md) var(--space-md); text-align: center; }
.elev-sample { width: 76px; height: 56px; margin: 0 auto var(--space-lg); background: var(--color-plate); border-radius: 6px; }
.elev-card strong { display: block; font-size: var(--text-sm); font-weight: 500; }
.elev-card code, .elev-tint { background: none; padding: 0; font-size: var(--text-xs); color: var(--color-muted); }
.elev-tint { display: block; margin-block-start: var(--space-3xs); font-family: var(--font-mono); }

/* ── Icons page ───────────────────────────────────────────────────── */

.icon-plate-grid { display: grid; gap: var(--space-lg) var(--space-md); grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.icon-plate { min-width: 0; }
.icon-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--color-plate);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-plate);
}
.icon-cell { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); padding: var(--space-md) var(--space-xs) var(--space-sm); }
.icon-cell + .icon-cell { border-inline-start: var(--rule-hair) solid var(--color-rule); }
.icon-cell svg { width: 26px; height: 26px; display: block; }
.icon-cell-label {
  font-family: var(--font-mono); font-size: 0.62rem;
  font-variant-caps: all-small-caps; letter-spacing: 0.08em;
  color: var(--color-on-plate-muted);
}
.icon-cap { margin-block-start: var(--space-xs); }
.icon-name { display: block; font-size: var(--text-sm); font-weight: 500; overflow-wrap: anywhere; }

/* Copy chip — mono affordance with an explicit success/failure state */
.copy-chip {
  display: block; width: 100%;
  margin-block-start: var(--space-2xs);
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: start;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-chip);
  padding: var(--space-2xs) var(--space-xs);
  white-space: nowrap; overflow: clip; text-overflow: ellipsis;
  transition: border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.copy-chip:hover { border-color: var(--color-rule-strong); color: var(--color-ink-2); }
.copy-chip:active { transform: translateY(1px); }
.copy-chip.is-copied { border-color: var(--color-do); color: var(--color-do); }
.copy-chip.is-copy-error { border-color: var(--color-dont); color: var(--color-dont); }

/* ── Changelog prose ──────────────────────────────────────────────── */

.prose { max-width: 72ch; padding-block: var(--space-lg) var(--space-xl); }
.prose h1 { font-size: var(--text-xl); margin: var(--space-xl) 0 var(--space-sm); }
.prose h2 {
  font-size: var(--text-lg);
  margin: var(--space-2xl) 0 var(--space-sm);
  padding-block-start: var(--space-lg);
  border-block-start: var(--rule-hair) solid var(--color-rule);
}
.prose h2:first-of-type { border-block-start: none; padding-block-start: 0; margin-block-start: var(--space-lg); }
.prose h3 { font-family: var(--font-body); font-weight: 600; letter-spacing: 0; font-size: var(--text-base); margin: var(--space-lg) 0 var(--space-xs); }
.prose p { margin: 0 0 var(--space-sm); color: var(--color-ink-2); }
.prose ul { margin: 0 0 var(--space-md); padding-inline-start: 1.3em; color: var(--color-ink-2); }
.prose li { margin-block-end: var(--space-xs); }

/* ── Motion discipline ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ── Mobile ───────────────────────────────────────────────────────── */

@media (max-width: 60rem) {
  .specimen-hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .type-live { border-inline-start: none; border-block-start: var(--rule-hair) solid var(--color-rule); padding-inline-start: 0; padding-block-start: var(--space-lg); }
  .bridge { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .loop-steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
}
@media (max-width: 46rem) {
  .stat-strip-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md) var(--space-lg); }
  .hero-title { font-size: var(--text-display-s); }
  .mast-nav { gap: var(--space-2xs) var(--space-md); }
  .mast-gap { display: none; }
  .sec { padding-block-start: var(--space-2xl); }
}
