/* ═══════════════════════════════════════════════════════════
   SIMULATTE DESIGN TOKENS — v2
   Single source of truth. Link this before every page's
   <style> tag:
     <link rel="stylesheet" href="tokens.css">

   Changes from v1:
   ─ --static: #5E5E5E → #9A9997  (was 3.1:1, now 7.1:1 WCAG AA)
   ─ Text opacity floor upgraded to 0.68 minimum
   ─ Mono font: IBM Plex Mono → Martian Mono
   ─ Canonical variable names: --f-display, --f-body, --f-mono
   ─ Legacy aliases kept for backwards compat
═══════════════════════════════════════════════════════════ */

:root {

  /* ── Core Palette ────────────────────────────────────────── */
  --void:      #050505;
  --parchment: #E9E6DF;
  --signal:    #A8FF3E;
  --layer:     #111111;
  --layer-2:   #1A1A1A;
  --static:    #9A9997;   /* 7.1:1 contrast. #5E5E5E is retired (3.1:1 — fails WCAG AA) */

  /* ── Text Opacity Tiers (all verified ≥ 7.1:1 on #050505) ── */
  /* Rule: never use opacity below 0.68 for readable text.       */
  /* Anything below is reserved for borders/tints only.          */
  --text-primary:   rgba(233,230,223,1.00);   /* 16.5:1  headings */
  --text-body:      rgba(233,230,223,0.88);   /* 12.7:1  body copy */
  --text-secondary: rgba(233,230,223,0.80);   /* 10.4:1  supporting body */
  --text-caption:   rgba(233,230,223,0.72);   /*  8.5:1  captions, small text */
  --text-data:      rgba(233,230,223,0.68);   /*  7.6:1  data labels, mono text */

  /* ── Non-text: borders, dividers, tints (NOT for text) ────── */
  --border-hi:  rgba(233,230,223,0.20);
  --border-mid: rgba(233,230,223,0.12);
  --border-lo:  rgba(233,230,223,0.08);
  --tint:       rgba(233,230,223,0.04);

  /* ── Signal green variants ───────────────────────────────── */
  --green-bd:   rgba(168,255,62,0.32);   /* accent border */
  --green-mid:  rgba(168,255,62,0.18);   /* mid-weight tint */
  --green-tint: rgba(168,255,62,0.06);   /* subtle surface tint */

  /* ── Type Families ───────────────────────────────────────── */
  --f-display: 'Barlow Condensed', sans-serif;
  --f-body:    'Barlow', sans-serif;
  --f-mono:    'Martian Mono', monospace;   /* Replaces IBM Plex Mono */

  /* ── Layout ──────────────────────────────────────────────── */
  --nav-h: 52px;
  --max-w: 1160px;
  --px:    56px;

  /* ── Spacing Scale (4pt base) ─────────────────────────────── */
  --space-4:  4px;   --space-8:   8px;   --space-12: 12px;
  --space-16: 16px;  --space-24:  24px;  --space-32: 32px;
  --space-40: 40px;  --space-48:  48px;  --space-64: 64px;
  --space-80: 80px;  --space-96:  96px;


  /* ══════════════════════════════════════════════════════════
     LEGACY ALIASES — backwards compatibility with v1 naming.
     These use the correct canonical values, not v1 values.
     Migrate pages to canonical names over time.
  ══════════════════════════════════════════════════════════ */

  /* Old --pN opacity aliases → canonical semantic values */
  --p88: rgba(233,230,223,0.88);   /* = --text-body */
  --p72: rgba(233,230,223,0.88);   /* upgraded: was 0.72, floor is 0.88 for body */
  --p68: rgba(233,230,223,0.88);   /* upgraded: was 0.68, map to body */
  --p60: rgba(233,230,223,0.88);   /* upgraded: was 0.60 (failing), now body */
  --p35: rgba(233,230,223,0.72);   /* upgraded: was 0.35 (failing), now caption */
  --p12: rgba(233,230,223,0.12);   /* = --border-mid (non-text only) */
  --p08: rgba(233,230,223,0.08);   /* = --border-lo */
  --p06: rgba(233,230,223,0.08);   /* = --border-lo (normalised from 0.06→0.08) */
  --p03: rgba(233,230,223,0.04);   /* = --tint */

  /* Old --gN green aliases → canonical values */
  --g30: rgba(168,255,62,0.32);   /* = --green-bd (normalised from 0.30→0.32) */
  --g18: rgba(168,255,62,0.18);   /* = --green-mid */
  --g08: rgba(168,255,62,0.08);   /* between tint and mid */
  --g06: rgba(168,255,62,0.06);   /* = --green-tint */
  --g04: rgba(168,255,62,0.04);   /* subtle tint */

  /* Old font name aliases */
  --f-d: 'Barlow Condensed', sans-serif;   /* = --f-display */
  --f-b: 'Barlow', sans-serif;            /* = --f-body */
  --f-m: 'Martian Mono', monospace;       /* = --f-mono */

}
