/* ============================================================================
   Wilder Insights Lab — design tokens (single source of truth)

   Every dashboarding surface (partner portal, W.I.L.D. score dashboard,
   location profile, management, public live pages, exports) reads its colours,
   type and spacing from here. Components never pick their own colour or grey.

   Rules of the house style:
   - Type: DM Sans for everything, DM Mono for labels/metadata/tabular numbers.
     No serif faces anywhere.
   - Gradients: only on the W.I.L.D. score visual itself (the conic ring).
     Cards, charts and backgrounds are flat.
   - Semantic status colours (present / expected / absent) carry meaning and are
     never replaced by partner branding.
   ============================================================================ */

:root {
  /* Grounds */
  --wil-bg: #FAFAF7;
  --wil-card: #FFFFFF;
  --wil-forest: #1F2A24;

  /* Brand */
  --wil-primary: #2D4A3E;
  --wil-primary-dark: #213A30;
  --wil-sage: #7BA098;
  --wil-sand: #D4C4A8;
  --wil-sand-dark: #B8A77F;
  --wil-roest: #B85C3A;
  --wil-amber: #C8924A;

  /* Text and lines */
  --wil-text: #1A1F1B;
  --wil-text-2: #5A645C;
  --wil-text-3: #68716A;
  --wil-border: #E8E4DB;
  --wil-hairline: #EFECE5;

  /* Accent colours, dark enough to be read as text.

     --wil-sage / --wil-roest / --wil-amber are fills: on the near-white grounds
     they land between 2.4:1 and 4.3:1, well under the 4.5:1 WCAG AA needs for
     body text. Anything that sets `color:` on a label, eyebrow, pill or number
     uses the -text pair instead; borders, dots, bars and chart series keep the
     brighter original. Each of these clears 4.8:1 against every ground it
     actually lands on: --wil-bg, --wil-card, and the tinted chip and pill
     backgrounds (the accent itself at 8–20 % over either ground). */
  --wil-sage-text: #4E6C66;
  --wil-roest-text: #984C30;
  --wil-amber-text: #825C28;

  /* Semantic status: present / expected (out of season) / absent */
  --wil-status-present: #2D4A3E;
  --wil-status-expected: #C8924A;
  --wil-status-absent: #8A938C;

  /* Tints (for chips, panels) */
  --wil-tint-primary: rgba(123, 160, 152, 0.14);
  --wil-tint-sand: rgba(212, 196, 168, 0.22);
  --wil-tint-roest: rgba(184, 92, 58, 0.12);

  /* Type */
  --wil-font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wil-font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wil-text-xs: 11px;
  --wil-text-sm: 12.5px;
  --wil-text-md: 14px;
  --wil-text-lg: 17px;
  --wil-text-xl: 22px;
  --wil-text-2xl: 28px;
  --wil-text-hero: 64px;

  /* Spacing scale */
  --wil-s1: 4px;
  --wil-s2: 8px;
  --wil-s3: 12px;
  --wil-s4: 16px;
  --wil-s5: 24px;
  --wil-s6: 32px;
  --wil-s7: 48px;

  /* Shape */
  --wil-radius: 12px;
  --wil-radius-sm: 8px;
  --wil-shadow: 0 1px 3px rgba(28, 35, 30, 0.04), 0 4px 12px rgba(28, 35, 30, 0.02);

  /* Chart series: categorical palette derived from the brand */
  --wil-series-1: #2D4A3E;
  --wil-series-2: #7BA098;
  --wil-series-3: #D4C4A8;
  --wil-series-4: #B85C3A;
  --wil-series-5: #C8924A;
  --wil-series-6: #5B7DB1;
  --wil-series-7: #8E6BA8;
  --wil-series-8: #9AA0A6;

  /* Heatmap ramp: none = white, few = light amber, many = deep roest */
  --wil-heat-0: #FFFFFF;
  --wil-heat-1: #FBE9C8;
  --wil-heat-2: #F3C98A;
  --wil-heat-3: #E39A55;
  --wil-heat-4: #C86A3C;
  --wil-heat-5: #8F3A22;

  /* Legacy aliases used by the management CSS (--mg-*) and older dashboard CSS. */
  --mg-bg: var(--wil-bg);
  --mg-panel: var(--wil-card);
  --mg-border: var(--wil-border);
  --mg-text: var(--wil-text);
  --mg-muted: var(--wil-text-2);
  --mg-accent: var(--wil-primary);
  --mg-accent-dark: var(--wil-primary-dark);
  --primary-color: var(--wil-sage);
  --secondary-color: var(--wil-primary);
}
