/* ==========================================================================
   MetaPrompt — shared stylesheet (CLAUDE.md §7)
   Direction C "Layer Cutaway" in the P1 "Sky to Bedrock" palette, set in
   Poppins (display) + Plus Jakarta Sans (body/UI) + JetBrains Mono (figures).
   Dark theme: <html data-theme="dark">, set by the inline head snippet before
   first paint and by the toggle in main.js. Components use ONLY the tokens in
   §1, so both themes follow automatically.

   Layer colours: every element that belongs to a category carries
   data-layer="<category slug>" (on the post <article>, a card, a hub, a
   Latest item…). §1b maps the slug to --layer and the stack marker; table
   header rules, bars, the #1 tint and charts read --layer.
   The class structure follows DabPop's (simplecodeworker/dbpp) via MetaRoles.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light;
  /* Sky to Bedrock, day */
  --paper: #F7F6F2;        /* page ground (warm off-white) */
  --surface: #FFFFFF;      /* cards, top bar, tables, inputs */
  --head: #F1EFE9;         /* table heads, hovers, Key facts labels */
  --ink: #111418;          /* headings, figures, the pulled-out layer's outline */
  --body: #2E333B;         /* long-form copy */
  --muted: #5A606A;        /* labels, captions, "as of" lines */
  --rule: #DDDBD3;         /* borders, dividers */
  --accent: #A3460F;       /* links (copper) */
  --on-accent: #FFFFFF;
  --fill: #111418;         /* primary buttons */
  --on-fill: #FFFFFF;
  --band: #111418;         /* dark band: category list, footer */
  --band-text: #F7F6F2;
  --band-muted: #A8ADB5;   /* 8.2:1 on the band */
  --band-accent: #F09A5E;  /* 8.3:1 on the band */
  --band-rule: rgba(247, 246, 242, .16);
  --track: #ECEAE3;        /* behind in-row and chart bars */
  --tint: #F9F1ED;         /* #1 row fallback (copper at 8%); see .dt-ranking */
  --tint-pct: 8%;
  --img: #EEEDE7;          /* placeholder block behind a missing image */
  --focus: #A3460F;
  /* The ten strata, top of the stack (sky) to the bottom (bedrock), CLAUDE.md §4 order */
  --l01: #4A74C9;          /* Agents */
  --l02: #3A5FB0;          /* Language Models */
  --l03: #2F4C93;          /* Voice & Audio */
  --l04: #263D78;          /* Image, Video & Avatars */
  --l05: #55606F;          /* Benchmarks & AGI */
  --l06: #7A6A4F;          /* Embodied AI */
  --l07: #956A12;          /* Tokens & Economics */
  --l08: #B0531C;          /* Chips & Memory */
  --l09: #8A3A1E;          /* Data Centers & Energy */
  --l10: #2B2B2B;          /* Policy & Standards */
  --layer: var(--ink);     /* overridden by [data-layer] */
  --strata: linear-gradient(90deg,
    var(--l01) 0 10%, var(--l02) 10% 20%, var(--l03) 20% 30%, var(--l04) 30% 40%, var(--l05) 40% 50%,
    var(--l06) 50% 60%, var(--l07) 60% 70%, var(--l08) 70% 80%, var(--l09) 80% 90%, var(--l10) 90% 100%);

  --r: 14px;               /* cards, panels, tables */
  --r-sm: 10px;            /* inputs, buttons, media */
  --r-pill: 999px;         /* chips, badges */

  --f-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --h1: 52px;
  --h2: 30px;
  --ct: 19px;
  --bar-h: 68px;           /* sticky top bar height, for scroll-padding */
}

:root[data-theme="dark"] {
  color-scheme: dark;
  /* Sky to Bedrock, night */
  --paper: #0F1115;
  --surface: #171A20;
  --head: #1E2128;
  --ink: #EEEDE8;
  --body: #C9CBD0;
  --muted: #9298A2;
  --rule: #2A2E36;
  --accent: #F09A5E;
  --on-accent: #0F1115;
  --fill: #EEEDE8;
  --on-fill: #0F1115;
  --band: #000000;
  --band-text: #EEEDE8;
  --band-muted: #A8ADB5;
  --band-accent: #F09A5E;
  --band-rule: rgba(238, 237, 232, .16);
  --track: #262A31;
  --tint: #312826;
  --tint-pct: 10%;
  --img: #1D2027;
  --focus: #F09A5E;
  --l01: #A9C3F8;
  --l02: #8EAEF0;
  --l03: #7896E2;
  --l04: #6680D0;
  --l05: #A3ABB8;
  --l06: #C2B08A;
  --l07: #E2B04E;
  --l08: #EE8C4E;
  --l09: #DB7A5C;
  --l10: #D8D6CF;
}

/* 1b. Layers: category slug → layer colour and stack position ------------- */
[data-layer="agents"]              { --layer: var(--l01); }
[data-layer="language-models"]     { --layer: var(--l02); }
[data-layer="voice-audio"]         { --layer: var(--l03); }
[data-layer="image-video-avatars"] { --layer: var(--l04); }
[data-layer="benchmarks-agi"]      { --layer: var(--l05); }
[data-layer="embodied-ai"]         { --layer: var(--l06); }
[data-layer="tokens-economics"]    { --layer: var(--l07); }
[data-layer="chips-memory"]        { --layer: var(--l08); }
[data-layer="data-centers-energy"] { --layer: var(--l09); }
[data-layer="policy-standards"]    { --layer: var(--l10); }

