/* ============================================================
   XPRSHUN · Brand kit stylesheet · v1.0 · 2026-10-11
   Source of truth: PRODUCT.md · DESIGN.md · PRESENCE.md ·
   rollout/decisions-round-1.md. Token values: system/tokens.js.

   1. Fonts (SIL OFL 1.1, self-hosted)
   2. Tokens (generated: do not edit by hand)
   3. Kit variables (textures, layers, density)
   4. Base
   5. Type
   6. Shell: masthead, sidebar and mobile drawer, main
   7. Controls
   8. Components
   9. Views
   10. Tweaks panel
   11. Textures
   12. Motion and reduced motion
   13. Responsive
   14. Print
   ============================================================ */

/* ── 1. Fonts ─────────────────────────────────────────────── */

@font-face {
  font-family: 'Commissioner';
  src: url('assets/fonts/commissioner/Commissioner-Variable.woff2') format('woff2-variations'),
       url('assets/fonts/commissioner/Commissioner-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader';
  src: url('assets/fonts/newsreader/Newsreader-Variable.woff2') format('woff2-variations'),
       url('assets/fonts/newsreader/Newsreader-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader';
  src: url('assets/fonts/newsreader/Newsreader-Italic-Variable.woff2') format('woff2-variations'),
       url('assets/fonts/newsreader/Newsreader-Italic-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url('assets/fonts/source-sans-3/SourceSans3-Variable.woff2') format('woff2-variations'),
       url('assets/fonts/source-sans-3/SourceSans3-Variable.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ── 2. Tokens ────────────────────────────────────────────── */
/* tokens:begin */
/* XPRSHUN design tokens v1.0 · generated from system/tokens.js · 2026-10-11 */
:root {
  /* Colour primitives. Hex is canonical. */
  --c-charcoal: #1D1815;
  --c-charcoal-2: #27221F;
  --c-charcoal-3: #3B3531;
  --c-paper: #F4EFE6;
  --c-paper-2: #EAE3D8;
  --c-paper-3: #D8CFC1;
  --c-stone: #B0A89D;
  --c-stone-deep: #564E47;
  --c-bluegrey: #8493A0;
  --c-bluegrey-deep: #566572;
  --c-gold: #CEAB75;
  --c-gold-deep: #7E5C27;
  --c-clay: #CD9A8A;
  --c-clay-deep: #874F3E;

  /* The dawn sequence: sky and tint per stop (bluehour-firstlight is the OKLab midpoint). */
  --sky-night: #1B1E24;
  --tint-night: #E3E4E7;
  --sky-nautical: #323D49;
  --tint-nautical: #E1E6ED;
  --sky-bluehour: #596B7B;
  --tint-bluehour: #E0EAF3;
  --sky-bluehour-firstlight: #8B8D8F;
  --tint-bluehour-firstlight: #EBEBEC;
  --sky-firstlight: #BFB0A2;
  --tint-firstlight: #F6ECE4;
  --sky-sunrise: #E0C599;
  --tint-sunrise: #F9EFDB;

  /* Gradients. OKLab only: OKLCH routes blue-grey to gold through green. */
  --gradient-dawn: linear-gradient(in oklab to right, var(--sky-night) 10%, var(--sky-nautical) 30%, var(--sky-bluehour) 50%, var(--sky-firstlight) 70%, var(--sky-sunrise) 90%);
  --gradient-light: linear-gradient(in oklab to right, var(--c-bluegrey), var(--c-gold));

  /* Type families (SIL OFL 1.1, self-hosted in assets/fonts). */
  --font-display: 'Commissioner', 'Avenir Next', 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;
  --font-voice: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', 'Palatino', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', 'Segoe UI', 'Helvetica Neue', 'Arial', sans-serif;

  /* Type scale: 16 px base, 12 px minimum. */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.375rem;
  --fs-4xl: 3rem;
  --fs-5xl: 3.75rem;
  --fs-6xl: 4.75rem;
  --fs-7xl: 6rem;
  --fs-8xl: 7.5rem;

  --lh-display: 1.04;
  --lh-heading: 1.15;
  --lh-lyric: 1.4;
  --lh-body: 1.5;
  --tracking-display: -0.01em;
  --tracking-none: 0em;
  --tracking-caps-min: 0.08em;
  --tracking-caps: 0.1em;
  --tracking-caps-max: 0.14em;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-wordmark: 540;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing. */
  --space-3xs: 2px;
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;
  --space-6xl: 160px;

  /* Radius: 0 media, 3 small controls, 8 cards and inputs, 16 sheets, 999 avatars and pills. */
  --radius-none: 0;
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Motion: breath is the clock. */
  --dur-ui: 240ms;
  --dur-hold: 800ms;
  --dur-condense: 1200ms;
  --dur-dissolve: 1500ms;
  --dur-inhale: 1600ms;
  --dur-clear: 1800ms;
  --dur-cut-min: 2000ms;
  --dur-exhale: 2400ms;
  --dur-breath: 4000ms;
  --dur-canvas: 7900ms;
  --ease-dawn: cubic-bezier(0.33, 0, 0.2, 1);
  --ease-inhale: cubic-bezier(0.37, 0, 0.63, 1);
  --ease-exhale: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Layout (kit shell). */
  --layout-sidebar: 264px;
  --layout-content: 1120px;
  --layout-reading: 42rem;
  --layout-masthead: 64px;

  /* Theme: Paper is the default. */
  --color-canvas: var(--c-paper);
  --color-surface: var(--c-paper-2);
  --color-ink: var(--c-charcoal-2);
  --color-ink-2: var(--c-stone-deep);
  --color-ink-3: var(--c-bluegrey-deep);
  --color-rule: var(--c-paper-3);
  --color-accent: var(--c-gold);
  --color-accent-text: var(--c-gold-deep);
  --color-focus: var(--c-gold-deep);
  --color-on-accent: var(--c-charcoal-2);
  --color-error: var(--c-clay-deep);
  --color-tint: var(--chapter-tint);
  --color-horizon: var(--c-charcoal-2);
  color-scheme: light;

  /* Chapter preset: album (the default). */
  --chapter-sky: var(--sky-bluehour);
  --chapter-tint: var(--c-paper);
  --chapter-on-sky: var(--c-paper);
  --chapter-ticks: 7;
  --flar: 50;
  --light: 0.5;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}

/* Dusk: set explicitly, or followed from the system unless Paper is chosen. */
:root[data-theme="dark"],
.theme-dusk {
  --color-canvas: var(--c-charcoal);
  --color-surface: var(--c-charcoal-2);
  --color-ink: var(--c-paper);
  --color-ink-2: var(--c-stone);
  --color-ink-3: var(--c-bluegrey);
  --color-rule: var(--c-charcoal-3);
  --color-accent: var(--c-gold);
  --color-accent-text: var(--c-gold);
  --color-focus: var(--c-gold);
  --color-on-accent: var(--c-charcoal-2);
  --color-error: var(--c-clay);
  --color-tint: var(--c-charcoal-2);
  --color-horizon: color-mix(in oklab, var(--c-gold) 50%, transparent);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-canvas: var(--c-charcoal);
    --color-surface: var(--c-charcoal-2);
    --color-ink: var(--c-paper);
    --color-ink-2: var(--c-stone);
    --color-ink-3: var(--c-bluegrey);
    --color-rule: var(--c-charcoal-3);
    --color-accent: var(--c-gold);
    --color-accent-text: var(--c-gold);
    --color-focus: var(--c-gold);
    --color-on-accent: var(--c-charcoal-2);
    --color-error: var(--c-clay);
    --color-tint: var(--c-charcoal-2);
    --color-horizon: color-mix(in oklab, var(--c-gold) 50%, transparent);
    color-scheme: dark;
  }
}
.theme-paper {
  --color-canvas: var(--c-paper);
  --color-surface: var(--c-paper-2);
  --color-ink: var(--c-charcoal-2);
  --color-ink-2: var(--c-stone-deep);
  --color-ink-3: var(--c-bluegrey-deep);
  --color-rule: var(--c-paper-3);
  --color-accent: var(--c-gold);
  --color-accent-text: var(--c-gold-deep);
  --color-focus: var(--c-gold-deep);
  --color-on-accent: var(--c-charcoal-2);
  --color-error: var(--c-clay-deep);
  --color-tint: var(--chapter-tint);
  --color-horizon: var(--c-charcoal-2);
  color-scheme: light;
}

/* Chapter presets: on :root for the whole page, or data-chapter-scope on one frame. */
:root[data-chapter="i1"],
[data-chapter-scope="i1"] {
  --chapter-sky: var(--sky-night);
  --chapter-tint: var(--tint-night);
  --chapter-on-sky: var(--c-paper);
  --chapter-ticks: 1;
  --flar: 0;
  --light: 0;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="i2"],
[data-chapter-scope="i2"] {
  --chapter-sky: var(--sky-nautical);
  --chapter-tint: var(--tint-nautical);
  --chapter-on-sky: var(--c-paper);
  --chapter-ticks: 2;
  --flar: 10;
  --light: 0.17;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="i3"],
[data-chapter-scope="i3"] {
  --chapter-sky: var(--sky-nautical);
  --chapter-tint: var(--tint-nautical);
  --chapter-on-sky: var(--c-paper);
  --chapter-ticks: 3;
  --flar: 20;
  --light: 0.33;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="i4"],
[data-chapter-scope="i4"] {
  --chapter-sky: var(--sky-bluehour);
  --chapter-tint: var(--tint-bluehour);
  --chapter-on-sky: var(--c-paper);
  --chapter-ticks: 4;
  --flar: 30;
  --light: 0.5;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="i5"],
[data-chapter-scope="i5"] {
  --chapter-sky: var(--sky-bluehour-firstlight);
  --chapter-tint: var(--tint-bluehour-firstlight);
  --chapter-on-sky: var(--c-charcoal-2);
  --chapter-ticks: 5;
  --flar: 40;
  --light: 0.67;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="i6"],
[data-chapter-scope="i6"] {
  --chapter-sky: var(--sky-firstlight);
  --chapter-tint: var(--tint-firstlight);
  --chapter-on-sky: var(--c-charcoal-2);
  --chapter-ticks: 6;
  --flar: 50;
  --light: 0.83;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="i7"],
[data-chapter-scope="i7"] {
  --chapter-sky: var(--sky-sunrise);
  --chapter-tint: var(--tint-sunrise);
  --chapter-on-sky: var(--c-charcoal-2);
  --chapter-ticks: 7;
  --flar: 60;
  --light: 1;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
:root[data-chapter="album"],
[data-chapter-scope="album"] {
  --chapter-sky: var(--sky-bluehour);
  --chapter-tint: var(--c-paper);
  --chapter-on-sky: var(--c-paper);
  --chapter-ticks: 7;
  --flar: 50;
  --light: 0.5;
  --color-light: color-mix(in oklab, var(--c-bluegrey) calc((1 - var(--light)) * 100%), var(--c-gold));
}
/* tokens:end */

/* ── 3. Kit variables ─────────────────────────────────────── */

:root {
  --density: 1;
  --section-gap: calc(var(--space-4xl) * var(--density));
  --block-gap: calc(var(--space-2xl) * var(--density));
  --z-masthead: 50;
  --z-backdrop: 70;
  --z-drawer: 80;
  --z-tweaks: 90;
  --scrim: rgb(29 24 21 / 0.5);
  --guide: rgb(244 239 230 / 0.92);
  --guide-dark: rgb(39 34 31 / 0.85);
  --band-paper: url('assets/img/mood/m03.jpg');
  --grain-paper: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.114  0 0 0 0 0.094  0 0 0 0 0.082  0 0 0 0.62 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
  --grain-dusk: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.957  0 0 0 0 0.937  0 0 0 0 0.902  0 0 0 0.62 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
  --grain: var(--grain-paper);
  --grain-page-opacity: 0.07;
  --tint-glow: none;
}

:root[data-density="compact"] { --density: 0.7; }
:root[data-density="spacious"] { --density: 1.3; }

:root[data-theme="dark"],
.theme-dusk {
  --grain: var(--grain-dusk);
  --grain-page-opacity: 0.06;
  --tint-glow: radial-gradient(130% 70% at 50% 118%, color-mix(in oklab, var(--chapter-sky) 70%, transparent), transparent 72%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grain: var(--grain-dusk);
    --grain-page-opacity: 0.06;
    --tint-glow: radial-gradient(130% 70% at 50% 118%, color-mix(in oklab, var(--chapter-sky) 70%, transparent), transparent 72%);
  }
}
.theme-paper {
  --grain: var(--grain-paper);
  --tint-glow: none;
}

/* Scoped theme panels set their own text colour. */
.theme-paper,
.theme-dusk { color: var(--color-ink); }

/* ── 4. Base ──────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--layout-masthead) + var(--space-lg));
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  font-kerning: normal;
  color: var(--color-ink);
  background: var(--color-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur-dissolve) var(--ease-dawn), color var(--dur-dissolve) var(--ease-dawn);
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote, pre, table { margin: 0; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
  transition: text-decoration-color var(--dur-ui) var(--ease-dawn), color var(--dur-ui) var(--ease-dawn);
}
a:hover { text-decoration-color: currentColor; }

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

::selection {
  background: color-mix(in oklab, var(--c-gold) 42%, transparent);
  color: var(--color-ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-rule);
  margin: var(--space-2xl) 0;
}

code, kbd, samp, pre {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
  font-size: 0.8125rem;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--color-ink) 7%, transparent);
  overflow-wrap: anywhere;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 200;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-canvas);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-xs); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* ── 5. Type ──────────────────────────────────────────────── */

h1, h2, .display {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-variation-settings: "FLAR" var(--flar);
  letter-spacing: var(--tracking-display);
  color: var(--color-ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(var(--fs-3xl), 1.6rem + 2.6vw, var(--fs-5xl));
  line-height: var(--lh-display);
}

h2 {
  font-size: clamp(var(--fs-xl), 1.15rem + 1vw, var(--fs-2xl));
  line-height: var(--lh-heading);
}

h3 {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
  color: var(--color-ink);
}

h4 {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
}

.display--xl { font-size: clamp(var(--fs-4xl), 2rem + 4vw, var(--fs-7xl)); line-height: var(--lh-display); }

.kicker,
.label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  font-variation-settings: "FLAR" var(--flar);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-ink-3);
}

.label--wide { letter-spacing: var(--tracking-caps-max); }

.lede {
  font-size: var(--fs-lg);
  line-height: 1.45;
  color: var(--color-ink-2);
  max-width: var(--layout-reading);
  text-wrap: pretty;
}

.voice {
  font-family: var(--font-voice);
  font-style: italic;
  font-weight: var(--fw-regular);
  letter-spacing: 0;
}

.caption {
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--color-ink-3);
}

.meta {
  font-size: var(--fs-sm);
  color: var(--color-ink-3);
}

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ink { color: var(--color-ink); }
.ink-2 { color: var(--color-ink-2); }
.ink-3 { color: var(--color-ink-3); }
.accent-text { color: var(--color-accent-text); }
.measure { max-width: var(--layout-reading); }

.page p,
.page li { text-wrap: pretty; }

.page p { max-width: var(--layout-reading); }

.page p + p { margin-top: var(--space-sm); }

.plain {
  list-style: none;
  padding: 0;
}
.plain li + li { margin-top: var(--space-2xs); }

.prose ul,
.prose ol,
ul.list,
ol.list {
  padding-left: 1.2em;
}
ul.list li + li,
ol.list li + li { margin-top: var(--space-xs); }
ul.list li::marker { color: var(--color-ink-3); }
ol.list li::marker { color: var(--color-ink-3); font-variant-numeric: tabular-nums; }

.quote {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(var(--fs-lg), 1rem + 0.9vw, var(--fs-xl));
  line-height: 1.38;
  color: var(--color-ink);
  text-wrap: pretty;
}

/* ── 6. Shell ─────────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-masthead);
  height: var(--layout-masthead);
  background: var(--color-canvas);
  border-bottom: 1px solid var(--color-rule);
  transition: background-color var(--dur-dissolve) var(--ease-dawn);
}

.masthead__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0 var(--space-lg);
}

.masthead__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
  text-decoration: none;
  color: var(--color-ink);
}

.masthead__wordmark { height: 18px; width: auto; flex: none; }
.wm-dusk { display: none; }
:root[data-theme="dark"] .wm-paper { display: none; }
:root[data-theme="dark"] .wm-dusk { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm-paper { display: none; }
  :root:not([data-theme="light"]) .wm-dusk { display: block; }
}

.masthead__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-rule);
  white-space: nowrap;
}

.masthead__title .label { color: var(--color-ink-2); }

.masthead__controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 40px;
  padding: 0 var(--space-sm) 0 var(--space-xs);
  margin-left: calc(var(--space-xs) * -1);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.menu-button svg { width: 22px; height: 22px; }

.shell {
  display: grid;
  grid-template-columns: var(--layout-sidebar) minmax(0, 1fr);
  min-height: calc(100vh - var(--layout-masthead));
}

.sidebar {
  position: sticky;
  top: var(--layout-masthead);
  height: calc(100vh - var(--layout-masthead));
  height: calc(100dvh - var(--layout-masthead));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--color-rule);
  padding: var(--space-xl) var(--space-md) var(--space-xl);
  background: var(--color-canvas);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  scrollbar-width: thin;
}

.sidebar__head { display: none; }
.sidebar__controls { display: none; }

.nav__group + .nav__group { margin-top: var(--space-lg); }

.nav__label {
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-xs);
}

.nav__list { list-style: none; padding: 0; }

.nav__item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  width: 100%;
  min-height: 36px;
  padding: var(--space-xs) var(--space-sm);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink-2);
  font-size: 0.9375rem;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  transition: color var(--dur-ui) var(--ease-dawn), background-color var(--dur-ui) var(--ease-dawn);
}

.nav__item:hover { color: var(--color-ink); background: color-mix(in oklab, var(--color-ink) 5%, transparent); }

.nav__item[aria-current="page"] {
  color: var(--color-ink);
  font-weight: 600;
}

.nav__item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: var(--color-accent-text);
}

.nav__num {
  flex: none;
  width: 1.6em;
  font-size: var(--fs-xs);
  color: var(--color-ink-3);
  font-weight: 400;
}

.sidebar__foot {
  margin-top: auto;
  padding: var(--space-lg) var(--space-sm) 0;
  border-top: 1px solid var(--color-rule);
}

.sidebar__foot .voice { font-size: var(--fs-base); line-height: 1.4; color: var(--color-ink-2); }
.sidebar__links { margin-top: var(--space-md); }
.sidebar__links a { font-size: var(--fs-sm); color: var(--color-ink-2); }
.sidebar__links li + li { margin-top: var(--space-2xs); }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-ui) var(--ease-dawn);
}

.main {
  min-width: 0;
  padding: var(--space-3xl) clamp(var(--space-lg), 5vw, var(--space-3xl)) var(--space-6xl);
}

.main:focus { outline: none; }

.page {
  max-width: var(--layout-content);
  margin: 0 auto;
}

.page-head {
  margin-bottom: var(--section-gap);
}

.page-head .kicker { margin-bottom: var(--space-md); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { margin-top: var(--space-lg); }

.page-head::after {
  content: "";
  display: block;
  height: 0;
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--color-horizon);
}

.section {
  margin-top: var(--section-gap);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-rule);
}

.page-head + .section,
.section--flush {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.section > h2,
.section__head h2 { margin-bottom: var(--space-md); max-width: 24ch; }
.section__head { margin-bottom: var(--space-xl); }
.section__head .kicker { margin-bottom: var(--space-sm); }
.section > h3,
.section h3.sub { margin-top: var(--block-gap); margin-bottom: var(--space-sm); }
.section > p + .grid-2,
.section > p + .grid-3,
.section > p + .table-wrap { margin-top: var(--space-lg); }

.block { margin-top: var(--block-gap); }

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: var(--space-lg);
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-2xl);
  align-items: start;
}

/* ── 7. Controls ──────────────────────────────────────────── */

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--color-ink-3);
  border-radius: var(--radius-sm);
}

.seg button {
  min-height: 30px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--color-ink-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--dur-ui) var(--ease-dawn), color var(--dur-ui) var(--ease-dawn);
}

