@font-face{font-family:"Bricolage Grotesque";src:url("/assets/fonts/bricolage.woff2") format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Next";src:url("/assets/fonts/ahn.woff2") format("woff2");font-weight:200 800;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Next";src:url("/assets/fonts/ahn-italic.woff2") format("woff2");font-weight:200 800;font-style:italic;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Mono";src:url("/assets/fonts/ahm-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Atkinson Hyperlegible Mono";src:url("/assets/fonts/ahm-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Lexend";src:url("/assets/fonts/lexend.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"OpenDyslexic";src:url("/assets/fonts/opendyslexic-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"OpenDyslexic";src:url("/assets/fonts/opendyslexic-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
/* Layout: a visible ruled grid (specimen-catalogue structure), ruled cells for nav and filters,
   big display type for names, one reading column for prose. Three palettes share one token set. */
:root {
  /* Sand (light) is the base; values verified ≥4.5:1 for text, ≥3:1 for control borders */
  --bg: #f4ede1; --raised: #ebe1cf; --text: #0d3338; --text-2: #33545a; --muted: #4a6469;
  --accent: #4c3fb0; --accent-2: #0b6b65; --on-accent: #f4ede1;
  --line: #857a68; --hair: #d6c9b3; --focus: #4c3fb0; --ruler: rgb(76 63 176 / .10);
  --ok: #1d6b3a; --err: #9b2c1f;
  --font-display: "Bricolage Grotesque", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --scale: 1; --lh: 1.6; --ls: 0; --ws: 0; --ps: 1em; --measure: 66ch;
  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b2227; --raised: #11303a; --text: #f1eadf; --text-2: #c3ccc8; --muted: #9fb0ad;
    --accent: #b9b2f7; --accent-2: #6fd6cb; --on-accent: #0b2227;
    --line: #5e7f86; --hair: #1f3e46; --focus: #b9b2f7; --ruler: rgb(185 178 247 / .10);
    --ok: #7fd49b; --err: #ff9b8a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b2227; --raised: #11303a; --text: #f1eadf; --text-2: #c3ccc8; --muted: #9fb0ad;
  --accent: #b9b2f7; --accent-2: #6fd6cb; --on-accent: #0b2227;
  --line: #5e7f86; --hair: #1f3e46; --focus: #b9b2f7; --ruler: rgb(185 178 247 / .10);
  --ok: #7fd49b; --err: #ff9b8a; color-scheme: dark;
}
/* Explicit palette choice from the reading settings wins over the system */
html[data-palette="petrol"]:root {
  --bg: #0b2227; --raised: #11303a; --text: #f1eadf; --text-2: #c3ccc8; --muted: #9fb0ad;
  --accent: #b9b2f7; --accent-2: #6fd6cb; --on-accent: #0b2227;
  --line: #5e7f86; --hair: #1f3e46; --focus: #b9b2f7; --ruler: rgb(185 178 247 / .10);
  --ok: #7fd49b; --err: #ff9b8a; color-scheme: dark;
}
html[data-palette="violet"]:root {
  --bg: #17132b; --raised: #221c3d; --text: #f1eadf; --text-2: #cbc4d9; --muted: #aaa2c2;
  --accent: #4fd1c5; --accent-2: #b9b2f7; --on-accent: #17132b;
  --line: #6f6698; --hair: #2c2650; --focus: #4fd1c5; --ruler: rgb(79 209 197 / .10);
  --ok: #7fd49b; --err: #ff9b8a; color-scheme: dark;
}
html[data-palette="sand"]:root {
  --bg: #f4ede1; --raised: #ebe1cf; --text: #0d3338; --text-2: #33545a; --muted: #4a6469;
  --accent: #4c3fb0; --accent-2: #0b6b65; --on-accent: #f4ede1;
  --line: #857a68; --hair: #d6c9b3; --focus: #4c3fb0; --ruler: rgb(76 63 176 / .10);
  --ok: #1d6b3a; --err: #9b2c1f; color-scheme: light;
}

/* Reading preferences */
html[data-font="lexend"] { --font-body: "Lexend", Verdana, sans-serif; --font-display: "Lexend", Verdana, sans-serif; --font-mono: "Lexend", Verdana, sans-serif; }
html[data-font="dyslexic"] { --font-body: "OpenDyslexic", "Comic Sans MS", sans-serif; --font-display: "OpenDyslexic", "Comic Sans MS", sans-serif; --font-mono: "OpenDyslexic", "Comic Sans MS", sans-serif; }
html[data-font="browser"] { --font-body: sans-serif; --font-display: sans-serif; --font-mono: monospace; }
html[data-spacing="wide"] { --lh: 1.9; --ls: .12em; --ws: .16em; --ps: 2em; }
html[data-measure="narrow"] { --measure: 50ch; }

html { font-size: calc(100% * var(--scale)); -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="calm"]) { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: var(--lh);
  letter-spacing: var(--ls); word-spacing: var(--ws);
  font-variant-ligatures: none;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
p { margin: 0 0 var(--ps); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
h1, h2, h3, .statement, .cover .ct, .foot-big { overflow-wrap: anywhere; hyphens: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
html[data-spacing="wide"] :is(h1, h2, h3) { letter-spacing: var(--ls); line-height: 1.4; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--max); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

.skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 12px; top: 12px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: .75rem 1rem; font-weight: 700; border-radius: 4px; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- Header: ruled cells ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--hair); }
@media (max-height: 640px) { .site-header { position: static; } }
html.compact .site-header { position: sticky; top: env(safe-area-inset-top, 0px); }
.bar > .brand { min-width: 0; }
html.compact .bar { grid-template-columns: minmax(0, 1fr) auto auto; }
html.compact .brand { font-size: clamp(1.1rem, 1rem + 2vw, 1.6rem); }
.bar { display: grid; grid-template-columns: max-content repeat(var(--ncells, 6), minmax(max-content, 1fr)) minmax(180px, 1.4fr); min-height: 6.5rem; }
/* AI & accessibility page */
.findings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.finding { padding: 1.4rem 1.25rem; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: grid; gap: .6rem; align-content: start; min-width: 0; }
.finding h3 { font-size: 1.3rem; }
.finding p { color: var(--text-2); margin: 0; }
.tag.conf { justify-self: start; border-color: var(--accent); color: var(--text); }
.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.check { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: .5rem 2rem; padding: 1.4rem .25rem; border-bottom: 1px solid var(--hair); }
.check-head { display: flex; gap: .9rem; align-items: baseline; grid-row: span 3; }
.check .cid { font: 600 1.6rem/1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; min-width: 2ch; }
.check h3 { font-size: 1.3rem; }
.check p { margin: 0; color: var(--text-2); grid-column: 2; }
.check .basis { font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (max-width: 860px) { .check { grid-template-columns: 1fr; } .check-head { grid-row: auto; } .check p { grid-column: 1; } }
.dir-sub { font-size: clamp(1.8rem, 3.4vw, 2.75rem); padding-block: 3rem 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; padding-block: 1rem; text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 1.6rem; letter-spacing: -0.02em; }

.brand small { display: block; font: 400 .75rem/1.3 var(--font-mono); letter-spacing: .02em; color: var(--muted); }
.nav { display: contents; }
.nav ul { display: contents; list-style: none; }
.cell { display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; padding: 1rem 1.1rem; border-left: 1px solid var(--hair); text-decoration: none; min-height: 100%; }
.cell .label { font-weight: 700; font-size: 1rem; }
.cell .count { font: 500 .8125rem/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.cell:hover { background: var(--raised); }
.cell[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.cell[aria-current="page"] .count { color: var(--on-accent); }
.settings-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; padding: 1rem 1.1rem; border-left: 1px solid var(--hair); }
.settings-btn:hover { background: var(--raised); }
.settings-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.settings-btn .label { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.settings-btn .summary { font: 400 .8125rem/1.3 var(--font-mono); color: var(--muted); }
.settings-btn[aria-expanded="true"] { background: var(--text); color: var(--bg); }
.settings-btn[aria-expanded="true"] .summary { color: var(--bg); }
.menu-btn { display: none; }

html.compact .bar { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 4.5rem; }
html.compact .nav { display: none; grid-column: 1 / -1; border-top: 1px solid var(--hair); }
html.compact .nav.open { display: block; }
html.compact .nav ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; padding: 0; }
html.compact .nav li { border-bottom: 1px solid var(--hair); }
html.compact .cell { border-left: 0; min-height: 4.25rem; flex-direction: row; align-items: center; }
html.compact .menu-btn, html.compact .settings-btn { display: flex; align-items: center; justify-content: center; min-width: 3.25rem; padding: .75rem 1rem; }
html.compact .menu-btn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-left: 1px solid var(--hair); font-weight: 700; }
html.compact .menu-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
html.compact .settings-btn { flex-direction: row; gap: .5rem; }
html.compact .settings-btn .summary { display: none; }
html.compact .bar > .brand { grid-row: 1; }
html.compact .bar > .settings-btn { grid-row: 1; grid-column: 2; }
html.compact .bar > .menu-btn { grid-row: 1; grid-column: 3; }
@media (max-width: 480px) { .brand small { display: none; } }
html.compact .brand small { display: none; }
@media (max-width: 640px) { .menu-btn .t, .settings-btn .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }

/* ---------- Reading settings panel ---------- */
.panel { border-bottom: 1px solid var(--hair); background: var(--raised); }
.panel-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.panel fieldset, .panel .field { border: 0; margin: 0; padding: 1.25rem 1.1rem; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); min-width: 0; }
.panel legend, .panel .flabel { padding: 0; font: 500 .8125rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .75rem; float: left; width: 100%; }
.panel legend + *, .panel .flabel + * { clear: both; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--hair); }
.panel-head h2 { font-size: 1.25rem; }
.panel-head p { margin: 0; color: var(--text-2); font-size: .95rem; }
.opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt > span { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; background: var(--bg); }
.opt > input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt:hover span { border-color: var(--text); }
.sw { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.sw-system { background: linear-gradient(90deg, #0b2227 50%, #f4ede1 50%); }
.sw-petrol { background: #0b2227; box-shadow: inset 0 0 0 4px #0b2227, inset 0 0 0 9px #b9b2f7; }
.sw-violet { background: #17132b; box-shadow: inset 0 0 0 4px #17132b, inset 0 0 0 9px #4fd1c5; }
.sw-sand { background: #f4ede1; box-shadow: inset 0 0 0 4px #f4ede1, inset 0 0 0 9px #4c3fb0; }
.f-ahn { font-family: "Atkinson Hyperlegible Next", sans-serif; }
.f-lex { font-family: "Lexend", sans-serif; }
.f-od { font-family: "OpenDyslexic", sans-serif; }
.f-br { font-family: sans-serif; }
.range { display: flex; align-items: center; gap: .75rem; }
.range input { flex: 1; accent-color: var(--accent); min-height: 2.75rem; }
.range output { font: 500 1rem/1 var(--font-mono); min-width: 3.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.panel .hint { font-size: .875rem; color: var(--text-2); margin: .75rem 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .6rem 1.15rem; border: 1px solid var(--text); border-radius: 999px; background: transparent; color: var(--text); font: 700 .95rem/1.2 var(--font-body); letter-spacing: var(--ls); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--text); color: var(--bg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn svg { width: 1em; height: 1em; }
.listen-status { font: 400 .875rem/1.4 var(--font-mono); color: var(--muted); margin-top: .5rem; min-height: 1.4em; }

/* ---------- Reading ruler ---------- */
.ruler { position: fixed; left: 0; right: 0; height: calc(2.2em * var(--scale)); background: var(--ruler); border-block: 1px solid var(--accent); pointer-events: none; z-index: 30; transform: translateY(-50%); display: none; }
html[data-ruler="on"] .ruler { display: block; }

/* ---------- Generic sections ---------- */
main { display: block; }
.section { border-bottom: 1px solid var(--hair); padding-block: clamp(3rem, 7vw, 6rem); }
.eyebrow { font: 500 .875rem/1.3 var(--font-mono); letter-spacing: .04em; color: var(--muted); margin: 0 0 1.25rem; text-transform: uppercase; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem 3rem; align-items: start; margin-bottom: 2.5rem; }
.sec-head h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
.sec-head .intro p { color: var(--text-2); font-size: 1.125rem; }
@media (max-width: 820px) { .sec-head { grid-template-columns: 1fr; } }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.375rem); color: var(--text-2); max-width: 60ch; }
.updated { font: 400 .875rem/1.3 var(--font-mono); color: var(--muted); }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 7rem) clamp(2.5rem, 6vw, 5rem); border-bottom: 1px solid var(--hair); }
.hero h1 { font-size: clamp(2.6rem, 7.4vw, 6.5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; max-width: 15ch; margin-bottom: 2rem; }
html[data-spacing="wide"] .hero h1 { line-height: 1.25; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Doors (start here) */
.doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
@media (max-width: 1000px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .doors { grid-template-columns: 1fr; } }
.door { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.5rem 1.25rem 1.75rem; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); min-width: 0; }
.door:hover { background: var(--raised); }
.door .who { font: 500 .8125rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.door h3 { font-size: 1.5rem; }
.door a { text-decoration: none; }
.door a::after { content: ""; position: absolute; inset: 0; }
.door a:focus-visible { outline: none; }
.door:focus-within { outline: 3px solid var(--focus); outline-offset: -3px; }
.door p { color: var(--text-2); margin: 0; }
.door .go { margin-top: auto; font-weight: 700; display: inline-flex; gap: .4rem; align-items: center; }

/* Workframe specimen */
.moves { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.move { display: grid; grid-template-columns: minmax(5rem, 9rem) minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 2rem; align-items: baseline; padding-block: 1.75rem; border-bottom: 1px solid var(--hair); }
.move .letter { font-family: var(--font-display); font-size: clamp(4rem, 9vw, 7.5rem); line-height: .85; font-weight: 700; color: var(--accent); }
.move h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.move p { margin: 0; color: var(--text-2); font-size: 1.125rem; }
@media (max-width: 760px) { .move { grid-template-columns: 3.5rem minmax(0, 1fr); } .move .letter { font-size: 3.25rem; } }
.note-order { font: 500 .875rem/1.4 var(--font-mono); color: var(--muted); margin-top: 1.25rem; }

/* Position */
.statement { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.12; font-weight: 550; letter-spacing: -0.02em; max-width: 22ch; margin: 0 0 2.5rem; text-wrap: balance; }
html[data-spacing="wide"] .statement { line-height: 1.4; letter-spacing: var(--ls); }
.statement mark { background: none; color: var(--accent); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 3rem; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.cols p { color: var(--text-2); font-size: 1.125rem; }

/* Split rows (podcast / people) */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hair); border-left: 1px solid var(--hair); }
.split > div { padding: 2rem 1.5rem; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); min-width: 0; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.split h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.split p { color: var(--text-2); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.voices { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; min-height: 1.75rem; padding: .1rem .6rem; border: 1px solid var(--line); border-radius: 999px; font: 500 .8125rem/1.3 var(--font-mono); color: var(--text-2); }

/* FAQ */
.faq { border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.25rem 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.2rem, 2vw, 1.5rem); min-height: 3rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.75rem/1 var(--font-mono); color: var(--accent); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline-offset: 0; }
.faq .ans { padding: 0 0 1.5rem; color: var(--text-2); font-size: 1.0625rem; }

/* Forms */
.form { display: grid; gap: 1.5rem; max-width: 46rem; }
.form .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
@media (max-width: 640px) { .form .row2 { grid-template-columns: 1fr; } }
.fld { display: grid; gap: .45rem; min-width: 0; }
.fld label, .fld .lab { font-weight: 700; font-size: 1rem; }
.fld .req { font-weight: 400; color: var(--muted); font-size: .9rem; }
.fld .help { font-size: .9rem; color: var(--text-2); margin: 0; }
.fld input, .fld select, .fld textarea { width: 100%; min-height: 3rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.4 var(--font-body); letter-spacing: var(--ls); word-spacing: var(--ws); }
.fld textarea { min-height: 8rem; resize: vertical; }
.fld input:focus-visible, .fld select:focus-visible, .fld textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--text); }
.fld [aria-invalid="true"] { border-color: var(--err); border-width: 2px; }
.fld .err { color: var(--err); font-weight: 700; font-size: .95rem; margin: 0; display: flex; gap: .4rem; }
.fld .err::before { content: "!"; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--err); color: var(--bg); font-size: .8rem; flex: none; margin-top: .1rem; }
.err-summary { border: 2px solid var(--err); border-radius: 8px; padding: 1rem 1.25rem; }
.err-summary h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.err-summary ul { margin: 0; padding-left: 1.2rem; }
.err-summary a { color: var(--err); font-weight: 700; }
.success { border: 2px solid var(--ok); border-radius: 8px; padding: 1rem 1.25rem; }
.success h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.form-note { font-size: .9rem; color: var(--text-2); margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; max-width: 40rem; }
.inline-form .fld { flex: 1 1 16rem; }

/* ---------- Directory (tools / institutions / reading) ---------- */
.dir-head { padding-block: clamp(2.5rem, 6vw, 5rem) 2rem; }
.dir-head h1 { font-size: clamp(2.6rem, 7vw, 6rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 1.5rem; }
html[data-spacing="wide"] .dir-head h1 { line-height: 1.25; }
.dir-head .meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.5rem; }
.toolbar { background: var(--bg); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.toolbar-grid { display: grid; grid-template-columns: minmax(17rem, 1fr) minmax(0, 2.6fr) auto; }
@media (min-width: 981px) { .toolbar-grid > .viewctl { align-content: flex-start; } }
.toolbar-grid > * { padding: .9rem 1rem; border-right: 1px solid var(--hair); min-width: 0; }
.toolbar-grid > *:first-child { padding-left: 0; }
.toolbar-grid > *:last-child { border-right: 0; padding-right: 0; }
@media (max-width: 980px) { .toolbar-grid { grid-template-columns: 1fr; } .toolbar-grid > * { border-right: 0; border-bottom: 1px solid var(--hair); padding-inline: 0; } .toolbar-grid > *:last-child { border-bottom: 0; } }
.search { display: grid; gap: .35rem; align-content: start; }
.search label { font: 500 .8125rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.search input { width: 100%; min-height: 2.75rem; border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; background: var(--bg); color: var(--text); font: 400 1rem/1.3 var(--font-body); letter-spacing: var(--ls); }
.search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.filters { display: grid; gap: .6rem; }
.chips { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chips legend { float: left; align-self: center; line-height: 2.25rem; font: 500 .8125rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: .5rem; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip > span { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.25rem; padding: .25rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; }
.chip > span b { font: 500 .75rem/1 var(--font-mono); color: var(--muted); }
.chip input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.chip input:checked + span b { color: var(--bg); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip:hover span { border-color: var(--text); }
.viewctl { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.results { margin: 0; font: 600 1.6rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.results small { font: 400 .875rem/1 var(--font-mono); color: var(--muted); margin-left: .35rem; }
.jump { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--hair); font-size: .95rem; }
.jump span { font: 500 .8125rem/1.6 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.group { padding-block: 3rem 1rem; border-bottom: 1px solid var(--hair); }
.group-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 3rem; margin-bottom: 1.5rem; }
.group-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
.group-head h2 .n { font: 500 .9rem/1 var(--font-mono); color: var(--muted); vertical-align: super; margin-left: .35rem; letter-spacing: 0; }
.group-head .intro p { color: var(--text-2); }
@media (max-width: 820px) { .group-head { grid-template-columns: 1fr; } }

.items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.item { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.5fr) minmax(0, .8fr); gap: .75rem 2rem; align-items: baseline; padding: 1.4rem .25rem; border-bottom: 1px solid var(--hair); }
.item:hover { background: var(--raised); }
.item .name { font-family: var(--font-display); font-size: clamp(1.35rem, 2.3vw, 2rem); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; }
html[data-spacing="wide"] .item .name { letter-spacing: var(--ls); line-height: 1.4; }
.item .name a { text-decoration: none; }
.item .name a:hover { text-decoration: underline; }
.item .name .ext { font-size: .6em; color: var(--muted); margin-left: .2em; }
.item .desc { color: var(--text-2); margin: 0; }
.item .by { display: block; font: 400 .9rem/1.4 var(--font-mono); color: var(--muted); margin-top: .35rem; letter-spacing: var(--ls); }
.item .tags { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
@media (max-width: 860px) { .item { grid-template-columns: 1fr; } .item .tags { justify-content: flex-start; } }

/* Grid view */
[data-view="grid"] .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); border-left: 1px solid var(--hair); }
[data-view="grid"] .item { grid-template-columns: 1fr; align-content: start; border-right: 1px solid var(--hair); padding: 1.4rem 1.1rem; }
[data-view="grid"] .item .tags { justify-content: flex-start; }
[data-view="grid"] .item .name { font-size: 1.5rem; }

.empty { padding: 3rem 0; border-bottom: 1px solid var(--hair); }
.empty h2 { font-size: 1.6rem; margin-bottom: .75rem; }

.callout { border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.5rem, 3vw, 2.5rem); margin-block: 3rem; background: var(--raised); }
.callout h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
.callout p { color: var(--text-2); }
.footnote { font-size: .95rem; color: var(--text-2); padding-block: 1.5rem; }

/* Article (manifesto, statement) */
.article { padding-block: clamp(2.5rem, 6vw, 5rem); }
.article-head { margin-bottom: 3rem; }
.article-head h1 { font-size: clamp(2.6rem, 7vw, 6rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 1.5rem; }
html[data-spacing="wide"] .article-head h1 { line-height: 1.25; }
.article-tools { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.prose { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 0 3rem; }
.prose section { display: contents; }
.prose .num { font: 500 .875rem/1.6 var(--font-mono); color: var(--muted); padding-top: 2.6rem; border-top: 1px solid var(--hair); }
.prose .body { padding-block: 2.25rem 1.5rem; border-top: 1px solid var(--hair); min-width: 0; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 1.25rem; }
.prose h3 { font-size: 1.3rem; margin: 2rem 0 .75rem; }
.prose p, .prose li { font-size: 1.1875rem; }
.prose ul { padding-left: 1.2rem; max-width: var(--measure); margin: 0 0 var(--ps); }
.prose li { margin-bottom: .5rem; }
.prose .wf { list-style: none; padding: 0; }
.prose .wf li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--hair); margin: 0; }
.prose .wf b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; color: var(--accent); }
@media (max-width: 760px) { .prose { grid-template-columns: 1fr; } .prose .num { padding-top: 2rem; } .prose .body { border-top: 0; padding-top: .5rem; } }

/* Footer */
.site-footer { padding-block: 3rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h2 { font: 500 .8125rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.foot-grid a { display: inline-block; padding-block: .25rem; }
.foot-big { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; line-height: 1.1; max-width: 16ch; }
.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); font: 400 .875rem/1.4 var(--font-mono); color: var(--muted); }

/* Preview-only page switching */
.page[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="calm"]) .door, html:not([data-motion="calm"]) .item, html:not([data-motion="calm"]) .cell { transition: background-color .15s ease; }
}
html[data-motion="calm"] *, html[data-motion="calm"] *::before, html[data-motion="calm"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (forced-colors: active) {
  .cell[aria-current="page"], .opt input:checked + span, .chip input:checked + span { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .ruler { border-color: Highlight; }
}
.results a { text-decoration: none; display: inline-flex; align-items: baseline; white-space: nowrap; padding-block: .575rem; }
.results small { white-space: nowrap; }
.results a:hover small { text-decoration: underline; }
[tabindex="-1"]:focus:not(:focus-visible), main:focus, .wrap[tabindex="-1"]:focus { outline: none; }
body { overflow-wrap: anywhere; }
.btn { max-width: 100%; white-space: normal; text-align: center; }
.sec-head > *, .split > div, .cols > *, .door, .group-head > * { min-width: 0; }
html.static-header .site-header { position: relative; }
[aria-disabled="true"] { opacity: .75; cursor: not-allowed; }
.cell .label, .settings-btn .label, .brand, .tag, .count, .chip > span b { overflow-wrap: normal; }
.chip > span, .opt > span { max-width: 100%; }
.cell .label, .brand > span, .chip > span b, .count { white-space: nowrap; }

/* ---------- Icons (Lucide, inlined) and logo ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; stroke-width: 1.75; }
.brand { flex-direction: column; align-items: flex-start; justify-content: center; gap: .4rem; }
.brand .logo { height: 1.75rem; width: auto; max-width: 100%; color: var(--text); }
.brand small { margin: 0; }
html.compact .brand .logo { height: 1.5rem; }
.eyebrow .ic, .flabel .ic, .panel legend .ic, .search label .ic { margin-right: .45em; color: var(--accent); }
.eyebrow { display: flex; align-items: center; }
.gi { width: .78em; height: .78em; margin-right: .35em; vertical-align: -0.04em; color: var(--accent); stroke-width: 2; }
.door .who { display: flex; align-items: center; gap: .6rem; }
.door-ic { width: 1.6rem; height: 1.6rem; color: var(--accent); }
.door .go .ic, .btn .ic { width: 1.05em; height: 1.05em; vertical-align: -0.15em; }
.tag { gap: .35rem; }
.tag .ic { width: 1em; height: 1em; color: var(--accent); }
.item .name .ext { width: .55em; height: .55em; margin-left: .25em; color: var(--muted); vertical-align: .1em; stroke-width: 2.25; }
.chip > span .ic { width: 1em; height: 1em; }
.settings-btn .label .ic { width: 1.1em; height: 1.1em; }

/* Filters fold away on small screens so results come first */
.filters-cell { min-width: 0; }
.filters-toggle { display: none; }
.fcount:not(:empty) { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 500 .8rem/1 var(--font-mono); }
@media (max-width: 980px) {
  .filters-toggle { display: inline-flex; }
  .filters { display: none; margin-top: .9rem; }
  .filters.open { display: grid; }
  .toolbar-grid > .viewctl { display: flex; justify-content: space-between; }
}

.bar > .brand { padding-right: 1.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.hero-mark { width: clamp(12rem, 24vw, 22rem); height: auto; color: var(--accent-2); opacity: .9; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-mark { display: none; } }
.move { grid-template-columns: minmax(4.5rem, 8rem) minmax(0, 1fr); align-items: center; }
.move > div { display: grid; gap: .4rem; }
.move > div p { max-width: 52ch; }
.item .name .ext { width: .7em; height: .7em; }
.item { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.item .tags { grid-column: 2; justify-content: flex-start; }

@media (max-width: 860px) { .item .tags { grid-column: 1; } }
[data-view="grid"] .item .tags { grid-column: 1; }
.move > div { min-width: 0; } @media (max-width: 760px) { .move { gap: .5rem 1rem; } }

/* ---------- Book covers: original motifs, motion only on hover/focus ---------- */
.item.book { grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
.item.book .cover { grid-row: span 2; }
.item.book .tags { grid-column: 3; }
.cover { width: 100%; aspect-ratio: 1; max-width: 100%; border-radius: 6px; overflow: hidden; border: 1px solid var(--hair); }
.cover svg { display: block; width: 100%; height: 100%; }
.c-bg { fill: var(--raised); }
.f-a { fill: var(--accent); } .f-b { fill: var(--accent-2); } .f-t { fill: var(--text); } .f-m { fill: var(--hair); }
.s-a { stroke: var(--accent); } .s-b { stroke: var(--accent-2); } .s-t { stroke: var(--text); } .s-m { stroke: var(--line); } .s-on { stroke: var(--on-accent); }
.cover .glyph { font: 700 58px/1 var(--font-display); }
.book[data-topic="adhd"] .cover { border-top: 4px solid var(--accent); }
.book[data-topic="autism"] .cover { border-top: 4px solid var(--accent-2); }
.book[data-topic="dyslexia"] .cover { border-top: 4px solid var(--text); }
.book[data-topic="general"] .cover { border-top: 4px solid var(--line); }
@media (max-width: 860px) { .item.book { grid-template-columns: 4.5rem minmax(0, 1fr); } .item.book .desc, .item.book .tags { grid-column: 2; } .item.book .cover { grid-row: span 3; } }
[data-view="grid"] .item.book { grid-template-columns: 1fr; }
[data-view="grid"] .item.book .cover { grid-row: auto; margin-bottom: .5rem; }
[data-view="grid"] .item.book .tags, [data-view="grid"] .item.book .desc { grid-column: 1; }

.cover .an { transform-box: fill-box; transform-origin: center; animation-duration: 1.6s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; animation-play-state: paused; animation-delay: var(--d, 0s); }
.an-slide { animation-name: c-slide; } @keyframes c-slide { to { transform: translateX(-14px); } }
.an-travel { animation-name: c-travel; animation-direction: normal; } @keyframes c-travel { to { transform: translate(92px, -76px); } }
.an-drift { animation-name: c-drift; } @keyframes c-drift { to { transform: translate(3px, -4px) scale(.94); } }
.an-drift2 { animation-name: c-drift2; } @keyframes c-drift2 { to { transform: translate(-4px, 3px) scale(1.04); } }
.an-knob1 { animation-name: c-k1; } @keyframes c-k1 { to { transform: translateX(40px); } }
.an-knob2 { animation-name: c-k2; } @keyframes c-k2 { to { transform: translateX(-34px); } }
.an-knob3 { animation-name: c-k3; } @keyframes c-k3 { to { transform: translateX(26px); } }
.an-reveal { animation-name: c-reveal; } @keyframes c-reveal { from { opacity: .15; } to { opacity: 1; transform: scale(1.25); } }
.an-dash { animation-name: c-dash; } @keyframes c-dash { to { transform: translateX(10px); } }
.an-pulse, .an-pulse2, .an-pulse3 { animation-name: c-pulse; } .an-pulse2 { --d: .3s; } .an-pulse3 { --d: .6s; } @keyframes c-pulse { to { transform: scale(1.08); } }
.an-jump { animation-name: c-jump; animation-timing-function: cubic-bezier(.3,0,.5,1); animation-duration: .9s; } @keyframes c-jump { to { transform: translateY(-50px); } }
.an-unmask { animation-name: c-unmask; } @keyframes c-unmask { to { transform: translateX(-22px); opacity: .25; } }
.an-spin { animation-name: c-spin; animation-direction: normal; animation-timing-function: linear; animation-duration: 3s; } @keyframes c-spin { to { transform: rotate(360deg) scale(1.15); } }
.an-charge { animation-name: c-charge; transform-origin: bottom; } @keyframes c-charge { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.an-bar { animation-name: c-bar; transform-origin: bottom; } @keyframes c-bar { to { transform: scaleY(.7); } }
.an-seek { animation-name: c-seek; } @keyframes c-seek { to { transform: scale(1.5); } }
.an-orbit { animation-name: c-spin; animation-direction: normal; animation-timing-function: linear; animation-duration: 8s; }
.an-flip { animation-name: c-flip; } @keyframes c-flip { to { transform: scaleX(-1); } }
.an-tilt { animation-name: c-tilt; } @keyframes c-tilt { to { transform: rotate(8deg) scale(.96); } }
.an-unfold { animation-name: c-unfold; } @keyframes c-unfold { from { transform: scaleX(.55); } to { transform: scaleX(1); } }
.an-sway { animation-name: c-sway; transform-origin: bottom; } @keyframes c-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
.an-climb { animation-name: c-climb; animation-direction: normal; animation-duration: 2.4s; } @keyframes c-climb { 33% { transform: translate(26px, -24px); } 66% { transform: translate(52px, -48px); } 100% { transform: translate(78px, -72px); } }
.an-bob { animation-name: c-bob; } @keyframes c-bob { to { transform: translateY(5px); } }
.an-gear { animation-name: c-spin; animation-direction: normal; animation-timing-function: linear; animation-duration: 6s; }
.an-gear-r { animation-name: c-spin-r; animation-direction: normal; animation-timing-function: linear; animation-duration: 4s; } @keyframes c-spin-r { to { transform: rotate(-360deg); } }
.an-pop { animation-name: c-pop; } @keyframes c-pop { to { transform: scale(1.06) translateY(-2px); } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="calm"]) .book:hover .cover .an, html:not([data-motion="calm"]) .book:focus-within .cover .an { animation-play-state: running; }
}
html[data-motion="calm"] .cover .an { animation: none !important; }
@media (max-width: 560px) { .item.book .desc, .item.book .tags { grid-column: 1 / -1; } .item.book .cover { grid-row: auto; } .tag { max-width: 100%; } }
/* Podcast transcripts */
.transcript { max-width: 46rem; }
.transcript p { font-size: 1.125rem; }
.transcript .line { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .25rem 1rem; }
.transcript .spk { font: 500 .875rem/1.9 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.transcript .cue { color: var(--muted); font-style: italic; font-size: .92em; }
.transcript h2, .transcript h3 { font-size: 1.4rem; margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); }
.transcript ul, .transcript ol { padding-left: 1.2rem; }
@media (max-width: 560px) { .transcript .line { grid-template-columns: 1fr; } }
.draft-note { border: 1px dashed var(--line); border-radius: 8px; padding: .75rem 1rem; color: var(--text-2); max-width: 46rem; }
.tag.draft { border-style: dashed; }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* 404 */
.nf { padding-block: clamp(2.5rem, 6vw, 5rem); }
.nf-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; margin-bottom: 3rem; }
.nf h1 { font-size: clamp(2.6rem, 6.5vw, 5.5rem); letter-spacing: -0.03em; line-height: 1.02; max-width: 14ch; margin-bottom: 1.5rem; }
html[data-spacing="wide"] .nf h1 { line-height: 1.25; }
.nf-path { font-size: 1.05rem; color: var(--text-2); }
.nf-path code { font-family: var(--font-mono); background: var(--raised); border: 1px solid var(--hair); border-radius: 4px; padding: .1em .4em; overflow-wrap: anywhere; }
.nf-mark { width: clamp(10rem, 22vw, 18rem); height: auto; color: var(--accent-2); }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="calm"]) .nf-mark { animation: nf-wobble 5s ease-in-out infinite alternate; transform-origin: 50% 50%; } }
@keyframes nf-wobble { 0% { transform: rotate(-8deg) scale(.96); } 50% { transform: rotate(5deg) scale(1.02) translateY(-6px); } 100% { transform: rotate(-2deg) scale(1); } }
@media (max-width: 760px) { .nf-grid { grid-template-columns: 1fr; } .nf-mark { width: 7rem; order: -1; } }
.nf-h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.5rem; }
.nf-links { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-top: .4rem; }
@media (max-width: 760px) { .move { grid-template-columns: 3rem minmax(0, 1fr); gap: .5rem 1rem; } .move .letter { font-size: 3rem; } }

/* ---------- Menu and reading settings open as overlays: the page never shifts ---------- */
.site-header { position: sticky; }
.bar { position: static; }
.panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 18px 40px rgb(0 0 0 / .22); border-top: 1px solid var(--hair); }
html.compact .nav { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; background: var(--bg); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgb(0 0 0 / .22); max-height: calc(100dvh - 5rem); overflow-y: auto; overscroll-behavior: contain; }
html.compact .nav ul { grid-template-columns: 1fr; max-width: var(--max); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); padding-block: .5rem 1rem; }
html.compact .nav li:last-child { border-bottom: 0; }
html.compact .cell { justify-content: space-between; min-height: 3.5rem; padding: .85rem .75rem; font-size: 1.125rem; border-radius: 6px; }
html.compact .cell .count { font-size: .9rem; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline-block; }
html.menu-open body::after, html.panel-open body::after { content: ""; position: fixed; inset: 0; z-index: 15; background: rgb(8 12 20 / .45); }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="calm"]) .panel:not([hidden]), html:not([data-motion="calm"]).compact .nav.open { animation: drop-in .16s ease-out; }
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Manifesto: organised read ---------- */
.mf { padding-block: clamp(2.5rem, 6vw, 5rem); }
.mf-head h1 { font-size: clamp(2.6rem, 7vw, 6rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 1.25rem; }
html[data-spacing="wide"] .mf-head h1 { line-height: 1.25; }
.mf-head .lead { margin-bottom: 1.5rem; }
.mf-grid { display: grid; grid-template-columns: minmax(12rem, 17rem) minmax(0, 44rem); gap: 1rem 4rem; margin-top: 2.5rem; }
.mf-toc { position: sticky; top: 8rem; align-self: start; }
html.compact .mf-toc, html.static-header .mf-toc { top: 1.5rem; }
.mf-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hair); }
.mf-toc a { display: grid; grid-template-columns: 2.25rem 1fr; gap: .25rem; padding: .6rem .75rem .6rem 1rem; text-decoration: none; color: var(--text-2); border-left: 3px solid transparent; margin-left: -2px; min-height: 2.75rem; align-items: baseline; }
.mf-toc a:hover { color: var(--text); background: var(--raised); }
.mf-toc a[aria-current] { color: var(--text); border-left-color: var(--accent); font-weight: 700; }
.mf-toc .tn { font: 500 .85rem/1.6 var(--font-mono); color: var(--muted); }
.mf-part { padding-block: 2.25rem 1.5rem; border-top: 1px solid var(--hair); scroll-margin-top: 7rem; }
.mf-part:focus { outline: none; }
.mf-num { font: 500 .85rem/1.4 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.mf-part h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
.mf-part p, .mf-part li { font-size: 1.1875rem; }
.gist { background: var(--raised); border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; padding: .9rem 1.1rem; color: var(--text); }
.keyline { font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.75rem) !important; line-height: 1.3; color: var(--text); padding-left: 1rem; border-left: 2px solid var(--accent-2); }
.keyline strong { font-weight: 600; }
.mf-part .wf { list-style: none; padding: 0; margin: 0 0 var(--ps); }
.mf-part .wf li { display: grid; grid-template-columns: 2.5rem 1fr; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--hair); }
.mf-part .wf b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; color: var(--accent); }
html[data-gists] .mf-part > p:not(.gist):not(.mf-num), html[data-gists] .mf-part .wf { display: none; }
.mf-end { margin-top: 2.5rem; }
.mf-progress { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 4px; z-index: 30; pointer-events: none; }
.mf-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.page[hidden] .mf-progress { display: none; }
@media (max-width: 900px) { .mf-grid { grid-template-columns: 1fr; } .mf-toc { position: static; } .mf-toc ol { border-left: 0; border-top: 1px solid var(--hair); } .mf-toc li { border-bottom: 1px solid var(--hair); } .mf-toc a { border-left: 0; margin-left: 0; } }