/* Stack-layer marker: the ten strata in miniature, the post's layer pulled out.
   <span class="stack" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></span>
   inside any [data-layer] ancestor. Add .stack-sm for the small inline version
   beside a layer label, .stack-fill to fill an image box. */
.stack { display: inline-flex; flex-direction: column; gap: 2px; width: 18px; flex: none; }
.stack i { display: block; height: 3px; border-radius: 1px; background: var(--ink); opacity: .3; }
.stack i:nth-child(1) { background: var(--l01); }
.stack i:nth-child(2) { background: var(--l02); }
.stack i:nth-child(3) { background: var(--l03); }
.stack i:nth-child(4) { background: var(--l04); }
.stack i:nth-child(5) { background: var(--l05); }
.stack i:nth-child(6) { background: var(--l06); }
.stack i:nth-child(7) { background: var(--l07); }
.stack i:nth-child(8) { background: var(--l08); }
.stack i:nth-child(9) { background: var(--l09); }
.stack i:nth-child(10) { background: var(--l10); }
[data-layer="agents"] .stack i:nth-child(1),
[data-layer="language-models"] .stack i:nth-child(2),
[data-layer="voice-audio"] .stack i:nth-child(3),
[data-layer="image-video-avatars"] .stack i:nth-child(4),
[data-layer="benchmarks-agi"] .stack i:nth-child(5),
[data-layer="embodied-ai"] .stack i:nth-child(6),
[data-layer="tokens-economics"] .stack i:nth-child(7),
[data-layer="chips-memory"] .stack i:nth-child(8),
[data-layer="data-centers-energy"] .stack i:nth-child(9),
[data-layer="policy-standards"] .stack i:nth-child(10) { opacity: 1; transform: translateX(22%); }
.stack-fill { flex: 1; width: 100%; align-self: stretch; justify-content: center; gap: 5px; padding: 0 16%; }
.stack-fill i { height: 10px; border-radius: 2px; }
[data-layer="agents"] .stack-fill i:nth-child(1),
[data-layer="language-models"] .stack-fill i:nth-child(2),
[data-layer="voice-audio"] .stack-fill i:nth-child(3),
[data-layer="image-video-avatars"] .stack-fill i:nth-child(4),
[data-layer="benchmarks-agi"] .stack-fill i:nth-child(5),
[data-layer="embodied-ai"] .stack-fill i:nth-child(6),
[data-layer="tokens-economics"] .stack-fill i:nth-child(7),
[data-layer="chips-memory"] .stack-fill i:nth-child(8),
[data-layer="data-centers-energy"] .stack-fill i:nth-child(9),
[data-layer="policy-standards"] .stack-fill i:nth-child(10) { transform: translateX(8%); box-shadow: 0 0 0 2px var(--ink); }

/* Layer label: "L08 · Chips & Memory", always with its marker (colour is never the only cue) */
.layer-tag {
  display: inline-flex; align-items: center; gap: 10px; min-height: 32px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink); text-decoration: none;
}
a.layer-tag:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.layer-tag .meta { font-weight: 400; color: var(--muted); }

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.6;
}
/* width: 100% stops a narrow page (About, Terms) from shrinking to its text and floating off-centre */
body > main { flex: 1 0 auto; width: 100%; }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
sup, sub { line-height: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100; padding: 10px 16px;
  font-weight: 700; color: var(--on-fill); background: var(--fill); border-radius: var(--r-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Every figure that must line up is in JetBrains Mono: Poppins has no tabular digits (CLAUDE.md §7) */
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums lining-nums; }
.kicker, .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.4; }
.kicker { font-family: var(--f-display); color: var(--accent); }
.label { color: var(--muted); }

/* Figure labels (CLAUDE.md §1): drawn in CSS, always with the word.
   <span class="fig fig-measured">Measured</span> · fig-vendor (Vendor-stated) · fig-estimate (Estimate) */
.fig { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.3; white-space: nowrap; color: var(--ink); }
.fig::before { content: ""; flex: none; width: 10px; height: 10px; box-sizing: border-box; }
.fig-measured::before { border-radius: 50%; background: var(--ink); }
.fig-vendor::before { border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.fig-estimate::before { border-radius: 50%; border: 1.5px dashed var(--ink); }

/* Capacity status (CLAUDE.md §1): pattern + word, in the Data Centers & Energy layer colour.
   <span class="cap cap-operational">Operational</span> · cap-construction (Under construction) · cap-announced (Announced) */
.cap { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; white-space: nowrap; color: var(--ink); }
.cap::before { content: ""; flex: none; width: 28px; height: 10px; box-sizing: border-box; border-radius: 2px; }
.cap-operational::before { background: var(--l09); }
.cap-construction::before { border: 1.5px solid var(--l09); background: repeating-linear-gradient(135deg, var(--l09) 0 3px, transparent 3px 7px); }
.cap-announced::before { border: 1.5px dashed var(--l09); }

/* 3. Layout ---------------------------------------------------------------- */
.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }
main { display: block; }

