/* ============================================================================
   PROMISE TOKENS — COMPATIBILITY LAYER.

   This file no longer holds any colour of its own. It maps the legacy variable
   names that 61 pages bind to onto the semantic tokens in promise_ds_v1.css,
   which in turn resolve to the signed values in
   activation_packages/brand_signoff/reference/locked_palette.md.

       legacy name  ->  semantic --ds-* token  ->  signed locked value

   Why this file existed at all: it was the surface that carried the LOCKED
   PALETTE 2026-05-16 after two files had each declared themselves "THE CANONICAL
   COLOR DOCUMENT" about different twelve-colour sets. It did that job. The
   remaining defect was narrower and lasted until 2026-08-12: the signed values
   were written out here as literals *and* (differently) in promise_ds_v1.css, so
   there were two editable places carrying one truth. Identical values today is
   not the same as one authority — it only means the next edit is where the drift
   starts. There is now exactly one place a Promise colour can be changed.

   The @import is what makes this safe. Measured: 61 pages load this file, 16 load
   promise_ds_v1.css, 1 loads both. Aliasing to var(--ds-*) without the import
   would leave the token undeclared on ~60 pages, and an undeclared custom property
   does not fall back — it invalidates the whole declaration. That exact failure
   was measured on /today in this codebase, where `border:1px solid var(--ds-line)`
   computed to `border-width: 0px` on every card. promise_ds_v1.css declares no
   element selectors (verified: zero), only :root tokens and .ds-* classes, so
   importing it cannot restyle a page that does not opt into those classes.

   MAPPED BY MEANING, NOT BY NAME. The names collide across the two systems:
   legacy `--surface` is charcoal #1E293B, which in the DS is `--ds-surface-2`;
   the DS's own `--ds-surface` is bg-elevated #0D1B34, which is legacy
   `--surface-2`. Aliasing `--surface` to `--ds-surface` because the words match
   would have repainted every panel on 61 pages.
   ============================================================================ */
@import url("/static/promise_ds_v1.css");

:root{
  /* channel triplets — still exposed under the old names, now sourced from the DS */
  --paper-rgb: var(--ds-paper-rgb);   /* #F8FAFC */
  --gold-rgb:  var(--ds-gold-rgb);    /* #CFA85A */

  /* canvas — note the deliberate cross-mapping described above */
  --bg:        var(--ds-bg);          --pds-bg:        var(--ds-bg);          /* bg-deep     */
  --surface:   var(--ds-surface-2);   --pds-surface:   var(--ds-surface-2);   /* charcoal    */
  --surface-2: var(--ds-bg-2);        --pds-surface-2: var(--ds-bg-2);        /* bg-elevated */
  --line:      var(--ds-hairline);    --pds-line:      var(--ds-hairline);
  --line-2:    rgba(var(--ds-gold-rgb),.16);  --pds-line-2: rgba(var(--ds-gold-rgb),.16);

  /* text */
  --text:   var(--ds-ink);     --pds-text:   var(--ds-ink);
  --text-2: var(--ds-ink-2);   --pds-text-2: var(--ds-ink-2);
  --muted:  var(--ds-ink-3);   --pds-muted:  var(--ds-ink-3);
  --faint:  var(--ds-muted);   --pds-faint:  var(--ds-muted);

  /* status — the lock's three functional colours, reached through their DS roles */
  --green: var(--ds-buy);      --pds-green: var(--ds-buy);     /* success · BUY  */
  --amber: var(--ds-watch);    --pds-amber: var(--ds-watch);   /* warning · WATCH */
  --red:   var(--ds-bad);      --pds-red:   var(--ds-bad);     /* danger · REJECT */

  /* Promise Gold — refined, NOT amber/honey · used sparingly (logo, accents) */
  --gold:      var(--ds-gold);       --pds-gold:     var(--ds-gold);
  --gold-soft: var(--ds-gold-soft);  --pds-gold-dim: rgba(var(--ds-gold-rgb),.30);

  /* legacy aliases seen across older pages */
  --pl:   var(--ds-surface-2);  --pl2:  var(--ds-bg-2);
  --bd:   var(--ds-hairline);   --bd2:  rgba(var(--ds-gold-rgb),.16);
  --tx:   var(--ds-ink);        --mu:   var(--ds-ink-3);   --soft: var(--ds-ink-2);
  --grn:  var(--ds-buy);        --amb:  var(--ds-watch);   --gold2: var(--ds-gold-soft);
}
