/* ═══════════════════════════════════════════════
   DOSSIER — brutalist news system
   Mobile-first. Themes: light / dark / brutalism.
   ═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

:root {
  --serif: "Instrument Serif", "Noto Serif Malayalam", "Newsreader", "Noto Sans Malayalam", Georgia, serif;
  --body-serif: "Newsreader", "Noto Serif Malayalam", "Noto Sans Malayalam", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --code-font: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 2px;
  --border: 1px solid;
  --shadow: 0 1px 2px rgb(0 0 0 / .06);
  --tap: 44px;

  /* ── UI TUNING defaults ──
     Don't edit these. Override them in assets/css/tuning.css,
     which has plain-English comments for every knob. */
  --t-nameplate-size: clamp(52px, 13vw, 108px);
  --t-nameplate-pad: 26px;
  --t-topbar-pad: 10px;
  --t-tocbtn-size: 40px;
  --t-closebtn-size: 40px;
  --t-toc-width: 252px;
  --t-toc-width-vw: 64vw;
  --t-toc-radius: 20px;
  --t-toc-top: 12px;          /* gap from the top of the screen */
  --t-toc-bottom: 28px;       /* gap from the bottom — panel never touches it */
  --t-toc-sec-size: 12.5px;
  --t-toc-sub-size: 11.5px;
  --t-card-gap: 28px;
  --t-card-gap-desktop: 24px;
  --t-card-pad: 28px;
  --t-card-title: clamp(24px, 4.5vw, 34px);
  --t-article-width: 680px;
  --t-article-title: clamp(32px, 8.5vw, 56px);
  --t-body-size: 18px;
}

/* ── LIGHT (v1 editorial paper) ── */
[data-theme="light"] {
  --paper: #f5f2eb;
  --paper-2: #faf6ee;
  --ink: #121212;
  --ink-soft: rgb(18 18 18 / .62);
  --ink-faint: rgb(18 18 18 / .38);
  --line: rgb(18 18 18 / .16);
  --line-strong: #121212;
  --accent: #e5ff00;
  --accent-strong: #e5ff00;
  --accent-ink: #121212;
  --task-done: #2e7d32;
  --hl: #e5ff00;
  --hl-red: #ffb8b8;
  --hl-blue: #bcd9ff;
  --hl-green: #bfe6bf;
  --danger: #dc2626;
  --card: #fdfaf3;
  --chip-bg: #121212;
  --chip-ink: #faf9f7;
  --ticker-bg: #121212;
  --ticker-ink: #faf9f7;
  --code-bg: rgb(18 18 18 / .06);
  --star: #b57a08;
  --codebox-bg: #ffffff;
  --codebox-ink: #1f2328;
  --codebox-line: #e3ded6;
  --codebox-bar: #f4f1ec;
  --codebox-muted: #6e7781;
  --tok-kw: #6d28d9;
  --tok-str: #047857;
  --tok-num: #b45309;
  --tok-com: rgb(18 18 18 / .45);
  --tok-fn: #1d4ed8;
  --df-add: #047857;
  --df-add-bg: #dcfae7;
  --df-del: #b91c1c;
  --df-del-bg: #fee2e2;
  --radius: 10px;
}

/* ── DARK (v1 ink mode) ── */
[data-theme="dark"] {
  --paper: #0f1115;
  --paper-2: #151821;
  --ink: #e8e6e1;
  --ink-soft: rgb(232 230 225 / .66);
  --ink-faint: rgb(232 230 225 / .40);
  --line: rgb(232 230 225 / .16);
  --line-strong: #4b5263;
  --head: #232733;
  --accent: #e5ff00;
  --accent-strong: #e5ff00;
  --accent-ink: #0f1115;
  --task-done: #e5ff00;
  --danger: #ff5a4d;
  --card: #151821;
  --chip-bg: #e8e6e1;
  --chip-ink: #0f1115;
  --ticker-bg: #ffffff;
  --ticker-ink: #0f1115;
  --code-bg: rgb(232 230 225 / .08);
  --star: #e8a013;
  --codebox-bg: #0d1117;
  --codebox-ink: #e6edf3;
  --codebox-line: #30363d;
  --codebox-bar: #161b22;
  --codebox-muted: #8b949e;
  --tok-kw: #c4b5fd;
  --tok-str: #6ee7b7;
  --tok-num: #fbbf24;
  --tok-com: rgb(232 230 225 / .45);
  --tok-fn: #93c5fd;
  --df-add: #6ee7b7;
  --df-add-bg: rgb(110 231 183 / .12);
  --df-del: #fca5a5;
  --df-del-bg: rgb(252 165 165 / .12);
  --hl: #e5ff00;
  --hl-red: #c04545;
  --hl-blue: #3f6fb5;
  --hl-green: #35945c;
  --radius: 10px;
}

/* dark mode: inverted accents use dark blue-gray, never white */
[data-theme="dark"] {
  --ticker-bg: #232733;
  --ticker-ink: #e8e6e1;
}
[data-theme="dark"] .close-btn,
[data-theme="dark"] .chip--verified,
[data-theme="dark"] .railcard__head,
[data-theme="dark"] .has-tip::after {
  background: #232733;
  color: #e8e6e1;
  border-color: #4b5263;
}

/* ── BRUTALISM ── */
[data-theme="brutalism"] {
  --paper: #ffffff;
  --paper-2: #ffffff;
  --ink: #000000;
  --ink-soft: #000000;
  --ink-faint: rgb(0 0 0 / .55);
  --line: #000000;
  --line-strong: #000000;
  --accent: #e5ff00;
  --accent-strong: #6f7f00;
  --accent-ink: #000000;
  --task-done: #1e7d1e;
  --danger: #ff0000;
  --card: #ffffff;
  --chip-bg: #000000;
  --chip-ink: #ffffff;
  --ticker-bg: #000000;
  --ticker-ink: #ffffff;
  --code-bg: #f0f0f0;
  --star: #000000;
  --codebox-bg: #ffffff;
  --codebox-ink: #000000;
  --codebox-line: #000000;
  --codebox-bar: #f0f0f0;
  --codebox-muted: #5a5a5a;
  --tok-kw: #0000ff;
  --tok-str: #007a00;
  --tok-num: #d00000;
  --tok-com: rgb(0 0 0 / .5);
  --tok-fn: #000000;
  --df-add: #007a00;
  --df-add-bg: #d9f2d9;
  --df-del: #d00000;
  --df-del-bg: #ffd9d9;
  --hl: #e5ff00;
  --hl-red: #ff0000;
  --hl-blue: #0000ff;
  --hl-green: #00a000;
  --radius: 0;
  --shadow: none;
}

/* ── BRUTALISM NIGHT ("dark brutalism"): brutalist skeleton on charcoal,
      white fat lines, fluorescent lime accents ── */
[data-theme="brutalism-night"] {
  --paper: #131316;
  --paper-2: #131316;
  --ink: #f4f2ec;
  --ink-soft: #f4f2ec;
  --ink-faint: rgb(244 242 236 / .55);
  --line: #f4f2ec;
  --line-strong: #f4f2ec;
  --accent: #e5ff00;
  --accent-strong: #e5ff00;
  --accent-ink: #131316;
  --task-done: #e5ff00;
  --danger: #ff5a4d;
  --card: #1a1a1f;
  --chip-bg: #e5ff00;
  --chip-ink: #131316;
  --ticker-bg: #e5ff00;
  --ticker-ink: #131316;
  --code-bg: rgb(229 255 0 / .08);
  --star: #e5ff00;
  --codebox-bg: #0c0c0f;
  --codebox-ink: #f4f2ec;
  --codebox-line: #f4f2ec;
  --codebox-bar: #1e1e24;
  --codebox-muted: #9a978e;
  --tok-kw: #7dd3fc;
  --tok-str: #e5ff00;
  --tok-num: #ff9d8a;
  --tok-com: rgb(244 242 236 / .5);
  --tok-fn: #ffffff;
  --df-add: #e5ff00;
  --df-add-bg: rgb(229 255 0 / .12);
  --df-del: #ff5a4d;
  --df-del-bg: rgb(255 90 77 / .12);
  --hl: #e5ff00;
  --hl-red: #ff5a4d;
  --hl-blue: #7dd3fc;
  --hl-green: #e5ff00;
  --radius: 0;
  --shadow: none;
}

/* ── AMOLED: normal dark-theme colors + brutalism effect, on pure black.
      Accent is cosmos blue (#6a9bff) — deep blue suits AMOLED panels and
      stays easy on the eyes; lime is reserved for the other themes.
      Battery: #000 backgrounds keep pixels off. Eyes: off-white text
      (never pure white), near-black dividers, desaturated secondary
      colors. ── */
[data-theme="amoled"] {
  --paper: #000000;
  --paper-2: #000000;
  --ink: #e8e6e1;
  --ink-soft: rgb(232 230 225 / .66);
  --ink-faint: rgb(232 230 225 / .40);
  --line: #1e1e22;
  --line-strong: #e8e6e1;
  --head: #0a0a0c;
  --accent: #6a9bff;
  --accent-strong: #6a9bff;
  --accent-ink: #000000;
  --task-done: #6a9bff;
  --danger: #ff7a6b;
  --card: #000000;
  --chip-bg: #e8e6e1;
  --chip-ink: #000000;
  --ticker-bg: #000000;
  --ticker-ink: #6a9bff;
  --code-bg: rgb(232 230 225 / .07);
  --star: #e8a013;
  --codebox-bg: #000000;
  --codebox-ink: #e6edf3;
  --codebox-line: #2a2a2e;
  --codebox-bar: #0b0b0d;
  --codebox-muted: #8b949e;
  --tok-kw: #c4b5fd;
  --tok-str: #6ee7b7;
  --tok-num: #fbbf24;
  --tok-com: rgb(232 230 225 / .45);
  --tok-fn: #93c5fd;
  --df-add: #6ee7b7;
  --df-add-bg: rgb(110 231 183 / .12);
  --df-del: #fca5a5;
  --df-del-bg: rgb(252 165 165 / .12);
  --hl: #6a9bff;
  --hl-red: #c04545;
  --hl-blue: #3f6fb5;
  --hl-green: #35945c;
  --radius: 0;
  --shadow: none;
}

/* native controls (audio/video players, inputs) follow the theme's scheme */
[data-theme="light"], [data-theme="brutalism"] { color-scheme: light; }
[data-theme="dark"], [data-theme="brutalism-night"], [data-theme="amoled"] { color-scheme: dark; }

