/* Hallmark · genre: editorial · macrostructure: Ecosystem Index (home) + Long Document (article) · nav: N6 Newspaper masthead · footer: Ft1 Mast-headed · enrichment: Tier B hand-built SVG covers + walkthrough stepper
 * theme: custom · vibe: "ledger navy, brass, hand-set" · paper: oklch(97.5% 0.007 90) · accent: oklch(49% 0.11 76)
 * display: Fraunces (roman) · body: IBM Plex Sans · outlier: IBM Plex Mono · axes: light / roman-serif / chromatic-amber ~76°
 * studied: no · context: inferred (user delegated all decisions; brand anchor taken from the CV: navy + brass)
 *
 * Every colour and font in blog.css comes through these tokens. Add a token here before using a new value.
 */
/* Hallmark · pre-emit critique: P5 H4 E4 S5 R4 V5 · contrast: pass (40–41) · nav: N6 · footer: Ft1 · slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · mobile: pass (34, 49, 50–57) */

:root {
  /* ---- Paper · ink · neutrals (all tinted: ivory toward gold, ink and greys toward navy) ---- */
  --color-paper:        oklch(97.5% 0.007 90);
  --color-paper-2:      oklch(95%   0.009 90);
  --color-paper-3:      oklch(92%   0.011 88);
  --color-ink:          oklch(21%   0.05  258);
  --color-ink-2:        oklch(34%   0.045 258);
  --color-muted:        oklch(46%   0.03  258);
  --color-rule:         oklch(84%   0.012 250);
  --color-rule-2:       oklch(90%   0.01  250);

  /* ---- The one accent: brass. Text-grade (>= 4.5:1 on paper) and a brighter sibling for dark bands ---- */
  --color-accent:        oklch(49% 0.11 76);
  --color-accent-bright: oklch(74% 0.125 82);
  --color-accent-ink:    oklch(97% 0.01 90);
  --color-focus:         oklch(52% 0.17 76);

  /* ---- Reversed band (Radar) ---- */
  --color-band:        oklch(21%   0.05  258);
  --color-band-2:      oklch(26%   0.05  258);
  --color-band-ink:    oklch(94%   0.01  90);
  --color-band-muted:  oklch(76%   0.02  258);
  --color-band-rule:   oklch(36%   0.045 258);

  /* ---- Type ---- */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-outlier: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* major-third scale on a 16px root; five working sizes + display */
  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.375rem;
  --text-xl:   1.75rem;
  --text-2xl:  2.25rem;
  --text-display-s: clamp(2rem, 2.6vw + 1rem, 3rem);
  --text-display:   clamp(2.5rem, 4vw + 1rem, 4.5rem);

  /* ---- Space: 4pt scale ---- */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --page-gutter: clamp(1rem, 4vw, 2.5rem);
  --max-page:    80rem;
  --measure:     65ch;

  /* ---- Shape ---- */
  --radius: 2px;
  --rule-hair: 1px;

  /* ---- Motion ---- */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:     cubic-bezier(0.64, 0, 0.78, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-short:  150ms;
  --dur-medium: 280ms;
  --dur-long:   600ms;

  /* ---- Z scale ---- */
  --z-base:     1;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    400;

  color-scheme: light;
}

/* Dark: same hues, lightness and chroma move. Higher surfaces are lighter. */
:root[data-theme="dark"] {
  --color-paper:        oklch(16%   0.03  258);
  --color-paper-2:      oklch(19.5% 0.035 258);
  --color-paper-3:      oklch(23%   0.038 258);
  --color-ink:          oklch(94%   0.01  90);
  --color-ink-2:        oklch(82%   0.015 90);
  --color-muted:        oklch(70%   0.02  258);
  --color-rule:         oklch(34%   0.03  258);
  --color-rule-2:       oklch(27%   0.03  258);
  --color-accent:        oklch(78% 0.115 82);
  --color-accent-bright: oklch(80% 0.12  84);
  --color-accent-ink:    oklch(18% 0.04  258);
  --color-focus:         oklch(82% 0.14  82);
  --color-band:        oklch(21%   0.045 258);
  --color-band-2:      oklch(25%   0.045 258);
  --color-band-ink:    oklch(94%   0.01  90);
  --color-band-muted:  oklch(74%   0.02  258);
  --color-band-rule:   oklch(35%   0.04  258);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-paper:        oklch(16%   0.03  258);
    --color-paper-2:      oklch(19.5% 0.035 258);
    --color-paper-3:      oklch(23%   0.038 258);
    --color-ink:          oklch(94%   0.01  90);
    --color-ink-2:        oklch(82%   0.015 90);
    --color-muted:        oklch(70%   0.02  258);
    --color-rule:         oklch(34%   0.03  258);
    --color-rule-2:       oklch(27%   0.03  258);
    --color-accent:        oklch(78% 0.115 82);
    --color-accent-bright: oklch(80% 0.12  84);
    --color-accent-ink:    oklch(18% 0.04  258);
    --color-focus:         oklch(82% 0.14  82);
    --color-band:        oklch(21%   0.045 258);
    --color-band-2:      oklch(25%   0.045 258);
    --color-band-ink:    oklch(94%   0.01  90);
    --color-band-muted:  oklch(74%   0.02  258);
    --color-band-rule:   oklch(35%   0.04  258);
    color-scheme: dark;
  }
}

