/* =========================================================
   Bence Weiszmann: design system
   Tokens first; components below. Light theme.
   ========================================================= */

@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-ext-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1E9F; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  /* Colour (light theme) */
  --bg: #ffffff;           /* page */
  --surface: #f3f6fa;      /* raised surfaces */
  --surface-hover: #e8eef6;
  --line: #dfe5ee;         /* hairlines */
  --line-strong: #c3cedd;
  --text: #0d1b30;
  --text-muted: #44546d;
  --text-faint: #5b6a82;
  --accent: #0b6d97;       /* links, tags, primary button */
  --accent-hover: #084f6e;
  --accent-line: #1697c5;  /* diagram strokes and focus rings (non-text) */
  --on-accent: #ffffff;    /* text on accent */
  --signal: #8796ad;       /* dashed diagram lines */
  --amber: #8f5b00;        /* placeholders and drafts only */

  /* Type */
  --font-sans: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem);

  /* Space & shape */
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --section: clamp(3.5rem, 7vw, 6.5rem);
  --radius: 10px;
  --radius-sm: 6px;
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 3px; border-radius: 3px; }
main:focus { outline: none; }
h1, h2, h3 { font-weight: 650; line-height: 1.15; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 1em; height: 1em; vertical-align: -0.125em; flex: none; }

.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; border-radius: var(--radius-sm); font-weight: 600; }
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1.2; }
.wordmark-name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.wordmark-role { font-size: var(--step--1); color: var(--text-muted); }
.wordmark:hover .wordmark-name { color: var(--accent-hover); }
.site-nav ul { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a { display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font: 600 0.9375rem var(--font-sans); color: var(--text);
    background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    padding: 0.55rem 0.9rem; min-height: 44px; cursor: pointer;
  }
  .js .nav-toggle[aria-expanded="true"] { border-color: var(--accent); }
  .js .site-nav { display: none; }
  .js .site-nav.is-open {
    display: block; position: absolute; inset: 100% 0 auto 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .site-nav ul { flex-direction: column; gap: 0; }
  .no-js .site-nav ul { flex-direction: row; }
  .js .site-nav a { padding: 0.9rem 0; font-size: var(--step-1); border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); }
  .js .site-nav a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .no-js .header-inner { flex-wrap: wrap; padding-block: 0.75rem; }
}

/* ---------- Buttons & links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 46px;
  padding: 0.7rem 1.25rem; border-radius: var(--radius-sm);
  font: 600 1rem var(--font-sans); text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-quiet { border-color: var(--line-strong); color: var(--text); }
.btn-quiet:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding-block: clamp(3rem, 8vw, 6.5rem) var(--section);
}
.hero-title { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; max-width: 13ch; }
.hero-lede { font-family: var(--font-serif); font-size: var(--step-1); line-height: 1.6; color: var(--text-muted); margin-block: 1.5rem 2rem; max-width: 34em; }
.hero-figure { margin: 0; }
.hero-figure figcaption { font-size: var(--step--1); color: var(--text-faint); margin-top: 1rem; max-width: 46ch; }

/* Diagram */
.diagram { display: block; width: 100%; overflow: visible; }
.diagram--narrow { display: none; }
.dg-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.dg-title { fill: var(--text); font: 600 14px var(--font-sans); letter-spacing: -0.01em; }
.dg-sub { fill: var(--text-muted); font: 400 12px var(--font-sans); }
.dg-label { fill: var(--text-faint); font: 400 11.5px var(--font-sans); }
.dg-request { fill: none; stroke: var(--accent-line); stroke-width: 1.6; }
.dg-arrowhead { fill: var(--accent-line); }
.dg-signal { fill: none; stroke: var(--signal); stroke-width: 1.4; stroke-dasharray: 3 5; }
.dg-static .dg-node { fill: transparent; stroke-dasharray: 4 4; }
.dg-link { cursor: pointer; }
.dg-link:hover .dg-node, .dg-link:focus-visible .dg-node { stroke: var(--accent); fill: var(--surface-hover); }
.dg-link:focus-visible { outline: none; }
.dg-link:focus-visible .dg-node { stroke-width: 2; }

