/* _kit/tokens.css — shared design tokens. Light-first, dark via media query.
   Every venture copies this file verbatim. Change the --brand-* block per venture. */
:root {
  /* ---- per-venture overrides: change ONLY these four ---- */
  --brand-600: #1f6feb;
  --brand-700: #1a5fd0;
  --brand-50:  #eef4ff;
  /* The ink on a FILLED brand surface. A venture that lightens --brand-600 for dark mode must
     flip this too, or white text lands on a pale accent: measured 2.96:1 on the tools teal and
     1.29:1 on QuoteForge's dark accent. QuoteForge and BidSheet each found this separately and
     patched it locally before it was a token. _kit/test.cjs now fails if any page overrides the
     dark accent without a legible --on-brand. */
  --on-brand:  #ffffff;

  /* ---- neutrals ---- */
  --bg:        #f7f8fa;
  --surface:   #ffffff;
  --surface-2: #f2f4f7;
  --border:    #dfe3e8;
  --border-2:  #c9cfd6;
  --text:      #11161c;
  --text-2:    #5b6671;
  /* #8b95a0 measured 3.04:1 on white, 2.86:1 on --bg and 2.76:1 on --surface-2 — a WCAG AA
     failure on .hint and .kpi-label in every venture and every free page at once. #67717c is the
     lightest value on the same grey ramp that clears 4.5:1 on all three (4.96 / 4.67 / 4.51). */
  --text-3:    #67717c;

  /* ---- semantic ---- */
  --ok:    #177245;
  --ok-bg: #e8f5ec;
  --warn:  #8a5300;
  --warn-bg:#fdf3e3;
  --bad:   #b42318;
  --bad-bg:#fdeceb;

  /* ---- form ---- */
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --shadow-2: 0 4px 6px -2px rgba(16,24,40,.05), 0 12px 16px -4px rgba(16,24,40,.10);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1180px;
}
/* Nothing a venture overrides at :root may be redefined in the blocks below. `:root:not([data-theme="light"])`
   scores (0,2,0) and a venture's `:root{--brand-600:...}` scores (0,1,0), so a kit dark-mode rule would
   silently replace DealGauge's teal and RigLedger's amber with the kit default. That is why the dark accent
   is NOT flipped here and why --on-brand is defined once, in :root, where a venture can beat it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#0d1117; --surface:#161b22; --surface-2:#1c2129;
    --border:#2a313b; --border-2:#3a424e;
    --text:#e6edf3; --text-2:#9aa5b1; --text-3:#808993; /* was #6e7781: 3.80:1 on --surface, an AA failure. #808993 is 4.87/5.33/4.56. */
    --brand-50:#11203a;
    /* The INK must flip with the background. Dark backgrounds were defined from the start but the semantic TEXT colours were not, so every verdict, pill and warning rendered dark-on-dark: ok 2.74:1, warn 2.55:1, bad 2.60:1 - unreadable, in every venture at once. Found 2026-09-11 during the QuoteForge redesign, which had to patch it locally. */
    --ok:#54b483;    --ok-bg:#0f2419;
    --warn:#e0ad2e;  --warn-bg:#2a1f0c;
    --bad:#f0918a;   --bad-bg:#2d1513;
    --shadow-1:0 1px 2px rgba(0,0,0,.4); --shadow-2:0 8px 24px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg:#0d1117; --surface:#161b22; --surface-2:#1c2129;
  --border:#2a313b; --border-2:#3a424e;
  --text:#e6edf3; --text-2:#9aa5b1; --text-3:#808993; /* was #6e7781: 3.80:1 on --surface, an AA failure. #808993 is 4.87/5.33/4.56. */
  --brand-50:#11203a;
  /* The INK must flip with the background. Dark backgrounds were defined from the start but the semantic TEXT colours were not, so every verdict, pill and warning rendered dark-on-dark: ok 2.74:1, warn 2.55:1, bad 2.60:1 - unreadable, in every venture at once. Found 2026-09-11 during the QuoteForge redesign, which had to patch it locally. */
  --ok:#54b483;    --ok-bg:#0f2419;
  --warn:#e0ad2e;  --warn-bg:#2a1f0c;
  --bad:#f0918a;   --bad-bg:#2d1513;
  --shadow-1:0 1px 2px rgba(0,0,0,.4); --shadow-2:0 8px 24px rgba(0,0,0,.5);
}