/* AMOLED component care: cosmos-blue revealed spoilers (readable on black),
   and a surfaced audio player instead of a pure-black slab. */
[data-theme="amoled"] .spoiler.revealed,
[data-theme="amoled"] .spoiler--blur.revealed {
  background: rgb(106 155 255 / .12);
  border: 1px solid rgb(106 155 255 / .35);
}
[data-theme="amoled"] .aplayer { background: #0b0b0e; }
[data-theme="amoled"] .aplayer audio { accent-color: var(--accent); }

/* v1 paper grain — dotted texture on light & dark */
[data-theme="light"] body {
  background-image: radial-gradient(rgb(18 18 18 / .028) 1px, transparent 1.5px);
  background-size: 24px 24px;
}
[data-theme="dark"] body {
  background-image: radial-gradient(rgb(255 255 255 / .045) 1px, transparent 1.5px);
  background-size: 24px 24px;
}

/* ── BRUTALISM, the v1 way: all mono, fat borders, hard shadows ── */
[data-theme="brutalism"] body { font-family: var(--mono); }
/* ── brutalism night + amoled: same skeleton, shadows stay visible on dark ── */
[data-theme="brutalism-night"] body, [data-theme="amoled"] body { font-family: var(--mono); }
[data-theme="brutalism-night"] .board-title, [data-theme="amoled"] .board-title,
[data-theme="brutalism-night"] .nameplate__title, [data-theme="amoled"] .nameplate__title,
[data-theme="brutalism-night"] .hero__title, [data-theme="amoled"] .hero__title,
[data-theme="brutalism-night"] .dossier__title, [data-theme="amoled"] .dossier__title,
[data-theme="brutalism-night"] .publish__h2, [data-theme="amoled"] .publish__h2,
[data-theme="brutalism-night"] .dossier__body h2, [data-theme="amoled"] .dossier__body h2,
[data-theme="brutalism-night"] .dossier__body h3, [data-theme="amoled"] .dossier__body h3,
[data-theme="brutalism-night"] .dossier__body h4, [data-theme="amoled"] .dossier__body h4 { font-family: var(--mono); }
[data-theme="brutalism-night"] .dossier__body strong, [data-theme="amoled"] .dossier__body strong { background: var(--accent); color: #000; padding: 0 5px; }
[data-theme="brutalism-night"] .newsrow, [data-theme="amoled"] .newsrow,
[data-theme="brutalism-night"] .mcard, [data-theme="amoled"] .mcard,
[data-theme="brutalism-night"] .memo, [data-theme="amoled"] .memo,
[data-theme="brutalism-night"] .id-card, [data-theme="amoled"] .id-card { border-width: 3px; box-shadow: 8px 8px 0 var(--accent); }
[data-theme="brutalism-night"] .to-top, [data-theme="amoled"] .to-top { border-radius: 0; border-width: 2px; box-shadow: 4px 4px 0 var(--accent); }
[data-theme="brutalism-night"] .stamp--lead, [data-theme="amoled"] .stamp--lead { box-shadow: 3px 3px 0 var(--accent); }
[data-theme="brutalism"] .board-title,
[data-theme="brutalism"] .nameplate__title,
[data-theme="brutalism"] .hero__title,
[data-theme="brutalism"] .newsrow__title,
[data-theme="brutalism"] .dossier__title,
[data-theme="brutalism"] .dossier__body h2,
[data-theme="brutalism"] .dossier__body h3,
[data-theme="brutalism"] .dossier__body h4,
[data-theme="brutalism"] .publish__h2 { font-family: var(--mono); font-weight: 700; letter-spacing: -.01em; }
[data-theme="brutalism"] .memo,
[data-theme="brutalism"] .dbox,
[data-theme="brutalism"] .ctabs,
[data-theme="brutalism"] .codetabs,
[data-theme="brutalism"] .collapse,
[data-theme="brutalism"] .alert,
[data-theme="brutalism"] .codebox,
[data-theme="brutalism"] .embed16x9,
[data-theme="brutalism"] .newsrow { border-width: 3px; box-shadow: 8px 8px 0 #000; }
[data-theme="brutalism"] .theme-btn,
[data-theme="brutalism"] .close-btn,
[data-theme="brutalism"] .dossier__body a.btn,
[data-theme="brutalism"] .search,
[data-theme="brutalism"] .dbox--ghost { border-width: 3px; }
[data-theme="brutalism"] .dossier__body a.btn,
[data-theme="brutalism"] .close-btn { box-shadow: 4px 4px 0 #000; }
[data-theme="brutalism"] .dossier__body a.btn:active,
[data-theme="brutalism"] .close-btn:active { box-shadow: 0 0 0 #000; transform: translate(4px, 4px); }
[data-theme="brutalism"] .dossier__body strong { background: #000; color: #e5ff00; padding: 0 5px; }
[data-theme="brutalism"] .tab.is-active,
[data-theme="brutalism"] .dbox__title { background: #000; }
[data-theme="brutalism"] .stamp--lead { box-shadow: 3px 3px 0 #000; }

/* ── v1 theme-switch glitch: shake + flash ── */
@keyframes glitch-anim {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}
.glitch-active { animation: glitch-anim 0.15s steps(2, end) infinite; }
.theme-flash {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: #fff; mix-blend-mode: difference;
  animation: theme-flash-anim 0.12s steps(2, end);
}
@keyframes theme-flash-anim { 0% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .glitch-active, .theme-flash { animation: none !important; }
}

/* ── text highlight (marker pen) ── */
.hl {
  background: var(--hl, #e5ff00);
  padding: 0.08em 0.3em;
  border-radius: calc(var(--radius) * 0.35);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl--red { background: var(--hl-red, #ffb8b8); }
.hl--blue { background: var(--hl-blue, #bcd9ff); }
.hl--green { background: var(--hl-green, #bfe6bf); }
.hl--black { background: #000; color: #fff; }
[data-theme="brutalism"] .hl--red,
[data-theme="brutalism"] .hl--blue,
[data-theme="brutalism"] .hl--green { color: #fff; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body-serif);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .25s, color .25s;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; }

/* ═══ TICKER ═══ */
.ticker {
  background: var(--ticker-bg, #121212);
  color: var(--ticker-ink, #faf9f7);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  overflow: hidden;
  white-space: nowrap;
  padding: 7px 0;
  border-bottom: 3px solid var(--accent, #e5ff00);
}
/* moon: no fluorescent line under the live ticker in light/dark */
[data-theme="light"] .ticker, [data-theme="dark"] .ticker { border-bottom: 0; }
.ticker__track { display: inline-block; animation: tick var(--t-ticker-speed, 28s) linear infinite; }
.ticker__track span { padding-right: 2rem; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ═══ MASTHEAD → NEWSPAPER NAMEPLATE ═══ */
.masthead { background: var(--paper-2); border-bottom: var(--border) var(--line-strong); }
.dateline-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--ink-soft);
  text-transform: uppercase;
}
.dateline-bar__edition { color: var(--danger); font-weight: 700; }
.nameplate { display: block; text-align: center; text-decoration: none; color: inherit; padding: var(--t-nameplate-pad) 16px; }
.nameplate__title { display: block; font-family: var(--serif); font-weight: 700; font-size: var(--t-nameplate-size); line-height: .95; letter-spacing: .01em; }
.nameplate__tag { display: block; margin-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .34em; color: var(--ink-soft); }
.rule-double { border-top: 3px solid var(--line-strong); height: 6px; border-bottom: 1px solid var(--line-strong); }

/* ── sticky TOC bar: progress ring + live section label, tap opens the dropdown ── */
.tocbar {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 2px; background: var(--paper); border: 0;
  border-bottom: var(--border) var(--line);
  font-family: var(--mono); color: var(--ink); text-align: left; cursor: pointer;
}
.tocbar[hidden] { display: none; }
.tocbar__ring { width: 22px; height: 22px; flex: none; display: block; }
.tocbar__track { stroke: var(--line-strong); opacity: .25; }
.tocbar__fill { stroke: var(--accent-strong); transition: stroke-dashoffset .12s linear; }
.tocbar__label {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
}
.tocbar__chev { flex: none; color: var(--ink-faint); font-size: 13px; line-height: 1; transition: transform .2s ease; }
.tocbar[aria-expanded="true"] .tocbar__chev { transform: rotate(180deg); }
/* ── TOC dropdown: drops from the bar, reference-site style ── */
.tocdrop {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--paper); color: var(--ink);
  border-bottom: 1px solid var(--line);
  max-height: min(60vh, 420px); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.tocdrop[hidden] { display: none; }
.tocdrop__nav { padding: 8px 16px 14px; position: relative; }
/* progress line: runs through the section bullets, fills as you read */
.tocdrop__track, .tocdrop__fill {
  position: absolute; left: 27px; top: 22px; width: 2px; border-radius: 2px;
  pointer-events: none;
}
.tocdrop__track { bottom: 28px; background: var(--ink-faint); }
.tocdrop__fill { height: 0; background: var(--accent-strong); transition: height .3s ease; }
/* hierarchical contents: filled-bullet sections + outline-bullet sub-sections */
.td { list-style: none; margin: 0; padding: 0; font-family: var(--mono); }
.td__sec { margin-bottom: 2px; }
.td__sec > a {
  position: relative;
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 4px 9px 27px; text-decoration: none;
  font-size: var(--t-toc-sec-size); font-weight: 700; letter-spacing: .1em; color: var(--ink-soft);
}
.td__sec > a:active { color: var(--ink); }
/* outline ring bullet — the progress line passes behind it, never through it.
   (global border-box: width includes the border, so 14px total) */
.td__sec > a::before {
  content: ""; position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--ink-faint); background: var(--paper);
}
.td__sec.active > a { color: var(--accent-strong); }
.td__sec.active > a::before { border-color: var(--accent-strong); }
.td__sub { list-style: none; margin: 0; padding: 0 0 6px 26px; }
.td__sub li { position: relative; padding: 6px 0 6px 14px; }
.td__sub li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px;
  border: 1.5px solid var(--ink-faint); border-radius: 50%;
  transform: translateY(-50%); background: transparent;
}
.td__sub li > a {
  text-decoration: none; color: var(--ink-soft);
  font-size: var(--t-toc-sub-size); letter-spacing: .06em;
}
.td__sub li.active::before { border-color: var(--accent-strong); background: var(--accent-strong); }
.td__sub li.active > a { color: var(--accent-strong); font-weight: 700; }
.td__sec:not(.active) .td__sub { opacity: .55; }

/* article view drops the site chrome for the v1 file header */
body.is-file .ticker,
body.is-file .masthead,
body.is-file .tabs { display: none; }
.filehead-wrap { position: sticky; top: 0; z-index: 40; }
.filehead { background: var(--paper); }
/* reading page only: frosted glass behind the sticky header + TOC bar.
   --t-read-blur is the tuning knob (0px = off). Home page untouched.
   NOTE: the wrapper stays un-blurred — a blurred parent breaks the
   dropdown's own backdrop-filter (nested backdrop-filters don't render). */
body.is-file .filehead {
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(var(--t-read-blur, 12px));
  backdrop-filter: blur(var(--t-read-blur, 12px));
  transform: translateZ(0); /* own GPU layer — blur stays smooth while scrolling */
}
/* the TOC bar + expanded dropdown share the frosted glass (their solid
   backgrounds would otherwise cover the blur) */
body.is-file .tocbar { background: transparent; }
body.is-file .tocdrop {
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(var(--t-read-blur, 12px));
  backdrop-filter: blur(var(--t-read-blur, 12px));
  transform: translateZ(0); /* own GPU layer — blur stays smooth while scrolling */
}

/* single compact theme button — small low-contrast circle, icon only */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; min-height: 34px; padding: 0;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; flex: 0 0 auto;
}
.theme-btn:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-btn:active { transform: translateY(1px); }
.theme-btn__icon { line-height: 1; display: inline-flex; }
.theme-btn__icon svg { width: 17px; height: 17px; display: block; }

/* ═══ TABS ═══ */
.tabs {
  display: flex; align-items: stretch;
  border-bottom: var(--border) var(--line-strong);
  background: var(--paper);
  position: relative;
}
/* scrollable tab strip — ends where the search slot begins, never slides under it */
.tabs__scroll {
  display: flex; align-items: stretch; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.tabs__scroll::-webkit-scrollbar { display: none; }
/* search icon: its own fixed slot at the right — no overlap, no fade, no peeking */
.tabs__slot {
  flex: none; width: 58px;
  display: flex; align-items: center; justify-content: center;
  border-left: var(--border) var(--line);
}
.tabs__search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--line-strong); border-radius: 50%; cursor: pointer;
  touch-action: manipulation;
}
.tabs__search svg { width: 17px; height: 17px; display: block; }
.tabs__search[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.tabs__search:active { translate: 1px 1px; }
/* tapping the icon swaps the tab row for a search field — no dropdown, no overlay */
.tabs__searchbox {
  display: none; flex: 1; min-width: 0; align-items: center;
  padding: 5px 12px;
}
.tabs.is-searching .tabs__scroll { display: none; }
.tabs.is-searching .tabs__searchbox { display: flex; }
.tabs__searchbox .search { width: 100%; max-width: none; flex: 1; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-decoration: none; color: var(--ink-soft);
  padding: 12px 16px; min-height: var(--tap);
  border-right: var(--border) var(--line);
  white-space: nowrap;
}
.tab.is-active { background: var(--ink); color: var(--paper); }
.tab__dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.tab.is-active .tab__dot { background: currentColor; }
.tabs__meta {
  margin-left: auto; align-self: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint);
  padding: 0 16px; white-space: nowrap; display: none;
}

/* ═══ FRONT PAGE ═══ */
#app { flex: 1; }
.view { padding: 20px 16px 48px; max-width: 1200px; margin: 0 auto; width: 100%; }
.view--front { max-width: 980px; }

.frontpage-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 8px; margin: 30px 0 20px;
}
.frontpage-head--top { margin-top: 8px; }
.section-label { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .22em; }
.section-meta { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); }

/* kickers — the small red section tag above headlines */
.kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.kicker--red { color: var(--danger); }

/* hero — the top story */
.hero { display: block; text-decoration: none; color: inherit; padding: 24px 0 30px; border-bottom: 1px solid var(--line-strong); }
/* featured with image: cinematic card — photo fills, text over a per-theme fade */
.hero--featured:not(.hero--noimg) {
  position: relative; display: flex; align-items: flex-end;
  min-height: min(112vw, 520px);
  border: var(--border) var(--line-strong); border-radius: 24px;
  overflow: hidden; box-shadow: var(--shadow);
  padding: 0; margin: 6px 0 30px;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__overlay {
  position: relative; width: 100%;
  padding: 104px 24px 26px;
  background: linear-gradient(to top, var(--hero-fade) 0%, var(--hero-fade) 52%, transparent 84%);
  color: var(--hero-ink);
}
.hero--featured:not(.hero--noimg) .hero__title { margin: 14px 0 10px; max-width: 24ch; color: var(--hero-ink); }
.hero--featured:not(.hero--noimg) .hero__stand { margin: 0; color: var(--hero-soft); }
.hero--featured:not(.hero--noimg) .hero__meta { justify-content: flex-start; color: var(--hero-faint); }
.hero--featured:not(.hero--noimg) .hero__fileno { color: var(--hero-faint); }
.hero--featured:not(.hero--noimg) .hero__cta { color: var(--hero-ink); }
/* kicker becomes a filled pill on the photo */
.hero--featured:not(.hero--noimg) .kicker--feat {
  background: var(--accent); color: var(--hero-pill-ink);
  padding: 7px 16px; border-radius: 999px; letter-spacing: .18em;
}
.hero--featured:not(.hero--noimg):hover .hero__title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.hero__kicker { display: flex; align-items: center; gap: 12px; }
.hero__fileno { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); }
.hero__title { font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 9vw, 74px); line-height: 1.02; letter-spacing: -0.01em; margin: 14px 0 14px; }
.hero:hover .hero__title { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.hero__stand { font-family: var(--body-serif); font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 62ch; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); text-transform: uppercase; }
.hero__cta { color: var(--ink); font-weight: 700; }

/* the latest — hairline-separated story river */
.newslist { display: flex; flex-direction: column; gap: var(--t-card-gap); }
.frontpage-head__right { display: flex; align-items: center; gap: 14px; }
/* THE LATEST "view all" toggle */
.viewall {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em;
  background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink); padding: 7px 14px; cursor: pointer; white-space: nowrap;
}
.viewall:hover { background: var(--ink); color: var(--paper); }
/* ── tag sections: one river per topic ── */
.fsec { margin-top: 8px; }
.fsec__more {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em;
  color: var(--accent-strong); text-decoration: none; white-space: nowrap;
}
.fsec__more:hover { text-decoration: underline; }
.fsec__rows { display: flex; flex-direction: column; }
.secrow {
  display: grid; grid-template-columns: 76px 1fr 24px; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.secrow__thumb {
  width: 76px; height: 76px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--paper-2); flex: none;
}
.secrow__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.secrow__thumb--init {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 30px; color: var(--ink);
  background: var(--accent);
}
.secrow__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.secrow__title {
  font-family: var(--serif); font-size: 19px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.secrow:hover .secrow__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.secrow__meta { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-faint); }
.secrow__go { font-size: 18px; color: var(--ink-faint); }
.secrow:hover .secrow__go { color: var(--accent-strong); }
.newsrow {
  display: block; text-decoration: none; color: inherit;
  position: relative;
  background: var(--card);
  border: var(--border) var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* news-site card: image on top, full-bleed */
.newsrow__img { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--code-bg); border-bottom: var(--border) var(--line-strong); }
.newsrow__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.newsrow__body { padding: var(--t-card-pad); position: relative; }
.newsrow--noimg .newsrow__body { padding: var(--t-card-pad); }
/* v1 open-file affordance — sits on the card's padding grid */
.newsrow__go {
  position: absolute; top: var(--t-card-pad); right: var(--t-card-pad);
  width: 36px; height: 36px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--border) var(--line); border-radius: 50%;
  background: var(--paper-2); color: var(--ink-faint);
  font-size: 15px; line-height: 1;
}
.newsrow:hover .newsrow__go { color: var(--ink); border-color: var(--line-strong); }
.pin-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--danger); }
.pin-badge svg { display: block; }
.newsrow__kicker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-right: 48px; }
.newsrow__kicker .stamp--lead { border: 2px solid var(--ink); }
.newsrow__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.newsrow__fileno { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); }
.newsrow__title { font-family: var(--serif); font-weight: 700; font-size: var(--t-card-title); line-height: 1.12; margin: 10px 0; padding-right: 52px; }
.newsrow:hover .newsrow__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.newsrow__sum { font-family: var(--body-serif); font-size: 16px; line-height: 1.55; color: var(--ink-soft); max-width: 68ch; }
.newsrow__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint); text-transform: uppercase; }
/* v1 system note — dashed meta box under the feed */
.sysnote {
  margin: 26px 0 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px 20px;
}
.sysnote__label {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .3em;
  margin-bottom: 8px;
}
.sysnote p {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; line-height: 1.7;
  font-style: italic; color: var(--ink-soft);
}

/* newspaper drop cap on article openers — opt-in via `dropcap: true` in frontmatter */
.dossier__body.dropcap > p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 700;
  font-size: 3.4em; float: left; line-height: .82;
  padding: 6px 12px 0 0;
}
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-soft); border: var(--border) var(--line); border-radius: var(--radius); padding: 3px 8px; }

/* stamps & chips — still used in the dossier kicker */
.stamp {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em;
  padding: 4px 8px; border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
}
.stamp--lead { background: var(--accent); color: var(--accent-ink); }
.stamp--leak { background: var(--danger); color: #fff; }
.stamp--data { background: var(--ink); color: var(--paper); }
.stamp--memo { background: transparent; color: var(--ink); border: var(--border) var(--ink); }
.chip {
  display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 600;
  letter-spacing: .1em; padding: 2px 8px; border-radius: var(--radius);
  background: var(--chip-bg); color: var(--chip-ink);
}
.chip--verified { background: var(--ink); color: var(--paper); }

/* publish page title */
.board-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 11vw, 84px);
  line-height: .95; letter-spacing: .01em;
}

/* front-page search */
.search {
  width: 100%; max-width: 420px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .06em;
  background: var(--paper-2); color: var(--ink);
  border: var(--border) var(--line-strong); border-radius: var(--radius);
  padding: 12px 14px; min-height: var(--tap);
}
.search::placeholder { color: var(--ink-faint); }
.search:focus { outline: 2px solid var(--accent-strong); outline-offset: -2px; }

.empty { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); padding: 40px 0; text-align: center; letter-spacing: .06em; }