@media (prefers-reduced-motion: no-preference) {
  .js .dg-request { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dg-draw 0.7s cubic-bezier(.4,0,.2,1) forwards; }
  .js .dg-request[data-i="1"] { animation-delay: 0.45s; }
  .js .dg-request[data-i="2"] { animation-delay: 0.9s; }
  .js .dg-signal { opacity: 0; animation: dg-fade 0.8s ease-out 1.5s forwards; }
  .js .dg-label { opacity: 0; animation: dg-fade 0.6s ease-out 1.7s forwards; }
  .js .dg-arrowhead { opacity: 0; animation: dg-fade 0.3s ease-out 1.4s forwards; }
}
@keyframes dg-draw { to { stroke-dashoffset: 0; } }
@keyframes dg-fade { to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }
.section-head h2, .split h2, .ideas h2 { font-size: var(--step-2); }
.section-intro { font-family: var(--font-serif); color: var(--text-muted); font-size: 1.0625rem; line-height: 1.65; max-width: var(--measure); margin-block: 1rem 1.25rem; }

/* Lead article */
.lead-article { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; padding-block: 2rem; border-bottom: 1px solid var(--line); }
.lead-glyph { width: 5.5rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--accent); background: var(--surface); }
.glyph { width: 2.25rem; height: 2.25rem; color: var(--text-muted); flex: none; }
.glyph-lg { width: 3rem; height: 3rem; color: var(--accent); }
.lead-date { color: var(--text-faint); font-size: var(--step--1); }
.lead-title { font-size: var(--step-3); margin-block: 0.4rem 0.75rem; max-width: 28ch; }
.lead-title a, .entry-title a { color: var(--text); text-decoration: none; }
.lead-title a:hover, .entry-title a:hover { color: var(--accent-hover); text-decoration: underline; text-decoration-color: var(--accent); }
.lead-desc { font-family: var(--font-serif); font-size: var(--step-1); color: var(--text-muted); max-width: var(--measure); line-height: 1.6; }

/* Entry list (article previews) */
.entry {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 0 1.75rem;
  padding-block: 1.6rem; border-bottom: 1px solid var(--line); position: relative;
}
.entry-date { color: var(--text-faint); font-size: var(--step--1); padding-top: 0.2rem; }
.entry-title { font-size: var(--step-1); font-weight: 600; line-height: 1.3; max-width: 52ch; }
.entry-title a::after { content: ""; position: absolute; inset: 0; } /* whole row clickable, one link for AT */
.entry-desc { font-family: var(--font-serif); color: var(--text-muted); margin-top: 0.45rem; max-width: var(--measure); line-height: 1.6; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; margin-top: 0.8rem; font-size: var(--step--1); }
.tag { color: var(--accent); font-weight: 600; text-decoration: none; }
a.tag:hover { text-decoration: underline; }
.meta-note { color: var(--text-faint); display: inline-flex; align-items: center; gap: 0.35rem; }
.entry-glyph { align-self: start; margin-top: 0.15rem; }
.entry:hover .entry-glyph { color: var(--accent); }
.entries--compact .entry { grid-template-columns: 9.5rem minmax(0, 1fr); padding-block: 1.25rem; }
.entries--compact .entry-desc { display: none; }

/* Series: a real sequence, so it gets numbers */
.series-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.series-steps li { position: relative; padding: 1.5rem 1.25rem 1.5rem 0; display: flex; flex-direction: column; gap: 0.6rem; }
.series-steps li + li { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.step-num { font-size: var(--step-3); font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -0.03em; }
.series-steps a { color: var(--text); font-weight: 600; text-decoration: none; line-height: 1.35; }
.series-steps a:hover { color: var(--accent-hover); text-decoration: underline; }
.series-steps time { color: var(--text-faint); font-size: var(--step--1); margin-top: auto; }

/* Topic index */
.topic-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.topic-index li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.topic-index h3 { font-size: var(--step-1); }
.topic-index h3 a { color: var(--text); text-decoration: none; }
.topic-index h3 a:hover { color: var(--accent-hover); text-decoration: underline; }
.topic-index p { color: var(--text-muted); margin-top: 0.35rem; max-width: 46ch; }
.topic-index li:not(.is-empty) .glyph { color: var(--accent); }
.topic-count { font-size: var(--step--1); color: var(--text-faint) !important; }
.topic-index .is-empty h3 { color: var(--text-muted); }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding-bottom: var(--section); }
.split > div { border-top: 1px solid var(--line); padding-top: 1.5rem; }