/* Self-hosted fonts (SIL Open Font License). Generated by tools/fetch_fonts.py. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/fraunces-normal-400-800-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/fraunces-normal-400-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-italic-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-italic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-normal-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-normal-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-normal-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-normal-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/plex-sans-normal-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-mono-normal-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-mono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/plex-mono-normal-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/plex-mono-normal-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Components and layout. Colours, fonts, space and motion come from tokens.css only. */

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--space-xl); }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; margin: 0; overflow-wrap: anywhere; min-width: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--max-page); margin-inline: auto; padding-inline: var(--page-gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--space-md); top: -4rem; z-index: var(--z-modal); background: var(--color-ink); color: var(--color-paper); padding: var(--space-xs) var(--space-md); text-decoration: none; }
.skip:focus { top: var(--space-md); }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 1.125em; height: 1.125em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ============ Masthead (N6) ============ */
.mast { padding-top: var(--space-md); }
.mast__line { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); color: var(--color-muted); font-size: var(--text-xs); letter-spacing: 0.06em; }
.mast__date { font-variant-caps: all-small-caps; letter-spacing: 0.1em; white-space: nowrap; }
.mast__tools { display: flex; align-items: center; gap: var(--space-xs); margin-inline-start: auto; }
.lang { display: inline-flex; align-items: center; }
.lang a { display: inline-grid; place-items: center; min-width: 2.25rem; min-height: 2.25rem; text-decoration: none; letter-spacing: 0.08em; font-weight: 500; color: var(--color-muted); }
.lang a[aria-current="true"] { color: var(--color-ink); box-shadow: inset 0 -2px 0 var(--color-accent); }
.lang a:hover { color: var(--color-ink); }
.tool { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; color: var(--color-muted); transition: color var(--dur-short) var(--ease-out); }
.tool:hover { color: var(--color-ink); }
.tool__moon { display: none; }
:root[data-theme="dark"] .tool__sun { display: none; }
:root[data-theme="dark"] .tool__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tool__sun { display: none; }
  :root:not([data-theme="light"]) .tool__moon { display: block; }
}
.mast__name { display: block; margin-top: var(--space-md); text-align: center; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1; letter-spacing: -0.025em; white-space: nowrap; }
.mast__name span { color: var(--color-accent); }
.mast__tag { margin-top: var(--space-xs); text-align: center; color: var(--color-muted); font-size: var(--text-sm); }
.mast__nav { margin-top: var(--space-md); }
.mast__menu { display: none; }
.mast__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2xs) var(--space-lg); list-style: none; }
.mast__links a { display: inline-block; padding: var(--space-xs) 0; text-decoration: none; white-space: nowrap; font-weight: 500; font-size: var(--text-sm); letter-spacing: 0.02em; border-bottom: 2px solid transparent; transition: border-color var(--dur-short) var(--ease-out); }
.mast__links a:hover { border-bottom-color: var(--color-rule); }
.mast__links a[aria-current="page"] { border-bottom-color: var(--color-accent); }
.rule-double { height: 5px; margin: var(--space-xs) 0 0; border: 0; border-top: var(--rule-hair) solid var(--color-ink); border-bottom: var(--rule-hair) solid var(--color-ink); transform-origin: left; }

