/* Design tokens from the handoff (direction 1a "Clinical"). Scale colours carry meaning; everything else is neutral. */
:root {
  color-scheme: light;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;

  --bg: #f6f7f9;
  --card: #fff;
  --ink: #12161d;
  --ink-2: #3b4250;
  --muted: #5a6270;
  --icon: #7a828f;
  --line: #e3e6ea;
  --line-2: #eceef1;
  --line-3: #d5d9df;
  --faint: #b5bbc4;
  --chip: #e8ebef;
  --track: #eef0f3;
  --seg-on: #fff;
  --seg-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  --sel-bg: #12161d;
  --sel-fg: #fff;
  --tabbar: rgba(246, 247, 249, .94);
  --scrim: rgba(10, 13, 18, .42);
  --skeleton: #e3e6ea;
  --skeleton-2: #eceef1;
  --hatch-gap: rgba(255, 255, 255, .7);

  /* Scales: WHO UV, WBGT flags, NWS heat index */
  --s-green: oklch(0.64 0.15 150);
  --s-yellow: oklch(0.84 0.16 92);
  --s-orange: oklch(0.72 0.17 55);
  --s-red: oklch(0.58 0.21 27);
  --s-violet: oklch(0.55 0.2 300);
  --s-black: oklch(0.22 0.01 260);
  --on-green: #12161d;
  --on-yellow: #12161d;
  --on-orange: #12161d;
  --on-red: #fff;
  --on-violet: #fff;
  --on-black: #fff;
  --hi-caution: oklch(0.9 0.1 92);
  --hi-extreme-caution: oklch(0.8 0.14 70);
  --hi-danger: oklch(0.58 0.21 27);
  --hi-extreme-danger: oklch(0.42 0.17 15);
  --on-hi-caution: #12161d;
  --on-hi-extreme-caution: #12161d;
  --on-hi-danger: #fff;
  --on-hi-extreme-danger: #fff;

  --warn-bg: oklch(0.95 0.03 27);
  --warn-fg: oklch(0.42 0.16 27);
  --burn: oklch(0.5 0.2 27);
  --burn-mark: oklch(0.58 0.21 27);
  --uv-line: oklch(0.58 0.21 27);
  --uv-area: oklch(0.58 0.21 27 / .16);
  --best-tint: oklch(0.96 0.045 150);
  --best-tag: oklch(0.42 0.12 150);
  --stale: oklch(0.48 0.13 55);
  --destructive: oklch(0.55 0.21 27);
  --destructive-text: oklch(0.5 0.2 27);
  --alert-badge-bg: oklch(0.95 0.03 27);
  --alert-badge-fg: oklch(0.48 0.18 27);

  --radius-card: 16px;
  --radius-row: 14px;
  --radius-control: 12px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1015;
  --card: #161a21;
  --ink: #eceef2;
  --ink-2: #c3c8d1;
  --muted: #9199a6;
  --icon: #6c7482;
  --line: #252b35;
  --line-2: #222730;
  --line-3: #343b47;
  --faint: #4a515d;
  --chip: #1c212a;
  --track: #232833;
  --seg-on: #2c323d;
  --seg-shadow: none;
  --sel-bg: #eceef2;
  --sel-fg: #0d1015;
  --tabbar: rgba(13, 16, 21, .94);
  --scrim: rgba(0, 0, 0, .6);
  --skeleton: #1c212a;
  --skeleton-2: #232833;
  --hatch-gap: rgba(13, 16, 21, .75);

  /* Raised lightness, same hues; dark ink on the chips keeps AA contrast. */
  --s-green: oklch(0.72 0.15 150);
  --s-yellow: oklch(0.86 0.15 92);
  --s-orange: oklch(0.76 0.16 55);
  --s-red: oklch(0.66 0.2 27);
  --s-violet: oklch(0.68 0.18 300);
  --s-black: #000;
  --on-green: #0d1015;
  --on-yellow: #0d1015;
  --on-orange: #0d1015;
  --on-red: #0d1015;
  --on-violet: #0d1015;
  --on-black: #eceef2;
  --hi-caution: oklch(0.88 0.1 92);
  --hi-extreme-caution: oklch(0.8 0.14 70);
  --hi-danger: oklch(0.66 0.2 27);
  --hi-extreme-danger: oklch(0.6 0.19 15);
  --on-hi-danger: #0d1015;
  --on-hi-extreme-danger: #0d1015;

  --warn-bg: oklch(0.3 0.07 27);
  --warn-fg: oklch(0.9 0.05 27);
  --burn: oklch(0.76 0.15 27);
  --burn-mark: oklch(0.7 0.2 27);
  --uv-line: oklch(0.7 0.2 27);
  --uv-area: oklch(0.7 0.2 27 / .2);
  --best-tint: oklch(0.28 0.05 150);
  --best-tag: oklch(0.82 0.13 150);
  --stale: oklch(0.78 0.13 70);
  --destructive: oklch(0.6 0.21 27);
  --destructive-text: oklch(0.72 0.17 27);
  --alert-badge-bg: oklch(0.3 0.07 27);
  --alert-badge-fg: oklch(0.85 0.1 27);
}