/* ---------- Inner pages ---------- */
.page-head { padding-block: clamp(2.75rem, 7vw, 5rem) 2rem; }
.page-head h1, .article-head h1, .about h1 { font-size: var(--step-4); letter-spacing: -0.03em; font-weight: 700; }
.page-lede { font-family: var(--font-serif); font-size: var(--step-1); color: var(--text-muted); max-width: 58ch; margin-top: 1rem; line-height: 1.6; }
.page-lede a { color: var(--accent); }

/* Filters */
.filters { display: grid; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.filters[hidden] { display: none; }
.search input {
  width: 100%; max-width: 30rem; min-height: 48px; padding: 0.7rem 1rem;
  font: 400 1rem var(--font-sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.search input::placeholder { color: var(--text-faint); }
.search input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font: 500 0.9375rem var(--font-sans); color: var(--text-muted);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.45rem 0.95rem; min-height: 40px; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--text-faint); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.filter-status { font-size: var(--step--1); color: var(--text-faint); min-height: 1.4em; }
.year-group { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0 1rem; padding-top: 1rem; }
.year-group[hidden] { display: none; }
.year { font-size: var(--step-2); color: var(--text-faint); font-weight: 600; padding-top: 1.45rem; position: sticky; top: 5rem; align-self: start; }
.year-group .entry { grid-template-columns: 5rem minmax(0, 1fr) auto; }
.entry[hidden] { display: none; }
.empty-state { padding-block: 2.5rem; color: var(--text-muted); font-family: var(--font-serif); font-size: var(--step-1); max-width: 52ch; }
.empty-state[hidden] { display: none; }
.empty-state--page { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2rem; display: grid; gap: 0.75rem; }

/* Article template */
.article { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section); }
.article-head { max-width: 50rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.article-head h1 { font-size: var(--step-3); margin-top: 0.75rem; }
.article-byline { color: var(--text-faint); font-size: var(--step--1); margin-top: 1.25rem; }
.prose { font-family: var(--font-serif); font-size: 1.125rem; line-height: 1.72; max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--font-sans); font-size: var(--step-2); margin-top: 2.2em; }
.prose h3 { font-family: var(--font-sans); font-size: var(--step-1); margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose code { font-variant-ligatures: none; font-family: var(--font-mono); font-size: 0.86em; background: var(--surface); border: 1px solid var(--line); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { font-variant-ligatures: none; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; overflow-x: auto; max-width: 100%; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose blockquote { margin-inline: 0; padding-left: 1.25rem; border-left: 2px solid var(--accent); color: var(--text-muted); }
.prose figure { margin-inline: 0; } .prose figcaption { font-family: var(--font-sans); font-size: var(--step--1); color: var(--text-faint); margin-top: 0.5rem; }
.prose .table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; font-family: var(--font-sans); font-size: 0.9375rem; width: 100%; }
.prose th, .prose td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); }
.prose .callout { font-family: var(--font-sans); font-size: 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1rem 1.25rem; background: var(--surface); }
.related { margin-top: var(--section); max-width: 50rem; }
.related h2 { font-size: var(--step-2); padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.project-block h2 { margin-top: 0; }
.project-block + .project-block { margin-top: 2.2em; }

/* Projects */
.project-list li { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.project-list h2 { font-size: var(--step-2); }
.project-list h2 a { color: var(--text); text-decoration: none; }
.project-list p { color: var(--text-muted); margin-top: 0.4rem; }
.ideas { margin-block: var(--section); padding: 1.75rem; border: 1px dashed color-mix(in srgb, var(--amber) 55%, transparent); border-radius: var(--radius); }
.ideas h2 { color: var(--amber); }
.ideas ul { display: grid; gap: 1.25rem; }
.ideas h3 { font-size: var(--step-1); }
.ideas li p { color: var(--text-muted); margin-top: 0.3rem; }
.draft-flag, .placeholder-note strong { color: var(--amber); font-weight: 600; font-size: var(--step--1); }
.draft-flag { border: 1px solid var(--amber); border-radius: 999px; padding: 0.1rem 0.6rem; vertical-align: middle; }

/* Community & contact */
.contrib-group { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1rem 2rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.contrib-group h2 { font-size: var(--step-1); color: var(--text-muted); font-weight: 600; }
.contrib-group .section-intro { margin: 0; }
.contrib-list { display: grid; gap: 1.5rem; }
.contrib-list h3 { font-size: var(--step-2); }
.contrib-list p { font-family: var(--font-serif); color: var(--text-muted); margin-top: 0.35rem; max-width: var(--measure); }
.contrib-list .meta-note { font-family: var(--font-sans); font-size: var(--step--1); }
.contact-list { border-top: 1px solid var(--line); margin-bottom: var(--section); }
.contact-list li { display: grid; grid-template-columns: 14rem 1fr; gap: 0.5rem 2rem; padding-block: 1.75rem; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact-list h2 { font-size: var(--step-2); }
.contact-list p { color: var(--text-muted); font-family: var(--font-serif); font-size: var(--step-1); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2rem, 6vw, 5rem); padding-block: clamp(2.75rem, 7vw, 5rem) var(--section); }
.about .prose { margin-top: 2rem; }
.portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line-strong); display: block; }
.portrait--placeholder { display: grid; place-items: center; background: var(--surface); border-style: dashed; }
.portrait--placeholder span { font-size: 3rem; font-weight: 700; color: var(--line-strong); letter-spacing: -0.04em; }
.facts { margin: 1.5rem 0 0; display: grid; gap: 0.25rem; }
.facts dt { color: var(--text-faint); font-size: var(--step--1); margin-top: 0.75rem; }
.facts dd { margin: 0; }

/* 404 */
.notfound { padding-bottom: var(--section); }
.notfound-code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; color: var(--line-strong); margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--section); }
.page-home .site-footer { margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-block: 2.5rem 3rem; font-size: var(--step--1); color: var(--text-muted); }
.footer-about { max-width: 34rem; display: grid; gap: 0.4rem; }
.footer-name { color: var(--text); font-weight: 600; font-size: 1rem; }
.footer-disclaimer { color: var(--text-faint); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-content: start; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent-hover); }