.seg button:hover { color: var(--color-ink); }

.seg button[aria-pressed="true"] {
  background: var(--color-ink);
  color: var(--color-canvas);
}

.seg--grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}
.seg--grid button { padding: 0 var(--space-2xs); }
.seg--3 { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }

.select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
  color: var(--color-ink-2);
}

.select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 34px;
  max-width: 100%;
  padding: 0 32px 0 var(--space-sm);
  border: 1px solid var(--color-ink-3);
  border-radius: var(--radius-sm);
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.select option { color: var(--c-charcoal-2); background: var(--c-paper); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  --track: var(--color-rule);
}
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: var(--track);
}
.range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--track);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid var(--color-ink);
  background: var(--color-canvas);
}
.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--color-ink);
  background: var(--color-canvas);
}
.range--light { --track: var(--gradient-light); }
.range--dawn { --track: var(--gradient-dawn); }

.field { display: grid; gap: var(--space-xs); }
.field__label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-ink); }
.field__hint { font-size: var(--fs-xs); color: var(--color-ink-3); }

.input,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px var(--space-sm);
  border: 1px solid var(--color-ink-3);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--fs-base);
  line-height: 1.4;
}
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder,
.textarea::placeholder { color: var(--color-ink-3); opacity: 1; }
.input:focus-visible,
.textarea:focus-visible { outline-offset: 1px; }

