/* Web fonts (Google Fonts, SIL OFL): Inter = UI, controls, numbers; Source Serif 4 = explanations, captions, italic map callouts.
   Loaded by index.html (GIS), not here (no @import: it blocks rendering). Put in <head>, before css/theme.css:
   <link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap">
   NOTE: index.html does not link this file yet. Add <link rel="stylesheet" href="css/theme.css"> BEFORE css/app.css. */

/* === Design tokens (UI Designer) ===
   Source of truth: design/ui-brief.md §13 (v0.4). Prefix --rd-. Added with GIS & Simulation's permission, Oct 25 2026.
   No existing variables were found in app/css (theme.css did not exist; app.css defines none), so there are no mappings to note.
   MapLibre layers can read these at load: getComputedStyle(document.documentElement).getPropertyValue('--rd-accent').trim()
*/
:root{
  /* colour: STYLE.md palette */
  --rd-ink:#1A1A1A;           /* text, linework, Run button */
  --rd-ink-2:#4A4A4A;         /* secondary text (8.9:1 on white) */
  --rd-line:#6E6E6E;          /* context lines, invalid ghost */
  --rd-hair:#D9D9D9;          /* dividers, card borders */
  --rd-surface:#FFFFFF; --rd-surface-2:#F2F2F2; --rd-scrim:rgba(26,26,26,.55);
  --rd-water-today:#2E6AB0;   /* today's high tide / permanent water */
  --rd-flood:#9EC3E8;         /* raised flood water (STYLE.md) */
  --rd-flood-1:#C6DBEF;       /* depth < 0.3 m  */
  --rd-flood-2:#9EC3E8;       /* 0.3 to 0.6 m   */
  --rd-flood-3:#5F91CD;       /* > 0.6 m        */
  --rd-flood-opacity:.75;
  --rd-accent:#B9561A;        /* strategies only */
  --rd-accent-ink:#9A4A12;    /* accent text on white (≥4.5:1) */
  --rd-accent-tint:#F4D9C2;   /* strategy fills */
  --rd-accent-2:#1F6F78;      /* teal: OPEN QUESTION. Compare option B / long-term phase only */
  --rd-accent-2-tint:#CFE3E4;
  --rd-water-perm:#D6E8F0;    /* permanent water on the washed basemap */
  --rd-flood-fill-opacity:.6;
  --rd-flood-line:1.5px dashed var(--rd-water-today);
  --rd-flood-line-next:1px dashed var(--rd-water-today);
  --rd-hatch-accent:repeating-linear-gradient(45deg,#B9561A 0 1.3px,transparent 1.3px 6px),repeating-linear-gradient(-45deg,#B9561A 0 1.3px,#F4D9C2 1.3px 6px);
  --rd-hatch-water:repeating-linear-gradient(45deg,#2E6AB0 0 1px,transparent 1px 6px),repeating-linear-gradient(-45deg,#2E6AB0 0 1px,transparent 1px 6px);
  --rd-hatch-accent-2:repeating-linear-gradient(45deg,#1F6F78 0 1.3px,transparent 1.3px 6px),repeating-linear-gradient(-45deg,#1F6F78 0 1.3px,#CFE3E4 1.3px 6px);
  --rd-water-label:#1E4F8A;   /* italic water callouts */
  --rd-building-3d:#EDEDEA;   /* fill-extrusion-color in 3D tilt */
  --rd-auto-run-debounce:300ms; /* agreed with GIS (setAutoRun) */
  /* basemap (MapLibre raster paint; precedent §0) */
  --rd-basemap-saturation:-0.95; --rd-basemap-brightness-min:0.5; --rd-basemap-contrast:-0.35;  /* v0.6: paler, BPDA-style wash */
  --rd-danger:#B42318;        /* delete only */
  --rd-focus:0 0 0 3px #fff,0 0 0 5px var(--rd-ink);
  /* type */
  --rd-font:"Inter","Helvetica Neue",Arial,sans-serif;              /* UI, controls, numbers */
  --rd-font-serif:"Source Serif 4","Source Serif Pro",Georgia,serif; /* explanations, captions, map callouts (italic) */
  --rd-title-transform:uppercase; --rd-title-tracking:.12em; --rd-title-weight:700; --rd-title-size:13px;
  --rd-callout-size:14px; --rd-callout-halo:0 0 3px #fff,0 0 3px #fff,0 0 2px #fff;
  /* fonts: Google Fonts, OFL. Inter 400/500/600/700/800; Source Serif 4 400, 400i, 600.
     Fallback pair if Source Serif feels heavy: Crimson Pro (body) + Work Sans (titles). */
  --rd-fs-xs:12px; --rd-fs-sm:13px; --rd-fs-md:15px; --rd-fs-lg:18px; --rd-fs-xl:22px; --rd-fs-score:34px;
  --rd-fw-regular:400; --rd-fw-medium:500; --rd-fw-bold:700; --rd-fw-heavy:800;
  /* space & size */
  --rd-space-1:4px; --rd-space-2:8px; --rd-space-3:12px; --rd-space-4:16px; --rd-space-5:24px; --rd-space-6:32px;
  --rd-tap:44px; --rd-handle:22px; --rd-marker:36px; --rd-icon:32px;
  --rd-tray-w:320px; --rd-sheet-peek:56px; --rd-sheet-default:244px; --rd-topbar-h:56px; --rd-run-h:56px;
  /* shape */
  --rd-radius-sm:6px; --rd-radius-md:10px; --rd-radius-lg:16px; --rd-radius-pill:999px;
  --rd-line-key:3px; --rd-line-context:1px;  /* map: key = strategies, context = zone/parcels */
  /* elevation */
  --rd-shadow-1:0 1px 2px rgba(0,0,0,.12),0 1px 1px rgba(0,0,0,.06);
  --rd-shadow-2:0 6px 18px rgba(0,0,0,.18);
  --rd-shadow-run:0 4px 0 #000,0 6px 18px rgba(0,0,0,.18);
  /* motion */
  --rd-ease:cubic-bezier(.2,.8,.2,1); --rd-ease-spring:cubic-bezier(.3,1.4,.5,1);
  --rd-dur-fast:120ms; --rd-dur-med:220ms; --rd-dur-slow:400ms; --rd-dur-water-step:1200ms;
  /* v0.5 play (PROPOSED): same accent, stipple not crosshatch, + ink ball badge */
  --rd-play-dots:radial-gradient(circle,#B9561A 1.1px,transparent 1.4px) 0 0/6px 6px,rgba(244,217,194,.7);
  --rd-play-badge:16px; --rd-play-badge-bg:#1A1A1A;
  --rd-playzone-line:#1A1A1A; --rd-playzone-line-w:2.2px; --rd-playzone-hatch-opacity:.55;
  --rd-playzone-hatch:repeating-linear-gradient(-60deg,rgba(26,26,26,.55) 0 .8px,transparent .8px 7px),rgba(255,255,255,.35);
  --rd-wet-cell:rgba(158,195,232,.6);  /* per-piece flood readout, wet cells */
  /* v0.5 N-score card: equal weight, every score same size */
  --rd-score-value-size:28px; --rd-score-value-size-compact:20px; --rd-score-unit-size:12px;
  --rd-score-gap:8px; --rd-score-base-bar:#C9C9C9; --rd-score-after-bar:#1A1A1A; --rd-score-bar-h:4px;
}
@media (prefers-reduced-motion:reduce){:root{--rd-dur-med:0ms;--rd-dur-slow:0ms;--rd-dur-water-step:150ms;--rd-ease-spring:linear}}
/* === end Design tokens (UI Designer) === */
