/*
 * Shared design tokens — the single source of truth for the palette tokens every
 * page carries identically (ISH-520).
 *
 * Before this file, each of the 24 pages owned its own copy of the palette in an
 * inline <style> block, so a token could only be "changed" 24 times and a shared
 * stylesheet in css/ could only ask its host politely for a value. That is the
 * failure mode ISH-353 fixed for stage colours (css/stage-colors.css) and the one
 * that produced this file's headline case: `--text-secondary` had drifted to six
 * distinct values, one of which fails WCAG AA.
 *
 * Link it from every page, first, ahead of the other css/ files and the inline
 * <style>. Do not re-declare any token below in a page's own :root — the parity
 * test in js/tokens-parity.test.js fails the build if you do.
 *
 * ── What lives here, and what deliberately does not ──────────────────────────
 *
 * A token belongs here once it is genuinely identical on every page that declares
 * it. Everything below was measured on origin/develop @ 10ae86c before it moved;
 * this is a move, not a copy, following the css/stage-colors.css precedent.
 *
 * **Still per-page, because they have really drifted** — do not fold these in
 * without deciding each one, because "unifying" them silently changes pages:
 *
 *   --text          2 values  #1a1a1a (22) · #0f172a (2 — index/operations-hub)
 *   --text-label    5 values  #999999 (17) · #94a3b8 · #777777 · #9b9b9b · #767676
 *   --border        3 values  #e0e0e0 (21) · #e2e8f0 (2) · #dcdcdc (1)
 *   --border-light  2 values  #ebebeb (21) · #f1f5f9 (2)
 *   --green         2 values  #28a745 (17) · #10b981 (3)
 *   --info-bg       2 values  #f4f4f4 (12) · #ffffff (4)
 *   --radius        2 values  6px (20) · 8px (4)
 *   --radius-lg     2 values  8px (19) · 12px (4)
 *   --shadow-*      2-3 values each, on the 5-ish pages that define them
 *
 * `--text-label` is the one with teeth: per-page compensations exist *because* of
 * its drift (`--dlm-label` on sales-pipeline-detail.html, `--heat-zero-text` on
 * both heat-map ramps were introduced to stop inheriting a page's label colour
 * after ISH-380's contrast failures). Unifying it means re-measuring those ramps
 * and retiring local overrides — its own issue, resting on this mechanism.
 *
 * `--orange` is uniform (#fd7e14) but declared on only 9 of 24 pages, which is why
 * css/sales-process-tab.css carries a literal fallback for it. Promoting it here
 * would let that fallback go; left alone for now so this change stays one token.
 */

:root {
  /* Brand. Identical on all 24 pages before the move. */
  --red: #a62626;
  --red-hover: #8f2121;
  --nav-bg: #1a1a1a;

  /* Surfaces. --page-bg on all 24; --card-bg on 22 — login.html and
     contractor-list-submission.html never declared or used it, so gaining it here
     changes nothing on either. */
  --page-bg: #f8f9fa;
  --card-bg: #ffffff;

  /*
   * Secondary text — DESIGN_GUIDE.md:39.
   *
   * The token this file was created for. It had drifted to six values across the
   * 24 pages, and two of those were defects rather than preferences:
   *
   *   #1a1a1a (9 pages) was identical to --text on those same pages, so anything
   *     deliberately styled to recede did not recede at all.
   *   #6c757d (broker/login/map) is 4.45:1 on --page-bg — under the 4.5:1 WCAG AA
   *     floor for normal text. A real contrast defect, not a mismatch.
   *
   * #4b5563 is the value DESIGN_GUIDE.md already names, so nothing was invented
   * here; 4 pages already honoured it. It measures 7.56:1 on --card-bg #ffffff and
   * 7.17:1 on --page-bg #f8f9fa — AAA for normal text on both.
   *
   * index.html and operations-hub.html were folded in from #475569 as a deliberate
   * call, not silently: they sit on a slate scale (--text: #0f172a) so their value
   * may have been a pairing rather than drift, but the two differ by 0.02:1 in
   * contrast and are visually indistinguishable. Their --text stays slate.
   */
  --text-secondary: #4b5563;

  /* Layout. 98% on the 22 pages that declared it; the other two neither declare
     nor use it. */
  --max-width: 98%;
}
