/* ── zRev shared layer ─────────────────────────────────────────────
   Single source of truth for design tokens and universal base rules.
   Loaded BEFORE each page's inline <style>, so any page-level override
   (including per-page theme-var tweaks) still wins the cascade.
   Card/surface defaults live here since 2026-09-14 (--card-bg, --card-hover, --surface); a page overrides them
   inline only when it genuinely diverges. --orb-opacity and --wm-op stay per page.
   Text greys: --fg-mid (body), --fg-subtle (muted text, AA on the page background), --fg-faint (decorative
   lines, dots, strokes: never for words). Status: --warn (errors, red), --amber (caution). Tags: --tag-*.
   ─────────────────────────────────────────────────────────────────── */

:root {
  --accent1: #00E87A;
  --accent2: #00C2FF;
  --mono: 'DM Mono', 'Courier New', monospace;
  --serif: 'Playfair Display', Georgia, serif;
}

[data-theme="dark"] {
  --accent1: #00E87A;
  --bar-bg: rgba(10,10,10,0.95);
  --bg: #0A0A0A;
  --bg-alt: #0d0d0d;
  --book-bg: #060606;
  --border: #202020;
  --border-soft: #181818;
  --fg: #F2F2EE;
  --fg-mid: #888888;
  --fg-subtle: #7A7A7A;
  --fg-faint: #555555;
  --card-bg: #0D0D0D;
  --card-hover: #101010;
  --amber: #E8B44A;
  --tag-bg: rgba(0,232,122,.08);
  --tag-border: rgba(0,232,122,.25);
  --tag-fg: #00E87A;
  --logo-col: #2a2a2a;
  --nav-bg: rgba(10,10,10,0.92);
  --noise-op: 0.04;
  --results-bg: #060606;
  --surface: #111111;
  --surface-2: #161616;
  --warn: #FF6B5C;
}

/* Light = the print edition ("Paper & Ink"): warmer paper, real ink, visible grain,
   borders that read, so cards sit ON the page instead of dissolving into it. */
[data-theme="light"] {
  --accent1: #009648;
  --bar-bg: rgba(251,250,245,0.95);
  --bg: #FBFAF5;
  --bg-alt: #F3F1EA;
  --book-bg: #0A0A0A;
  --border: #DCD8CE;
  --border-soft: #E8E5DC;
  --fg: #0A0A0A;
  --fg-mid: #524D45;
  --fg-subtle: #6B665C;
  --fg-faint: #9C978E;
  --card-bg: #FFFFFF;
  --card-hover: #FAF9F4;
  --surface: #F4F2EB;
  --amber: #8A6200;
  --tag-bg: #E3F6EB;
  --tag-border: #BFEAD1;
  --tag-fg: #007A3D;
  --logo-col: #D4D4D0;
  --nav-bg: rgba(251,250,245,0.92);
  --noise-op: 0.045;
  --results-bg: #0A0A0A;
  --surface-2: #F3F1EA;
  --warn: #C43A27;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Keyboard focus (a11y H2, 2026-09-14): one brand ring for anything focused by keyboard; mouse and touch focus shows nothing. */
:focus-visible { outline: 1px solid var(--accent1); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }
/* Visually hidden, still read out (heading stubs, labels) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Static site links inside #nav-root: replaced by nav.js on load; present so non-JS crawlers (GPTBot, ClaudeBot, PerplexityBot) see the site graph */
.nav-static { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Safety net: a bare link in body copy never falls back to the browser's blue/purple. Page and component rules still win. */
a:not([class]) { color: var(--accent1); text-decoration-color: rgba(0,232,122,.45); }
[data-theme="light"] a:not([class]) { text-decoration-color: rgba(0,150,72,.45); }

body::before { content: ''; position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E"); opacity: var(--noise-op); pointer-events: none; z-index: 1000; }

/* footer social icons (bottom bar) */
.bottom-icon { display: inline-flex; align-items: center; }
.bottom-icon svg { width: 14px; height: 14px; display: block; fill: currentColor; }