.field--error .input { border-color: var(--color-error); }
.field__error,
.field__ok {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.field__error { color: var(--color-error); }
.field__ok { color: var(--color-ink); }
.field__error svg,
.field__ok svg { width: 18px; height: 18px; flex: none; }

/* ── 8. Components ────────────────────────────────────────── */

/* Icons */
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* Buttons: filled (ink), quiet (outline), text link, the single Listen pill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-ui) var(--ease-dawn), color var(--dur-ui) var(--ease-dawn), border-color var(--dur-ui) var(--ease-dawn);
}

.btn--primary { background: var(--color-ink); color: var(--color-canvas); }
.btn--primary:hover { background: color-mix(in oklab, var(--color-ink) 84%, var(--color-canvas)); }

.btn--quiet { background: transparent; color: var(--color-ink); border-color: var(--color-ink-3); }
.btn--quiet:hover { border-color: var(--color-ink); background: color-mix(in oklab, var(--color-ink) 6%, transparent); }

.btn--listen {
  background: var(--c-gold);
  color: var(--c-charcoal-2);
  border-radius: var(--radius-full);
  padding: 0 var(--space-xl);
}
.btn--listen:hover { background: color-mix(in oklab, var(--c-gold) 88%, var(--c-paper)); }

.btn--sm { min-height: 36px; padding: 0 var(--space-md); font-size: var(--fs-sm); }
.btn--icon { width: 44px; padding: 0; }
.btn--icon.btn--sm { width: 36px; }

.btn[disabled],
.btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklab, currentColor 50%, transparent);
}
.link:hover { text-decoration-color: currentColor; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-ink-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
button.chip { border-color: var(--color-ink-3); cursor: pointer; }
.chip--selected,
button.chip[aria-pressed="true"] {
  background: color-mix(in oklab, var(--color-ink) 12%, var(--color-canvas));
  border-color: transparent;
  color: var(--color-ink);
}
.chip--chapter {
  background: var(--c-gold);
  border-color: transparent;
  color: var(--c-charcoal-2);
}
.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

/* Horizon line: 1 px, charcoal on Paper, gold at about 50% on Dusk */
.horizon {
  display: block;
  height: 0;
  margin: var(--space-xl) 0;
  border: 0;
  border-top: 1px solid var(--color-horizon);
}
.horizon--draw { transform-origin: 50% 50%; animation: horizon-draw var(--dur-inhale) var(--ease-inhale) both; }
.horizon--light { border-top-color: var(--color-light); }

/* L3 Horizon lockup. The hairline sits on the 45% line (54.67% down the artwork box),
   runs to both frame edges and stops one cap height (13.332% of the wordmark width)
   short of the X and the N. The frame clips the lines. */
.lockup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-2xl) 0;
}
.lockup__mark,
.tp-lockup {
  position: relative;
  width: var(--wm-w, 46%);
}
.lockup__mark img,
.tp-lockup img { display: block; width: 100%; height: auto; }
.lockup__mark::before,
.lockup__mark::after,
.tp-lockup::before,
.tp-lockup::after {
  content: "";
  position: absolute;
  top: 54.67%;
  width: 300vw;
  height: 0;
  border-top: 1px solid currentColor;
}
.lockup__mark::before,
.tp-lockup::before { right: calc(100% + 13.332%); }
.lockup__mark::after,
.tp-lockup::after { left: calc(100% + 13.332%); }

/* Surfaces */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}
.card--outline {
  background: transparent;
  border: 1px solid var(--color-rule);
}
.card h3 + p,
.card h4 + p { margin-top: var(--space-xs); }
.card .kicker + h3,
.card .kicker + h4 { margin-top: var(--space-xs); }

.panel-tint {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--tint-glow), var(--color-tint);
  transition: background-color var(--dur-dissolve) var(--ease-dawn);
}

.sheet {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-xl);
}

/* Notes (the why) */
.note {
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  border-left: 2px solid var(--color-ink-3);
  background: color-mix(in oklab, var(--color-ink) 4%, transparent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  max-width: calc(var(--layout-reading) + 48px);
}
.note__label {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-ink-3);
  margin-bottom: var(--space-2xs);
}
:root[data-notes="off"] .note { display: none; }

/* Do / don't */
.rules { list-style: none; padding: 0; }
.rules li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-rule);
  max-width: none;
}
.rules li:first-child { border-top: 1px solid var(--color-rule); }
.rules svg { width: 18px; height: 18px; margin-top: 3px; }
.rules--do svg { color: var(--color-ink); }
.rules--dont svg { color: var(--color-error); }
.rules strong { color: var(--color-ink); font-weight: 600; }

.dodont {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-xl);
}
.dodont h3 { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-sm); }