@media (max-width: 39.99rem) {
  .mast__date { display: none; }
  .mast__name { font-size: clamp(2rem, 11vw, 2.75rem); }
  .mast__tag { display: none; }
  .mast__menu { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 2.75rem; font-weight: 500; border-top: var(--rule-hair) solid var(--color-rule); }
  .mast__links { display: none; flex-direction: column; gap: 0; }
  .mast__nav[data-open] .mast__links { display: flex; }
  .mast__links a { display: block; padding: var(--space-sm) 0; min-height: 2.75rem; border-top: var(--rule-hair) solid var(--color-rule-2); border-bottom: 0; }
  .mast__links a[aria-current="page"] { color: var(--color-accent); }
  .mast__nav { margin-top: var(--space-sm); }
}

/* ============ Shared bits ============ */
.meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-3xs) var(--space-xs); color: var(--color-muted); font-size: var(--text-xs); letter-spacing: 0.04em; }
.meta__kind { color: var(--color-accent); font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: 0.1em; font-size: var(--text-sm); }
.meta__dot { color: var(--color-rule); margin-inline-end: var(--space-xs); }
.meta__part { white-space: nowrap; }
.link-arrow { display: inline-flex; align-items: center; gap: var(--space-xs); text-decoration: none; font-weight: 600; font-size: var(--text-sm); white-space: nowrap; border-bottom: 1px solid var(--color-ink); padding-bottom: var(--space-3xs); }
.link-arrow .icon { transition: transform var(--dur-short) var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow:active .icon { transform: translateX(5px); }
.link-arrow--band { border-bottom-color: var(--color-band-ink); }
.btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 2.75rem; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: var(--text-sm); white-space: nowrap; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.btn:hover { background: var(--color-ink); color: var(--color-paper); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-xs) var(--space-lg); margin-bottom: var(--space-lg); }
.section__title { font-size: var(--text-xl); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); list-style: none; }
.chip { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius); text-decoration: none; font-size: var(--text-sm); font-weight: 500; white-space: nowrap; transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.chip:hover { border-color: var(--color-ink); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.chip__n { margin-inline-start: var(--space-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__n, .chip[aria-current="page"] .chip__n { color: var(--color-paper-3); }

/* ============ Cover (hand-built SVG) ============ */
.cover { aspect-ratio: 16 / 9; background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); overflow: hidden; }
.cover svg { width: 100%; height: 100%; }
.cv-line { fill: none; stroke: var(--color-ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cv-soft { fill: none; stroke: var(--color-rule); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.cv-fill { fill: var(--color-paper); stroke: var(--color-ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cv-ink { fill: var(--color-ink); }
.cv-gold { fill: var(--color-accent); stroke: var(--color-accent); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cv-gold-line { fill: none; stroke: var(--color-accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; }

/* ============ Home: lead ============ */
.lead { padding-block: var(--space-lg) var(--space-2xl); }
.lead__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
.lead__intro { max-width: 46rem; margin-bottom: var(--space-lg); color: var(--color-ink-2); font-size: var(--text-lg); line-height: 1.5; }
.feature { display: grid; gap: var(--space-sm); align-content: start; }
.feature__cover { margin-top: var(--space-md); }
.feature a { text-decoration: none; }
.feature__title { font-size: var(--text-display-s); line-height: 1.05; letter-spacing: -0.025em; margin-top: var(--space-2xs); }
.feature__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--color-accent); text-underline-offset: 0.12em; }
.feature__sum { font-size: var(--text-md); line-height: 1.55; color: var(--color-ink-2); max-width: 60ch; }
.latest { align-self: start; }
.latest__title { font-size: var(--text-lg); padding-bottom: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-ink); }
.list { list-style: none; }
.list__item { padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); }
.list__item a { text-decoration: none; display: grid; gap: var(--space-2xs); }
.list__title { font-family: var(--font-display); font-weight: 650; font-size: var(--text-lg); line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.list__item a:hover .list__title { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.list__sum { color: var(--color-ink-2); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 60rem) {
  .lead__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: start; }
}

/* ============ Home: Radar band ============ */
.band { background: var(--color-band); color: var(--color-band-ink); }
.band .meta { color: var(--color-band-muted); }
.band .meta__kind { color: var(--color-accent-bright); }
.band__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); padding-block: var(--space-2xl); }
.band__title { font-size: var(--text-display-s); line-height: 1.05; margin-top: var(--space-xs); }
.band__lede { margin-top: var(--space-md); color: var(--color-band-muted); max-width: 30rem; }
.band__cta { margin-top: var(--space-lg); }
.radar-list { list-style: none; counter-reset: radar; }
.radar-list li { counter-increment: radar; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--space-sm); padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-band-rule); }
.radar-list li:first-child { border-top: var(--rule-hair) solid var(--color-band-rule); }
.radar-list li::before { content: counter(radar, decimal-leading-zero); font-family: var(--font-outlier); font-size: var(--text-sm); color: var(--color-accent-bright); padding-top: 0.2em; }
.radar-list a { text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); line-height: 1.25; overflow-wrap: anywhere; }
.radar-list a:hover { text-decoration: underline; text-decoration-color: var(--color-accent-bright); text-underline-offset: 0.15em; text-decoration-thickness: 2px; }
.radar-list__src { display: block; margin-top: var(--space-3xs); color: var(--color-band-muted); font-size: var(--text-xs); letter-spacing: 0.04em; }
@media (min-width: 60rem) {
  .band__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-2xl); }
}