/* 4. Top bar (sticky) + wordmark ------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
/* The ten strata as a thin rule along the top of every page */
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--strata); }
.topbar-in { display: flex; align-items: center; gap: 12px 24px; min-height: var(--bar-h); padding-top: 4px; }
.mini-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
/* W1 layer mark: four bars, the third pulled out (CLAUDE.md §7).
   <svg class="mark" viewBox="0 0 30 30" aria-hidden="true"><rect class="m1" x="2" y="3" width="22" height="5" rx="1.5"/>
   <rect class="m2" x="2" y="10" width="22" height="5" rx="1.5"/><rect class="m3" x="7" y="17" width="22" height="5" rx="1.5"/>
   <rect class="m4" x="2" y="24" width="22" height="5" rx="1.5"/></svg> */
.mark { width: 30px; height: 30px; flex: none; }
.mark .m1 { fill: var(--l02); }
.mark .m2 { fill: var(--l05); }
.mark .m3 { fill: var(--l08); }
.mark .m4 { fill: var(--l09); }
/* "MetaPrompt" as one word, Poppins Bold, in ink; never split, never a gradient, never a layer colour */
.wordmark { font-family: var(--f-display); font-weight: 700; font-size: 24px; line-height: 1; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.topbar-tag { font-size: 13px; color: var(--muted); white-space: nowrap; padding-left: 14px; border-left: 1px solid var(--rule); }
.mast-panel { display: flex; flex: 1; align-items: center; gap: 8px 20px; order: 2; }
.topbar-in > .theme-toggle { order: 3; }
.topbar-in > .nav-toggle { order: 4; }
.util-nav { display: flex; flex-wrap: nowrap; margin-left: auto; white-space: nowrap; }
.util-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--body);
}
.util-nav a:hover, .util-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.mast-tools { display: flex; align-items: center; gap: 10px; }
.mast-tools form { display: flex; margin: 0; }

.search {
  display: flex; align-items: center; gap: 8px; height: 44px; min-width: 220px; padding: 0 12px;
  color: var(--muted); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-sm);
}
.search .ico { width: 16px; height: 16px; }
.search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }

.theme-toggle, .nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px;
  font: inherit; font-size: 13px; font-weight: 700;
  color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); cursor: pointer;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--ink); }
.theme-toggle .ico { width: 16px; height: 16px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
html:not(.js) .theme-toggle { display: none; }
.nav-toggle { display: none; padding: 0; }

/* 5. Masthead + category strip (index + category pages) -------------------- */
.masthead { padding: 28px 0 0; }
.masthead h1, .masthead .mast-title { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; }
.mast-tag { margin-top: 8px; font-size: 16px; color: var(--muted); }
.cat-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 4px; }
.cat-strip .chip { background: var(--surface); }
/* Strip chips carry data-layer and a small square in their layer colour, beside the name */
.cat-strip .chip[data-layer]::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 2px; background: var(--layer); }
.cat-strip .chip.is-active, .cat-strip .chip[aria-current="page"] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.cat-strip .chip.is-active::before, .cat-strip .chip[aria-current="page"]::before { box-shadow: 0 0 0 1.5px var(--surface); }

/* Chips (category strip, post tags, tag cloud, type filter) */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--body); background: transparent; border: 1px solid var(--rule); border-radius: var(--r-pill);
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip.is-active, .chip[aria-current="page"] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.chip-n { font-family: var(--f-mono); font-size: 12px; opacity: .8; }

/* 6. Homepage hero (latest post): image box left, copy right on the paper --- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 24px 48px;
  padding: 28px 0 8px;
}
.hero-media { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-media .media { flex: 1; min-height: 320px; border: 1px solid var(--rule); border-radius: var(--r); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 18px; min-width: 0; padding: 12px 0; }
.hero-eyebrow { font-family: var(--f-mono); font-size: 13px; font-weight: 500; color: var(--muted); }
.hero-cat { align-self: flex-start; }
.hero-t { font-size: clamp(32px, 3.8vw, var(--h1)); line-height: 1.05; letter-spacing: -.03em; }
.hero-t a { text-decoration: none; }
.hero-t a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.hero-blurb { max-width: 56ch; font-size: 18px; line-height: 1.6; color: var(--body); }
.stat-list {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 0; padding: 0; list-style: none;
}
.stat-list li {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm);
}
.stat-list li > span:first-child { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-list .val { font-family: var(--f-mono); font-size: 21px; font-weight: 500; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-list .val .fig { font-family: var(--f-body); font-size: 14px; font-weight: 600; }
.hero-cta { align-self: flex-start; }

/* 7. Media boxes (hero, cards, post lead) ---------------------------------- */
.media, .card-img, .post-lead {
  position: relative; display: grid; place-items: center; overflow: hidden;
  color: var(--layer); background: var(--img);
}
.media { aspect-ratio: 4 / 3; }
/* A drawn diagram sizes to its content instead of being cropped to 4:3 */
.media.is-diagram { aspect-ratio: auto; padding: 24px; background: var(--surface); }
/* No image: the stack marker fills the box (display:flex so the strata stretch across) */
.media.is-stack, .card-img.is-stack, .post-lead.is-stack { display: flex; }
a.media { text-decoration: none; }
.media img, .card-img img, .post-lead img, .media svg.chart-svg { width: 100%; height: 100%; object-fit: cover; }
/* YouTube's hqdefault thumbnails are 4:3 with the 16:9 picture letterboxed: zoom past the bars */
.media img[src*="img.youtube.com/"], .card-img img[src*="img.youtube.com/"] { transform: scale(1.34); }
.media > .ico { width: 120px; height: 120px; stroke-width: 1; }
.badge {
  position: absolute; top: 10px; z-index: 1; padding: 4px 10px; line-height: 1.3;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; border-radius: var(--r-pill);
}
.badge-cat { left: 10px; max-width: calc(100% - 110px); color: var(--ink); background: var(--surface); overflow-wrap: anywhere; box-shadow: 0 0 0 1px var(--rule); }
.badge-n { right: 10px; color: var(--on-fill); background: var(--fill); text-transform: uppercase; letter-spacing: .02em; }
.caption, .post-lead-caption { font-size: 14px; text-align: center; color: var(--muted); }

