/* Design tokens. Everything else reads these by role.
   Brand blue #3F72AF for interaction and the water line; ink is a deep navy.
   Status colours follow the familiar flood-agency ramp (normal green,
   warning amber, orange, danger red) and always come with a text label. */

:root {
  color-scheme: light;

  --brand: #3f72af;
  --brand-strong: #2f5e97;
  --brand-soft: #e9f0f9;
  --navy: #112d4e;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #eaeef3;
  --border: #e2e7ee;
  --border-strong: #cdd5e0;

  --text: #15263b;
  --text-2: #4a5b70;
  --muted: #768599;

  --critical: #d93025;
  --serious: #e8710a;
  --warning: #f29900;
  --good: #1e8e3e;
  --water: var(--brand);
  --neutral: #9aa6b5;
  --stale: #b8c1cc;
  --cam: #7057ff; /* cameras: violet, apart from status colours and the water blue */

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow-2: 0 2px 6px rgba(16, 24, 40, 0.08), 0 8px 24px rgba(16, 24, 40, 0.1);
  --shadow-3: 0 4px 10px rgba(16, 24, 40, 0.1), 0 18px 40px rgba(16, 24, 40, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "IBM Plex Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #6f9fdc;
    --brand-strong: #92b8e8;
    --brand-soft: rgba(111, 159, 220, 0.14);
    --bg: #0b1626;
    --surface: #101e31;
    --surface-2: #15253b;
    --surface-3: #1b2e48;
    --border: #213450;
    --border-strong: #2c4464;
    --text: #e7edf5;
    --text-2: #b3c1d3;
    --muted: #8193aa;
    --good: #34a853;
    --neutral: #5f7189;
    --stale: #3d4f67;
    --cam: #8b73ff;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 4px 10px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #6f9fdc;
  --brand-strong: #92b8e8;
  --brand-soft: rgba(111, 159, 220, 0.14);
  --bg: #0b1626;
  --surface: #101e31;
  --surface-2: #15253b;
  --surface-3: #1b2e48;
  --border: #213450;
  --border-strong: #2c4464;
  --text: #e7edf5;
  --text-2: #b3c1d3;
  --muted: #8193aa;
  --good: #34a853;
  --neutral: #5f7189;
  --stale: #3d4f67;
  --cam: #8b73ff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 4px 10px rgba(0, 0, 0, 0.4), 0 18px 40px rgba(0, 0, 0, 0.5);
}

/* data-tone="…" sets --tone for dots, banners, pills. */
[data-tone="critical"] { --tone: var(--critical); }
[data-tone="serious"] { --tone: var(--serious); }
[data-tone="warning"] { --tone: var(--warning); }
[data-tone="good"] { --tone: var(--good); }
[data-tone="water"] { --tone: var(--water); }
[data-tone="neutral"] { --tone: var(--neutral); }
[data-tone="stale"] { --tone: var(--stale); }