/* Tables */
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: var(--space-lg);
}
.table-wrap:focus-visible { outline-offset: 4px; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.table th {
  padding: 0 var(--space-md) var(--space-sm) 0;
  border-bottom: 1px solid var(--color-ink-3);
  text-align: left;
  vertical-align: bottom;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-min);
  color: var(--color-ink-3);
  white-space: nowrap;
}

.table td {
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  border-bottom: 1px solid var(--color-rule);
  vertical-align: top;
  color: var(--color-ink);
}
.table td:last-child,
.table th:last-child { padding-right: 0; }
.table tbody th[scope="row"] {
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  vertical-align: top;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-rule);
  white-space: normal;
}
.table th.num,
.table td.num { text-align: right; }
.tk-table,
.table--wide { min-width: 720px; }
.table td.is-fail { color: var(--color-ink-3); text-decoration: line-through; text-decoration-color: var(--color-error); }
.table tr.is-derived td { background: color-mix(in oklab, var(--color-ink) 3%, transparent); }
.table .voice { font-size: var(--fs-base); }
.table--rows th[scope="row"] {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-rule);
  white-space: normal;
  vertical-align: top;
  padding-top: var(--space-sm);
  width: 28%;
}

/* Code blocks */
.code-block { position: relative; margin-top: var(--space-md); }
.code-block pre {
  max-height: 440px;
  overflow: auto;
  padding: var(--space-lg);
  padding-right: 96px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  line-height: 1.6;
  tab-size: 2;
}
.copy-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  min-height: 32px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--color-ink-3);
  border-radius: var(--radius-sm);
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.copy-btn.is-copied { border-color: var(--color-ink); }

/* Swatches */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--space-md);
}
.swatch { display: flex; flex-direction: column; }
.swatch__chip {
  height: 92px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 10%, transparent);
}
.swatch__meta {
  padding: var(--space-sm);
  border: 1px solid var(--color-rule);
  border-top: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: var(--fs-sm);
  flex: 1;
}
.swatch__name { font-weight: 600; color: var(--color-ink); }
.swatch__hex { color: var(--color-ink-2); }
.swatch__role { margin-top: var(--space-xs); font-size: var(--fs-xs); color: var(--color-ink-3); }
.swatch__ratios { margin-top: var(--space-xs); display: flex; gap: var(--space-sm); font-size: var(--fs-xs); color: var(--color-ink-2); }

.dawn-strip {
  margin-top: var(--space-lg);
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.dawn-strip span { display: block; height: 100%; }

/* Media helpers: an optional image over a labelled placeholder */
.media {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
}
.media > img,
.media > .media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}
.media.is-missing > img[data-optional] { display: none; }
.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: var(--space-md);
  color: var(--color-ink-2);
  background:
    linear-gradient(to right, transparent calc(33.333% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(33.333% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px), transparent calc(66.666% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(66.666% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.333% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(33.333% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(33.333% + 0.5px), transparent calc(33.333% + 0.5px), transparent calc(66.666% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(66.666% - 0.5px), color-mix(in oklab, var(--color-ink) 10%, transparent) calc(66.666% + 0.5px), transparent calc(66.666% + 0.5px)),
    var(--color-surface);
}
.placeholder .label { color: var(--color-ink-2); }
.placeholder__text { font-size: var(--fs-xs); line-height: 1.4; color: var(--color-ink-3); max-width: 32ch; }

/* Portrait frame and silhouette frame: real photographs with a credit */
.frame { margin: 0; }
.frame__media { aspect-ratio: var(--ratio, 4 / 5); border-radius: var(--radius-none); }
.frame[data-ratio="1:1"] { --ratio: 1 / 1; }
.frame[data-ratio="4:5"] { --ratio: 4 / 5; }
.frame[data-ratio="3:4"] { --ratio: 3 / 4; }
.frame[data-ratio="3:2"] { --ratio: 3 / 2; }
.frame[data-ratio="9:16"] { --ratio: 9 / 16; }
.frame[data-ratio="16:9"] { --ratio: 16 / 9; }
.frame__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--color-ink-3);
}
.frame__caption strong { color: var(--color-ink); font-weight: 600; }
.frame__tag {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 2;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgb(244 239 230 / 0.92);
  color: var(--c-charcoal-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.3;
}
.frame--silhouette .frame__media { background: var(--sky-bluehour); }
.frames {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--space-lg);
  align-items: start;
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-md);
}

/* The cover (3000 × 3000 master, drawn at any size in container units) */
.cover {
  position: relative;
  aspect-ratio: 1 / 1;
  container-type: inline-size;
  overflow: hidden;
  background: var(--c-paper);
  color: var(--c-charcoal-2);
  border-radius: var(--radius-none);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.cover__photo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 66.6667%;
  overflow: hidden;
  background: var(--c-charcoal-2);
}
.cover__photo img {
  position: absolute;
  left: 0;
  top: var(--pt, 0%);
  width: 100%;
  height: var(--ph, 100%);
  object-fit: cover;
  object-position: var(--px, 50%) var(--py, 50%);
}
.cover__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain-paper);
  background-size: 180px;
  opacity: 0.32;
  pointer-events: none;
}
.cover__band {
  position: absolute;
  left: 0;
  right: 0;
  top: 66.6667%;
  bottom: 0;
  background: var(--c-paper);
  overflow: hidden;
}
.cover__band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--band-paper) center / cover no-repeat;
  filter: brightness(1.072) saturate(0.6);
  opacity: 0.55;
}
.cover__ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 66.6667%;
  height: 1.4667%;
  z-index: 2;
}
.cover__tick {
  position: absolute;
  top: 0;
  left: calc(6% + var(--i) * 1.2%);
  width: max(1px, 0.2%);
  height: 100%;
  background: var(--c-charcoal-2);
}
.cover__wordmark {
  position: absolute;
  z-index: 2;
  left: 32%;
  top: 75.9058%;
  width: 36%;
  height: auto;
}
.cover__title {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 13.3333%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-voice);
  font-style: italic;
  font-weight: 400;
  font-size: 3.5821cqw;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--c-charcoal-2);
  text-box: trim-both cap alphabetic;
}
.cover__title.is-step { font-size: 2.9851cqw; }
.cover__title.is-two-line {
  font-size: 2.9851cqw;
  line-height: 3.3333cqw;
  bottom: 11.3333%;
  white-space: normal;
  width: 72%;
  text-align: center;
}
@supports not (text-box: trim-both cap alphabetic) {
  .cover__title { bottom: calc(13.3333% - 0.265em); }
}
.cover__final {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}
.cover.has-final .cover__final { visibility: visible; }
.cover__stand-in {
  position: absolute;
  z-index: 3;
  top: 2%;
  left: 2%;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  background: rgb(244 239 230 / 0.9);
  color: var(--c-charcoal-2);
  font-family: var(--font-body);
  font-size: max(12px, 2.2cqw);
  font-weight: 600;
  line-height: 1.2;
}
.cover.has-final .cover__stand-in,
.cover--clean .cover__stand-in { display: none; }
@container (max-width: 260px) {
  .cover__stand-in { display: none; }
}
.show-guides .cover__stand-in { display: none; }

/* Cover measurement guides */
.cover__guides { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: none; }
.show-guides .cover__guides { display: block; }
.cg { position: absolute; }
.cg--h { left: 0; right: 0; height: 0; border-top: 1px dashed var(--c-gold); }
.cg--v { top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--c-gold); }
.cg--band { left: 0; right: 0; border-top: 1px solid var(--c-gold); }
.cg--zone { border: 1px dashed var(--c-gold); background: rgb(206 171 117 / 0.08); }
.cg__label {
  position: absolute;
  right: 1.2%;
  transform: translateY(-115%);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--c-charcoal-2);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: max(12px, 1.7cqw);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.cg--v .cg__label { right: auto; left: 4px; top: 1.2%; transform: none; }

.covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: var(--space-md);
}
.covers figcaption { margin-top: var(--space-xs); font-size: var(--fs-xs); color: var(--color-ink-3); line-height: 1.4; }
.covers figcaption .voice { display: block; font-size: var(--fs-sm); color: var(--color-ink); }

.tiny-strip {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.tiny-strip figure { margin: 0; }
.tiny-strip figcaption { margin-top: var(--space-xs); font-size: var(--fs-xs); color: var(--color-ink-3); }

/* Release hero */
.release-hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(var(--space-lg), 4vw, var(--space-3xl));
  align-items: center;
  padding: clamp(var(--space-lg), 4vw, var(--space-3xl));
}
.release-hero__title {
  margin-top: var(--space-sm);
  font-family: var(--font-voice);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(var(--fs-3xl), 1.6rem + 2.6vw, var(--fs-6xl));
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--color-ink);
}
.release-hero__meta { margin-top: var(--space-sm); color: var(--color-ink-2); }
.release-hero__bio { margin-top: var(--space-lg); color: var(--color-ink); }
.release-hero .actions { margin-top: var(--space-xl); }
.release-hero .stream-row { margin-top: var(--space-lg); }