/* ---------- Responsive ---------- */
@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; }
  .hero-title { max-width: 16ch; }
  .series-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .series-steps li:nth-child(3) { border-left: 0; padding-left: 0; }
  .series-steps li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .topic-index { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-side { order: -1; display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem; align-items: start; }
  .about-side .facts { margin: 0; }
  .about-side .facts dt:first-child { margin-top: 0; }
}
@media (max-width: 40rem) {
  .diagram--wide { display: none; }
  .diagram--narrow { display: block; }
  .hero { padding-top: 2.25rem; }
  .hero-lede { font-size: 1.0625rem; }
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  .lead-article { grid-template-columns: 1fr; gap: 1rem; padding-block: 1.5rem; }
  .lead-glyph { display: none; }
  .entry, .entries--compact .entry, .year-group .entry { grid-template-columns: 1fr; gap: 0.35rem; padding-block: 1.25rem; }
  .entry-glyph { display: none; }
  .entry-date { padding-top: 0; order: 0; }
  .year-group { grid-template-columns: 1fr; }
  .year { position: static; padding-top: 1rem; }
  .series-steps { grid-template-columns: 1fr; }
  .series-steps li, .series-steps li + li { padding: 1.1rem 0; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.25rem 0.75rem; }
  .series-steps li:first-child { border-top: 0; }
  .series-steps time { grid-column: 2; }
  .step-num { grid-row: span 2; font-size: var(--step-2); }
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .contrib-group, .contact-list li { grid-template-columns: 1fr; }
  .about-side { grid-template-columns: 6rem 1fr; }
  .prose { font-size: 1.0625rem; }
}

@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; }
}
@media print {
  .site-header, .site-footer, .filters, .hero-figure { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