/* ============ Home: topics ============ */
.topics { list-style: none; border-top: var(--rule-hair) solid var(--color-ink); }
.topic { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); padding-block: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.topic__name { font-size: var(--text-xl); line-height: 1.1; }
.topic__name a { text-decoration: none; }
.topic__name a:hover { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.topic__desc { color: var(--color-ink-2); max-width: 36rem; }
.topic__latest { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.topic__latest a { color: var(--color-ink); text-decoration-color: var(--color-accent); text-underline-offset: 0.18em; }
.topic__count { color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 48rem) {
  .topic { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: var(--space-xl); align-items: baseline; }
  .topic__latest { margin-top: 0; }
}

/* ============ Use cases ============ */
.ucs { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl) var(--space-lg); list-style: none; }
.uc a { display: grid; gap: var(--space-sm); text-decoration: none; align-content: start; }
.uc__title { font-size: var(--text-xl); line-height: 1.12; }
.uc a:hover .uc__title { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.uc__sum { color: var(--color-ink-2); max-width: 60ch; }
.uc__badge { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--color-ink); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; }
@media (min-width: 48rem) {
  .ucs { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .uc:nth-child(1) { grid-column: span 7; }
  .uc:nth-child(2) { grid-column: span 5; }
  .uc:nth-child(n+3) { grid-column: span 4; }
  .uc:nth-child(1) .uc__title { font-size: var(--text-2xl); }
}

/* ============ Author band ============ */
.author { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); padding-block: var(--space-2xl); border-top: var(--rule-hair) solid var(--color-ink); }
.author__name { font-size: var(--text-xl); }
.author__role { color: var(--color-muted); font-size: var(--text-sm); margin-top: var(--space-2xs); }
.author__bio { color: var(--color-ink-2); max-width: 62ch; }
.author__links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin-top: var(--space-md); }
@media (min-width: 60rem) {
  .author { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-2xl); }
}

/* ============ Listing pages ============ */
.page-head { padding-block: var(--space-xl) var(--space-lg); }
.page-head__title { font-size: var(--text-display-s); line-height: 1.04; letter-spacing: -0.025em; max-width: 22ch; }
.page-head__lede { margin-top: var(--space-md); max-width: 42rem; font-size: var(--text-lg); line-height: 1.5; color: var(--color-ink-2); }
.filters { display: grid; gap: var(--space-sm); margin-block: var(--space-lg) var(--space-xl); }
.year { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--color-ink); margin-block: var(--space-lg) var(--space-xs); padding-bottom: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-ink); }
.empty { color: var(--color-muted); padding-block: var(--space-xl); }

