/* ═══════════════════════════════════════════════════════════════════════
   AMPAM BRAND TOKENS — the ONE source of truth (filled 2026-07-09)
   Canonical gold: #C8A84E (reconciled 2026-07-28 to the DESIGN.md hallmark
     value; supersedes the prior #C9A84C — the two are near-identical antique
     gold, DESIGN.md is now the single source).
   Type system (2026-07-28): the DESIGN.md hallmark triad, SELF-HOSTED below
     (no Google/CDN dependency) — Cormorant Garamond (display) / Inter (body)
     / JetBrains Mono (mono). Fonts live at /fonts/*.woff2 in both docroots.
   Mirrored for generators at /opt/pdh/config/brand_kit.json — edit the
   JSON first, keep this file in sync. Guidelines: /branding-guidelines.md
   Load order: link this file AFTER a page's inline <style> so these
   :root values override the page's local copies.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── SELF-HOSTED HALLMARK TRIAD (sovereign; no external font CDN) ────────── */
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/cormorant-garamond-400.woff2') format('woff2')}
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/cormorant-garamond-600.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/inter-400.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/inter-500.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/inter-600.woff2') format('woff2')}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/inter-700.woff2') format('woff2')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/jetbrains-mono-400.woff2') format('woff2')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/jetbrains-mono-700.woff2') format('woff2')}

:root{
  /* ── canonical brand tokens (use these in new work) ─────────────────── */
  --ampam-gold:        var(--gold);   /* RETIRED to alias → --gold (Ray 2026-08-25 canonicalization). Value unchanged #C8A84E */
  --ampam-gold-bright: var(--gold-bright);   /* RETIRED to alias → --gold-bright (#E8C87A) */
  --ampam-gold-dim:    var(--gold-dim);      /* RETIRED to alias → --gold-dim (#8E7836)    */
  --ampam-gold-faint:  var(--gold-faint);    /* RETIRED to alias → --gold-faint (#4A3F20)  */
  --ampam-gold-line:   var(--gold-line);     /* RETIRED to alias → --gold-line (rgba)      */
  --ampam-bronze:      var(--gold2);   /* RETIRED to alias → --gold2 (same value #B8964E) */

  --ampam-bg:          #0A0E1A;   /* page background (void)               */
  --ampam-bg2:         #0E1422;   /* raised background                    */
  --ampam-panel:       #111829;   /* cards / panels                       */
  --ampam-line:        #1E2940;   /* neutral borders                      */
  --ampam-ink:         #F4EFE2;   /* primary text (warm parchment white)  */
  --ampam-mut:         #9AA3AD;   /* muted text                           */
  --ampam-green:       #5FBF7E;   /* success                              */

  /* NIBIRU / Sovereign Studio celestial palette (kept, gold canonicalized) */
  --ampam-portal-blue:   #1E90FF;
  --ampam-void-black:    #0A0A12;
  --ampam-deep-space:    #050505;   /* RECONCILED 2026-08-07: DESIGN.md deep-space wins (was #12121F). --ampam-bg stays #0A0E1A — OPEN ITEM: bg-vs-spec migration, deliberately NOT fanned out */
  --ampam-nebula-purple: #2D1B4E;
  --ampam-cosmic-silver: #C0C0D0;

  --ampam-font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;   /* titles */
  --ampam-font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;  /* body */
  --ampam-font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;  /* labels/code */
  --ampam-radius: 14px;
  --ampam-radius-sm: 10px;

  /* ── dash-derived families (added 2026-08-07) ─────────────────────────
     Neutral ramp, 4 status roles, cyan (DESIGN.md reconciliation), 6-step
     chart ramp, gold-wash + parchment. Derived from the dash.html hex
     consolidation. WRITE-ONLY — no surface is wired to these yet.      */
  --ampam-n-100: #E8ECF4;  --ampam-n-200: #D8D8D8;  --ampam-n-300: #A0A0A0;
  --ampam-n-400: #8A8A8A;  --ampam-n-500: #6A6A6A;  --ampam-n-600: #555555;
  --ampam-success: #4FA86B;  --ampam-warning: #D9A62E;
  --ampam-danger:  #C0392B;  --ampam-info:    #5B8CC4;
  --ampam-cyan:    #00E5FF;   /* reconciles the DESIGN.md-named cyan */
  --ampam-chart-1: #7F77DD;  --ampam-chart-2: #E0608A;  --ampam-chart-3: #E0894E;
  --ampam-chart-4: #F0785F;  --ampam-chart-5: #3FD6D6;  --ampam-chart-6: #7EA7D8;
  --ampam-gold-wash: #FBE7A8;  /* pale gold wash — distinct role, not shade drift */
  --ampam-tan: #CFC59A;  /* muted tan from dash.html (renamed from --ampam-parchment 2026-08-07) */

  /* ── compatibility overrides ─────────────────────────────────────────
     Existing pages define these names locally with divergent values; this
     file loads AFTER their inline <style>, so the canon wins everywhere
     the file is linked. Var names collected from the 2026-07-09 audit.  */
  --gold:        #C8A84E;   /* CANONICAL source for antique gold (Ray 2026-08-25). --ampam-gold aliases here. */
  --gold2:       #B8964E;   /* CANONICAL source for secondary gold. --ampam-bronze + --gold-2 alias here. */
  --gold-2:      var(--gold2);   /* RETIRED to alias → --gold2 (hyphen variant; keep resolving for 6 legacy refs) */
  --gold-bright: #E8C87A;
  --gold-dim:    #8E7836;
  --gold-faint:  #4A3F20;
  --gold-line:   rgba(200,168,78,.28);
}

/* ══ LIGHT-MODE GOVERNMENT IDENTITY — added 2026-08-07 (Ray, Step 4) ═══════════
   Tokens ONLY — no surface is wired to these yet. --ampam-gold stays #C8A84E
   (fills + seal) and is deliberately NOT overridden here. Applied under BOTH the
   system preference AND the explicit [data-theme="light"] toggle, per spec.
   NOTE: --ampam-parchment (#FAF7F0) is the LIGHT-MODE surface, defined here only.
   The dash.html muted tan #CFC59A is now --ampam-tan (renamed 2026-08-07). The media
   block is guarded with :not([data-theme="dark"]) so an explicit dark toggle wins. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ampam-bg:        #FFFFFF;   /* light page background              */
    --ampam-parchment: #FAF7F0;   /* light parchment surface            */
    --ampam-ink:       #1A1712;   /* primary text/ink on light          */
    --ampam-gold-text: #6B5722;   /* NEW — gold text/rules on light     */
  }
}
:root[data-theme="light"] {
  --ampam-bg:        #FFFFFF;
  --ampam-parchment: #FAF7F0;
  --ampam-ink:       #1A1712;
  --ampam-gold-text: #6B5722;
}