/* Streaming link row */
.stream-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-lg);
  list-style: none;
  padding: 0;
}
.stream-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 32px;
  font-weight: 600;
  color: var(--color-ink);
}
.stream-row a svg { width: 0.9em; height: 0.9em; color: var(--color-ink-3); }
.stream-row--buttons { gap: var(--space-xs); }
.stream-row--buttons a {
  min-height: 36px;
  padding: 0 var(--space-md);
  border: 1px solid var(--color-ink-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.stream-row--buttons a:hover { border-color: var(--color-ink); }

/* Chapter index */
.chapter-index { list-style: none; padding: 0; counter-reset: none; }
.chapter-index__row {
  display: grid;
  grid-template-columns: 3.2em 4.6em minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-rule);
}
.chapter-index__row:first-child { border-top: 1px solid var(--color-rule); }
.chapter-index__code {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps-min);
  color: var(--color-ink-3);
}
.chapter-index__title { font-family: var(--font-voice); font-style: italic; font-size: var(--fs-lg); line-height: 1.25; color: var(--color-ink); }
.chapter-index__light { display: inline-flex; align-items: center; gap: var(--space-xs); font-size: var(--fs-sm); color: var(--color-ink-2); white-space: nowrap; }
.sky-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 18%, transparent);
}
.ticks { display: inline-flex; gap: 3px; align-items: flex-start; height: 16px; }
.ticks i { display: block; width: 2px; height: 14px; background: currentColor; border-radius: 0; }
.ticks + .num { margin-left: var(--space-xs); }
.chapter-index button.chapter-index__row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--color-rule);
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background-color var(--dur-ui) var(--ease-dawn);
}
.chapter-index button.chapter-index__row:hover { background: color-mix(in oklab, var(--color-ink) 4%, transparent); }
.chapter-index button.chapter-index__row[aria-pressed="true"] { background: color-mix(in oklab, var(--color-ink) 7%, transparent); }

/* Lyric block: Newsreader Italic, held-vowel spacing on long notes */
.lyric {
  padding: clamp(var(--space-lg), 4vw, var(--space-3xl));
}
.lyric__lines {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(var(--fs-xl), 1.1rem + 1.8vw, var(--fs-4xl));
  line-height: var(--lh-lyric);
  letter-spacing: 0;
  color: var(--color-ink);
}
.lyric__line { display: block; }
.held {
  display: inline;
  margin-inline-end: 0.5em;
}
.lyric--live .held { margin-inline-end: 0; transition: margin-inline-end var(--dur-ui) var(--ease-exhale); }
.lyric--live .held.is-holding { margin-inline-end: var(--hold, 0.9em); transition: margin-inline-end var(--hold-ms, 1600ms) linear; }
.lyric__note { margin-top: var(--space-lg); }

/* EPK block */
.epk {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-2xl);
}
.epk__portraits { display: grid; grid-template-columns: 3fr 2fr; gap: var(--space-md); align-items: start; }
.epk__facts { display: grid; gap: var(--space-lg); align-content: start; }
.epk__facts dt { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--color-ink-3); }
.epk__facts dd { margin-top: var(--space-2xs); }
.logo-pack { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.logo-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  min-height: 120px;
  text-decoration: none;
}
.logo-tile img { width: 100%; max-width: 180px; }
.logo-tile--paper { background: var(--c-paper); color: var(--c-charcoal-2); box-shadow: inset 0 0 0 1px var(--c-paper-3); }
.logo-tile--dusk { background: var(--c-charcoal); color: var(--c-paper); }
.logo-tile span { font-size: var(--fs-xs); font-weight: 600; }

/* Avatar circle-crop tester */
.avatar-test {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-2xl);
  align-items: start;
}
.avatar {
  --s: 110px;
  --zoom: 1;
  --shift: 0%;
  position: relative;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: var(--color-surface);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateY(var(--shift)) scale(var(--zoom));
}
.avatar__guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
}
.avatar__guide::before {
  content: "";
  position: absolute;
  inset: 17.5%;
  border: 1px dashed var(--c-gold);
  border-radius: 50%;
}
.avatar__guide::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 40%;
  border-top: 1px solid var(--c-gold);
}
.avatar-test.no-guide .avatar__guide { display: none; }
.avatar.is-missing > img { display: none; }
.avatar__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18%;
  font-size: var(--fs-xs);
  color: var(--color-ink-3);
}
.avatar--sm .avatar__empty { display: none; }
.avatar-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
}
.avatar-row figure { margin: 0; display: grid; justify-items: center; gap: var(--space-xs); }
.avatar-row figcaption { font-size: var(--fs-xs); color: var(--color-ink-3); }
.avatar-test__controls { display: grid; gap: var(--space-md); margin-top: var(--space-lg); }
.avatar-test__controls label { display: grid; gap: var(--space-2xs); font-size: var(--fs-sm); font-weight: 600; }
.check { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: var(--space-xs) !important; font-weight: 500 !important; }
.check input { width: 18px; height: 18px; accent-color: var(--c-charcoal-2); margin: 0; }

/* Vocal preview (tap to hear) */
.vp {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.vp__play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-ink-3);
  background: transparent;
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-ui) var(--ease-dawn), border-color var(--dur-ui) var(--ease-dawn);
}
.vp__play:hover { border-color: var(--color-ink); }
.vp__play svg { width: 18px; height: 18px; }
.vp[data-state="playing"] .vp__play { background: var(--color-ink); color: var(--color-canvas); border-color: var(--color-ink); }
.vp__title { font-size: var(--fs-md); line-height: 1.25; color: var(--color-ink); }
.vp__sub { font-size: var(--fs-xs); color: var(--color-ink-3); margin-top: 2px; }
.vp__line {
  position: relative;
  height: 0;
  margin-top: var(--space-sm);
  border-top: 1px solid var(--color-rule);
}
.vp__progress {
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: calc(var(--p, 0) * 100%);
  background: var(--color-horizon);
}
.vp__mute {
  min-height: 40px;
  padding: 0 var(--space-sm);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.vp__mute:hover { color: var(--color-ink); border-color: var(--color-ink-3); }
.vp__mute svg { width: 20px; height: 20px; }
.vp__status { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--color-ink-3); min-height: 1.4em; }
.vp-list { display: grid; gap: var(--space-sm); }

/* ── 9. Views ─────────────────────────────────────────────── */

/* Overview */
.ov-hero {
  position: relative;
  margin-bottom: var(--section-gap);
  aspect-ratio: 16 / 8;
  container-type: inline-size;
  overflow: hidden;
  background: var(--c-paper);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.ov-hero__photo { position: absolute; inset: 0 0 33.333% 0; overflow: hidden; background: var(--c-charcoal-2); }
.ov-hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.ov-hero__band { position: absolute; inset: 66.667% 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2cqw; background: var(--c-paper); }
.ov-hero__band::before { content: ""; position: absolute; inset: 0; background: var(--band-paper) center / cover no-repeat; filter: brightness(1.072) saturate(0.6); opacity: 0.6; }
.ov-hero__wordmark { position: relative; width: 30%; }
.ov-hero__line { position: relative; font-family: var(--font-voice); font-style: italic; font-size: max(14px, 1.9cqw); line-height: 1.2; color: var(--c-charcoal-2); text-align: center; padding: 0 6%; }

.quickref {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 0;
  border-top: 1px solid var(--color-rule);
}
.quickref div {
  padding: var(--space-md) var(--space-md) var(--space-md) 0;
  border-bottom: 1px solid var(--color-rule);
}
.quickref dt { margin-bottom: var(--space-2xs); }
.quickref dd { color: var(--color-ink); font-size: var(--fs-base); }

.viewcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: var(--space-md);
}
.viewcard {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-rule);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-ui) var(--ease-dawn), background-color var(--dur-ui) var(--ease-dawn);
}
.viewcard:hover { border-color: var(--color-ink-3); background: color-mix(in oklab, var(--color-ink) 3%, transparent); }
.viewcard__title { font-weight: 600; font-size: var(--fs-md); color: var(--color-ink); display: flex; justify-content: space-between; gap: var(--space-xs); }
.viewcard__title svg { width: 18px; height: 18px; color: var(--color-ink-3); flex: none; margin-top: 3px; }
.viewcard p { font-size: var(--fs-sm); color: var(--color-ink-2); }

.memorable {
  font-family: var(--font-voice);
  font-style: italic;
  font-size: clamp(var(--fs-xl), 1.2rem + 1.8vw, var(--fs-4xl));
  line-height: 1.18;
  color: var(--color-ink);
  max-width: 24ch;
  text-wrap: balance;
}

.status-list { list-style: none; padding: 0; }
.status-list li {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-rule);
  max-width: none;
}
.status-list .chip { justify-self: start; }

