/* ============================================================================
   Kith — Shared Design Tokens (base palette)
   ----------------------------------------------------------------------------
   Single source of truth for the DEFAULT theme's variables — the Kith register
   in its RESTRAINED tool form (DESIGN.md: nightfall surfaces, lamplight accent
   used sparingly, no monospace, no glow; the drenched register belongs to the
   marketing pages, not a working tool). Load order:

     <link rel="stylesheet" href="tokens.css">   <- this file (defaults)
     <link rel="stylesheet" href="theme.css">    <- alternate themes ([data-theme])
     <script src="theme.js"></script>
     <style> :root{ /* page signature deltas only * / } ... </style>

   Cascade contract (do not break):
   - This file's plain :root loses to a page's own later :root declarations, so a
     page overrides a token simply by re-declaring it (its "signature" accent).
   - theme.css :root[data-theme=...] beats both (attribute specificity), so theme
     packs keep working unchanged.
   - theme.js's injected custom-theme <style> is appended last and wins over all.

   THE ALIAS LAYER IS PERMANENT. Pages historically used three naming
   conventions and users' saved custom theme packs (config.json) reference the
   legacy names — never remove an alias. Token NAMES are API (--cyan now holds
   lamplight; the name stays for compatibility).

   Per-tool signature accents (kept page-local, listed here for reference —
   regraded to the Kith palette in the 2026-07 redesign per-page pass):
     armor.html            --armor   (+ glow tint)
     ship-re.html          --re
     ship-components.html  --comp    (+ glow tint)
     ship-flight-computer  --fc  (gold)      (+ glow tint)
     ship-loot.html        --loot (green)    (+ glow tint)
     macros.html           --ml  (green)     (+ glow tint)
     market.html           --market  (+ glow tint)
     vehicle-re.html       --veh
     chef.html             --chef/--accent   (craft-family page)
     droid-engineer.html   --droid/--accent  (craft-family page)
     pet-engineer.html     --gene            (craft-family page)
     swg-dashboard.html    gold-led grey palette
   Craft-family pages (chef-tool, best-craft, schematics, chef,
   droid-engineer, pet-engineer) keep their full :root as an intentional
   sub-palette.
   ========================================================================== */

/* ── vendored fonts (offline; Bahnschrift fallback ships with Windows) ──────
   Rajdhani + Share Tech Mono stay vendored: they remain USER-SELECTABLE fonts
   (theme.js font picker) even though the default no longer uses them. */
@font-face{ font-family:'Rajdhani'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/Rajdhani-500.woff2') format('woff2'); }
@font-face{ font-family:'Rajdhani'; font-style:normal; font-weight:600; font-display:swap;
  src:url('fonts/Rajdhani-600.woff2') format('woff2'); }
@font-face{ font-family:'Rajdhani'; font-style:normal; font-weight:700; font-display:swap;
  src:url('fonts/Rajdhani-700.woff2') format('woff2'); }
@font-face{ font-family:'Share Tech Mono'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/ShareTechMono-400.woff2') format('woff2'); }

/* Kith faces (variable files, latin + latin-ext subsets, all weights) */
@font-face{ font-family:'Vollkorn'; font-style:normal; font-weight:500 700; font-display:swap;
  src:url('fonts/vollkorn-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face{ font-family:'Vollkorn'; font-style:normal; font-weight:500 700; font-display:swap;
  src:url('fonts/vollkorn-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face{ font-family:'Archivo'; font-style:normal; font-weight:400 700; font-display:swap;
  src:url('fonts/archivo-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face{ font-family:'Archivo'; font-style:normal; font-weight:400 700; font-display:swap;
  src:url('fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root{
  /* canonical brand tokens (names frozen; values are Kith-restrained) */
  --space:#091a21; --space-deep:#060f14;
  --panel-2:#10242e; --panel-3:#143039;
  --line:#1c333c; --line-bright:#2c4a54;
  --cyan:#d8b875; --signal:#91b09e; --cobalt:#6b5423;
  --ice:#dce8e4; --dim:#93a9a5; --dim-2:#829993;
  --rose:#ec9fcf; --lav:#7d5fa6; --plum:#0d0a1c; --cream:#efe5d2; --gold-soft:#e6c98b;
  --discord:#5865f2;
  --glow-cyan:0 0 0 rgba(0,0,0,0);

  /* base scale (app-legacy names; the nightfall ramp — No-Void floor) */
  --bg:#091a21; --bg2:#0c2029; --bg3:#10242e; --bg4:#143039;
  --border:#1c333c; --border2:#2c4a54;
  --text:#dce8e4; --text2:#93a9a5; --text3:#829993;

  /* signal colors (lamplight is THE accent; states from the Kith palette:
     patina = good, clay = caution, rust = a fault — never an alarm) */
  --accent:#d8b875; --accent2:#91b09e; --accent3:#c1714a;
  --admin:#a48fd1; --red:#c4675e; --green:#91b09e; --amber:#d8a04a;
  --gold:#d8b875; --gold2:#e6c98b;
  --blue:#7f97a3; --purple:#a48fd1;

  /* Kith palette proper names (site parity — the lfg port and any page copied
     from pricing-website reference these directly) */
  --nightfall:#091a21; --lamplight:#d8b875; --patina:#91b09e; --clay:#c1714a;
  --rust:#c4675e; --hearth:#ff9c50; --mist:#dce8e4; --rain:#93a9a5;

  /* glows — retired (light means people, not chrome). Transparent zero-shadows,
     NOT `none`: `none` inside a multi-shadow list invalidates the declaration. */
  --glow:0 0 0 rgba(0,0,0,0);
  --glow-green:0 0 0 rgba(0,0,0,0);
  --glow-admin:0 0 0 rgba(0,0,0,0);

  /* aliases — legacy naming conventions (PERMANENT, see header) */
  --panel:var(--bg2); --panel2:var(--bg3);
  --border-bright:var(--border2);
  --text-dim:var(--text2); --muted:var(--text2);
  --danger:var(--red); --warn:var(--gold);
  --gene:var(--admin);
  --row-hover:rgba(216,184,117,0.06);
  --house-color:var(--admin);

  /* typography — Archivo everywhere (there is no monospace; numerals align
     via tabular figures), Vollkorn for true headings via the rule below. */
  --font-display:'Archivo','Bahnschrift',sans-serif;
  --font-body:'Archivo','Bahnschrift',sans-serif;
  --font-serif:'Vollkorn',Georgia,serif;
  --font-mono:'Archivo','Bahnschrift',sans-serif;
}

/* Numerals align in data tables without a machine face. */
body{ font-variant-numeric:tabular-nums; }

/* True headings speak Vollkorn; UI labels/tabs/buttons stay Archivo via
   --font-display (389 uses across the app are labels, not headings). */
h1, h2{ font-family:var(--font-serif); letter-spacing:-0.01em; }

/* Focus is visible everywhere — the audience is in its forties (DESIGN.md floor rules). */
:where(button, [role="button"], a[href], input, select, textarea, .tab):focus-visible {
  outline: 2px solid var(--lamplight, #d8b875);
  outline-offset: 2px;
}
