/* ============================================================
   MapTracts-AMS — white-label brand tokens
   ------------------------------------------------------------
   The neutral base palette for the product. Structure is
   inherited from the Fortress AMS fork this codebase was cloned
   from, but every brand-identifying value has been replaced with
   a tenant-agnostic slate ramp.

   TO SKIN FOR A TENANT: override these custom properties in a
   tenant stylesheet loaded AFTER ds-tokens.css. Do not edit the
   values here — this file is the neutral default every tenant
   starts from.

   NOTE ON --gold-*: the ramp keeps its historical name because
   ~350 references across css/ and js/ consume it. It now holds
   the neutral accent ramp, NOT gold. Prefer reading it as
   "accent" wherever you touch it.

   MUST load FIRST (before the component CSS) so every stylesheet
   can reference var(--…). Additive only — defines custom
   properties, no rules.
   ============================================================ */

:root {
  /* ---- Primary (neutral slate near-black chrome) ---------- */
  --primary:       #0a0a0f;
  --primary-mid:   #1a1a2e;
  --primary-light: #2d2d44;

  /* ---- Neutral slate accent ------------------------------------- */
  --gold:        #c9a962;
  --gold-muted:  #a68b4b;
  --gold-subtle: rgba(201, 169, 98, .15);
  --gold-800: #7a5f2c;   /* deep gold — chip/badge text on gold-subtle, hover fills */
  --gold-700: #8a6d34;
  --gold-600: var(--gold-muted);   /* links, action text */
  --gold-500: var(--gold);         /* KPI numerals, dots */
  --gold-400: #d4bd82;
  --gold-300: #e0cfa3;
  --gold-200: #ede0c2;
  --gold-100: #f6efdc;
  --gold-050: #fbf7ec;

  /* ---- Backgrounds (cool near-whites) ------------------- */
  --bg-primary:   #fafafa;
  --bg-secondary: #fff;
  --bg-tertiary:  #f5f5f7;
  --bg-elevated:  #e8e9ed;
  --bg-glass:     hsla(0, 0%, 100%, .72);
  --bg-dark:           #0a0a0f;
  --bg-dark-secondary: #1a1a2e;
  --bg-page:      var(--bg-primary);
  --bg-surface:   var(--bg-secondary);
  --bg-subtle:    var(--bg-tertiary);
  --bg-sunken:    var(--bg-tertiary);

  /* ---- Text (Apple system grays) ------------------------ */
  --text-primary:       #1d1d1f;
  --text-secondary:     #424245;
  --text-tertiary:      #6e6e73;
  --text-muted:         #86868b;
  --text-inverse:       #fff;
  --text-inverse-muted: hsla(0, 0%, 100%, .75);
  --text-accent:        var(--gold-muted);

  /* ---- Ink ramp (cool grays) ---------------------------- */
  --ink-950: #0a0a0f; --ink-900: #1d1d1f; --ink-800: #2d2d44;
  --ink-700: #424245; --ink-600: #6e6e73; --ink-500: #86868b;
  --ink-400: #a1a1a6; --ink-300: #c7c7cc; --ink-200: #d9d9de;
  --ink-100: #e8e9ed; --ink-075: #eff0f2; --ink-050: #f5f5f7;
  --ink-025: #fafafa; --white: #ffffff;

  /* ---- Borders (cool black alphas) ---------------------- */
  --border-primary: rgba(0, 0, 0, .06);
  --border-subtle:  rgba(0, 0, 0, .04);
  --border-strong:  rgba(0, 0, 0, .1);
  --border-inverse: hsla(0, 0%, 100%, .08);
  --border-default: var(--border-primary);

  /* ---- Links -------------------------------------------- */
  --link:       var(--gold-muted);
  --link-hover: var(--gold-700);

  /* ---- Semantic (Apple system colors) ------------------- */
  --success: #34c759;  --success-bg: rgba(52, 199, 89, .1);
  --warning: #ff9f0a;  --warning-bg: rgba(255, 159, 10, .1);
  --error:   #ff3b30;  --error-bg:   rgba(255, 59, 48, .1);
  --info:    #007aff;  --info-bg:    rgba(0, 122, 255, .1);

  /* Category badge fills — darker WI/M&R that keep white ~9px labels at
     >= 4.5:1 (WCAG AA). The bright --info/--success above are for dots,
     accents, and tints, not for text-bearing solid fills. */
  --badge-wi: #0a66c2;   /* WI blue  — ~5.7:1 on white */
  --badge-mr: #1a7f45;   /* M&R green — ~5.0:1 on white */

  /* Text-safe foregrounds — for the SAME hues used as text on light
     surfaces, where the bright/muted accents fall below WCAG AA 4.5:1.
     Keep the bright/muted originals for borders, dots, and tints. */
  --gold-text:    #8a6d34;   /* ~4.9:1 on white (eyebrows, gold labels) */
  --error-text:   #b3261e;   /* ~6.5:1 on white (error/danger text)     */
  --warning-text: #a04d00;   /* ~5.9:1 on white (warning text)          */

  /* ---- Status (deal / record states) -------------------- */
  --status-hot:     #f97316;           --status-hot-bg:     rgba(249, 115, 22, .1);
  --status-active:  var(--success);    --status-active-bg:  var(--success-bg);
  --status-wi:      var(--info);       --status-wi-bg:      var(--info-bg);
  --status-danger:  var(--error);      --status-danger-bg:  var(--error-bg);
  --status-warn:    var(--warning);    --status-warn-bg:    var(--warning-bg);
  --status-neutral: var(--text-muted); --status-neutral-bg: rgba(0, 0, 0, .05);

  /* ---- Dark command chrome ------------------------------ */
  --chrome-bg:         var(--primary);
  --chrome-surface:    var(--primary-mid);
  --chrome-border:     var(--border-inverse);
  --chrome-text:       #ffffff;
  --chrome-text-muted: hsla(0, 0%, 100%, .55);
  --chrome-label:      var(--gold);
  --chrome-active-bg:       hsla(0, 0%, 100%, .06);
  --chrome-active-bg-light: var(--white);

  /* ---- Corner radii ------------------------------------- */
  --radius-xs: 4px;  --radius-sm: 6px;  --radius-md: 8px;
  --radius-lg: 12px; --radius-xl: 16px; --radius-2xl: 24px;
  --radius-full: 9999px; --radius-pill: 9999px; --radius-card: 16px;

  /* ---- Shadows (neutral black, layered) ----------------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .03), 0 1px 2px rgba(0, 0, 0, .02);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .02);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .03), 0 8px 24px rgba(0, 0, 0, .02);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, .04), 0 10px 24px rgba(0, 0, 0, .05), 0 20px 48px rgba(0, 0, 0, .03);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, .06), 0 16px 32px rgba(0, 0, 0, .04), 0 32px 64px rgba(0, 0, 0, .02);
  --shadow-float: 0 12px 28px rgba(0, 0, 0, .08), 0 24px 56px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-focus-gold: 0 0 0 3px rgba(201, 169, 98, .30);
  --shadow-focus-blue: 0 0 0 3px rgba(0, 122, 255, .28);

  /* ---- Motion ------------------------------------------- */
  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:   0.15s;
  --duration-normal: 0.2s;
  --duration-slow:   0.3s;

  /* ---- Gradients ---------------------------------------- */
  --gradient-featured: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  --gradient-gold:     linear-gradient(135deg, var(--gold) 0%, var(--gold-muted) 100%);

  /* ---- Type families (webfonts loaded in index.html) ---- */
  /* Playfair = headings/titles/large numerals; Inter = ALL UI text;
     mono = record IDs, table dates, legal/tract descriptors.
     A tenant skin may point --font-display at its own family. */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans:    var(--font-body);
  --font-mono:    'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, ui-monospace, Menlo, monospace;
}
