/* Design tokens — the single source for every value the public site repeats.
 *
 * This is the file rail.css was written against ("this file deliberately does
 * NOT redeclare those tokens, it consumes them"). Before it existed, seven
 * templates each carried their own copy-pasted :root and drifted: 23 distinct
 * font sizes across 69 type combinations, 49 of them crammed into the 9-13.5px
 * band where nobody can tell 11px from 11.5px.
 *
 * LOAD ORDER: linked from _styles.html, which every template includes BEFORE
 * its own <style>. That makes this the base layer — a template rule still wins
 * at equal specificity, which is what lets templates migrate one at a time.
 *
 * The ONLY custom property a template may still declare is --colw (its own
 * column width). Everything else belongs here.
 */
:root {
  /* ---- type scale ----------------------------------------------------
   * Eleven steps. The half-pixel neighbours the site used to carry (9/9.5,
   * 10/10.5, 11/11.5, 12/12.5, 13/13.5) were not a scale, they were the
   * residue of nudging with nothing to nudge against. */
  --fs-00: 10px;   /* tape keys, stamps, legal */
  --fs-0:  11px;   /* eyebrow / kicker */
  --fs-1:  12px;   /* dense data, chips, meta */
  --fs-2:  13px;   /* UI default, table cells */
  --fs-3:  15px;   /* body prose, card body */
  --fs-4:  17px;   /* card title */
  --fs-5:  20px;   /* section heading */
  --fs-6:  24px;   /* big stat number */
  --fs-7:  30px;   /* hero title */
  --fs-8:  36px;   /* page / letter title */
  --fs-9:  52px;   /* display numeral — the desk-closed countdown */

  /* ---- weights -------------------------------------------------------
   * Three, down from six. 500 and 800 read as noise next to 600 and 700;
   * 900 appeared exactly twice and was certainly accidental. */
  --w-body: 400;
  --w-mid:  600;
  --w-bold: 700;

  /* ---- spacing -------------------------------------------------------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;   /* the section rhythm */
  --sp-7: 48px;

  /* ---- radii ---------------------------------------------------------
   * Four, down from eleven. Literal 50% stays for circles (avatars). */
  --r-xs:   4px;    /* chips, marks */
  --r-sm:   10px;   /* buttons, small cards */
  --r-md:   14px;   /* cards, panels */
  --r-pill: 999px;

  /* ---- measure & column ----------------------------------------------
   * --measure is the READING width: the letter's headline and its prose
   * share it, so a headline can no longer span the full column while its
   * own body stops 40% short. --colw is the PAGE column and is overridden
   * per page (daily and duck_symbol run 1400px to seat the rail). */
  --measure: 680px;
  --colw: 1060px;

  /* ---- ink & paper ---------------------------------------------------- */
  --ink:   #111827;
  --paper: #ffffff;
  --dim:   #6b7280;
  --faint: #9ca3af;
  --panel: #fafbfc;

  /* ---- separators -----------------------------------------------------
   * ONE rule colour on light surfaces. --soft is a FILL only: it must never
   * appear inside a border declaration, which is how the site ended up with
   * three near-identical greys drawing the same hairline. */
  --hair: #e5e7eb;
  --soft: #eef0f2;

  /* ---- stance ---------------------------------------------------------
   * duck = bullish, cuck = bearish, sit = no edge. Per-symbol views stay
   * RAW; only market-direction aggregates flip for inverse ETFs. */
  --duck:        #10b981;
  --duck-deep:   #047857;
  --duck-bg:     #d1fae5;
  --duck-bright: #34d399;
  --cuck:        #dc2626;
  --cuck-deep:   #b91c1c;
  --cuck-bg:     #fee2e2;
  --sit-bg:      #f3f4f6;

  /* ---- the bill IS the terminal amber: data labels and eyebrows, dark
   * surfaces only. */
  --bill:      #f59e0b;
  --bill-deep: #d97706;

  /* ---- terminal band: dark instrument surfaces cutting the white page -- */
  --term:      #0a0f1c;
  --term-2:    #0f172a;
  --term-edge: rgba(148, 163, 184, 0.16);
  --term-ink:  #e2e8f0;
  --term-dim:  rgba(226, 232, 240, 0.62);

  /* ---- inline auth messages -------------------------------------------
   * _topbar.html reads these with fallbacks. No page ever defined them, and
   * error.html defined neither them nor --cuck-deep, so its error text fell
   * through to no colour at all. */
  --ok-msg:  var(--duck-deep);
  --err-msg: var(--cuck-deep);

  /* ---- families -------------------------------------------------------- */
  --display: 'Sora', -apple-system, sans-serif;
  --body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}