/* ═══ DOSSIER (article) — mobile-first ═══ */
.dossier-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: var(--t-topbar-pad) 0;
  border-bottom: var(--border) var(--line);
}
.dossier-topbar__date { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-soft); white-space: nowrap; }
.dossier-topbar__date { margin-right: auto; }
.td__sub a {
  display: block; font-family: var(--mono); font-size: var(--t-toc-sub-size); letter-spacing: .02em;
  line-height: 1.45; color: var(--ink-soft); text-decoration: none;
}
.td__sub a:active { color: var(--ink); }
.close-btn {
  margin-left: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--t-closebtn-size); height: var(--t-closebtn-size);
  font-size: 16px; line-height: 1; text-decoration: none; color: var(--ink);
  border: 2px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper-2);
}
.close-btn:active { transform: translate(1px, 1px); }

.dossier { max-width: var(--t-article-width); margin: 0 auto; }
.dossier__kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 16px; }
.dossier__title { font-family: var(--serif); font-weight: 400; font-size: var(--t-article-title); line-height: 1.04; margin-bottom: 12px; text-wrap: balance; }
.dossier__standfirst { font-size: 18px; font-style: italic; color: var(--ink-soft); line-height: 1.5; margin-bottom: 16px; }
.dossier__byline { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink-faint); padding-bottom: 16px; margin-bottom: 20px; border-bottom: 2px solid var(--line-strong); display: flex; flex-wrap: wrap; gap: 6px 14px; }


