/* tokens.css — design tokens for the Wave 4 redesign.
 *
 * SEAM SCAFFOLDING ONLY (T-005, PRD-002 AC8): this file is not linked from
 * any template yet and must not change how any page renders. It exists so
 * the separation seam (tokens / content() / CONTRACT.md / guards) is in
 * place before the redesign starts in Wave 4.
 *
 * Source: design-prototypes/11-studio-copilot.html's `:root` block in the
 * OLD repo (C:\Dev\Fable 5 - AI Studio, read-only reference — not ported).
 * Names/values are transcribed as-is; two semantic aliases are added below
 * (documented) for forward compatibility with how Wave 4 is expected to
 * consume these tokens, without altering any of the source values.
 *
 * Legacy exemption (guard G1, tests/test_seam_guards.py): this file is one
 * of exactly two files allowed to contain raw hex colors under
 * frontend/static/css/** — it *defines* the palette. The other exemption is
 * style.css (legacy, retired in Wave 4).
 */

:root {
  /* Core palette (verbatim from mockup 11) */
  --blue: #13294B;
  --orange: #FF5F05;
  --altgeld: #C84113;
  --ink: #1C2330;
  --muted: #5A6472;
  --line: #E7E4DD;
  --canvas: #FBFAF8;
  --panel: #FFFFFF;

  /* Official Illinois "Storm" neutral greys. Added for brand completeness and
     available for future use (charts, secondary UI); the app's shipped neutrals
     stay --muted/--line (warm greys) per ADR-0002 — no UI is repainted here. */
  --storm: #707372;
  --storm-60: #8E9090;
  --storm-80: #C6C7C6;

  /* Accent palette (verbatim from mockup 11) */
  --industrial: #1D58A7;
  --prairie: #006230;
  --berry: #5C0E41;

  /* Danger (added T-017, PRD-006): deep brick/maroon, distinct from --orange
     (brand) and --berry (the old catch-all "purple" tone) — reads
     Illinois-adjacent without clashing with --orange.
     AA verification (WCAG 2.1 relative-luminance contrast formula):
       - #9E1B32 text on #FFFFFF (--panel): ratio 7.90:1 (passes AA 4.5:1
         and AAA 7:1 for normal text).
       - #FFFFFF text on #9E1B32 fill: ratio 7.90:1 (same luminance pair,
         contrast is symmetric) — passes AA/AAA for white-on-fill usage
         (e.g. a solid danger button or filled badge).
     --danger-tint is a light background wash for tinted surfaces (badges,
     notices) — 14% --danger mixed into --panel, matching the mix ratio the
     other tones already use inline in components.css. */
  --danger: #9E1B32;
  --danger-tint: color-mix(in srgb, var(--danger) 14%, var(--panel));

  /* Document palette for the Hangar accessibility pre-check, which reproduces the
     Technology Services Accessibility Evaluation (a Word document): heading blue,
     priority red, classic link blue, black body text, grey footer rule. On white:
     --doc-blue 5.0:1, --doc-red 6.6:1, --doc-link 8.6:1 - all pass AA. */
  --doc-blue: #0070C0;
  --doc-red: #C00000;
  --doc-link: #0000FF;
  --doc-ink: #000000;
  --doc-rule: #7F7F7F;
  --f-doc: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
  --f-doc-serif: Cambria, Caladea, Georgia, serif;

  /* Admin > Console terminal (admin-console.css). The terminal is dark in both
     themes. On --term-bg: --term-ink 15.3:1, --term-dim 6.9:1, --term-accent
     7.7:1, --term-ok 10.3:1, --term-err 8.2:1, --term-placeholder 5.5:1 - all
     pass AA. --term-on-accent is text on a --term-accent fill (7.9:1). The tag
     colours sit on --panel (white): live 6.5:1, planned 7.7:1, write 8.6:1. */
  --term-bg: #0f1722;
  --term-ink: #e6edf5;
  --term-dim: #93a1b3;
  --term-accent: #ff8a4c;
  --term-on-accent: #1b1206;
  --term-ok: #7bd88f;
  --term-err: #ff8f8f;
  --term-line: #253246;
  --term-raised: #1b2738;
  --term-placeholder: #8090a4;
  --tag-live: #1d6b35;
  --tag-live-line: #a9d8b6;
  --tag-planned: #6b4e00;
  --tag-planned-line: #e5cf8f;
  --tag-write: #8a2c0d;
  --tag-write-line: #f1b79c;

  /* Type (verbatim from mockup 11) */
  --f-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  /* --f-mono added (not from mockup 11): single source for the mono stack that
     was previously copy-pasted across every page CSS file. Source Code Pro is
     the monospace sibling of Source Sans 3 (Adobe Source family). */
  --f-mono: "Source Code Pro", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* Shape (verbatim from mockup 11) */
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 28, 45, .05), 0 18px 40px rgba(20, 28, 45, .08);

  /* Semantic aliases (added, not from mockup 11 — documented per PRD-002
     Interfaces note "+ semantic aliases OK; names documented in file
     header"). Point at the core tokens above; Wave 4 may use either. */
  --color-text: var(--ink);
  --color-text-muted: var(--muted);
  --color-bg: var(--canvas);
  --color-surface: var(--panel);
  --color-border: var(--line);
  --color-brand: var(--orange);
}