/* Brand platform */
.lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-md); }
.line-card { padding: var(--space-lg); border-radius: var(--radius-md); background: var(--color-surface); display: flex; flex-direction: column; gap: var(--space-sm); }
.line-card .quote { font-size: var(--fs-lg); }
.quotes { display: grid; gap: var(--space-xl); }
.quotes blockquote { padding-left: var(--space-lg); border-left: 1px solid var(--color-horizon); }
.voice-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-lg); }
.voice-col h3 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 500; font-variation-settings: "FLAR" var(--flar); letter-spacing: var(--tracking-display); }
.voice-col p { margin-top: var(--space-xs); }
.wordlist { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; padding: 0; }
.numbered { list-style: none; padding: 0; counter-reset: n; }
.numbered > li {
  counter-increment: n;
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-rule);
  max-width: none;
}
.numbered > li:first-child { border-top: 1px solid var(--color-rule); }
.numbered > li::before {
  content: counter(n, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps-min);
  color: var(--color-ink-3);
  padding-top: 0.3em;
}
.numbered strong { color: var(--color-ink); }
.inspo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-md); }

/* Brand guide */
.wm-stage {
  position: relative;
  padding: clamp(var(--space-xl), 6vw, var(--space-4xl)) clamp(var(--space-lg), 6vw, var(--space-4xl));
  border-radius: var(--radius-md);
  background: var(--c-paper);
  color: var(--c-charcoal-2);
  box-shadow: inset 0 0 0 1px var(--c-paper-3);
}
.wm-stage--dusk { background: var(--c-charcoal); color: var(--c-paper); box-shadow: none; }
.wm-stage img { width: 100%; height: auto; }
.wm-measure { position: relative; width: 76%; }
.wm-measure__line { position: absolute; left: -2%; right: -2%; height: 0; border-top: 1px dashed var(--c-gold); }
.wm-measure__label {
  position: absolute;
  left: calc(100% + 12px);
  top: 0;
  transform: translateY(-50%);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--c-gold-deep);
}
@media (max-width: 640px) {
  .wm-measure { width: 100%; }
  .wm-measure__label { display: none; }
}
.clearspace { position: relative; display: inline-block; padding: var(--cap, 24px); outline: 1px dashed var(--c-gold); }
.clearspace img { width: 280px; max-width: 100%; }
.type-spec { display: grid; gap: var(--space-2xl); }
.type-spec__row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); }
.type-spec__sample-display { font-family: var(--font-display); font-weight: 500; font-variation-settings: "FLAR" var(--flar); font-size: clamp(var(--fs-3xl), 1.4rem + 3vw, var(--fs-6xl)); line-height: 1.02; letter-spacing: var(--tracking-display); }
.type-spec__sample-caps { font-family: var(--font-display); font-weight: 500; font-variation-settings: "FLAR" var(--flar); text-transform: uppercase; letter-spacing: var(--tracking-caps-max); font-size: var(--fs-md); margin-top: var(--space-sm); }
.type-spec__sample-voice { font-family: var(--font-voice); font-style: italic; font-size: clamp(var(--fs-2xl), 1.2rem + 2.4vw, var(--fs-5xl)); line-height: 1.1; }
.type-spec__sample-body { font-size: var(--fs-md); line-height: 1.55; max-width: 38rem; }
.flar-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: var(--space-md); margin-top: var(--space-lg); }
.flar-row div { display: grid; gap: var(--space-2xs); }
.flar-row span:first-child { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); line-height: 1.1; }
.motion-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-md);
}
.motion-demo__stage {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.motion-demo__word { font-family: var(--font-voice); font-style: italic; font-size: var(--fs-2xl); color: var(--color-ink); }
.motion-demo__patch {
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 34%;
  left: -40%;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--c-gold) 32%, transparent), transparent);
  transform: skewX(-18deg);
  opacity: 0;
}
.is-playing .motion-demo__patch { animation: light-patch 3.6s var(--ease-dawn) both; }
.is-playing .motion-demo__word.do-condense { animation: condense var(--dur-condense) var(--ease-inhale) both; }
.is-playing .motion-demo__word.do-clear { animation: clear var(--dur-clear) var(--ease-exhale) both; }
.is-playing .motion-demo__stage.do-dissolve { animation: dissolve var(--dur-dissolve) var(--ease-dawn) both; }
.breath {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--color-ink-3);
  transform: scale(0.8);
}
.is-playing .breath { animation: breath var(--dur-breath) linear 2; }

/* Tokens view */
.tk-parity {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-sm);
  max-width: none;
}
.tk-parity__dot { width: 8px; height: 8px; margin-top: 0.45em; border-radius: 50%; background: var(--color-ink-3); flex: none; }
.tk-parity.is-ok .tk-parity__dot { background: var(--color-ink); }
.tk-parity.is-off { color: var(--color-error); }
.tk-parity.is-off .tk-parity__dot { background: var(--color-error); }
.tk-chip {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: -4px;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 20%, transparent);
}
.tk-table td { white-space: normal; }
.tk-table td:first-child,
.tk-table td.tk-oklch,
.tk-table td.tk-nowrap { white-space: nowrap; }
.tk-oklch { font-size: var(--fs-xs); color: var(--color-ink-2); }
.tk-specimen { display: block; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.tk-specimen--display { font-family: var(--font-display); font-weight: 500; font-variation-settings: "FLAR" var(--flar); letter-spacing: var(--tracking-display); line-height: 1.05; }
.tk-gradients { display: grid; gap: var(--space-md); margin-top: var(--space-lg); }
.tk-gradient { margin: 0; }
.tk-gradient__bar { height: 44px; border-radius: var(--radius-md); }
.tk-gradient figcaption { margin-top: var(--space-xs); font-size: var(--fs-sm); color: var(--color-ink-2); }
.tk-gradient.is-banned .tk-gradient__bar { opacity: 0.85; outline: 1px dashed var(--color-error); outline-offset: 3px; }
.tk-light { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-lg); }
.tk-light__swatch { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.tk-mini { margin-top: var(--space-xl); }
.tk-mini h3 { margin-bottom: var(--space-xs); font-size: var(--fs-base); }
.tk-mini li { display: flex; justify-content: space-between; gap: var(--space-md); font-size: var(--fs-sm); max-width: 22rem; }
.tk-space { display: grid; gap: var(--space-xs); margin-top: var(--space-lg); }
.tk-space__row { display: grid; grid-template-columns: 8em 3em minmax(0, 1fr); align-items: center; gap: var(--space-md); font-size: var(--fs-sm); }
.tk-space__bar { display: block; height: 10px; border-radius: 2px; background: var(--color-ink-3); max-width: 100%; }
.tk-radius { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-lg); margin-top: var(--space-lg); }
.tk-radius figure { margin: 0; }
.tk-radius__box { width: 96px; height: 72px; background: var(--color-surface); border: 1px solid var(--color-ink-3); }
.tk-radius figcaption { margin-top: var(--space-xs); font-size: var(--fs-sm); }
.tk-easings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-lg); margin-top: var(--space-lg); }
.tk-easing { margin: 0; }
.tk-easing figcaption { margin-top: var(--space-xs); font-size: var(--fs-sm); }
.tk-curve { width: 132px; height: 132px; overflow: visible; }
.tk-curve__frame { fill: none; stroke: var(--color-rule); }
.tk-curve__handle { stroke: var(--color-ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tk-curve__path { fill: none; stroke: var(--color-ink); stroke-width: 2; }

/* Chapters: the dawn clock */
.clock { margin-top: var(--space-lg); }
.clock__sky {
  height: 112px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(in oklab to right, var(--sky-night) 7.14%, var(--sky-nautical) 21.43%, var(--sky-nautical) 35.71%, var(--sky-bluehour) 50%, var(--sky-bluehour-firstlight) 64.29%, var(--sky-firstlight) 78.57%, var(--sky-sunrise) 92.86%);
}
.clock__stations {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--color-horizon);
}
.clock__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2xs);
  width: 100%;
  height: 100%;
  min-height: 168px;
  padding: 40px var(--space-sm) var(--space-md);
  border: 0;
  border-right: 1px solid var(--color-rule);
  background: transparent;
  color: var(--color-ink);
  text-align: left;
  transition: background-color var(--dur-ui) var(--ease-dawn);
}
.clock__stations li:last-child .clock__btn { border-right: 0; }
.clock__btn:hover { background: color-mix(in oklab, var(--color-ink) 4%, transparent); }
.clock__btn[aria-pressed="true"] { background: var(--color-tint); }
.clock__btn[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--color-accent-text);
}
.clock__ticks { position: absolute; top: 0; left: var(--space-sm); display: flex; gap: 4px; color: var(--color-ink); }
.clock__ticks i { display: block; width: 2px; height: 22px; background: currentColor; }
.clock__code { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--tracking-caps-min); color: var(--color-ink-3); }
.clock__title { font-family: var(--font-voice); font-style: italic; font-size: var(--fs-md); line-height: 1.22; }
.clock__light { margin-top: auto; padding-top: var(--space-xs); font-size: var(--fs-xs); color: var(--color-ink-2); }
.clock__album { margin-top: var(--space-md); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.chapter-detail {
  border: 1px solid var(--color-rule);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--space-lg), 4vw, var(--space-3xl));
  margin-top: var(--space-2xl);
  padding: clamp(var(--space-lg), 3vw, var(--space-2xl));
  align-items: start;
}
.chapter-detail__title { font-family: var(--font-voice); font-style: italic; font-size: clamp(var(--fs-2xl), 1.3rem + 1.8vw, var(--fs-5xl)); line-height: 1.05; margin-top: var(--space-xs); }
.chapter-detail__label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-caps-max); font-size: var(--fs-sm); font-weight: 500; font-variation-settings: "FLAR" var(--flar); color: var(--color-ink-2); }
.tone-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); margin-top: var(--space-lg); }
.tone { border-radius: var(--radius-md); padding: var(--space-md); min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; font-size: var(--fs-xs); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c-charcoal-2) 10%, transparent); }
.stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 168px), 1fr)); gap: var(--space-md); margin-top: var(--space-lg); }
.stop-card { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-rule); display: flex; flex-direction: column; }
.stop-card__sky { height: 64px; }
.stop-card__tint { height: 20px; }
.stop-card__body { padding: var(--space-md); font-size: var(--fs-sm); flex: 1; }
.stop-card__body h3 { font-size: var(--fs-base); }
.stop-card__body ul { margin-top: var(--space-xs); padding-left: 1.1em; color: var(--color-ink-2); font-size: var(--fs-xs); }
.stop-card__body li + li { margin-top: 2px; }

