/* tokens.css -- THE central styling tokens.
   DECISIONS #9 (2026-07-24, tokens-only) + its AMENDMENT 2026-08-10:
   David's ruling "yes, the new UX replaces the old dark dahboard". The dark
   "Control Room" values are gone; the token NAMES are unchanged, which is the
   whole point of the rule -- the swap is a values-only edit plus three patched
   lines in app.css.

   THE NEW DIRECTION (his brief, built and picked in galleries/ux-mockup.html):
   - near-white chrome, so the ARTWORK is the loudest thing on any screen
   - his five palette hexes are SIGNAL colours only, never large surfaces
   - Min Sans Regular is the display face; mono is for measurements only
   - SQUARE corners (his "we will go with square for the time being")

   MEANINGS THAT MOVED ON LIGHT (recorded, not silent):
   - --main-soft was the PALE blue (a fill on dark). 11 of its 13 uses are text,
     and pale blue text is unreadable on white, so it now means "emphasis blue,
     readable on white". The pale fill it used to provide is --main-wash.
   - text on an accent used to be --bg (near-black on dark). On white that would
     be white-on-pale, so accents now carry --on-accent / --on-signal.
   - --sup-ok stays green: David has ruled nothing about it, and the mockup's
     use of blue for "verified" came from his attached palette simply not
     including the green. Do not repurpose it without his word.
*/

@font-face {
  font-family: "Min Sans";
  src: url("/web/brand/MinSans-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* David's palette (verbatim hexes, 2026-08-05) -- signals, never surfaces */
  --main: #1261d6;          /* primary: interactive, selection, VERIFIED */
  --main-soft: #1a5fc4;     /* emphasis blue -- links, quiet emphasis TEXT */
  --sup-error: #f26940;     /* denied / refused / a check fired */
  --sup-ok: #6ed62b;        /* CONFIDENT / approved / passed. David's ruling
                               2026-08-10: "green means confident across the
                               tool, yes" -- his hex, replacing #9fd32d.
                               A FILL only: white on it is 1.86:1, dark ink
                               9.73:1 (--on-signal). Green text uses --ok-ink. */
  --sup-pending: #d8d32a;   /* waiting on you (also the brand yellow -- the
                               collision is known and RULED OK, DECISIONS #34) */
  --sup-attn: #ffcfe4;      /* pink attention-class ("fresh -- your eye") */

  /* pale washes derived from the palette (his "you can make them lighter") */
  --main-wash: #eaf2fd;
  --main-line: #cfe2fa;
  --pending-wash: #fbf8de;
  --pending-line: #ece49a;
  --error-wash: #fdeee9;
  --error-line: #f8cdbe;
  --attn-wash: #fff3f8;

  /* SIGNAL INKS (David's go 2026-08-10: "You can edit the colors a bit to
     improve legibility"). His hexes are FILLS -- as small text on white they
     measure 1.37-3.06:1 and the pink chip was effectively invisible. Each ink
     below is the same hue darkened until it passes 4.5:1; measured, not
     eyeballed (scratchpad contrast run, values in the comments).
     RULE: bright hex = fills, rings, dots. ink = anything you read. */
  --ok-ink: #357010;        /* 6.04 on white / 5.59 on --panel-2 -- the same hue
                               as his #6ed62b fill, darkened until it is readable
                               (the fill itself measures 1.86 as text) */
  --pending-ink: #6f6b12;   /* 5.54:1  (fill #d8d32a was 1.58) */
  --error-ink: #a8391a;     /* 6.43:1  (fill #f26940 was 3.06) */
  --attn-ink: #9c3f71;      /* 6.24:1  (fill #ffcfe4 was 1.37) */

  /* text ON a filled accent */
  --on-accent: #ffffff;     /* on --main: 5.67:1 */
  --on-signal: #17170a;     /* on lime 10.17:1, yellow 11.41:1, orange 5.91:1
                               -- white on those measures 1.78/1.58/3.06 */

  /* structural neutrals: quiet by design. dim/faint darkened from #6b6b6b /
     #9b9b9b -- the old faint measured 2.78:1 and is used at 10-11px */
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f6f6f5;
  --line: #ececeb;
  --line-soft: #f2f2f1;
  --ink: #191919;
  --ink-dim: #545454;       /* 7.85 on white / 7.25 on --panel-2 */
  --ink-faint: #6e6e6e;     /* 5.13 on white / 4.74 on --panel-2 -- receipt paths
                               render at 10px ON the tinted panel, so it has to
                               clear 4.5 against BOTH surfaces, not just white */
  --canvas-dot: #f0f0ee;

  /* the banner-overview pane (his ask, 2026-08-16): a quiet #f7f7f7 ground,
     and a dark twin behind the same toggle so very light banners can be
     judged on a dark ground -- the flip touches ONLY that pane */
  --canvas-bg: #f7f7f7;
  --canvas-dark-bg: #232326;
  --canvas-dark-dot: #303034;
  --canvas-dark-line: #3a3a3f;
  --canvas-dark-ink: #e6e6e9;      /* 12.9:1 on --canvas-dark-bg */
  --canvas-dark-ink-dim: #ababb2;  /* 6.4:1 on --canvas-dark-bg */
  --canvas-dark-chip: #2e2e33;

  /* selection */
  --select: var(--main);
  --select-fill: rgba(18, 97, 214, 0.08);

  /* type */
  --font-display: "Min Sans", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: Consolas, "Cascadia Mono", ui-monospace, monospace;

  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 22px;

  /* elevation: on light, a 1px line beats a shadow. shadows stay for things
     that genuinely float (modals, popovers) and are far softer than the dark
     set they replace (0.35-0.55 alpha would read as smudges on white) */
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --elev-2: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.06);
  --elev-3: 0 2px 6px rgba(0, 0, 0, 0.06), 0 18px 48px rgba(0, 0, 0, 0.10);

  /* shape + rhythm -- SQUARE (his ruling 2026-08-09) */
  --radius: 0px;
  --radius-sm: 0px;
  --gap: 12px;
  --ease: 140ms cubic-bezier(0.2, 0, 0, 1);
}
