/* ═══════════════════════════════════════════════════════════════════
   EMERGENCY COMPATIBILITY SHIM  —  AI² ENQUIRE
   ───────────────────────────────────────────────────────────────────
   WHY THIS EXISTS
   style.css used to DECLARE the legacy custom properties. The Phase 1
   migration retired those declarations because every reference *inside
   style.css* had been repointed to canonical tokens. But the other
   stylesheets — tracker.css, sme_dashboard.css, subscriber_dashboard.css,
   landing.css, public.css, rag_cockpit.css — were never migrated. They
   still reference the old names, which now resolve to nothing.

   An unresolved var() in `background` paints transparent  -> no cards.
   An unresolved var() in `font-family` falls back to serif -> no fonts.

   WHAT THIS DOES
   Re-declares every legacy name as an alias of its canonical token.
   Nothing is hard-coded: each alias points at tokens.css, so the design
   decisions still hold and there is no second source of truth.

   HOW TO INSTALL  (two minutes, no server restart)
   1. Save as  static/_legacy_aliases.css
   2. In base.html, public_base.html and rag_cockpit.html add it
      IMMEDIATELY AFTER the tokens.css link:
         <link rel="stylesheet" href="/static/tokens.css">
         <link rel="stylesheet" href="/static/_legacy_aliases.css">   <-- add
   3. Hard-refresh (Ctrl+F5). The site should return to normal.

   HOW TO REMOVE
   Delete a block below only once the stylesheet that used those names
   has been migrated. When the file is empty, delete the file and the
   two <link> lines. It is scaffolding, not architecture.
   ═══════════════════════════════════════════════════════════════════ */

:root {

  /* ── TYPE — this block is why nothing looks right ──────────────── */
  --font-h:               var(--tml-font-display);
  --font-b:               var(--tml-font-body);
  --font-m:               var(--tml-font-mono);

  /* ── NEUTRAL FAMILY (style.css / dashboards / tracker) ─────────── */
  --neutral-bg:           var(--tml-bg);
  --neutral-bg-alt:       var(--tml-bg-alt);
  --neutral-bg-card:      var(--tml-surface);
  --neutral-border:       var(--tml-border-soft);
  --neutral-divider:      var(--tml-divider);
  --neutral-hover:        var(--tml-surface-hover);
  --neutral-text:         var(--tml-ink);
  --neutral-text-body:    var(--tml-ink-body);
  --neutral-text-muted:   var(--tml-ink-muted);

  /* ── LANDING FAMILY (landing.css / public.css) ─────────────────── */
  --landing-bg:           var(--tml-bg-public);
  --landing-card-bg:      var(--tml-surface);
  --landing-card-border:  var(--tml-border);
  --landing-accent:       var(--tml-primary);
  --landing-accent-deep:  var(--tml-primary-press);
  --landing-text-primary: var(--tml-ink);
  --landing-text-muted:   var(--tml-ink-soft);

  /* ── SHORT NAMES (style.css originals) ─────────────────────────── */
  --bg:                   var(--tml-bg);
  --text:                 var(--tml-ink);
  --muted:                var(--tml-ink-soft);
  --border:               var(--tml-border);
  --card-bg:              var(--tml-surface);
  --nav-bg:               var(--tml-dark);

  /* ── OLDER TML NAMES ───────────────────────────────────────────── */
  --tml-warm:             var(--tml-primary);
  --tml-deep:             var(--tml-primary-hover);
  --tml-bright:           var(--tml-accent);

  /* ── STATUS ────────────────────────────────────────────────────── */
  --success:              var(--tml-success);
  --warning:              var(--tml-warning);
  --danger:               var(--tml-danger);
  --info:                 var(--tml-info);

  /* ── TRACKER SEMANTICS ─────────────────────────────────────────── */
  --tk-corpus:            var(--tml-corpus);
  --tk-process:           var(--tml-process);
  --tk-attention:         var(--tml-attention);

  /* ── POC RAMP — declared in public.css only. Re-declared here so
       internal pages that reference it are not dependent on load
       order. Values unchanged; this family is a Phase 2 decision. ── */
  --poc-primary:          #4A5568;
  --poc-dark:             #2D3748;
  --poc-light:            #718096;
  --poc-bg:               #EDF2F7;
}