/* ============ Article ============ */
.article { max-width: 64rem; margin-inline: auto; padding-inline: var(--page-gutter); padding-block: var(--space-xl) var(--space-2xl); }
.article__head { max-width: 52rem; }
.article__crumb { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--space-md); }
.article__crumb a { text-decoration-color: var(--color-rule); text-underline-offset: 0.2em; }
.article__title { font-size: var(--text-display); line-height: 1.03; letter-spacing: -0.03em; margin-block: var(--space-sm) var(--space-md); }
.article__lede { font-size: var(--text-lg); line-height: 1.5; color: var(--color-ink-2); max-width: 42rem; }
.article__meta { margin-top: var(--space-lg); padding-block: var(--space-sm); border-block: var(--rule-hair) solid var(--color-rule); }
.article__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); margin-top: var(--space-xl); }
.article__media { margin-top: var(--space-xl); }
@media (min-width: 64rem) {
  .article__grid { grid-template-columns: minmax(0, 42rem) 14rem; justify-content: space-between; gap: var(--space-2xl); }
  .rail { position: sticky; top: var(--space-lg); align-self: start; }
}
.rail { display: grid; gap: var(--space-lg); font-size: var(--text-sm); }
.rail__title { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--space-xs); }
.toc ol { list-style: none; border-top: var(--rule-hair) solid var(--color-ink); }
.toc li { border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.toc a { display: block; padding: var(--space-xs) 0; text-decoration: none; color: var(--color-ink-2); line-height: 1.35; transition: color var(--dur-short) var(--ease-out); }
.toc a:hover, .toc a[aria-current="true"] { color: var(--color-ink); }
.toc a[aria-current="true"] { box-shadow: inset 2px 0 0 var(--color-accent); padding-inline-start: var(--space-sm); }
.toc .toc__sub a { padding-inline-start: var(--space-md); color: var(--color-muted); }
.share { display: grid; gap: var(--space-2xs); }
.share a, .share button { display: flex; align-items: center; gap: var(--space-xs); min-height: 2.5rem; text-decoration: none; color: var(--color-ink-2); text-align: start; }
.share a:hover, .share button:hover { color: var(--color-ink); }
.share [data-copied] { color: var(--color-accent); }
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: var(--z-sticky); pointer-events: none; }
.progress__bar { height: 100%; background: var(--color-accent); transform-origin: left; transform: scaleX(0); }

