/* =========================================================
   Zeal Portal — Legacy token bridge
   Design cohesion pass, July 2026. Contract §1.2.

   ONE JOB: alias every legacy token name onto its canonical
   equivalent in colors_and_type.css, so the 58 pages that still
   load /css/system/legacy/* (and /css/portal.css) inherit the
   reconciled values with NO per-page edits.

   This is the "expand" half of an expand–contract. It is a
   labelled, deletable unit: once nothing in the repo references a
   legacy token name, this whole file is removed in one verified
   step and the four token layers become one.

   LOAD ORDER: this file must load AFTER every file that DEFINES a
   legacy token name — /css/portal.css, /css/system/legacy/tokens.css,
   /css/system/legacy/portal-system.css — so these :root redefinitions
   win the cascade. scripts/sync-chrome.py places it immediately after
   colors_and_type.css, which is after all three. (Custom-property
   substitution is lazy, so `--p-ink: var(--ink)` resolves correctly
   regardless of whether --ink is declared before or after here.)

   DO NOT add new legacy names to real code. New code reads the
   canonical tokens directly. This file only catches what already
   exists.
   ========================================================= */

:root {
  /* --- Ink: the two-blacks fix (contract §1.1) ---------------
     Legacy --p-ink is #14110E (warm near-black); --text-primary
     is #1a1a1a. Both collapse to the one canonical black scale so
     no warm near-black renders anywhere. */
  --p-ink:          var(--ink);
  --p-ink-2:        var(--ink-2);
  --p-ink-3:        var(--ink-3);
  --p-ink-4:        var(--ink-4);

  --text-primary:   var(--ink);
  --text-secondary: var(--ink-2);
  --text-tertiary:  var(--ink-3);

  /* --- Accent + hairlines ------------------------------------ */
  --p-accent:       var(--accent);
  --p-rule:         var(--rule);
  --p-rule-2:       var(--rule-2);

  /* --- Status: one green, one amber, one red (contract §1.4) --
     Legacy --accent-green #1D9E75 / --accent-red #E24B4A and the
     margin-tool --p-success/-warning/-danger all resolve to the
     three canonical status tokens. */
  --accent-green:   var(--green);
  --accent-red:     var(--red-status);
  --p-success:      var(--green);
  --p-warning:      var(--amber);
  --p-danger:       var(--red-status);

  /* --- Paper / warm neutrals --------------------------------- */
  --warm-grey-light:   var(--zeal-warm-grey-25);  /* nearest canonical tint */
  --zeal-purple-light: var(--zeal-purple-50);     /* nearest canonical tint */
  --paper-warm:        var(--paper-2);            /* was undefined — see racks.css */
  --p-paper-2:         var(--paper-2);

  /* --- Type: --font-body was referenced but never defined
     (typeahead / projects-ui / directory-quick-add / racks), so it
     fell through to the browser serif default. Point it at the
     standard family. */
  --font-body:      var(--font-std);
}