/* 8. Buttons + links ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  font-family: var(--f-body); font-size: 15px; font-weight: 700;
  color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); cursor: pointer;
}
.btn:hover { border-color: var(--ink); }
/* Primary: ink fill (18.5:1 light, 16.1:1 dark) */
.btn-primary { color: var(--on-fill); background: var(--fill); border-color: var(--fill); }
.btn-primary:hover { background: var(--body); border-color: var(--body); }
.link, .cta-link {
  font-weight: 700; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.link:hover, .cta-link:hover { color: var(--ink); }
.cta-link { font-size: 15px; }

/* 9. Section heads + card grid --------------------------------------------- */
.section { padding-top: 40px; padding-bottom: 8px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.sec-head h2 { font-size: var(--h2); line-height: 1.1; }
.sec-head a { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.sec-head a:hover { text-decoration: underline; text-underline-offset: 4px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
}
.card:hover { border-color: var(--ink); }
.card-img { aspect-ratio: 4 / 3; }
.card-img > .ico { width: 84px; height: 84px; stroke-width: 1.1; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.card-t { font-family: var(--f-display); font-size: var(--ct); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.card-blurb { font-size: 15px; line-height: 1.55; color: var(--body); }
.card-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: auto; padding-top: 6px;
  font-size: 13px; color: var(--muted);
}
.card-meta time { font-family: var(--f-mono); font-size: 12px; }
.card-cta { font-weight: 700; color: var(--accent); }
.card:hover .card-t { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.more { display: flex; justify-content: center; padding: 40px 0 24px; }
.empty-note { grid-column: 1 / -1; padding: 28px; font-size: 17px; color: var(--muted); background: var(--surface); border: 1px dashed var(--rule); border-radius: var(--r); }

/* 10. Dark band: category list + footer ------------------------------------ */
.band { margin-top: 64px; color: var(--band-text); background: var(--band); }
.band-in { padding-top: 44px; padding-bottom: 48px; }
.band h2 { margin-bottom: 22px; font-size: 28px; }
.band-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.band-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-height: 44px; padding: 14px 0;
  color: var(--band-text); text-decoration: none; border-top: 1px solid var(--band-rule);
}
/* On the band every layer uses its night colour, so it reads on the dark ground */
.band, .foot { --l01: #A9C3F8; --l02: #8EAEF0; --l03: #7896E2; --l04: #6680D0; --l05: #A3ABB8; --l06: #C2B08A; --l07: #E2B04E; --l08: #EE8C4E; --l09: #DB7A5C; --l10: #D8D6CF; }
.band-list a[data-layer] { border-top: 3px solid var(--layer); padding-top: 12px; }
.band-list .n { font-family: var(--f-mono); font-size: 13px; color: var(--band-muted); }
.band-list .t { font-family: var(--f-display); font-size: 17px; font-weight: 600; }
.band-list a:hover .t { text-decoration: underline; text-underline-offset: 4px; }

.foot { margin-top: 64px; color: var(--band-text); background: var(--band); }
.band + .foot { margin-top: 0; border-top: 1px solid var(--band-rule); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.foot-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.foot .wordmark { color: var(--band-text); }
.foot-tag { font-size: 14px; color: var(--band-muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.foot-links a, .foot .link-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--band-text); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.foot-links a:hover, .foot .link-btn:hover { color: var(--band-accent); text-decoration: underline; text-underline-offset: 4px; }
.foot-fine { padding-bottom: 28px; font-size: 13px; color: var(--band-muted); }

/* 11. Page heads (category, tags, search, about, hubs…) -------------------- */
.page-head { padding: 36px 0 8px; }
.page-head h1 { max-width: 24ch; font-size: calc(var(--h1) * .85); line-height: 1.08; }
.page-head p.lede { max-width: 62ch; margin-top: 12px; font-size: 18px; color: var(--body); }
.page-head .layer-tag { margin-bottom: 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* 12. Post page ------------------------------------------------------------ */
.post { padding-top: 32px; padding-bottom: 24px; }
.post-head { max-width: 900px; }
.post-h1 { max-width: 22ch; margin: 10px 0 12px; font-size: clamp(32px, 4.4vw, var(--h1)); line-height: 1.06; letter-spacing: -.03em; }
.post-blurb { max-width: 62ch; font-size: 19px; line-height: 1.6; color: var(--body); }
.post-checked { margin-top: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.post-lead-fig { margin: 28px 0 36px; }
.post-lead { aspect-ratio: 21 / 9; border: 1px solid var(--rule); border-radius: var(--r); }
.post-lead > .ico { width: 150px; height: 150px; stroke-width: .9; }
.post-lead-caption { margin-top: 10px; }

/* "As of" line: directly above or below every table (CLAUDE.md §1, §7). A table whose
   figures all share one label states it here too: <span class="fig fig-vendor">All figures vendor-stated</span> */
.asof {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; color: var(--muted);
}
.asof strong { color: var(--ink); font-weight: 500; }
.asof .fig { font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.asof .ico { width: 15px; height: 15px; }

/* Data table (table.js). The plain data table is the default; .dt-ranking adds
   the Rank column, the #1 tint and in-row bars, and is ONLY for rankings
   (CLAUDE.md §7 "Tables are the product"). Units sit in the header:
   <th class="r" data-sort="num">HBM <span class="unit">GB</span></th> */
.dt { margin: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.dt > .asof { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.dt-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; padding: 16px; border-bottom: 1px solid var(--rule); }
.dt-tools .search { flex: 0 1 320px; min-width: 240px; background: var(--surface); }
.dt-filter-toggle { display: none; }
.dt-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.dt-field { display: flex; flex-direction: column; gap: 4px; }
.dt-field .label { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.dt-field select {
  height: 44px; min-width: 170px; padding: 0 36px 0 12px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--rule); border-radius: var(--r-sm); appearance: none; -webkit-appearance: none; cursor: pointer;
}
.dt-field select:focus-visible { border-color: var(--focus); }
/* "Clear filters" in copper text */
.dt-clear { min-height: 44px; padding: 0 16px; color: var(--accent); background: transparent; }
.dt-count { margin-left: auto; align-self: center; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
/* Long tables scroll inside their box on desktop so the header stays pinned; phones use the 5-row peek instead */
.dt-scroll { overflow-x: auto; }
@media (min-width: 721px) { .dt-scroll { max-height: min(470px, 80vh); overflow-y: auto; } }
.dt-table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 15px; font-variant-numeric: tabular-nums lining-nums; }
.dt-table caption { text-align: left; }
.dt-table th {
  position: sticky; top: 0; z-index: 1;
  padding: 11px 14px; text-align: left; white-space: nowrap; vertical-align: bottom;
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--head); border-bottom: 2px solid var(--layer);
}
.dt-table th .unit { font-weight: 400; }
.dt-table td { padding: 11px 14px; vertical-align: middle; border-bottom: 1px solid var(--rule); color: var(--body); }
.dt-table tbody tr:last-child td { border-bottom: 0; }
.dt-table tbody tr:hover td { background: var(--head); }
.dt-table .r, .dt-table th.r { text-align: right; }
.dt-table th.r .dt-sort { flex-direction: row; }
.dt-table td.num { font-family: var(--f-mono); font-size: 14px; white-space: nowrap; color: var(--ink); }
.dt-table td.code { font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.dt-table td.unit { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dt-table td.name { min-width: 180px; font-weight: 600; color: var(--ink); }
.dt-table td.name a { text-decoration: none; }
.dt-table td.name a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.dt-table td.name .sub { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.dt-table td .fn a { font-family: var(--f-mono); font-weight: 500; }
/* Ranking table only */
.dt-ranking td.rank { width: 64px; font-family: var(--f-mono); font-size: 14px; color: var(--muted); }
.dt-ranking td.ranked { font-weight: 700; }   /* the column the post ranks by */
.dt-ranking tr.is-top td { background: var(--tint); background: color-mix(in srgb, var(--layer) var(--tint-pct), var(--surface)); }
.dt-ranking tr.is-top td.rank { font-weight: 700; color: var(--ink); }
.dt-ranking td.dt-bar { width: 18%; min-width: 120px; }
/* One element: the layer-colour fill at --w over the --track */
.dt-bar .bar {
  display: block; height: 8px; width: 100%; border-radius: 4px;
  background: linear-gradient(var(--layer), var(--layer)) no-repeat 0 0 / var(--w, 0%) 100%, var(--track);
}
.dt-sort {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; margin: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: inherit;
  background: transparent; border: 0; cursor: pointer;
}
.dt-sort:hover { color: var(--ink); }
.dt-sort .arr { font-family: var(--f-mono); font-size: 12px; opacity: .6; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--ink); font-weight: 700; }
th[aria-sort="ascending"] .dt-sort .arr, th[aria-sort="descending"] .dt-sort .arr { opacity: 1; }
.dt-empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.dt-table tbody tr.dt-clip { display: none; }
.dt-more { display: flex; justify-content: center; padding: 14px 16px; border-top: 1px solid var(--rule); }
.dt-more-btn { width: 100%; max-width: 420px; min-height: 46px; color: var(--on-fill); background: var(--fill); border-color: var(--fill); }
.table-note { max-width: 80ch; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Chart (lead image drawn from the post's own data): layer-colour bars on the track, mono values.
   <div class="chart"><p class="chart-title">…</p><div class="chart-rows">
     <div class="chart-row"><span class="chart-label">B300</span><span class="chart-track"><span class="chart-bar" style="--w:100%"></span></span><span class="chart-val">288</span></div>
   </div><p class="chart-note">…</p></div> */
.chart { display: flex; flex-direction: column; justify-content: center; gap: 14px; height: 100%; width: 100%; padding: 24px; background: var(--surface); color: var(--ink); text-align: left; }
.chart-title { font-family: var(--f-display); font-size: 17px; font-weight: 600; }
.chart-title .unit { font-family: var(--f-body); font-weight: 400; color: var(--muted); }
.chart-rows { display: flex; flex-direction: column; gap: 9px; }
.chart-row { display: grid; grid-template-columns: minmax(64px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.chart-label { overflow: hidden; font-size: 13px; text-align: right; white-space: nowrap; text-overflow: ellipsis; color: var(--body); }
.chart-val { min-width: 3ch; font-family: var(--f-mono); font-size: 13px; color: var(--ink); text-align: right; }
.chart-track { display: block; height: 14px; background: var(--track); border-radius: 3px; }
.chart-bar { display: block; height: 100%; width: var(--w, 0%); background: var(--layer); border-radius: 3px; }
.chart-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 8px; }

/* The stack as a navigable cutaway (homepage launch hero, About): one link per layer, top to bottom.
   Hovering or focusing a layer pulls it out, as the concept does for a post's own layer.
   <nav class="cutaway" aria-label="…"><p class="chart-title">…</p><ol>
     <li data-layer="agents"><a href="/categories/agents.html"><span class="cw-bar"></span><span class="cw-n">L01</span><span class="cw-t">Agents</span></a></li> …
   </ol></nav> */
.cutaway { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.cutaway ol { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cutaway a {
  display: grid; grid-template-columns: minmax(40px, 1fr) 3ch minmax(0, 15em); align-items: center; gap: 12px; min-height: 32px;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.25; color: var(--body); text-decoration: none;
  transition: transform .18s ease;
}
.cw-bar { height: 22px; border-radius: 4px; background: var(--layer); }
.cw-n { color: var(--muted); }
.cutaway a:hover, .cutaway a:focus-visible { transform: translateX(14px); color: var(--ink); }
.cutaway a:hover .cw-bar, .cutaway a:focus-visible .cw-bar { box-shadow: 0 0 0 2px var(--ink); }
.cutaway a:hover .cw-t { text-decoration: underline; text-underline-offset: 3px; }
.prose .cutaway a { color: var(--body); }
.prose .cutaway a:hover, .prose .cutaway a:focus-visible { color: var(--ink); }

/* Explainer diagrams: flat cutaways in the layer colours (inline SVG), with a legend */
.diagram { margin: 24px 0; padding: 22px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { margin-top: 12px; font-size: 14px; text-align: center; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--body); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .sw { width: 14px; height: 10px; flex: none; border-radius: 2px; background: var(--sw, var(--layer)); }

/* Narrative */
.narrative { margin-top: 56px; }
.narrative > h2, .sources h2, .appears h2, .facts h2 { margin-bottom: 20px; font-size: var(--h2); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; padding: 28px 0; border-top: 1px solid var(--rule); }
.entry-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.entry-rank { font-family: var(--f-mono); font-size: 24px; font-weight: 500; line-height: 1; color: var(--accent); }
.entry h3 { font-size: calc(var(--h2) * .82); line-height: 1.15; }
.entry-val { margin-left: auto; font-family: var(--f-mono); font-size: 17px; font-weight: 500; }
.entry-body { max-width: 62ch; color: var(--body); }
.entry-body p + p { margin-top: 12px; }
.entry-body:last-child { grid-column: 1 / -1; max-width: 72ch; }
.prose-sec { padding: 28px 0; border-top: 1px solid var(--rule); }
.prose-sec h2 { margin-bottom: 12px; font-size: 26px; }
.prose-sec h3 { margin-bottom: 12px; font-size: 22px; }
.prose-sec p + p, .prose-sec .entry-body + .entry-body { margin-top: 12px; }
.prose-sec .embed { max-width: 860px; margin-top: 20px; }
/* Footnote markers: <sup class="fn"><a href="#s1" id="r1-1">1</a></sup> */
.fn a { padding: 0 2px; font-family: var(--f-mono); font-size: .75em; font-weight: 500; color: var(--accent); text-decoration: none; vertical-align: super; line-height: 0; }
.fn a:hover { text-decoration: underline; }
.embed { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--img); border-radius: var(--r-sm); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-facade { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; background: var(--img); cursor: pointer; }
.embed-facade img { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(17, 20, 24, .66); border: 1.5px solid #FFFFFF; transition: background-color .2s;
}
.play-btn svg { width: 28px; height: 28px; margin-left: 4px; fill: #FFFFFF; }
.embed-facade:hover .play-btn, .embed-facade:focus-visible .play-btn { background: #A3460F; border-color: #A3460F; }
.entry-img { overflow: hidden; border-radius: var(--r-sm); }
.entry-img img { width: 100%; }

/* "Latest" headlines (data/news.json via sync-cards.py; main.js hides expired items).
   Items may carry data-layer to show their layer square beside the date. */
.latest { padding-top: 28px; }
.latest .sec-head { margin-bottom: 10px; }
.latest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 4px 20px; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.latest-item { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--rule); }
.latest-list > .latest-item:nth-child(-n+2) { border-top: 0; }
.latest-date { display: flex; align-items: center; gap: 7px; align-self: start; padding-top: 3px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--ink); }
.latest-item[data-layer] .latest-date::before { content: ""; width: 9px; height: 9px; flex: none; border-radius: 2px; background: var(--layer); }
.latest-text { margin: 0; color: var(--body); }
.latest-src { font-size: 13px; color: var(--muted); }
.latest-links { margin: 6px 0 0; font-size: 14px; }
.latest-links .link { display: inline; }
.latest-links .link + .link { margin-left: 14px; }
.latest-box { max-width: 72ch; margin: 22px 0 0; }
.latest-box .latest-list { grid-template-columns: minmax(0, 1fr); }
.latest-box .latest-list > .latest-item:nth-child(2) { border-top: 1px solid var(--rule); }
.latest-box .label { display: block; margin-bottom: 8px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0; }
.sources { padding-top: 28px; border-top: 1px solid var(--rule); }
.sources ol { display: grid; gap: 8px; margin: 0; padding-left: 26px; font-size: 14px; color: var(--muted); }
.sources li::marker { font-family: var(--f-mono); font-size: 13px; }
.sources a { color: var(--accent); overflow-wrap: anywhere; }
.sources .fn-back { margin-left: 6px; text-decoration: none; }
.sources li:target { color: var(--ink); background: var(--tint); border-radius: 4px; }

/* 13. Profile hubs --------------------------------------------------------- */
.profile-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px 44px; align-items: start; padding: 36px 0 12px; }
.profile-type { font-family: var(--f-mono); font-size: 13px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.profile-name { margin-top: 10px; font-size: clamp(36px, 5vw, 60px); line-height: 1.04; letter-spacing: -.03em; }
.profile-intro { max-width: 66ch; margin-top: 22px; font-size: 18px; line-height: 1.7; color: var(--body); }
.profile-intro p + p { margin-top: 14px; }
.facts { margin-top: 48px; }
.facts-table { width: 100%; max-width: 760px; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.facts-table th, .facts-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: 0; }
.facts-table th { width: 34%; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--head); }
.facts-table td { font-weight: 500; }
.facts-table td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.appears { margin-top: 56px; }
.appears-list { margin: 0; padding: 0 20px; list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.appears-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.appears-list li:last-child { border-bottom: 0; }
.appears-list .pos { min-width: 3.2em; font-family: var(--f-mono); font-size: 15px; font-weight: 500; color: var(--accent); }
.appears-list a { flex: 1 1 320px; font-family: var(--f-display); font-size: 18px; font-weight: 600; text-decoration: none; }
.appears-list a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.appears-list .meta { font-size: 13px; color: var(--muted); }
.related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.type-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 8px; }
.type-filter button.chip { cursor: pointer; font-family: var(--f-body); }
.az { columns: 3 260px; column-gap: 40px; margin: 24px 0 0; padding: 0; list-style: none; }
.az li { break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--rule); }
.az a { font-family: var(--f-display); font-size: 17px; font-weight: 600; text-decoration: none; }
.az a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.az .meta { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.az-letter { break-after: avoid; padding-top: 18px; font-family: var(--f-display); font-size: 26px; font-weight: 700; color: var(--accent); border: 0 !important; }

/* 14. Glossary, category tiles, search, prose, 404 ------------------------- */
.glossary { margin: 24px 0 0; max-width: 820px; }
.glossary dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 22px; border-top: 1px solid var(--rule); font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.glossary dt .abbr { font-family: var(--f-mono); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.glossary dt .term-link { margin-left: auto; font-family: var(--f-body); font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
.glossary dt .term-link:hover { color: var(--accent); }
.glossary dd { margin: 8px 0 22px; color: var(--body); }
.glossary dd + dd { margin-top: -12px; font-size: 14px; color: var(--muted); }
.glossary dd a { color: var(--accent); }
.glossary dt:target, .glossary dt:target + dd { background: var(--tint); }
.az-jump { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 18px; }
.az-jump a { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; font-family: var(--f-mono); font-size: 15px; font-weight: 500; text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-sm); }
.az-jump a:hover { border-color: var(--ink); }

/* Category tiles carry data-layer: a layer-colour top rule, the icon in the layer colour and the stack marker */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 24px 0 8px; }
.cat-tile { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--layer); border-radius: var(--r); }
.cat-tile .tile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cat-tile .ico { width: 34px; height: 34px; color: var(--layer); stroke-width: 1.5; }
.cat-tile .stack { width: 26px; }
.cat-tile .tile-n { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.cat-tile h2 { font-size: var(--ct); font-weight: 600; line-height: 1.2; }
.cat-tile p { font-size: 15px; color: var(--body); }
.cat-tile .chip-n { margin-top: auto; font-size: 12px; color: var(--muted); }
.cat-tile:hover { border-color: var(--ink); border-top-color: var(--layer); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0; }
.results-status { margin: 8px 0 24px; color: var(--muted); }
.search-page-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.search-page-form .search { flex: 1 1 420px; max-width: 640px; height: 56px; background: var(--surface); }
.search-page-form .search input { font-size: 19px; }

.prose { max-width: 70ch; padding: 8px 0 24px; color: var(--body); }
.prose h2 { margin: 40px 0 12px; font-size: 26px; color: var(--ink); }
.prose h3 { margin: 28px 0 10px; font-size: 19px; color: var(--ink); }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 16px; }
.prose a { color: var(--accent); text-underline-offset: 4px; }
/* About: the figure labels and capacity statuses as a definition list */
.labels-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 18px; align-items: center; margin: 0 0 20px; }
.labels-list dt, .labels-list dd { margin: 0; }
.labels-list dt .fig, .labels-list dt .cap { font-size: 15px; font-weight: 600; }

.notfound { padding: 96px 0; text-align: center; }
.notfound .code { font-family: var(--f-mono); font-size: 112px; font-weight: 500; line-height: 1; color: var(--ink); }
.notfound .stack { display: flex; width: 120px; margin: 0 auto 28px; gap: 5px; }
.notfound .stack i { height: 8px; border-radius: 2px; }
.notfound h1 { margin: 16px 0 12px; font-size: var(--h2); }
.notfound p { margin-bottom: 28px; color: var(--muted); }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Reserved ad slots (CLAUDE.md §2): fixed heights so ads never shift layout. Unused until ads go live. */
.ad-slot { display: grid; place-items: center; min-height: 280px; margin: 40px 0; background: var(--head); border-radius: var(--r); }
.ad-slot.is-leader { min-height: 90px; }
.ad-slot::before { content: "Advertisement"; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* 14b. Cookie consent banner (assets/js/consent.js; EU/EEA/UK/CH visitors only) */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 20px 22px 18px; overflow: hidden;
  color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  box-shadow: 0 10px 30px rgba(17, 20, 24, .18);
}
.consent::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--strata); }
.consent[hidden] { display: none; }
.consent-text { flex: 1 1 300px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--body); }
.consent-text strong { font-family: var(--f-display); font-size: 16px; font-weight: 600; color: var(--ink); }
.consent-text a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.consent-btns { display: flex; gap: 10px; }
.consent .btn { min-height: 44px; padding: 0 22px; }

/* 15. Responsive ----------------------------------------------------------- */
@media (max-width: 1300px) {
  .topbar-tag { display: none; }
}

@media (max-width: 1100px) {
  /* Top bar (tablets and phones): logo + theme toggle + menu button; util nav and search fold into a panel */
  .topbar-in { flex-wrap: wrap; gap: 8px; }
  .mini-logo { margin-right: auto; }
  .nav-toggle { display: inline-flex; width: 44px; }
  .nav-toggle .i-close { display: none; }
  .topbar.is-open .nav-toggle .i-menu { display: none; }
  .topbar.is-open .nav-toggle .i-close { display: block; }
  /* Without JS (no .js class) the panel simply stays open */
  .mast-panel { order: 5; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding-bottom: 12px; }
  .js .mast-panel { display: none; }
  .js .topbar.is-open .mast-panel { display: flex; }
  html:not(.js) .nav-toggle { display: none; }
  .util-nav { flex-direction: column; margin-left: 0; }
  .util-nav a { padding: 0; font-size: 15px; }
  .mast-tools, .mast-tools form { width: 100%; }
  .mast-tools .search { flex: 1; min-width: 0; }

  .grid, .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .hero-media .media { min-height: 0; }
  .hero-copy { padding: 0; }
  .profile-head { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --h1: 34px; --h2: 25px; --ct: 18px; --bar-h: 60px; }
  .wrap, .wrap-narrow { padding: 0 16px; }
  /* Phones: a smaller logo and an icon-only theme toggle */
  .wordmark { font-size: 21px; }
  .mark { width: 26px; height: 26px; }
  .theme-toggle { padding: 0; width: 44px; }
  .theme-toggle .tt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  /* Category strip: one horizontally scrolling row; main.js scrolls the active chip into view */
  .cat-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .cat-strip::-webkit-scrollbar { display: none; }
  .cat-strip .chip { flex: none; white-space: nowrap; }

  .grid, .cat-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .band-list { grid-template-columns: minmax(0, 1fr); }
  .labels-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .labels-list dd { margin-bottom: 10px; }
  .stat-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stat-list li { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; }
  .stat-list .val { text-align: right; font-size: 18px; }

  /* Table filters collapse behind a "Filters" button */
  .dt-tools { padding: 14px; }
  .dt-tools .search { flex: 1 1 100%; min-width: 0; }
  .dt-filter-toggle { display: inline-flex; min-height: 44px; }
  .dt-filters { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; }
  .dt.filters-open .dt-filters { display: flex; }
  .dt-field select { width: 100%; }
  .dt-count { margin-left: 0; }
  .dt-table th, .dt-table td { padding-left: 12px; padding-right: 12px; }

  .entry { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .entry-val { margin-left: 0; }
  .post-lead { aspect-ratio: 4 / 3; }
  .post-lead img[src*="img.youtube.com/"] { transform: scale(1.34); }
  .chart { padding: 16px; }
  .cutaway a { grid-template-columns: minmax(32px, 1fr) 3ch minmax(0, 12.5em); gap: 8px; font-size: 12px; }
  .latest-list { grid-template-columns: minmax(0, 1fr); padding: 4px 16px; }
  .latest-list > .latest-item:nth-child(2) { border-top: 1px solid var(--rule); }
  .facts-table th { width: 42%; }
  .notfound .code { font-size: 84px; }
}

/* 16. Motion + print ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .cat-strip, .band, .foot, .dt-tools, .more, .dt-more, .consent, .ad-slot { display: none !important; }
  .dt-table tbody tr.dt-clip { display: table-row; }
  .dt-scroll { max-height: none; overflow: visible; }
  .dt-table th { position: static; }
  body { background: #fff !important; color: #000 !important; }
}
html:not(.js) .js-only { display: none; }