/* ============ Prose ============ */
.prose { font-size: var(--text-md); line-height: 1.7; max-width: var(--measure); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: var(--text-xl); line-height: 1.15; margin-top: 2.2em; scroll-margin-top: var(--space-lg); }
.prose h3 { font-size: var(--text-lg); line-height: 1.2; margin-top: 1.9em; scroll-margin-top: var(--space-lg); }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose a { text-decoration-line: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: text-decoration-thickness var(--dur-short) var(--ease-out); }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--color-accent); }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose code { font-family: var(--font-outlier); font-size: 0.86em; background: var(--color-paper-2); padding: 0.08em 0.35em; border-radius: var(--radius); overflow-wrap: anywhere; }
.prose pre { margin-inline: calc(var(--space-md) * -1); padding: var(--space-md); background: var(--color-paper-2); border-block: var(--rule-hair) solid var(--color-ink); overflow-x: auto; font-size: var(--text-sm); line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.prose .codeblock__label { display: block; font-weight: 600; font-size: var(--text-xs); color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--space-xs); }
.prose blockquote { margin-inline: 0; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-ink); font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); line-height: 1.35; letter-spacing: -0.01em; }
.prose blockquote p + p { margin-top: 0.6em; }
.prose blockquote cite { display: block; margin-top: var(--space-xs); font-family: var(--font-body); font-style: normal; font-size: var(--text-sm); color: var(--color-muted); letter-spacing: 0; }
.prose hr { border: 0; text-align: center; height: 1.5em; margin-block: 2em; }
.prose hr::before { content: "◆"; color: var(--color-accent); font-size: 0.7em; letter-spacing: 1em; }
.prose figure { margin-inline: 0; }
.prose figure img { width: 100%; height: auto; border: var(--rule-hair) solid var(--color-rule); }
.prose figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); line-height: 1.45; }
.tablewrap { overflow-x: auto; margin-inline: calc(var(--space-md) * -1); padding-inline: var(--space-md); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.45; min-width: 30rem; }
.prose th { text-align: start; font-weight: 600; font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule-hair) solid var(--color-ink); }
.prose td { padding: var(--space-sm) var(--space-sm) var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: top; }
.callout, .keypoints { padding: var(--space-md) var(--space-lg); background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); font-size: var(--text-base); line-height: 1.6; }
.callout__title, .keypoints__title { font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); margin-bottom: var(--space-xs); font-weight: 600; }
.callout > * + *, .keypoints > * + * { margin-top: 0.7em; }
.keypoints { background: none; border-inline: 0; border-block: 3px double var(--color-ink); padding-inline: 0; }
.keypoints ul { padding-inline-start: 1.2em; }
.prose--radar { counter-reset: item; }
.prose--radar h3 { counter-increment: item; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-xs); align-items: baseline; margin-top: 2.4em; padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-ink); }
.prose--radar h3::before { content: counter(item, decimal-leading-zero); font-family: var(--font-outlier); font-weight: 500; font-size: var(--text-sm); color: var(--color-accent); letter-spacing: 0; }
.prose--radar h3 a { text-decoration-color: var(--color-accent); text-underline-offset: 0.14em; text-decoration-thickness: 1px; }
.prose--radar h3 + p { margin-top: 0.5em; }
.item__meta { font-size: var(--text-sm); color: var(--color-muted); letter-spacing: 0.02em; padding-inline-start: calc(2.5rem + var(--space-xs)); font-style: normal; }
.item__meta em { font-style: normal; }
.prose--radar h3 ~ p:not(.item__meta), .prose--radar h3 ~ ul, .prose--radar h3 ~ blockquote { padding-inline-start: calc(2.5rem + var(--space-xs)); }
@media (max-width: 39.99rem) {
  .prose--radar h3 { grid-template-columns: 2rem minmax(0, 1fr); }
  .item__meta, .prose--radar h3 ~ p:not(.item__meta), .prose--radar h3 ~ ul, .prose--radar h3 ~ blockquote { padding-inline-start: 0; }
}

/* ============ Sources ============ */
.sources { max-width: var(--measure); margin-top: var(--space-2xl); }
.sources__title { font-size: var(--text-lg); padding-bottom: var(--space-xs); border-bottom: var(--rule-hair) solid var(--color-ink); }
.sources ol { list-style: none; counter-reset: src; }
.sources li { counter-increment: src; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--space-xs); padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); line-height: 1.5; }
.sources li::before { content: counter(src); font-family: var(--font-outlier); color: var(--color-muted); }
.sources a { text-underline-offset: 0.18em; text-decoration-color: var(--color-accent); overflow-wrap: anywhere; }
.sources__pub { color: var(--color-muted); }

/* ============ Disclosure, related, pager ============ */
.note { max-width: var(--measure); margin-top: var(--space-xl); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.55; }
.related { margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-ink); max-width: 52rem; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); margin-top: var(--space-xl); }
.pager a { display: grid; gap: var(--space-3xs); padding-block: var(--space-sm); text-decoration: none; border-top: var(--rule-hair) solid var(--color-rule); }
.pager__dir { font-size: var(--text-xs); color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.pager__title { font-family: var(--font-display); font-weight: 650; font-size: var(--text-md); line-height: 1.25; }
.pager a:hover .pager__title { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.15em; }
@media (min-width: 40rem) { .pager { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); } .pager__next { text-align: end; } }

/* ============ Video ============ */
.video { margin: 0; }
.video__frame { position: relative; aspect-ratio: 16 / 9; background: var(--color-ink); border: var(--rule-hair) solid var(--color-rule); overflow: hidden; }
.video__frame video, .video__frame iframe, .video__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video__play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-accent-ink); }
.video__play span { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 3rem; padding: 0 var(--space-lg); background: var(--color-ink); border: var(--rule-hair) solid var(--color-accent-bright); font-weight: 600; font-size: var(--text-sm); transition: background-color var(--dur-short) var(--ease-out); }
.video__play:hover span { background: var(--color-ink-2); }
.video figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.video details { margin-top: var(--space-xs); font-size: var(--text-sm); }
.video summary { cursor: pointer; min-height: 2.5rem; display: flex; align-items: center; font-weight: 600; }
.video details p { color: var(--color-ink-2); max-width: var(--measure); margin-top: var(--space-xs); line-height: 1.6; }