.dossier__body { font-size: var(--t-body-size); line-height: 1.7; overflow-wrap: break-word; }
.dossier__body > * { margin-bottom: 1.25em; }
.dossier__body h2, .dossier__body h3, .dossier__body h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 1.6em 0 .6em; scroll-margin-top: 130px; text-wrap: balance; }
.dossier__body h2 { font-size: 30px; }
.dossier__body h3 { font-size: 24px; }
.dossier__body h4 { font-size: 20px; }
.dossier__body .h-anchor { font-family: var(--mono); font-size: .6em; color: var(--ink-faint); text-decoration: none; margin-left: 8px; opacity: 0; }
.dossier__body h2:hover .h-anchor, .dossier__body h3:hover .h-anchor { opacity: 1; }

.dossier__body p { margin-bottom: 1.25em; }
.dossier__body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dossier__body a.ext::after { content: "↗"; font-size: .75em; margin-left: 2px; text-decoration: none; display: inline-block; }
.dossier__body ul, .dossier__body ol { padding-left: 1.4em; margin-bottom: 1.25em; }
.dossier__body li { margin-bottom: .5em; }
.dossier__body li::marker { color: var(--ink-faint); }

.dossier__body blockquote {
  border-left: 3px solid var(--line-strong);
  padding: 4px 0 4px 18px; margin: 1.6em 0;
  font-family: var(--serif); font-size: 22px; font-style: italic; line-height: 1.45;
}
.dossier__body blockquote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: .1em; color: var(--ink-faint); margin-top: 10px; }

.dossier__body pre {
  background: var(--code-bg); border: var(--border) var(--line);
  border-radius: var(--radius); padding: 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
}
.dossier__body code { font-family: var(--mono); font-size: .82em; background: var(--code-bg); padding: 2px 6px; border-radius: 3px; }
.dossier__body pre code { background: none; padding: 0; }

.dossier__body table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dossier__body th, .dossier__body td { border: var(--border) var(--line); padding: 10px 12px; text-align: left; white-space: nowrap; }
.dossier__body th { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; background: var(--code-bg); }
.table-wrap { overflow-x: auto; margin-bottom: 1.25em; border-radius: var(--radius); }
.table-wrap table { display: table; margin-bottom: 0; }

.dossier__body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.dossier__body figure { margin: 1.6em 0; }
.dossier__body figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-faint); margin-top: 8px; line-height: 1.6; }

/* ── image filter presets: ![alt](img.jpg "filter: newspaper | caption") ──
   halftone / grain / newspaper / noir — combinable: "filter: newspaper, grain" */
.imgfilter__frame { position: relative; display: block; }
.imgfilter__frame img { display: block; width: 100%; }
.imgfilter--newspaper .imgfilter__frame img { filter: grayscale(1) contrast(1.28) brightness(1.04); }
.imgfilter--noir .imgfilter__frame img { filter: grayscale(1) contrast(1.5) brightness(.97); }
.imgfilter--halftone .imgfilter__frame img { filter: grayscale(1) contrast(1.45) brightness(1.06); }
.imgfilter--halftone .imgfilter__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgb(0 0 0 / .5) 1px, transparent 1.7px);
  background-size: 4px 4px;
}
.imgfilter--grain .imgfilter__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* pull quote */
.pull { border-top: 2px solid var(--line-strong); border-bottom: 2px solid var(--line-strong); padding: 20px 4px; margin: 1.8em 0; }
.pull p { font-family: var(--serif); font-size: 26px; line-height: 1.35; margin: 0 !important; }

/* memo callout */
.memo { border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--paper-2); padding: 18px; margin: 1.6em 0; box-shadow: var(--shadow); }
.memo__title { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.memo__title::before { content: ""; width: 8px; height: 8px; background: var(--danger); display: inline-block; }
.memo > *:last-child { margin-bottom: 0; }

/* spoiler text */
.spoiler {
  background: var(--ink); color: transparent; border-radius: 3px;
  cursor: pointer; padding: 0 4px; user-select: none;
  transition: color .2s, background .2s;
}
.spoiler.revealed { background: var(--code-bg); color: inherit; user-select: text; }
/* blurred spoiler variant: ||~text|| */
.spoiler--blur { background: var(--code-bg); color: inherit; filter: blur(6px); }
.spoiler--blur.revealed { filter: none; }

/* redacted */
.redacted { background: var(--ink); color: transparent; padding: 0 6px; border-radius: 2px; user-select: none; white-space: nowrap; }

/* charts: :::bar / :::pie */
.chart { border: var(--border); background: var(--card); padding: 18px; margin: 1.6em 0; }
.chart__title { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.chart__row { display: grid; grid-template-columns: minmax(80px, 28%) 1fr auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.chart__row:last-child { margin-bottom: 0; }
.chart__label { font-size: 13px; font-weight: 600; line-height: 1.3; }
.chart__track { height: 20px; background: var(--code-bg); border: var(--border); }
.chart__fill { display: block; height: 100%; background: var(--accent-strong); min-width: 2px; }
.chart__value { font-family: var(--mono); font-size: 13px; font-weight: 600; min-width: 40px; text-align: right; }
.pie__wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pie { width: 190px; height: 190px; border-radius: 50%; border: var(--border); flex: none; }
.pie__legend { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 420px; }
.pie__legend li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.pie__legend li:last-child { margin-bottom: 0; }
.pie__sw { width: 14px; height: 14px; border: var(--border); flex: none; }
.pie__label { font-weight: 600; }
.pie__val { margin-left: auto; font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }

/* editorial notices: :::editor / :::correction / :::update / :::tldr */
.notice { border: var(--border); border-left: 4px solid var(--ink); background: var(--card); padding: 14px 18px; margin: 1.6em 0; }
.notice__kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; margin-bottom: 10px; display: flex; gap: 12px; align-items: baseline; }
.notice__date { font-weight: 400; letter-spacing: .02em; color: var(--ink-soft); }
.notice__body > *:last-child { margin-bottom: 0; }
.notice--correction { border-left-color: var(--danger); }
.notice--update { border-left-color: var(--hl-blue); }
.notice--tldr { border-left-color: var(--accent-strong); }
.notice--tldr .notice__body { font-size: 17px; }

/* fact check: :::factcheck TRUE/FALSE/MIXED */
.factcheck { border: var(--border); background: var(--card); margin: 1.6em 0; }
.factcheck__badge { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; padding: 9px 16px; border-bottom: var(--border); display: flex; gap: 10px; align-items: center; }
.factcheck__dot { width: 11px; height: 11px; background: var(--ink); flex: none; }
.factcheck--true .factcheck__dot { background: var(--hl-green); border: 1px solid var(--ink); }
.factcheck--false .factcheck__dot { background: var(--danger); border: 1px solid var(--ink); }
.factcheck--mixed .factcheck__dot { background: var(--hl-blue); border: 1px solid var(--ink); }
.factcheck--unverified .factcheck__dot { background: var(--code-bg); border: 1px solid var(--ink); }
.factcheck__body { padding: 14px 16px; }
.factcheck__body > *:last-child { margin-bottom: 0; }

/* sealed image */
.sealed { position: relative; border: var(--border) var(--line-strong); border-radius: var(--radius); overflow: hidden; margin: 1.6em 0; }
.sealed img { filter: blur(22px) grayscale(.4); transform: scale(1.02); display: block; width: 100%; }
.sealed.unsealed img { filter: none; transform: none; }
.sealed__cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 20px;
  background: rgb(0 0 0 / .45); color: #fff; cursor: pointer; border: 0; width: 100%;
  font-family: var(--mono);
}
.sealed.unsealed .sealed__cover { display: none; }
.sealed__label { font-size: 11px; font-weight: 600; letter-spacing: .16em; border: 1.5px solid #fff; padding: 8px 14px; }
.sealed__reason { font-size: 12px; opacity: .85; max-width: 40ch; line-height: 1.6; }
/* sealed image wrapper: caption sits below the clipped box, never overlapping */
.sealedwrap { margin: 1.6em 0; }
.sealedwrap > .sealed { margin: 0; }

/* footnotes */
.footnotes { border-top: 2px solid var(--line-strong); margin-top: 2.5em; padding-top: 1em; font-size: 15px; }
.footnotes ol { padding-left: 1.4em; }
.footnotes li { margin-bottom: .6em; color: var(--ink-soft); }
.footnote-ref { font-family: var(--mono); font-size: .72em; text-decoration: none; vertical-align: super; }
.footnote-back { font-family: var(--mono); text-decoration: none; margin-left: 6px; }

/* dateline stamp */
.dateline { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--danger); border: 1.5px solid var(--danger); border-radius: 2px; padding: 4px 8px; transform: rotate(-2deg); margin: 16px 0 14px; }

/* ═══ PUBLISH ═══ */
.publish { max-width: 680px; }
.publish__lede { font-size: 18px; color: var(--ink-soft); margin: 14px 0 20px; line-height: 1.6; }
.publish__steps { padding-left: 1.3em; margin-bottom: 28px; display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.publish__steps li::marker { font-family: var(--mono); color: var(--ink-faint); }
.publish__h2 { font-family: var(--serif); font-size: 30px; font-weight: 400; margin-bottom: 8px; }
.publish__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin: 12px 0 24px; }
.publish__list li { border: var(--border) var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--paper-2); font-size: 15px; }
.publish code, .publish__steps code { font-family: var(--mono); font-size: .82em; background: var(--code-bg); padding: 2px 6px; border-radius: 3px; }

