/* ===========================================================================
   LSO OFFICIAL PALETTE
   Approved colors from the Impact Review Team's style guide, taken verbatim
   from the original project. These override the base theme's accent and chart
   tokens; typography and layout still come from styles/theme.css.

   Source of each value:
     #003f5c  primary navy      — styles.css (.metric-value, panel borders) and
                                  the Trend_Chart marker color
     #DDCC77  PESF deposit      — Chart_Variance trace "Deposit into PESF"
     #882255  PESF withdrawal   — Chart_Variance trace "Withdrawal from PESF"
     #661940  diverging low     — COLORS_SHARE_CHANGE / COLORS_GROWTH low stop
     #EAEBEC  diverging neutral — COLOR_NEUTRAL
     #0E432C  diverging high    — COLORS_SHARE_CHANGE / COLORS_GROWTH high stop
     #f4f4f4  page background   — BACKGROUND_COLOR
     #f8f9fa  panel background  — styles.css .header-metrics / .intro-box
     #cbd5e1  divider           — styles.css .metric-divider
     #64748b  muted label       — styles.css .metric-title

   Do not introduce colors outside this file.
   =========================================================================== */

:root {
  /* page + surfaces */
  --bg: #f4f4f4;
  --surface: #ffffff;
  --panel: #f8f9fa;
  --border: #cbd5e1;
  --text: #222222;
  --muted: #64748b;

  /* primary */
  --accent: #003f5c;
  --accent-contrast: #ffffff;
  --brand-navy-2: #2f4b7c;   /* hero gradient second stop, index.qmd */
  --brand-card-edge: #e0e0e0; /* feature-card border, index.qmd */

  /* charts — exact trace colors from the published figures */
  --chart-1: #003f5c;   /* distribution trend bars */
  --chart-2: #882255;   /* PESF withdrawal */
  --chart-3: #0E432C;
  --chart-4: #DDCC77;   /* PESF deposit */
  --chart-5: #661940;
  --chart-6: #64748b;

  /* map scales — the three published gradients */
  --brand-diverge-low:  #661940;
  --brand-diverge-mid:  #EAEBEC;
  --brand-diverge-high: #0E432C;
  --brand-money-low:    #EAEBEC;
  --brand-money-high:   #0E432C;
  --brand-no-data:      #EAEBEC;

  /* status stays semantic, not decorative */
  --ok: #0E432C;
  --warn: #96660f;
  --danger: #882255;
}

/* The metrics band uses the style guide's panel color and left rule. */
.metrics { background: var(--panel); border-left-color: var(--accent); }
.card { background: var(--surface); }

/* Choropleth ramp for the money metric, from the published gradient. */
:root {
  --ramp-0: color-mix(in srgb, var(--brand-money-high) 12%, var(--brand-money-low));
  --ramp-1: color-mix(in srgb, var(--brand-money-high) 28%, var(--brand-money-low));
  --ramp-2: color-mix(in srgb, var(--brand-money-high) 45%, var(--brand-money-low));
  --ramp-3: color-mix(in srgb, var(--brand-money-high) 62%, var(--brand-money-low));
  --ramp-4: color-mix(in srgb, var(--brand-money-high) 80%, var(--brand-money-low));
  --ramp-5: var(--brand-money-high);
  --ramp-none: var(--brand-no-data);
}