/* ============ Walkthrough ============ */
.walk { border: var(--rule-hair) solid var(--color-ink); background: var(--color-paper); padding: var(--space-lg) var(--space-md); margin-inline: calc(var(--space-md) * -1); }
.walk__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); line-height: 1.2; }
html:not(.js) [data-filters] { display: none; }
.walk__lead { margin-top: var(--space-xs); color: var(--color-ink-2); font-size: var(--text-base); line-height: 1.55; max-width: 52ch; }
.walk__steps { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: var(--space-lg); counter-reset: step; }
.walk__step { counter-increment: step; }
.prose .walk__steps { padding-inline-start: 0; }
.prose .walk__step + .walk__step { margin-top: 0; }
.walk__node { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: baseline; gap: var(--space-xs); width: 100%; min-height: 2.75rem; padding: var(--space-sm) var(--space-xs); text-align: start; border-top: 2px solid var(--color-rule-2); color: var(--color-muted); transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.walk__node:hover { color: var(--color-ink); }
.walk__idx { font-family: var(--font-outlier); font-size: var(--text-xs); }
.walk__label { font-weight: 600; font-size: var(--text-sm); line-height: 1.3; }
.walk__step.is-active .walk__node { color: var(--color-ink); border-top-color: var(--color-accent); }
.walk__step.is-done .walk__node { border-top-color: var(--color-ink); }
.walk__panel { margin-top: var(--space-md); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.walk__detail > * + * { margin-top: var(--space-xs); }
.walk__kind { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 600; font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.walk__kind::before { content: ""; width: 0.6rem; height: 0.6rem; background: var(--color-accent); }
.walk__kind[data-kind="ai"]::before { border-radius: 50%; }
.walk__kind[data-kind="human"]::before { background: none; border: 2px solid var(--color-accent); border-radius: 50%; }
.walk__kind[data-kind="system"]::before { background: none; border: 2px solid var(--color-accent); }
.walk__kind[data-kind="rule"]::before { transform: rotate(45deg) scale(0.85); }
.walk__name { font-size: var(--text-lg); font-family: var(--font-display); font-weight: 700; }
.walk__text { color: var(--color-ink-2); font-size: var(--text-base); line-height: 1.6; max-width: 60ch; }
.walk__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-md); }
.walk__btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 2.75rem; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.walk__btn:hover { background: var(--color-ink); color: var(--color-paper); }
.walk__count { margin-inline-start: auto; font-family: var(--font-outlier); font-size: var(--text-sm); color: var(--color-muted); }
html:not(.js) .walk__controls { display: none; }
.js .walk__detail { display: none; }
.js .walk__detail.is-active { display: block; animation: walk-in var(--dur-medium) var(--ease-out); }
html:not(.js) .walk__detail { padding-block: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); }
@keyframes walk-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Phones: the step list collapses to a numbered progress strip; the panel carries the step name. */
@media (max-width: 47.99rem) {
  .walk__steps { grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr)); gap: var(--space-2xs); }
  .walk__node { grid-template-columns: minmax(0, 1fr); justify-items: center; padding-inline: 0; }
  .walk__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  html:not(.js) .walk__label { position: static; width: auto; height: auto; clip: auto; white-space: normal; }
  html:not(.js) .walk__steps { grid-template-columns: minmax(0, 1fr); }
  .walk__controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .walk__btn { justify-content: center; padding-inline: var(--space-xs); }
  .walk__count { grid-column: 1 / -1; justify-self: end; order: -1; }
}
@media (min-width: 48rem) {
  .walk { padding: var(--space-lg); margin-inline: 0; }
  .walk__steps { grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr)); gap: var(--space-xs); }
  .walk__node { grid-template-columns: minmax(0, 1fr); gap: var(--space-3xs); padding-inline: 0; }
}

