/* ============================================================
   pacenote · Paddock Clipboard — design tokens
   Source of truth for the workbench surface.
   Pairs with: theslipstream.net (f-slipstream-journal).
   ------------------------------------------------------------
   Type roles
     --display  → masthead / h1 / large key data (race title, telegram values, driver names, position)
     --body     → prose, captions, debate questions, anything read in sentences
     --sans     → labels, table headers, breadcrumbs, buttons, kinds, team subs (anything UPPERCASE or chrome)
     --mono     → numeric data, gaps, lap times, timestamps, foot lines

   Color rules
     --stamp is the only editorial accent. Use it for primary actions,
     P1 emphasis, badges, "filed" stamps. Never for series or team chips.
     Team colors live on their own channel (--team-*) so they never
     compete with the accent.
   ============================================================ */

:root {
  /* ---------- Paper stock ---------- */
  --paper:        #f5f1e8;   /* primary surface — warm cream */
  --paper-deep:   #ede7d8;   /* hover / secondary surfaces */
  --paper-stamp:  #ece3cf;   /* tag pills, chip backgrounds */

  /* ---------- Ink scale ---------- */
  --ink:          #1c1815;   /* primary text, masthead, key data */
  --ink-soft:     #4a4540;   /* secondary text, body prose */
  --ink-mute:     #6e665c;   /* labels, sub-text, captions — 5.01:1 on --paper, camera-safe */

  /* ---------- Rules ---------- */
  --rule:         #2a2622;   /* 2px section underlines, masthead bottom */
  --rule-soft:    rgba(28,24,21,0.22);  /* 1px column dividers */
  --rule-hard:    var(--ink);

  --hairline:     rgba(28,24,21,0.12);  /* 1px row dividers, tertiary lines */
  --hairline-2:   rgba(28,24,21,0.22);  /* 1px control borders, table head */

  /* ---------- Editorial accent (single — oxblood) ---------- */
  --stamp:        #8a1a20;   /* matches Slipstream — single brand accent */
  --stamp-deep:   #661217;   /* hover / pressed */

  /* ---------- State (functional — see design/BRAND.md) ---------- */
  /* Yellow always means caution — at any scope (yellow flag, VSC, Safety Car). */
  /* Red always means session ended/paused (red flag only). */
  --positive:     #2f6b3a;   /* gain, positive delta — ink only, never fill */
  --negative:     var(--stamp);  /* nay, loss — collapses to oxblood */
  --warn:         #f0c419;   /* caution at any scope (sector yellow, VSC, SC) — fill only, ink on top */
  --safety:       #c23a1a;   /* session stopped / red flag only — fill only, cream on top, used sparingly */

  /* ---------- Team chips (motorsport-only channel) ---------- */
  /* Use only for driver/constructor identification. Never as UI accent. */
  --team-fer:     #E8002D;   /* Ferrari */
  --team-mcl:    #FF8000;    /* McLaren */
  --team-mer:    #27F4D2;    /* Mercedes */
  --team-rb:     #3671C6;    /* Red Bull */
  --team-am:     #229971;    /* Aston Martin */
  --team-alp:    #FF87BC;    /* Alpine */
  --team-was:    #64C4FF;    /* Williams */
  --team-haas:   #B6BABD;    /* Haas */
  --team-sau:    #52E252;    /* Kick Sauber */
  --team-rb2:    #6692FF;    /* RB / Racing Bulls */

  /* ---------- Type stack ---------- */
  --display:  'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --body:     'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --sans:     'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:     'JetBrains Mono', ui-monospace, Menlo, monospace;
  /* Pacenote collapses both display and body to Source Serif 4 — the workbench
     wants one serif voice, not two. Slipstream uses Playfair Display for
     --display; that's the publication register, not the tool register. */

  /* ---------- Type scale ----------
     LEGIBILITY FLOOR (camera-ready surface): no text below 12px, anywhere.
     The workbench shows up in 1080p YouTube screen recordings. Anti-aliasing
     softens by ~1px effective, so 10px → ~9px in video → unreadable.
     This is a hard floor. If a label "needs" 10px, the layout is wrong. */
  --t-display:    clamp(32px, 4.2vw, 52px);  /* page h1 */
  --t-h2:         22px;                      /* section heading */
  --t-h3:         18px;                      /* subsection heading */
  --t-body:       15px;                      /* prose — minimum 15px */
  --t-ui:         14px;                      /* default UI text — minimum 14px */
  --t-meta:       13px;                      /* meta / data lines — minimum 13px */
  --t-label:      12px;                      /* uppercase labels (sans, .08–.12em tracking) — minimum 12px */
  /* --t-micro REMOVED. There is no 10px tier in this system by design.
     Use --t-label (12px) for badges and kind tags. */

  /* ---------- Spacing (4px base) ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;

  /* ---------- Layout ---------- */
  --col-max:  1320px;
  --gutter:   clamp(24px, 5vw, 64px);

  /* ---------- Motion ---------- */
  --tx-fast:  120ms;
  --tx-base:  180ms;
  --tx-slow:  280ms;
  --ease:     cubic-bezier(.2,.6,.2,1);
}

/* ============================================================
   Letter-spacing presets — avoid one-off magic numbers in components
   ============================================================ */
:root {
  --tracking-display:  -0.01em;   /* large serif headlines */
  --tracking-tight:   -0.005em;   /* h2 / driver names */
  --tracking-normal:   0;
  --tracking-label:    0.08em;    /* uppercase labels */
  --tracking-mark:     0.12em;    /* uppercase emphasis (kind tags, stamps) */
}