/* Fixes from user-story tests */
html.compact .nav { overflow-x: hidden; }
html.compact .cell .label { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
html.compact .cell { gap: .75rem; }
html.static-header .panel, html.static-header.compact .nav { position: fixed; top: 0; max-height: 100dvh; z-index: 60; }
.mf-body { max-width: min(100%, var(--measure)); }
.mf-body .mf-part p { max-width: none; }
.show-results { display: none; }
@media (max-width: 980px) { .filters.open .show-results { display: inline-flex; margin-top: .5rem; justify-self: start; } }
.jump a[hidden] { display: none; }
.nf-form { margin-top: .75rem; max-width: 32rem; } .nf-form .fld input[readonly] { background: var(--raised); }

.nav-close { display: none; }
html.static-header.compact .nav-close { display: inline-flex; margin: .75rem max(var(--gutter), env(safe-area-inset-left, 0px)) 0; }
html.menu-open, html.panel-open { overflow: hidden; }
html.menu-open body, html.panel-open body { overflow: hidden; }
.nf-mark { animation-iteration-count: 2 !important; }
:where(p, li, dd, dt, td, th, summary, label, blockquote, a, button, input, select, textarea) { letter-spacing: var(--ls); word-spacing: var(--ws); }
html[data-spacing="wide"] .keyline, html[data-spacing="wide"] .gist { line-height: var(--lh); }
@media (max-width: 980px) { .filters.open .show-results { position: sticky; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 2; box-shadow: 0 6px 18px rgb(0 0 0 / .25); } }
/* Stop the sideways jump when an overlay locks scrolling: keep the scrollbar's space reserved */
html { scrollbar-gutter: stable; }
/* Form fields keep their natural height when a neighbour has help text */
.fld { align-content: start; }
.form .row2 { align-items: start; }