/* ============ Search dialog ============ */
.search { width: min(40rem, calc(100% - 2 * var(--page-gutter))); max-height: 80dvh; margin: 10dvh auto 0; padding: 0; border: var(--rule-hair) solid var(--color-ink); background: var(--color-paper); color: var(--color-ink); overflow: hidden; }
.search::backdrop { background: color-mix(in oklch, var(--color-ink) 55%, transparent); }
.search[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.search__bar { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-md); border-bottom: var(--rule-hair) solid var(--color-ink); }
.search__input { flex: 1; min-width: 0; min-height: 3rem; border: 0; background: none; color: inherit; font: inherit; font-size: var(--text-md); }
.search__input:focus { outline: none; }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__bar:focus-within { box-shadow: inset 0 -2px 0 var(--color-accent); }
.search__close { min-width: 3rem; min-height: 3rem; display: grid; place-items: center; color: var(--color-muted); }
.search__results { overflow-y: auto; list-style: none; padding: var(--space-xs) var(--space-md) var(--space-md); }
.search__results a { display: grid; gap: var(--space-3xs); padding: var(--space-sm) 0; text-decoration: none; border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.search__results a:hover .list__title, .search__results a:focus-visible .list__title { text-decoration: underline; text-decoration-color: var(--color-accent); }
.search__hint { padding: var(--space-md) 0; color: var(--color-muted); font-size: var(--text-sm); }

/* ============ Footer (Ft1) ============ */
.foot { margin-top: var(--space-3xl); border-top: 5px double var(--color-ink); padding-block: var(--space-xl) var(--space-lg); }
.foot__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
.foot__name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); letter-spacing: -0.02em; }
.foot__tag { color: var(--color-muted); margin-top: var(--space-2xs); max-width: 32rem; font-size: var(--text-sm); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); list-style: none; align-content: start; }
.foot__links a { display: inline-block; padding: var(--space-xs) 0; text-decoration: none; font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.foot__links a:hover { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.18em; }
.foot__legal { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-xs); line-height: 1.55; max-width: 75ch; }
@media (min-width: 48rem) { .foot__row { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); } .foot__links { justify-content: flex-end; } }

/* ============ Gateway / 404 ============ */
.gate { min-height: 70dvh; display: grid; align-content: center; gap: var(--space-lg); padding-block: var(--space-2xl); }
.gate__title { font-size: var(--text-display); max-width: 14ch; }
.gate__links { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ============ One orchestrated entrance (home) ============ */
@media (prefers-reduced-motion: no-preference) {
  .enter .rule-double { animation: rule-in var(--dur-long) var(--ease-out) both; }
  .enter .lead__intro, .enter .feature, .enter .latest { animation: rise var(--dur-long) var(--ease-out) both; }
  .enter .lead__intro { animation-delay: 120ms; }
  .enter .feature { animation-delay: 220ms; }
  .enter .latest { animation-delay: 320ms; }
}
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ============ Print ============ */
@media print {
  .mast__tools, .mast__nav, .rail, .progress, .share, .foot__links, .walk__controls, .search, .pager, .related { display: none !important; }
  body { background: none; color: var(--color-ink); }
  .article { max-width: none; padding: 0; }
  .article__grid { display: block; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  .js .walk__detail { display: block; }
}

/* ============ Interaction states not covered above ============ */
.chip:active, .walk__btn:active, .tool:active, .search__close:active, .mast__menu:active { transform: translateY(1px); }
.chip[disabled], .walk__btn[disabled], .tool[disabled] { opacity: 0.55; cursor: not-allowed; }
.walk__node:active { color: var(--color-ink); }
.search__close:hover { color: var(--color-ink); }

/* Formerly inline styles (CSP: style-src 'self') */
.latest__more { margin-top: var(--space-md); }
.page-body { padding-bottom: var(--space-xl); }
.walk[data-steps="3"] { --steps: 3; }
.walk[data-steps="4"] { --steps: 4; }
.walk[data-steps="5"] { --steps: 5; }
.walk[data-steps="6"] { --steps: 6; }
.walk[data-steps="7"] { --steps: 7; }
.walk[data-steps="8"] { --steps: 8; }
.walk[data-steps="9"] { --steps: 9; }