/* Presence */
.ladder { display: grid; gap: 0; border-top: 1px solid var(--color-rule); }
.ladder__row { display: grid; grid-template-columns: 8em minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-lg); padding: var(--space-md) 0; border-bottom: 1px solid var(--color-rule); align-items: baseline; }
.ladder__level { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500; font-variation-settings: "FLAR" var(--flar); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid var(--color-ink-3);
  color: var(--color-ink);
}
.tag--real { background: var(--color-ink); color: var(--color-canvas); border-color: transparent; }
.tag--ai { background: transparent; }
.presence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--space-lg);
  align-items: start;
}
.presence-grid .frame__caption { flex-direction: column; align-items: flex-start; gap: 4px; }
.crop-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--space-md); }
.crop-card { border: 1px solid var(--color-rule); border-radius: var(--radius-md); padding: var(--space-md); display: grid; gap: var(--space-sm); align-content: start; }
.crop-card__diagram { position: relative; background: var(--color-surface); overflow: hidden; container-type: inline-size; }
.crop-card__diagram span { position: absolute; }

/* Touchpoints */
.tp-bar {
  position: sticky;
  top: calc(var(--layout-masthead) + var(--space-sm));
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.tp { margin: 0; }
.tp__frame {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  background: var(--c-charcoal-2);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.tp__frame[data-format="spotify"] { aspect-ratio: 5320 / 2280; }
.tp__frame[data-format="youtube"] { aspect-ratio: 2560 / 1440; }
.tp__frame[data-format="canvas"],
.tp__frame[data-format="lyric"] { aspect-ratio: 1080 / 1920; }
.tp__frame[data-format="ig"] { aspect-ratio: 1080 / 1440; }
.tp__frame[data-format="og"] { aspect-ratio: 1200 / 630; }
.tp__img {
  position: absolute;
  left: 0;
  top: var(--pt, 0%);
  width: 100%;
  height: var(--ph, 100%);
  object-fit: cover;
  object-position: var(--px, 50%) var(--py, 50%);
}
.tp__grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--grain-paper);
  background-size: 160px;
  opacity: 0.3;
  pointer-events: none;
}
.tp__zone {
  position: absolute;
  z-index: 3;
  border: 1px dashed var(--guide);
  box-shadow: 0 0 0 1px rgb(29 24 21 / 0.25);
  pointer-events: none;
}
.tp__zone--solid { border-style: solid; }
.tp__zone--calm { background: repeating-linear-gradient(135deg, rgb(244 239 230 / 0.16) 0 6px, transparent 6px 12px); }
.tp__line { position: absolute; z-index: 3; left: 0; right: 0; height: 0; border-top: 1px dashed var(--guide); pointer-events: none; }
.tp__zone-label {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgb(29 24 21 / 0.72);
  color: var(--c-paper);
  font-family: var(--font-body);
  font-size: max(12px, 1.15cqw);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.tp__line .tp__zone-label { top: auto; bottom: 3px; left: auto; right: 4px; }
.tp__zone--lb > .tp__zone-label { top: auto; bottom: 4px; }
.tp__line--l .tp__zone-label { right: auto; left: 4px; bottom: auto; top: 4px; }
.tp-guides-off .tp__zone,
.tp-guides-off .tp__line,
.tp-guides-off .tp__zone-tag,
.tp-guides-off .cover__guides { display: none !important; }
.tp__caption { margin-top: var(--space-sm); display: grid; gap: 2px; }
.tp__caption .label { color: var(--color-ink); }
.tp__caption p { font-size: var(--fs-sm); color: var(--color-ink-2); }
.tp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--space-xl); align-items: start; }
.tp-row--vertical { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 260px)); }
.tp-lockup {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  --wm-w: 29.6875%;
  transform: translate(-50%, -54.67%);
  color: var(--c-paper);
}
.tp-sky-text {
  position: absolute;
  z-index: 2;
  font-family: var(--font-voice);
  font-style: italic;
  line-height: 1.18;
  letter-spacing: 0;
}
.tp-label {
  position: absolute;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "FLAR" var(--flar);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps-max);
  white-space: nowrap;
}
.tp-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgb(29 24 21 / 0.42), rgb(29 24 21 / 0.18) 60%, transparent); }
.tp-paper { position: absolute; inset: 0; background: var(--chapter-tint, var(--c-paper)); }
.tp-paper::before { content: ""; position: absolute; inset: 0; background: var(--band-paper) center / cover; opacity: 0.22; filter: grayscale(1) brightness(1.12); }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; max-width: 640px; background: var(--color-canvas); }
.ig-grid .tp__frame { aspect-ratio: 3 / 4; }
.ig-cell__tag { position: absolute; z-index: 3; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 3px; background: rgb(29 24 21 / 0.7); color: var(--c-paper); font-size: 12px; font-weight: 600; }
.platform-overlay {
  position: absolute;
  z-index: 3;
  left: 4%;
  bottom: 9%;
  color: #fff;
  font-family: var(--font-body);
  pointer-events: none;
}
.platform-overlay__name { font-weight: 800; font-size: 5.2cqw; line-height: 1; letter-spacing: -0.01em; }
.platform-overlay__meta { font-size: 1.5cqw; margin-top: 0.8cqw; opacity: 0.9; }

/* Platforms view */
.spec-group + .spec-group { margin-top: var(--block-gap); }
.spec-group h3 { margin-bottom: var(--space-xs); }
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-sm); list-style: none; padding: 0; }
.profiles li { padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-md); max-width: none; }
.profiles strong { display: block; }
.profiles code { font-size: var(--fs-xs); }

/* Preview pages (preview/*.html) */
.pv {
  max-width: var(--layout-content);
  margin: 0 auto;
  padding: var(--space-2xl) clamp(var(--space-md), 5vw, var(--space-3xl)) var(--space-5xl);
}
.pv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--color-rule);
}
.pv-head__brand { display: flex; align-items: center; gap: var(--space-md); }
.pv-head__brand img { height: 16px; width: auto; }
.pv-head .actions { gap: var(--space-sm); }
.pv-title { margin-bottom: var(--space-md); }
.pv-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--space-sm); }
.pv-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-xl); }
.pv-panel { padding: var(--space-xl); border-radius: var(--radius-md); background: var(--color-canvas); border: 1px solid var(--color-rule); }
.pv-panel.theme-dusk { border-color: transparent; }
.is-focus-demo { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Wordmark crops for misuse examples: --w is the full artwork width, --a/--b the slice (0–1). */
.wm-crop { display: inline-block; overflow: hidden; width: calc((var(--b) - var(--a)) * var(--w)); vertical-align: bottom; }
.wm-crop img { display: block; width: var(--w); max-width: none; margin-left: calc(var(--a) * var(--w) * -1); }
.misuse { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-lg); }
.misuse figure { margin: 0; }
.misuse__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--c-paper);
  box-shadow: inset 0 0 0 1px var(--c-paper-3);
  overflow: hidden;
}
.misuse__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1px), color-mix(in oklab, var(--c-clay-deep) 70%, transparent) calc(50% - 1px), color-mix(in oklab, var(--c-clay-deep) 70%, transparent) calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none;
}
.misuse figcaption { display: flex; gap: var(--space-xs); align-items: flex-start; margin-top: var(--space-xs); font-size: var(--fs-sm); }
.misuse figcaption svg { width: 18px; height: 18px; flex: none; color: var(--color-error); margin-top: 2px; }

