/* nexus-tokens.css - THE PALETTE, ON NEXUS. The values are Command's tokens.css copied on
   Wed 4 Nov 2026 (Build #126; Jason: "Did nexus get the gui upgrade like command?" - it had
   not). ONE change from the source: every block is `html:root` instead of `:root`. 170 Nexus
   templates define their own `:root{...}` inline, which ties with a plain :root and wins by
   coming later; html:root (0,1,1) outranks them whatever the order, and the light block at
   (0,2,1) outranks both. A page that does not load this file is untouched - that is how the
   Space Day Maine console, the password-reset pages and the two demo products keep their own
   identity (migrate when touched, never in a big bang). */
/* tokens.css — the palette, and the ONLY place it is defined.
   10 Sep 2026. These lived inside base_command.html, so a page that
   did not extend it got no tokens at all and rendered white on white.
   The new Cards app hit exactly that. Extracted here so base_command
   and any standalone app shell read one definition instead of two
   copies that drift, which is the same fault that put a dead LinkedIn
   URL in our own database. */
html:root{
  /* Eye-friendly deep-indigo scheme (matches the Bridge). Softer than the old
     near-black + neon: deep desaturated blue base, off-white ink, muted accents,
     which cuts halation and eye strain over long sessions. */
  --orange:#f6a35a; --gold:#f4d58a; --signal:#6fe3ff; --ok:#57e0a0;
  --blue:#79b6ff; --purple:#a99cf0; --red:#ff7a6b;
  --cyan:#6fe3ff;
  --bg:#0b0f1e; --panel:#141a30; --panel-2:#1c2340;
  --faint:rgba(255,255,255,.09); --dim:rgba(200,208,232,.62);
  --ink:#eef1fb; --fg:#eef1fb; --border:var(--faint);
  --radius:14px; --radius-sm:10px;
  --fu:'Space Grotesk',system-ui,sans-serif;
  --fd:'Share Tech Mono',monospace;
  --fh:'Orbitron',sans-serif;
}
html:root[data-theme="light"]{
  --bg:#F4EEF7; --panel:#FFFFFF; --panel-2:#F0E8F5;
  --faint:rgba(30,20,45,.14); --dim:rgba(30,20,45,.66);
  --ink:#1E1430; --fg:#1E1430;
  /* ── CONTRAST PASS, 10 Sep 2026 ─────────────────────────────────────
     These accents are used as BUTTON TEXT (`.btn--ok{color:var(--ok)}`,
     `.act-approve`, the desk chips), so the bar is WCAG AA 4.5:1, not the
     3:1 that applies to a non-text UI edge. Measured against the surface
     they actually sit on, --panel-2 #F0E8F5:

       --orange  #E8792A  2.44:1  FAIL  ->  #AA5112  4.51:1
       --ok      #0a8f4f  3.48:1  FAIL  ->  #097A44  4.53:1
       --signal  #0a74c4  4.08:1  FAIL  ->  #096DB9  4.50:1
       --gold    #8a6205  4.59:1  already passes, unchanged
       --red     #c62b3a  4.61:1  already passes, unchanged

     Found by the mail seat in Chromium on three pages; their rendered
     numbers matched the token values exactly, which is how we know the
     calm-pass block in command-ui.css is NOT overriding these (it uses
     `html:root`, specificity 0,1,1, and this rule is 0,2,0, so this wins).
     Each replacement is the same hue darkened until it reaches 4.5:1, so
     the palette reads the same and only the lightness moves.

     DARK THEME IS UNTOUCHED. #E8792A remains the brand orange everywhere
     else; only the light variant moves, which is ordinary practice because
     a colour's contrast depends on what it sits on. */
  --orange:#AA5112; --gold:#8a6205; --ok:#097A44; --signal:#096DB9;
  --blue:#096DB9; --purple:#6d34c9; --red:#c62b3a; --cyan:var(--signal);
}

/* ── THE INNLINK CONTRACT NAMES, 8 Oct 2026 ─────────────────────────────────
   Jason forwarded Innlink's interface spec (ops-console-interface-spec.md,
   _docs/handoff/) with one rule: keep the TOKEN NAMES and the component
   class->role contract, reskin the values. These are the spec's names
   resolved onto OUR palette, so a stylesheet written against the spec
   (theirs, Neko's, or a future NorthStar client's) reads Stardust colours
   here without a single edit. Every value is a reference to a Stardust token
   above or a derivation of one: no new hex, both themes covered. */
html:root{
  --panel2:var(--panel-2);           /* the inverted / sidebar surface */
  --line:var(--faint);               /* borders */
  --line-strong:rgba(255,255,255,.18);
  --ink2:var(--dim);                 /* secondary text */
  --ink-muted:rgba(200,208,232,.42); /* tertiary text */
  --accent:var(--orange);            /* the one interactive colour */
  --accent-soft:var(--gold);
  --accent-bg:color-mix(in srgb, var(--orange) 14%, transparent);
  --good:var(--ok); --warn:var(--gold); --bad:var(--red);
  --side-ink:var(--ink); --side-ink2:var(--dim); --side-line:var(--faint);
  --side-hover:color-mix(in srgb, var(--orange) 8%, transparent);
  --side-active:color-mix(in srgb, var(--orange) 14%, transparent);
  --tap-fill:var(--panel-2); --tap-line:var(--faint);
  --go-bg:var(--ok); --go-ink:var(--bg); --stop-bg:var(--red);
  --chosen-bg:color-mix(in srgb, var(--ok) 14%, transparent);
  --chosen-line:color-mix(in srgb, var(--ok) 45%, transparent); --chosen-ink:var(--ok);
  --shadow:0 1px 2px rgba(0,0,0,.35); --shadow-sm:0 1px 2px rgba(0,0,0,.45);
  --mono:var(--fd); --sans:var(--fu);
  --r:var(--radius-sm); --tap:48px;
}
html:root[data-theme="light"]{
  --line-strong:rgba(30,20,45,.26);
  --ink-muted:rgba(30,20,45,.46);
  --shadow:0 1px 2px rgba(30,20,45,.08); --shadow-sm:0 1px 2px rgba(30,20,45,.12);
}

/* ── NEXUS'S OWN NAMES, RESOLVED ONTO THE TOKENS ─────────────────────────────
   Measured 4 Nov 2026 over 255 templates: --ink 816 uses, --dim 645, --border 549,
   --flame 295, --gold 260, --orange 244, --gold2 236, --hud 194, --blue 191, --panel 186,
   --green 157, --font 154, --font-ui 140, --bg 121, --hud-faint 115, --hud-dim 109,
   --line 100, --amber 99 ... Every name a Nexus page already uses reads a token here, so
   the light theme reaches inline styles and injected blocks written long before it
   existed. No new hex: each is a reference or a derivation. */
html:root{
  --flame:var(--orange); --gold2:var(--gold); --amber:var(--gold); --caution:var(--gold);
  --yellow:var(--gold); --orange-light:var(--orange);
  --hud:var(--signal); --hud-dim:var(--dim); --hud-faint:var(--faint);
  --green:var(--ok); --steel:var(--dim);
  --bg-base:var(--bg); --bg-card:var(--panel); --bg-input:var(--panel-2); --bg-sidebar:var(--panel);
  --border-mid:var(--faint);
  --text-primary:var(--ink); --text-muted:var(--dim); --text-dim:var(--dim);
  --font:var(--fu); --font-ui:var(--fu); --font-data:var(--fd);
  --nav-h:52px; --sidebar-w:180px;
}