/* ═══ FOOTER ═══ */
.footer {
  border-top: var(--border) var(--line-strong);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-faint);
}
/* ── footer theme picker: brutalism day / night / amoled ── */
.themeset { display: flex; flex-direction: column; gap: 8px; }
.themeset__label { font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--ink-soft); }
.themeset__row { display: flex; flex-wrap: wrap; gap: 8px; }
.themepick {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em;
  color: var(--ink-soft); background: var(--paper-2);
  border: 2px solid var(--line-strong); border-radius: var(--radius);
  padding: 8px 12px; cursor: pointer;
}
.themepick__sw {
  width: 26px; height: 18px; flex: none; display: inline-block;
  background:
    linear-gradient(var(--sw-accent), var(--sw-accent)) left 3px top 3px / 8px 4px no-repeat,
    linear-gradient(var(--sw-ink), var(--sw-ink)) left 3px bottom 3px / 16px 3px no-repeat,
    var(--sw-paper);
  border: 1.5px solid var(--line-strong);
}
.themepick.is-active {
  background: var(--ink); color: var(--paper);
  box-shadow: 3px 3px 0 var(--accent-strong);
}
.themepick:active { transform: translate(1px, 1px); }
.themepick__sw--split {
  background:
    linear-gradient(var(--sw-accent, #e5ff00), var(--sw-accent, #e5ff00)) left 3px top 3px / 8px 4px no-repeat,
    linear-gradient(#000, #000) left 3px bottom 3px / 16px 3px no-repeat,
    linear-gradient(to right, #ffffff 50%, #131316 50%);
}
.themepick__state {
  font-size: 9px; padding: 2px 7px; margin-left: 2px;
  border: 1.5px solid currentColor; border-radius: 99px;
  letter-spacing: .12em; line-height: 1;
}
/* full-width THEME button in the footer — opens the bottom sheet */
.theme-open {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .18em;
  color: var(--ink); background: var(--paper-2);
  border: 2px solid var(--line-strong); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow);
}
.theme-open:active { transform: translate(2px, 2px); box-shadow: none; }
.theme-open__current { color: var(--ink-soft); }
.theme-open__dot {
  width: 14px; height: 14px; border-radius: 50%; margin-left: auto; flex: none;
  background: var(--accent); border: 2px solid var(--line-strong);
}
/* bottom sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgb(0 0 0 / .55);
}
.sheet-backdrop[hidden] { display: none; }
.theme-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  background: var(--paper); color: var(--ink);
  border-top: 2px solid var(--line-strong);
  border-radius: 18px 18px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgb(0 0 0 / .35);
  animation: sheet-up .22s ease;
}
.theme-sheet[hidden] { display: none; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.theme-sheet__grab { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.theme-sheet__grab:active { cursor: grabbing; }
.theme-sheet__handle { width: 44px; height: 4px; border-radius: 4px; background: var(--line-strong); opacity: .4; margin: 2px auto 12px; }
.theme-sheet__head { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .2em; margin-bottom: 14px; }
.theme-sheet__close { font-size: 16px; background: none; border: 2px solid var(--line-strong); border-radius: 8px; color: var(--ink); width: 34px; height: 34px; cursor: pointer; }
.theme-sheet__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.theme-sheet__modes .themepick { justify-content: center; padding: 12px; }
.theme-sheet__label { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .2em; color: var(--ink-soft); margin-bottom: 10px; }
.theme-sheet__accents { display: flex; flex-wrap: wrap; gap: 12px; }
/* ring-style accent swatches */
.accent-pick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 4px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .08em; color: var(--ink-soft);
}
.accent-pick__ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: conic-gradient(var(--ac1) 0 50%, var(--ac2) 50% 100%);
  position: relative;
}
.accent-pick__ring--default {
  background: conic-gradient(var(--ink) 0 25%, var(--paper-2) 0 50%, var(--accent) 0 75%, var(--paper-2) 0 100%);
}
.accent-pick[aria-checked="true"] .accent-pick__ring { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent-strong); }
.accent-pick[aria-checked="true"] { color: var(--ink); }

/* ═══ TABLET+ ═══ */
@media (min-width: 640px) {
  .tabs__meta { display: block; }
  .footer { flex-direction: row; justify-content: space-between; }
}

/* ═══ DESKTOP ═══ */
@media (min-width: 1024px) {
  .view { padding: 32px 24px 64px; }
  .dateline-bar { padding: 6px 24px; }
  .dossier__body { font-size: 19px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════
   COMPONENTS — timeline, embeds, players, tabs,
   boxes, alerts, badges, tooltips, buttons…
   All theme-aware via the same variables.
   ═══════════════════════════════════════════════ */

/* ── timeline ── */
/* note: .dossier__body ol has higher specificity than .timeline, so re-assert padding */
.timeline, .dossier__body .timeline { list-style: none; padding: 0; padding-left: 0; margin: 1.6em 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6.5px; top: 6px; bottom: 6px; width: 3px; background: var(--line-strong); }
.timeline li { position: relative; padding: 0 0 1.4em 34px; }
.timeline li:last-child { padding-bottom: 2px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper); }
.timeline li::after { content: ""; position: absolute; left: 5px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.timeline__time { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--ink-soft); display: block; margin-bottom: 3px; }
.timeline__event { font-size: 16px; }
.timeline__event > *:last-child { margin-bottom: 0; }

/* ── embeds ── */
.embed16x9 { position: relative; aspect-ratio: 16/9; margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #0a0a0a; }
.embed16x9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.aplayer { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--paper-2); padding: 14px; }
.aplayer audio { width: 100%; accent-color: var(--ink); display: block; }
.aplayer__cap { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-faint); margin-top: 10px; line-height: 1.6; }

/* ── custom video player ── */
.vplayer { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); overflow: hidden; background: #0a0a0a; }
.vplayer__stage { position: relative; background: #000; }
.vplayer__stage video { display: block; width: 100%; aspect-ratio: 16/9; background: #000; cursor: pointer; }
.vplayer__big { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; border: 2px solid #fff; background: rgb(0 0 0 / .55); color: #fff; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.vplayer__big:hover { transform: scale(1.08); }
.vplayer__big.is-hidden { display: none; }
.vplayer__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--ink); color: var(--paper); }
.vplayer__bar button { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: var(--radius); min-height: 34px; min-width: 34px; padding: 0 10px; cursor: pointer; white-space: nowrap; }
.vplayer__bar button:hover { background: rgb(128 128 128 / .25); }
.vplayer__seek { flex: 1; height: 30px; position: relative; cursor: pointer; }
.vplayer__seek::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 5px; transform: translateY(-50%); background: rgb(128 128 128 / .45); border-radius: 3px; }
.vplayer__fill { position: absolute; left: 0; top: 50%; height: 5px; transform: translateY(-50%); width: 0; max-width: 100%; background: var(--accent); border-radius: 3px; pointer-events: none; }
.vplayer__time { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; white-space: nowrap; opacity: .85; }
.vplayer__cap { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; line-height: 1.6; color: var(--ink-soft); background: var(--paper-2); padding: 10px 12px; border-top: var(--border) var(--line-strong); }

