:root { --fg: #1b1d21; --bg: #fbfbf8; --muted: #5f6368; --rule: #dcdcd6; --link: #1f5fa8; --code: #f0f0ea; }
@media (prefers-color-scheme: dark) {
  :root { --fg: #e6e6e1; --bg: #141518; --muted: #9aa0a6; --rule: #33353a; --link: #8ab4f8; --code: #1f2125; }
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body { margin: 0; color: var(--fg); background: var(--bg); line-height: 1.55;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header, main, footer { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }
nav { display: flex; flex-wrap: wrap; gap: 1.1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
nav a { color: var(--muted); text-decoration: none; }
nav a.brand { color: var(--fg); font-weight: 650; margin-right: auto; letter-spacing: 0.02em; }
nav a:hover { color: var(--link); }
a { color: var(--link); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.6rem 0 0.8rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
code { background: var(--code); padding: 0.08em 0.3em; border-radius: 3px; font-size: 0.9em; }
pre { background: var(--code); padding: 0.8rem; overflow-x: auto; }
table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; font-size: 0.88rem; }
th, td { border: 1px solid var(--rule); padding: 0.35rem 0.55rem; text-align: left; vertical-align: top; }
th { background: var(--code); }
footer { margin-top: 3rem; padding: 1rem 1.25rem 2rem; border-top: 1px solid var(--rule); color: var(--muted);
  font-size: 0.85rem; }
td:first-child { white-space: nowrap; }
.meta { color: var(--muted); font-size: 0.9rem; margin-top: -0.4rem; }
.post { margin: 1.6rem 0; }
.post h2 { margin-bottom: 0.4rem; }
.post h2 a { color: var(--fg); text-decoration: none; }
.post h2 a:hover { color: var(--link); }
blockquote { margin: 1rem 0; padding: 0.2rem 1rem; border-left: 3px solid var(--rule); color: var(--muted); }
/* Figures (editorial/FIGURES.md). Chart colours are CSS variables so inline SVG follows light/dark; the categorical
   slots are the dataviz reference palette's first three, validated all-pairs against this site's two surfaces. */
:root { --viz-ink: var(--fg); --viz-ink-2: var(--muted); --viz-surface: var(--bg); --viz-grid: #e7e7e2;
  --viz-axis: #c2c2bc; --viz-s1: #257de0; --viz-s2: #f47230; --viz-s3: #00b894; }
@media (prefers-color-scheme: dark) {
  :root { --viz-grid: #2c2e33; --viz-axis: #474a50; --viz-s1: #338ced; --viz-s2: #e76624; --viz-s3: #00a888; }
}
figure.viz { margin: 1.5rem 0; }
figure.viz svg { display: block; width: 100%; height: auto; font-family: inherit; }
figure.viz figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.4rem; }
figure.viz figcaption .source { display: block; font-size: 0.8rem; margin-top: 0.2rem; }
