/* tokens.css — the light-mode design tokens shared by every page.
 *
 * Owned by the MAIN-WEB agent after this seed. Rule for everyone else:
 * values may be refined, names may not be removed or renamed, because the
 * simulator page reads them too.
 *
 * Contrast ratios are measured, not estimated (WCAG 2.x relative luminance).
 * "paper" figures are against --paper; the notes say where a colour stops
 * being safe for body text on the darker surfaces.
 */

:root {
  color-scheme: light;

  /* surfaces — warm field-report paper, not clinical white */
  --paper:    #F7F4EE;
  --paper-2:  #EFEAE1;   /* cards, panels */
  --paper-3:  #E5DED2;   /* wells, tracks, pressed states */
  --paper-hi: #FFFFFF;   /* the rare raised surface */

  /* ink */
  --ink:   #1C1815;   /* 16.1:1 on paper */
  --ink-2: #3D3630;   /* 10.8:1 */
  --ink-3: #62584F;   /*  6.3:1 — still AA on paper-3 (5.2:1) */
  --ink-4: #857A70;   /*  3.8:1 — large text and non-text marks ONLY */

  --line:   #DCD4C7;
  --line-2: #C9BFB0;

  /* accents */
  --ember:   #B43C0C;   /* 5.3:1 paper, 4.9 paper-2 — NOT body text on paper-3 */
  --ember-2: #8F2E08;   /* 7.5:1 — use for text on any surface */
  --ember-tint: #F4DCCB;
  --haze:    #7A6347;   /* 5.2:1 paper — smoke, the subject of the site */
  --haze-tint: #E8DFD1;
  --cool:    #1F6B85;   /* 5.5:1 — La Niña, rain, things that end fires */
  --good:    #1E7A55;   /* 4.8:1 paper; large text only on paper-2/3 */
  --bad:     #B42318;   /* 6.0:1 */

  /* ENSO / IOD phases */
  --enso-el-nino:  #B43C0C;
  --enso-neutral:  #857A70;
  --enso-la-nina:  #1F6B85;
  --iod-positive:  #9A5B0B;
  --iod-negative:  #2F5D8C;

  /* fuel pools — distinguishable in deuteranopia (checked in pairs) */
  --pool-peat-drained:     #B43C0C;
  --pool-peat-intact:      #C68A14;
  --pool-primary-forest:   #2E7D4F;
  --pool-secondary-forest: #3E7FA3;
  --pool-scrub-grass:      #9C7F55;

  /* AQI (US EPA PM2.5 bands), tuned to read on paper */
  --aqi-good:      #3E9E6E;
  --aqi-moderate:  #D4A017;
  --aqi-usg:       #E07B22;
  --aqi-unhealthy: #C9332A;
  --aqi-very:      #7E3B8C;
  --aqi-hazardous: #6A1B2A;

  /* type */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-ui:      "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* geometry */
  --radius:    12px;
  --radius-sm: 8px;
  --maxw:      1180px;
  --gutter:    clamp(1rem, 4vw, 2rem);

  /* elevation: offset + soft blur, never a zero-offset halo */
  --shadow-1: 0 1px 2px rgba(60, 45, 30, .06), 0 2px 8px rgba(60, 45, 30, .05);
  --shadow-2: 0 2px 4px rgba(60, 45, 30, .06), 0 10px 28px rgba(60, 45, 30, .09);

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 140ms;
  --t-mid:  260ms;
  --t-slow: 520ms;

  --tap: 44px;   /* minimum touch target, from the audit */

  /* ---- additions by MAIN-WEB (2026-10-16). Additive only. ------------- */

  /* type scale. Nothing functional goes below --fs-min (12px). */
  --fs-min:   0.75rem;    /* 12px — axis ticks, legend keys */
  --fs-small: 0.8125rem;  /* 13px — labels, captions */
  --fs-body:  1rem;
  --fs-lede:  1.1875rem;

  /* tracking: only for the rare caps label at >= 13px; never tiny + wide */
  --track-caps: 0.04em;

  /* the hero plate — haze as a warm grey-ochre veil over a pale sky.
     No text is ever drawn on these (the answer sits on a paper panel), but
     every veil colour keeps relative luminance >= 0.42 so it could carry
     ink-2 at 5:1 if a later layout needs it to. */
  --sky-clear:     #EEF0EA;
  --sky-clear-low: #F6F0E3;
  --sky-haze:      #DDCFB8;
  --sky-haze-low:  #CDB48E;
  --veil:          #E6DFD2;
  --veil-dense:    #C4AE88;
  --sun-clear:     #FFF7E6;
  --sun-haze:      #CF5F2B;
  --land-near:     #3B392E;
  --land-mid:      #6E6B58;
  --land-far:      #9C9783;

  /* dispersion plume bands (µg/m³), drawn translucent over the light map */
  --plume-35:  #D6AE5C;
  --plume-55:  #C3833A;
  --plume-150: #A04E26;
  --plume-250: #6B2617;

  /* peat choropleth ramp ends */
  --peat-lo: #EFE7D8;
  --peat-hi: #8A5A2E;

  /* map surface tints applied to the OpenFreeMap positron style */
  --map-land:  #F2EDE3;
  --map-water: #D5DEDE;
  --map-label: #4A433C;

  /* reduced-motion: state changes are kept, but this short */
  --t-reduced: 110ms;

  /* legacy aliases. Older stylesheets (sim3d.css) reference the dark-mode
     surface names; they now resolve to paper so nothing renders black. */
  --bg:      var(--paper);
  --bg-1:    var(--paper-2);
  --bg-2:    var(--paper-2);
  --bg-3:    var(--paper-3);
  --bg-sunk: var(--paper-3);
  --amber:   #9A5B0B;
}


::selection { background: var(--ember-tint); color: var(--ink); }