/* ── code box: editor chrome, theme-aware surface, popular syntax palette ── */
.codebox { margin: 1.6em 0; border: 1px solid var(--codebox-line); border-radius: var(--radius); overflow: hidden; background: var(--codebox-bg); color: var(--codebox-ink); }
.codebox__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--codebox-bar); border-bottom: 1px solid var(--codebox-line); padding: 6px 6px 6px 14px; }
.codebox__file { display: inline-flex; align-items: center; gap: 8px; font-family: var(--code-font); font-size: 12.5px; font-weight: 500; color: var(--codebox-muted); min-width: 0; }
.codebox__file > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codebox__actions { display: flex; align-items: center; gap: 2px; flex: none; }
.codebox__iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: transparent; border: 0; border-radius: 8px; color: var(--codebox-muted); cursor: pointer; }
.codebox__iconbtn:hover { background: rgb(127 132 142 / .18); color: var(--codebox-ink); }
.codebox__iconbtn.is-copied { color: var(--df-add); }
.codebox__fold svg { transition: transform .18s ease; }
.codebox.is-folded .codebox__fold svg { transform: rotate(180deg); }
.codebox.is-folded .codebox__body { display: none; }
.codebox__body pre { background: transparent !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; padding: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.codebox__body code { font-family: var(--code-font); font-size: 13.5px; line-height: 1.7; background: none; padding: 0; }
/* popular syntax palette, per-theme via --tok-* */
.codebox .hljs-keyword, .codebox .hljs-selector-tag, .codebox .hljs-built_in { color: var(--tok-kw); }
.codebox .hljs-title, .codebox .hljs-title.function_, .codebox .hljs-section { color: var(--tok-fn); }
.codebox .hljs-string, .codebox .hljs-regexp, .codebox .hljs-meta .hljs-string, .codebox .hljs-meta { color: var(--tok-str); }
.codebox .hljs-number, .codebox .hljs-literal { color: var(--tok-num); }
.codebox .hljs-comment, .codebox .hljs-quote { color: var(--tok-com); font-style: italic; }
.codebox .hljs-attr, .codebox .hljs-attribute, .codebox .hljs-variable, .codebox .hljs-template-variable { color: var(--tok-fn); }
.codebox .hljs-operator, .codebox .hljs-punctuation { color: var(--codebox-muted); }
.codebox .hljs-type, .codebox .hljs-class .hljs-title { color: var(--tok-fn); }
.codebox .hljs-emphasis { font-style: italic; }
.codebox .hljs-strong { font-weight: 700; }
/* mono override: `mono` flag kills the palette */
.codebox--mono [class*="hljs-"] { color: inherit !important; }
.codebox--mono .hljs-keyword, .codebox--mono .hljs-built_in, .codebox--mono .hljs-selector-tag { font-weight: 700; }
.codebox--mono .hljs-comment, .codebox--mono .hljs-quote { color: var(--tok-com); font-style: italic; }
/* diff lines */
.codebox .df-add { display: block; color: var(--df-add); background: var(--df-add-bg); }
.codebox .df-del { display: block; color: var(--df-del); background: var(--df-del-bg); }
.codebox .df-hunk { display: block; color: var(--codebox-muted); font-weight: 700; }
/* bare code box: no header, copy button floats inside and appears on tap/focus */
.codebox--bare { position: relative; cursor: text; }
.codebox__copy--float { position: absolute; top: 8px; right: 8px; z-index: 2; background: var(--codebox-bar); border: 1px solid var(--codebox-line); opacity: 0; pointer-events: none; transition: opacity .15s; }
.codebox--bare:focus-within .codebox__copy--float, .codebox--bare.is-open .codebox__copy--float { opacity: 1; pointer-events: auto; }
/* tabbed code box: :::codetabs */
.codetabs { margin: 1.6em 0; background: var(--codebox-bg); color: var(--codebox-ink); border: 1px solid var(--codebox-line); border-radius: var(--radius); overflow: hidden; }
.codetabs .ctabs__bar { display: flex; gap: 2px; overflow-x: auto; background: var(--codebox-bar); border-bottom: 1px solid var(--codebox-line); padding: 6px 10px 0; -webkit-overflow-scrolling: touch; }
.codetabs .ctabs__btn { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; padding: 10px 14px; min-height: var(--tap); background: transparent; color: var(--codebox-muted); border: 0; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.codetabs .ctabs__btn:hover { color: var(--codebox-ink); }
.codetabs .ctabs__btn.is-active { color: var(--tok-fn); border-bottom-color: var(--tok-fn); background: transparent; }
.codetabs .ctabs__panel { display: none; }
.codetabs .ctabs__panel.is-active { display: block; }
.codetabs .codebox { margin: 0; border: 0; border-radius: 0; background: transparent; }
/* social embeds: X/Twitter + Reddit + Instagram */
.embed { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--card); padding: 14px; min-height: 140px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.embed blockquote { margin: 0; border: 0; padding: 0; width: 100%; }
.embed .twitter-tweet { margin: 0 auto !important; }
.embed .instagram-media { margin: 0 auto !important; min-width: 0 !important; }
/* directive tables: :::table */
.dtable { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); overflow-x: auto; background: var(--card); }
.dtable table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable caption { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-align: left; padding: 12px 14px; border-bottom: var(--border) var(--line-strong); background: var(--paper-2); }
.dtable th { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 10px 14px; background: var(--ink); color: var(--paper); white-space: nowrap; }
.dtable td { padding: 10px 14px; border-top: var(--border) var(--line); vertical-align: top; }
.dtable tbody tr:nth-child(even) td { background: var(--paper-2); }

/* ── dossier box ── */
.dbox { border: 2px solid var(--line-strong); border-radius: var(--radius); margin: 1.6em 0; background: var(--paper-2); box-shadow: var(--shadow); }
.dbox__title { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; padding: 10px 14px; border-bottom: var(--border) var(--line-strong); background: var(--ink); color: var(--paper); }
.dbox__body { padding: 16px; font-size: 16px; }
.dbox__body > *:last-child { margin-bottom: 0; }
.dbox--red { border-color: var(--danger); }
.dbox--red .dbox__title { background: var(--danger); border-color: var(--danger); color: #fff; }
.dbox--ghost { background: transparent; box-shadow: none; }
.dbox--ghost .dbox__title { background: transparent; color: var(--ink); }

/* ── stat callout ── */
.stat { border: 2px solid var(--line-strong); border-left: 10px solid var(--accent-strong); border-radius: var(--radius); margin: 1.6em 0; padding: 18px 20px; background: var(--paper-2); box-shadow: var(--shadow); }
.stat__number { font-family: var(--mono); font-weight: 800; font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1; letter-spacing: -0.02em; }
.stat__label { margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.stat__label > p { margin: 0; }
.stat__label > *:last-child { margin-bottom: 0; }
.stat--red { border-color: var(--danger); border-left-color: var(--danger); }
.stat--red .stat__number { color: var(--danger); }
.stat--ghost { background: transparent; box-shadow: none; border-style: dashed; }

/* ── tabbed content ── */
.ctabs { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.ctabs__bar { display: flex; overflow-x: auto; background: var(--paper-2); border-bottom: var(--border) var(--line-strong); -webkit-overflow-scrolling: touch; }
.ctabs__btn { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; padding: 12px 18px; min-height: var(--tap); background: transparent; color: var(--ink-soft); border: 0; border-right: var(--border) var(--line); cursor: pointer; white-space: nowrap; }
.ctabs__btn.is-active { background: var(--ink); color: var(--paper); }
.ctabs__panel { display: none; padding: 16px; }
.ctabs__panel.is-active { display: block; }
.ctabs__panel > *:last-child { margin-bottom: 0; }
.ctabs__panel .table-wrap { margin-bottom: 0; }

/* ── numbered section ── */
.dossier__body { counter-reset: dsec; }
.dsection { counter-increment: dsec; border-top: 2px solid var(--line-strong); margin: 2.2em 0 1.6em; padding-top: 14px; }
.dsection__title { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .16em; margin-bottom: 14px; }
.dsection__title::before { content: "SEC." counter(dsec, decimal-leading-zero) " — "; color: var(--ink-faint); }
.dsection__body > *:last-child { margin-bottom: 0; }

/* ── collapsing block ── */
/* ── collapse: theme-aware accordion panel ── */
.collapse { margin: 1.2em 0; background: var(--codebox-bg); color: var(--codebox-ink); border: 1px solid var(--codebox-line); border-radius: var(--radius); overflow: hidden; }
.collapse > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; min-height: var(--tap); cursor: pointer; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.collapse > summary::-webkit-details-marker { display: none; }
.collapse > summary svg { flex: none; color: var(--codebox-muted); transition: transform .18s ease; }
.collapse[open] > summary svg { transform: rotate(180deg); }
.collapse__body { border-top: 1px solid var(--codebox-line); padding: 16px 18px; font-size: 16px; }
.collapse__body > *:last-child { margin-bottom: 0; }
.collapse__body a { color: var(--tok-fn); }

/* ── dividers ── */
.dossier__body hr { border: 0; border-top: 2px solid var(--line-strong); margin: 2.2em 0; }
.divider { display: flex; align-items: center; gap: 14px; margin: 2.2em 0; color: var(--ink-faint); font-size: 11px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line-strong); }

/* ── badges ── */
.badge { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; padding: 4px 10px; border-radius: var(--radius); background: var(--ink); color: var(--paper); vertical-align: 2px; white-space: nowrap; }
.badge--red { background: var(--danger); color: #fff; }
.badge--ghost { background: transparent; color: var(--ink); border: var(--border) var(--ink); }

/* ── alerts ── */
.alert { border: var(--border) var(--line-strong); border-left-width: 6px; border-radius: var(--radius); margin: 1.6em 0; background: var(--paper-2); }
.alert__title { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; padding: 12px 14px 0; display: flex; align-items: center; gap: 8px; }
.alert__title svg { width: 16px; height: 16px; flex: none; }
.alert__body { padding: 8px 14px 14px; font-size: 16px; }
.alert__body > *:last-child { margin-bottom: 0; }
.alert--note { border-left-color: var(--ink); }
.alert--tip { border-left-color: var(--accent-strong); }
.alert--tip .alert__title svg { color: var(--ink-faint); }
.alert--important { border-left-color: var(--ink); }
.alert--important .alert__title { background: var(--ink); color: var(--paper); padding: 10px 14px; margin-bottom: 4px; }
.alert--warning { border-left-color: #d9930d; }
.alert--warning .alert__title { color: #b57a08; }
.alert--caution { border-left-color: var(--danger); }
.alert--caution .alert__title { color: var(--danger); }
.alert--info { border-left-color: #1d4ed8; }
.alert--info .alert__title { color: #1d4ed8; }
.alert--success { border-left-color: #047857; }
.alert--success .alert__title { color: #047857; }
.alert--error { border-left-color: var(--danger); }
.alert--error .alert__title { color: var(--danger); }
[data-theme="dark"] .alert--warning .alert__title { color: #e8a013; }
[data-theme="dark"] .alert--info .alert__title { color: #7aa5ff; }
[data-theme="dark"] .alert--success .alert__title { color: #4ade80; }

/* ── download box — file card ── */
.dlbox { display: flex; align-items: center; gap: 14px; border: 2px solid var(--line-strong); border-radius: var(--radius); background: var(--paper-2); box-shadow: var(--shadow); padding: 14px 16px; margin: 1.6em 0; }
.dlbox__ext { flex: none; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 9px 10px; }
.dlbox__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dlbox__meta b { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.dlbox__meta span { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .08em; }
.dlbox__btn { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 10px 18px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-decoration: none; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.dlbox__btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ── steps — numbered guide ── */
.steps { list-style: none; counter-reset: step; margin: 1.6em 0; padding: 0; }
.dossier__body .steps li { counter-increment: step; position: relative; padding: 2px 0 1.3em 54px; }
.dossier__body .steps li:last-child { padding-bottom: 2px; }
.dossier__body .steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--paper); background: var(--ink); border-radius: 50%; }
.dossier__body .steps li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line-strong); opacity: .25; border-radius: 2px; }
.dossier__body .steps li:last-child::after { display: none; }
.steps li > *:first-child { margin-top: 0; }
.steps li > *:last-child { margin-bottom: 0; }

/* ── app card — app intro with scrolling screenshot bar ── */
.appcard { border: var(--border); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 1.6em 0; overflow: hidden; }
.appcard__head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 14px; }
.appcard__icon { width: 64px; height: 64px; border-radius: 16px; border: var(--border); object-fit: cover; flex: none; background: var(--paper-2); }
.appcard__icon--blank { display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: var(--paper); background: var(--ink); }
.appcard__id { flex: 1; min-width: 0; }
.appcard__id b { display: block; font-size: 18px; letter-spacing: -.01em; }
.appcard__id span { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .08em; }
.appcard__get { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); padding: 10px 16px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-decoration: none; color: var(--accent-ink); background: var(--accent); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.appcard__get:active { transform: translate(2px, 2px); box-shadow: none; }
.appcard__desc { padding: 0 18px 14px; font-size: 15px; }
.appcard__desc > *:last-child { margin-bottom: 0; }
.appcard__shots { display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 18px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.appcard__shots img { height: 190px; width: auto; flex: none; border: var(--border); border-radius: 12px; scroll-snap-align: start; background: var(--paper-2); }

/* ── tooltips ── */
.has-tip { border-bottom: 1px dotted var(--ink-soft); cursor: help; position: relative; }
.has-tip__icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px; border: 1px solid var(--ink-soft); border-radius: 50%; font-size: 9px; font-style: normal; font-weight: 700; line-height: 1; color: var(--ink-soft); vertical-align: 2px; font-family: var(--mono); }
.has-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%) translateY(4px); background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 11px; letter-spacing: .03em; line-height: 1.55; padding: 9px 11px; border-radius: var(--radius); width: max-content; max-width: 230px; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 60; box-shadow: var(--shadow); }
.has-tip:hover::after, .has-tip:focus-visible::after, .has-tip.show-tip::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.has-tip:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

/* ── kbd ── */
.dossier__body kbd, .publish kbd { font-family: var(--mono); font-size: .78em; font-weight: 600; background: var(--paper-2); border: var(--border) var(--line-strong); border-bottom-width: 3px; border-radius: 5px; padding: 2px 8px; white-space: nowrap; }

/* ── buttons ── */
.dossier__body a.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 10px 22px; margin: 4px 8px 4px 0; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-decoration: none; background: var(--ink); color: var(--paper); border: var(--border) var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.dossier__body a.btn:hover { text-decoration: none; }
.dossier__body a.btn:active { transform: translateY(1px); }
.dossier__body a.btn--red { background: var(--danger); border-color: var(--danger); color: #fff; }
.dossier__body a.btn--ghost { background: transparent; color: var(--ink); }

/* ── checklists ── */
.dossier__body ul.contains-task-list { list-style: none; padding-left: .2em; }
.dossier__body li.task-list-item { list-style: none; margin-bottom: .6em; }
.dossier__body .task-list-item > input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--ink); margin-right: 10px; vertical-align: -4px; flex: none; cursor: default; }

/* ═══════════════════════════════════════════════
   BATCH 024.5 — featured hero, download button, stars,
   ID cards, logos, image alignment, back-to-top,
   desk, custom lists & checklists
   ═══════════════════════════════════════════════ */

/* ── featured hero — centered, editorial ── */
.kicker--feat { color: var(--danger); }
.hero--featured { text-align: center; padding: 36px 0 34px; }
.hero--featured .hero__kicker { justify-content: center; }
.hero--featured .hero__title { margin: 18px auto 14px; max-width: 22ch; text-wrap: balance; }
.hero--featured .hero__stand { margin: 0 auto; }
.hero--featured .hero__meta { justify-content: center; }
/* cinematic image hero: text bottom-left over the dark fade, not centered */
.hero--featured:not(.hero--noimg) { text-align: left; }
.hero--featured:not(.hero--noimg) .hero__kicker { justify-content: flex-start; }

/* thumbnail filters for board cards: manifest "filter" (preset names or raw CSS) */
.tfilter--newspaper { filter: grayscale(1) contrast(1.28) brightness(1.04); }
.tfilter--noir { filter: grayscale(1) contrast(1.5) brightness(.97); }
.tfilter--halftone { filter: grayscale(1) contrast(1.45) brightness(1.06); }
.tfilter--grain { filter: grayscale(.85) contrast(1.1) brightness(1.02); }
.tfilter--newspaper.tfilter--grain { filter: grayscale(1) contrast(1.32) brightness(1.05); }

/* ── download button ── */
.dl-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: var(--tap); padding: 10px 18px; margin: 6px 10px 6px 0;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-decoration: none; vertical-align: middle;
  background: var(--paper-2); color: var(--ink);
  border: 2px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dl-btn:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.dl-btn:active { transform: translateY(1px); }
.dl-btn__icon { font-size: 17px; line-height: 1; }
.dl-btn__ext { font-size: 10px; font-weight: 700; letter-spacing: .08em; border: 1px solid currentColor; border-radius: 3px; padding: 3px 7px; }
[data-theme="brutalism"] .dl-btn { border-width: 3px; box-shadow: 4px 4px 0 #000; }
[data-theme="brutalism"] .dl-btn:hover { background: #000; color: #e5ff00; }
[data-theme="brutalism"] .dl-btn:active { box-shadow: 0 0 0 #000; transform: translate(4px, 4px); }

/* ── rating stars ── */
.stars { position: relative; display: inline-block; line-height: 1; font-size: 19px; letter-spacing: 3px; white-space: nowrap; vertical-align: -2px; }
.stars__bg { color: var(--ink-faint); }
.stars__fg { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--star); white-space: nowrap; }

/* ── person / movie ID cards ── */
.id-card {
  border: var(--border) var(--line-strong); border-radius: var(--radius);
  background: var(--paper-2); margin: 1.6em 0; overflow: hidden;
  box-shadow: var(--shadow); max-width: 420px;
}
.id-card__photo { background: var(--ink); line-height: 0; }
.id-card__img { width: 100%; height: 240px; object-fit: cover; display: block; }
.id-card__img.is-round { width: 150px; height: 150px; border-radius: 50%; margin: 22px auto 0; border: 3px solid var(--line-strong); }
.id-card__body { padding: 16px 18px 18px; font-size: 16px; }
.id-card__body > *:first-child { margin-top: 0; }
.id-card__body > *:last-child { margin-bottom: 0; }
.id-card__name { font-family: var(--serif); font-size: 24px; line-height: 1.25; margin-bottom: 10px; }
.id-card__facts { margin: 0 0 4px; }
.id-card__fact { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; font-size: 14px; }
.id-card__fact dt { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding-top: 2px; }
.id-card__fact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.id-card__fact--div { border-bottom: 1px solid var(--line); }
.id-card__fact--div:last-child { border-bottom: 0; }
.id-card__div { border: 0; border-top: 1px dashed var(--line-strong); margin: 8px 0; }
.id-card__bio { font-size: 15px; margin-top: 10px; color: var(--ink-soft); }
.id-card__bio > *:last-child { margin-bottom: 0; }
[data-theme="brutalism"] .id-card { border-width: 3px; box-shadow: 8px 8px 0 #000; }

/* movie metadata box: :::movie / :::moviebox — file-card look */
.movie { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.movie__head { background: var(--ink); color: var(--paper); padding: 8px 16px; }
.movie__kicker { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.movie__title { font-family: var(--serif); font-size: 28px; line-height: 1.2; padding: 12px 16px; border-bottom: var(--border) var(--line-strong); }
.movie__grid { display: grid; grid-template-columns: 190px 1fr; gap: 0; }
.movie__posterwrap { margin: 0; line-height: 0; border-right: var(--border) var(--line-strong); background: var(--paper-2); }
.movie__poster { width: 100%; height: 100%; min-height: 250px; max-height: 340px; object-fit: cover; display: block; }
.movie__facts { margin: 0; padding: 4px 16px 8px; min-width: 0; }
.movie__fact { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.movie__fact:last-child { border-bottom: 0; }
.movie__fact dt { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding-top: 2px; }
.movie__fact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.movie__syn { font-size: 15px; padding: 12px 16px 16px; border-top: var(--border) var(--line-strong); background: var(--paper-2); }
.movie__syn > *:first-child { margin-top: 0; }
.movie__syn > *:last-child { margin-bottom: 0; }
[data-theme="brutalism"] .movie { border-width: 3px; box-shadow: 8px 8px 0 #000; }
@media (max-width: 560px) {
  .movie__grid { grid-template-columns: 1fr; }
  .movie__posterwrap { border-right: 0; border-bottom: var(--border) var(--line-strong); }
  .movie__poster { max-height: 300px; }
}

/* movie showcase card: :::moviecard — poster + ratings + trailer */
.mcard { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-columns: 220px 1fr; }
.mcard__poster { line-height: 0; background: var(--ink); min-height: 100%; }
.mcard__poster img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.mcard__body { padding: 18px 20px 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mcard__body > *:first-child { margin-top: 0; }
.mcard__kicker { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; color: var(--ink-soft); }
.mcard__title { font-family: var(--serif); font-size: clamp(24px, 4vw, 34px); line-height: 1.15; }
.mcard__year { font-size: .65em; color: var(--ink-soft); font-family: var(--body-serif); }
.mcard__tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mcard__cert { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; border: 2px solid var(--ink); border-radius: 3px; padding: 3px 8px; }
.mcard__genres { display: contents; }
.mcard__genre { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; background: var(--paper-2); border: var(--border) var(--line); border-radius: 20px; padding: 4px 12px; color: var(--ink-soft); }
.mcard__ratings { display: flex; flex-wrap: wrap; gap: 10px; }
.mcard__rating { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border: var(--border) var(--line); border-radius: var(--radius); padding: 8px 12px; }
.mcard__rating .rlogo { width: 44px; height: 22px; flex: none; }
.mcard__rating b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mcard__rating span { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.mcard__summary { font-size: 15px; line-height: 1.65; margin: 0; }
.mcard__cast { font-size: 13px; color: var(--ink-soft); }
.mcard__cast span { display: block; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; margin-bottom: 4px; color: var(--ink-faint); }
.mcard__trailer { align-self: flex-start; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; background: var(--ink); color: var(--paper); text-decoration: none; padding: 12px 20px; border-radius: var(--radius); margin-top: 2px; }
.mcard__trailer:hover { opacity: .85; }
[data-theme="brutalism"] .mcard { border-width: 3px; box-shadow: 8px 8px 0 #000; }
[data-theme="brutalism"] .mcard__trailer { box-shadow: 4px 4px 0 #000; }
@media (max-width: 560px) {
  .mcard { grid-template-columns: 1fr; }
  .mcard__poster img { min-height: 0; max-height: 380px; }
}
[data-theme="brutalism"] .movie { border-width: 3px; box-shadow: 8px 8px 0 #000; }

/* diagrams: ```mermaid fences */
.diagram { margin: 1.6em 0; border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--card); padding: 18px 12px; overflow-x: auto; }
.diagram pre.mermaid { margin: 0; border: 0; background: transparent; padding: 0; text-align: center; font-family: var(--mono); font-size: 13px; }
.diagram svg { max-width: 100%; height: auto; }
[data-theme="brutalism"] .diagram { border-width: 3px; box-shadow: 8px 8px 0 #000; }

/* ── inline logo with custom size ── */
img.logo { display: inline-block; width: auto; max-height: 64px; vertical-align: -10px; border: 0; border-radius: 0; margin: 0 6px; }

/* ── image alignment (fig--center / --left / --right) ── */
figure.fig--center { text-align: center; }
figure.fig--center img { margin-left: auto; margin-right: auto; }
figure.fig--center figcaption { text-align: center; }
figure.fig--right { text-align: right; }
figure.fig--right figcaption { text-align: right; }
figure.fig--left { text-align: left; }
figure.fig--left figcaption { text-align: left; }

/* ── back-to-top button ── */
.to-top {
  position: fixed; right: 16px; bottom: 18px; z-index: 150;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-soft);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 18px; line-height: 1; cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}
.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--ink); border-color: var(--ink-soft); }
[data-theme="brutalism"] .to-top { border-radius: 0; border-width: 2px; box-shadow: 4px 4px 0 #000; }

/* ── desk ── */
.desk { max-width: 720px; margin: 0 auto; }
.desk__gate { text-align: center; padding: 48px 0; }
.desk__form { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.desk__code { max-width: 220px; text-align: center; }
.desk__err { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--danger); margin-top: 14px; }
.btn-desk {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 10px 20px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  background: var(--ink); color: var(--paper);
  border: var(--border) var(--line-strong); border-radius: var(--radius); cursor: pointer;
}
.btn-desk:hover { opacity: .88; }
.btn-desk:active { transform: translateY(1px); }
.btn-desk--ghost { background: transparent; color: var(--ink); }
.btn-desk[aria-pressed="false"] { background: transparent; color: var(--ink-faint); }
.desk__title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 7vw, 48px); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.desk__tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
/* FILE INFO panel: edit frontmatter without touching YAML */
.deskmeta { border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--paper-2); padding: 14px; margin: 0 0 14px; box-shadow: var(--shadow); }
.deskmeta[hidden] { display: none; }
.deskmeta__head { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.deskmeta__row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.deskmeta__row--2 { grid-template-columns: 1fr 1fr; }
.deskmeta__field { display: block; margin-bottom: 10px; min-width: 0; }
.deskmeta__field > span { display: block; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .14em; color: var(--ink-soft); margin-bottom: 4px; }
.deskmeta__field input, .deskmeta__field textarea { width: 100%; font-family: var(--mono); font-size: 13px; background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 10px; }
.deskmeta__field input:focus, .deskmeta__field textarea:focus { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.deskmeta__field textarea { resize: vertical; }
.deskmeta__actions { display: flex; gap: 10px; margin-top: 4px; }
/* publish panel */
.deskpublish__steps { font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--ink-soft); margin: 0 0 14px; }
.deskpublish__steps b { color: var(--ink); }
.deskpublish__copyrow { display: flex; gap: 8px; align-items: stretch; }
.deskpublish__copyrow input, .deskpublish__copyrow textarea { flex: 1; min-width: 0; }
.deskpublish__copyrow .btn-desk { flex: none; }
.desk__input {
  width: 100%; min-height: 300px;
  font-family: var(--mono); font-size: 14px; line-height: 1.65;
  background: var(--paper-2); color: var(--ink);
  border: var(--border) var(--line-strong); border-radius: var(--radius);
  padding: 16px; resize: vertical;
}
.desk__input:focus { outline: 2px solid var(--accent-strong); outline-offset: -2px; }
.desk__live { border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--paper-2); margin-top: 14px; box-shadow: var(--shadow); overflow: hidden; }
.desk__livehead { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; background: var(--ink); color: var(--paper); padding: 8px 14px; border-bottom: var(--border) var(--line-strong); }
.desk__live .dossier__body { padding: 26px 22px; }
.desk__live .dossier__body > *:first-child { margin-top: 0; }
[data-theme="brutalism"] .desk__live, [data-theme="brutalism"] .desk__input, [data-theme="brutalism"] .toolbox { border-width: 3px; box-shadow: 8px 8px 0 #000; }
/* component toolbox: insert snippets at the cursor */
.toolbox { border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--paper-2); padding: 10px 12px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.toolbox__group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.toolbox__label { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .14em; color: var(--ink-soft); width: 44px; flex: none; }
.toolbox__btn { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; min-height: 32px; }
.toolbox__btn:hover { background: var(--ink); color: var(--paper); }
.toolbox__btn:active { transform: translateY(1px); }
[data-theme="brutalism"] .btn-desk { border-width: 3px; box-shadow: 4px 4px 0 #000; }

/* ── custom lists: square bullets, dossier numbering ── */
.dossier__body ul:not(.contains-task-list):not(.timeline):not(.rlist) { list-style: none; padding-left: 0; }
.dossier__body ul:not(.contains-task-list):not(.timeline):not(.rlist) > li { position: relative; padding-left: 24px; }
.dossier__body ul:not(.contains-task-list):not(.timeline):not(.rlist) > li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 7px; height: 7px; background: var(--accent-strong); border: 1px solid var(--line-strong);
}
.dossier__body ul:not(.contains-task-list):not(.timeline):not(.rlist) ul > li { padding-left: 20px; }
.dossier__body ul:not(.contains-task-list):not(.timeline):not(.rlist) ul > li::before { width: 5px; height: 5px; background: transparent; top: .72em; }

/* ── round list: :::roundlist ── */
.dossier__body ul.rlist { list-style: none; padding-left: 0; }
.dossier__body ul.rlist > li { position: relative; padding-left: 24px; margin-bottom: .55em; }
.dossier__body ul.rlist > li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-strong); border: 1px solid var(--line-strong);
}
.dossier__body ul.rlist ul > li { padding-left: 20px; }
.dossier__body ul.rlist ul > li::before { width: 5px; height: 5px; background: transparent; top: .72em; }

.dossier__body ol:not(.timeline):not(.steps) { list-style: none; padding-left: 0; counter-reset: dlist; }
.dossier__body ol:not(.timeline):not(.steps) > li { counter-increment: dlist; position: relative; padding-left: 48px; }
.dossier__body ol:not(.timeline):not(.steps) > li::before {
  content: counter(dlist, decimal-leading-zero);
  position: absolute; left: 0; top: .28em;
  font-family: var(--mono); font-size: .68em; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-faint); border-bottom: 2px solid var(--accent-strong); padding-bottom: 1px;
}
.dossier__body ol:not(.timeline) ol > li { padding-left: 40px; }
/* keep footnote numbers classic */
.dossier__body .footnotes ol { list-style: decimal; padding-left: 1.4em; }
.dossier__body .footnotes ol > li { padding-left: 0; }
.dossier__body .footnotes ol > li::before { content: none; }

/* ── custom checklists: Lucide icons ── */
.dossier__body ul.contains-task-list { list-style: none; padding-left: .2em; }
.dossier__body li.task-list-item { list-style: none; position: relative; padding-left: 38px; margin-bottom: .7em; }
.dossier__body .task-icon {
  position: absolute; left: 0; top: 2px; width: 24px; height: 24px;
  display: inline-flex; color: var(--ink-faint); pointer-events: none;
}
.dossier__body .task-icon svg { width: 100%; height: 100%; display: block; }
.dossier__body .task-icon--done { color: var(--task-done); }

/* ══════════════════════════════════════════════════════════════
   DESKTOP LAYOUT (≥1024px) — fill the canvas, no empty gutters
   The mobile-first base above is untouched; this only re-grids
   large screens: front page, hero, article + rail, desk.
   ══════════════════════════════════════════════════════════════ */

/* article grid: body + rail. Mobile stacks with the rail (file record) first. */
.dossier__grid { display: flex; flex-direction: column; min-width: 0; }
.dossier__rail { order: -1; margin: 0 0 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* file record card (article side rail) */
.railcard { border: var(--border) var(--line-strong); border-radius: var(--radius); background: var(--paper-2); box-shadow: var(--shadow); overflow: hidden; }
.railcard__head { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .18em; padding: 10px 14px; background: var(--ink); color: var(--paper); }
.railcard__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.railcard__row > span { color: var(--ink-faint); letter-spacing: .12em; flex: none; }
.railcard__row > b { font-weight: 700; letter-spacing: .04em; text-align: right; }
.railcard__tags { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }

@media (min-width: 1024px) {
  /* ── front page: full 1200px canvas ── */
  .view--front { max-width: 1200px; }

  /* hero: editorial spread — text left, image right (noimg only; image heroes are cinematic) */
  .hero--featured.hero--noimg { display: grid; grid-template-columns: 1.02fr .98fr; gap: 48px; align-items: center; padding: 32px 0 38px; }
  .hero--featured:not(.hero--noimg) { min-height: 520px; }
  .hero--featured:not(.hero--noimg) .hero__overlay { padding: 120px 40px 36px; }
  .hero--featured:not(.hero--noimg) .hero__title { font-size: clamp(40px, 4.6vw, 66px); }

  /* the latest: two-column river, no dead space */
  .newslist { display: grid; grid-template-columns: 1fr 1fr; gap: var(--t-card-gap-desktop); align-items: start; }
  .newslist .empty { grid-column: 1 / -1; }

  /* tag sections: two-column rows on desktop */
  .fsec__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }

  /* ── article: full-width header, body + sticky rail ── */
  .dossier { max-width: 1180px; }
  .dossier__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0 54px; align-items: start; }
  .dossier__rail { order: 0; margin: 0; position: sticky; top: 84px; }
  .dossier__body { font-size: 19px; max-width: 72ch; }

  /* imageless hero: full-width typographic statement, not a narrow column */
  .hero--featured.hero--noimg { display: block; }
  .hero--featured.hero--noimg .hero__title { font-size: clamp(48px, 6.5vw, 104px); max-width: 26ch; }
  .hero--featured.hero--noimg .hero__stand { font-size: 20px; max-width: 72ch; }

  /* ── desk: editor + preview side by side ── */
  .desk { max-width: 1120px; }
  .desk__studio { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; align-items: start; }
  .desk__title, .desk__studio > .publish__lede, .desk__tools, .desk__studio > .toolbox { grid-column: 1 / -1; }
  .desk__input { min-height: 560px; }
  .desk__live { margin-top: 0; }
}

/* very wide screens: stretch the canvas further, 3-column river */
@media (min-width: 1500px) {
  .view--front { max-width: 1440px; }
  .newslist { grid-template-columns: 1fr 1fr 1fr; }
  .dossier { max-width: 1380px; }
  .dossier__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 0 64px; }
}