/* ── 10. Tweaks panel ─────────────────────────────────────── */

.tweaks-toggle {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: var(--z-tweaks);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 40px;
  padding: 0 var(--space-md);
  border: 1px solid var(--color-ink-3);
  border-radius: var(--radius-full);
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.tweaks-toggle:hover { border-color: var(--color-ink); }
.tweaks-toggle svg { width: 16px; height: 16px; }

.tweaks {
  position: fixed;
  right: var(--space-md);
  bottom: calc(var(--space-md) + 52px);
  z-index: calc(var(--z-tweaks) + 1);
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - var(--layout-masthead) - 96px);
  overflow-y: auto;
  padding: var(--space-lg);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-ink);
}
.tweaks__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); }
.tweaks__head h2 { font-size: var(--fs-lg); letter-spacing: 0; }
.tweaks__row + .tweaks__row { margin-top: var(--space-lg); }
.tweaks__row > .label { margin-bottom: var(--space-xs); display: flex; justify-content: space-between; gap: var(--space-sm); }
.tweaks__row output { font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; color: var(--color-ink-2); }
.tweaks__hint { margin-top: var(--space-2xs); font-size: var(--fs-xs); color: var(--color-ink-3); }
.tweaks__light { display: flex; align-items: center; gap: var(--space-sm); }
.tweaks__light span { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--color-light); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--color-ink) 15%, transparent); }
.tweaks .seg { width: 100%; }
.tweaks .seg button { flex: 1; }
.tweaks__reset { margin-top: var(--space-xs); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink-2);
}
.icon-btn:hover { color: var(--color-ink); border-color: var(--color-ink-3); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── 11. Textures ─────────────────────────────────────────── */

.tex-grain { position: relative; isolation: isolate; }
.tex-grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: var(--grain);
  background-size: 220px;
  opacity: 0.5;
  pointer-events: none;
}

.tex-haze { position: relative; isolation: isolate; }
.tex-haze::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 75% at 50% 122%, color-mix(in oklab, var(--color-light) 42%, transparent), transparent 64%);
  pointer-events: none;
}

/* Page texture: grain floats over everything at a whisper; the haze sits behind the content. */
:root[data-texture="grain"] body::before,
:root[data-texture="haze"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  background-image: var(--grain);
  background-size: 220px;
  opacity: var(--grain-page-opacity);
  pointer-events: none;
}
:root[data-texture="haze"] body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 46vh;
  z-index: 0;
  background: radial-gradient(90% 100% at 50% 118%, color-mix(in oklab, var(--color-light) 34%, transparent), transparent 70%);
  pointer-events: none;
}
.shell { position: relative; z-index: 1; }

/* ── 12. Motion ───────────────────────────────────────────── */

@keyframes condense {
  from { opacity: 0; filter: blur(12px); transform: scale(1.02); }
  to { opacity: 1; filter: blur(0); transform: scale(1); }
}
@keyframes clear {
  from { opacity: 1; filter: blur(0); transform: translateY(0); }
  to { opacity: 0; filter: blur(8px); transform: translateY(-8px); }
}
@keyframes dissolve {
  from { filter: brightness(0.35); }
  to { filter: brightness(1); }
}
@keyframes horizon-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes light-patch {
  0% { left: -40%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}
@keyframes breath {
  0% { transform: scale(0.8); }
  40% { transform: scale(1); animation-timing-function: var(--ease-exhale); }
  100% { transform: scale(0.8); }
}

@keyframes view-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.view-enter { animation: view-in var(--dur-ui) var(--ease-inhale) both; }
.cover.has-plate .cover__stand-in { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .view-enter { animation: none !important; }
}
:root[data-motion="reduce"] *,
:root[data-motion="reduce"] *::before,
:root[data-motion="reduce"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* ── 13. Responsive ───────────────────────────────────────── */

@media (max-width: 1180px) {
  .shell { grid-template-columns: 232px minmax(0, 1fr); }
  .masthead__title .label:last-child { display: none; }
}

@media (max-width: 1040px) {
  .split,
  .epk,
  .avatar-test,
  .chapter-detail,
  .release-hero { grid-template-columns: minmax(0, 1fr); }
  .release-hero .cover { max-width: 420px; }
  .chapter-detail .cover { max-width: 420px; }
  .type-spec__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
}

@media (max-width: 899px) {
  .menu-button { display: inline-flex; }
  .masthead__inner { padding: 0 var(--space-md); gap: var(--space-sm); }
  .masthead__title { display: none; }
  .masthead__controls .seg,
  .masthead__controls .select-wrap { display: none; }

  .shell { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-drawer);
    width: min(340px, 88vw);
    height: 100%;
    padding: var(--space-md) var(--space-md) var(--space-xl);
    border-right: 1px solid var(--color-rule);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform var(--dur-ui) var(--ease-exhale), visibility 0s linear var(--dur-ui);
  }
  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--dur-ui) var(--ease-inhale), visibility 0s;
  }
  .sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 0 0 var(--space-sm) var(--space-xs);
    border-bottom: 1px solid var(--color-rule);
  }
  .sidebar__head img { height: 16px; width: auto; }
  .sidebar__controls { display: grid; gap: var(--space-md); padding: 0 var(--space-xs); }
  .sidebar__controls .seg { width: 100%; }
  .sidebar__controls .seg button { flex: 1; min-height: 40px; }
  .sidebar__controls .select-wrap,
  .sidebar__controls .select { width: 100%; }
  .sidebar__controls .select { min-height: 44px; }
  .nav__item { min-height: 44px; align-items: center; }
  .drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
  .drawer-open { overflow: hidden; }

  .main { padding: var(--space-2xl) var(--space-md) var(--space-5xl); }
  .page-head h1 { max-width: none; }
  .clock__sky { height: 64px; }
  .clock__stations { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .clock__btn {
    min-height: 0;
    display: grid;
    grid-template-columns: 4.2em 3.4em minmax(0, 1fr);
    grid-template-areas: "code ticks title" "code ticks light";
    align-items: center;
    column-gap: var(--space-sm);
    row-gap: 0;
    padding: var(--space-sm);
    border-right: 0;
    border-bottom: 1px solid var(--color-rule);
  }
  .clock__ticks { position: static; grid-area: ticks; gap: 3px; }
  .clock__ticks i { height: 16px; }
  .clock__code { grid-area: code; }
  .clock__title { grid-area: title; }
  .clock__light { grid-area: light; margin-top: 0; padding-top: 0; }
  .clock__btn[aria-pressed="true"]::after { top: 0; bottom: 0; left: 0; right: auto; width: 2px; height: auto; }
  .ladder__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
}

@media (max-width: 640px) {
  :root { --section-gap: calc(var(--space-3xl) * var(--density)); }
  .ov-hero { aspect-ratio: 4 / 3; }
  .ov-hero__wordmark { width: 52%; }
  .ov-hero__line { font-size: 14px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .epk__portraits { grid-template-columns: minmax(0, 1fr); }
  .logo-pack { grid-template-columns: minmax(0, 1fr); }
  .chapter-index__row { grid-template-columns: 2.8em minmax(0, 1fr); row-gap: 2px; }
  .chapter-index__row .ticks { display: none; }
  .chapter-index__light { grid-column: 2; }
  .tone-pair { grid-template-columns: minmax(0, 1fr); }
  .vp { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-md); }
  .vp__mute { grid-column: 1 / -1; justify-self: start; }
  .status-list li { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .tk-space__row { grid-template-columns: 7em 2.5em minmax(0, 1fr); }
  .tweaks-toggle span { display: none; }
  .tweaks-toggle { padding: 0; width: 44px; justify-content: center; }
  .code-block pre { padding: var(--space-md); padding-top: 52px; }
}

/* ── 14. Print ────────────────────────────────────────────── */

@media print {
  :root { --section-gap: 32px; }
  body { background: #fff; }
  body::before,
  body::after,
  .masthead,
  .sidebar,
  .drawer-backdrop,
  .tweaks,
  .tweaks-toggle,
  .tp-bar,
  .copy-btn { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .section { break-inside: auto; }
  .table-wrap { overflow: visible; }
  .code-block pre { max-height: none; white-space: pre-wrap; }
  a { text-decoration: none; }
  /* Tiled grain and filtered textures are slow to rasterise for print: print them flat. */
  .cover__photo::after,
  .tp__grain::after,
  .tex-grain::after { display: none !important; }
  .cover__band::before,
  .ov-hero__band::before { filter: none !important; opacity: 0.3; }
}
