/* Traffic Safety Atlas - Waypoint design tokens (Round 2, LIGHT theme).
   Semantic names are --color-*. The --c-* names are the contract used by design/assets/layout.css, so this file can replace
   brand.tokens.css as is. A dark theme can be added later by redefining the same --color-* values (see the commented block). */
@import url("fonts/fonts.css");
:root{
  /* ---- type ---- */
  --font-display:"Sora",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;       /* headings, big numbers (OFL) */
  --font-ui:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;           /* body, buttons, labels (OFL) */
  --font-mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;                      /* crash IDs, coordinates */
  --fs-caption:12px; --lh-caption:16px;  --fs-label:13px; --lh-label:16px;  --fs-meta:14px; --lh-meta:20px;
  --fs-body-s:15px;  --lh-body-s:22px;   --fs-body:16px;  --lh-body:24px;   --fs-lead:18px; --lh-lead:28px;
  --fs-h4:17px; --lh-h4:22px; --fs-h3:20px; --lh-h3:24px; --fs-h2:24px; --lh-h2:30px; --fs-h1:30px; --lh-h1:36px; --fs-display:40px; --lh-display:46px;
  --fw-regular:400; --fw-medium:500; --fw-semibold:600; --fw-bold:700;
  --fs-base:16px; --lh-base:1.5;

  /* ---- semantic colour roles ---- */
  --color-bg:#F5F9F9;              --color-surface:#FFFFFF;     --color-surface-2:#E8F0F1;
  --color-line:#D2DFE2;          --color-line-strong:#7E98A0;  /* line-strong = control borders (3:1) */
  --color-text:#0F2128;          --color-muted:#47606A;         --color-subtle:#566E77;
  --color-primary:#0B6B74;    --color-primary-hover:#095A62;  --color-primary-ink:#FFFFFF;  --color-primary-soft:#D6ECEE;
  --color-accent:#F5C400;      --color-accent-hover:#D4A600;    --color-accent-ink:#0F2128;    --color-accent-soft:#FFF4CC;
  --color-accent-edge:#0F2128;  --color-accent-deep:#B8860B;  /* edge is required around yellow on light surfaces; deep is dashes on white */
  --color-link:#0B6B74;          --color-focus:#1B5FD1;
  /* precision of a pin's location: each also has its own shape (solid / outlined / dashed) */
  --color-prec-confirmed:#0A6B57; --color-prec-confirmed-bg:#DCF0EA;
  --color-prec-likely:#7F5200;       --color-prec-likely-bg:#FBEDCF;
  --color-prec-approx:#5B4F9E;       --color-prec-approx-bg:#E9E6F4;
  /* evidence */
  --color-evidence-video:#0B6B74;     --color-evidence-news:#47606A;
  /* crash-type categories: charts, legends, filter chips (map pins use glyph shape, not these) */
  --color-cat-vehicle:#0B6B74;  --color-cat-pedestrian:#7A1060;  --color-cat-cyclist:#4A62D0;  --color-cat-single:#5C6C74;
  /* map */
  --color-cluster:#0B6B74;  --color-cluster-ink:#FFFFFF;  --color-cluster-ring:#FFFFFF;
  --color-hotspot:#F5C400;  --color-hotspot-ink:#0F2128;
  --color-pin-halo:#FFFFFF;  --color-pin-selected-ring:#F5C400;
  --color-heat-1:#7EB6B2; --color-heat-2:#F5C400; --color-heat-3:#C9A000; --color-heat-4:#0F2128;
  --color-map-sea:#BEDCE8; --color-map-land:#EFF2EC; --color-map-land-edge:#D2DAD3; --color-map-state:#C9D3CF;
  --color-map-country:#A9B8B6; --color-map-river:#A6CADA; --color-map-label:#556C75;
  --color-map-space-1:#EAF2F5; --color-map-space-2:#D3E4EC;

  /* ---- shape, elevation, spacing ---- */
  --r-sm:8px; --r-md:12px; --r-lg:24px; --r-card:16px; --r-pill:999px;
  --shadow-1:0 1px 6px rgba(15,33,40,.22);
  --shadow-2:0 8px 32px rgba(15,33,40,.28);
  --shadow-sheet:0 -6px 28px rgba(15,33,40,.22);
  --tap:44px; --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px;
  --focus-blue:var(--color-focus);
  --focus-ring:0 0 0 2px var(--focus-blue);

  /* ---- contract aliases (design/assets/layout.css uses these) ---- */
  --c-bg:var(--color-bg); --c-surface:var(--color-surface); --c-surface-2:var(--color-surface-2); --c-line:var(--color-line);
  --c-ink:var(--color-text); --c-ink-2:var(--color-muted); --c-ink-3:var(--color-subtle);
  --c-primary:var(--color-primary); --c-primary-ink:var(--color-primary-ink); --c-primary-soft:var(--color-primary-soft);
  --c-accent:var(--color-accent); --c-accent-ink:var(--color-accent-ink); --c-accent-soft:var(--color-accent-soft); --c-accent-edge:var(--color-accent-edge);
  --c-nav-bg:var(--color-surface); --c-nav-ink:var(--color-text); --c-link:var(--color-link);
  --c-prec-confirmed:var(--color-prec-confirmed); --c-prec-confirmed-bg:var(--color-prec-confirmed-bg);
  --c-prec-likely:var(--color-prec-likely); --c-prec-likely-bg:var(--color-prec-likely-bg);
  --c-prec-approx:var(--color-prec-approx); --c-prec-approx-bg:var(--color-prec-approx-bg);
  --icon-confirmed:url("brand/badge-confirmed.svg"); --icon-likely:url("brand/badge-likely.svg"); --icon-approx:url("brand/badge-approx.svg");
  --c-cluster:var(--color-cluster); --c-cluster-ink:var(--color-cluster-ink); --c-cluster-ring:var(--color-cluster-ring);
  --c-heat-0:rgba(14,92,88,0); --c-heat-1:var(--color-heat-1); --c-heat-2:var(--color-heat-2); --c-heat-3:var(--color-heat-3); --c-heat-4:var(--color-heat-4);
  --c-sky:var(--color-map-space-2); --c-space:var(--color-map-space-1);
}

/* ---- DARK THEME: not designed yet (light only for now). ----
   When it is, redefine the --color-* values (and --shadow-*) here; every component already reads only the semantic names.
:root[data-theme="dark"]{ ... }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){ ... } }
*/
:focus-visible{outline:none;box-shadow:var(--focus-ring)}

/* ---- layout-contract extras (web developer). Aliases layout.css already uses that tokens.css does not define.
   Mapped onto Waypoint semantic roles; not new brand colors. Light theme only. ---- */
:root{
  --fw-display:var(--fw-semibold);
  --c-accent-hover:var(--color-accent-hover);
  --c-accent-text:var(--color-accent-deep);
  --c-accent-edge:var(--color-accent-edge);
  --c-cluster-halo:rgba(11,107,116,.22);
  --c-approx-fill:rgba(91,79,158,.18);
  --c-approx-stroke:rgba(91,79,158,.70);
  --c-overlay:rgba(15,33,40,.86); --c-overlay-ink:#FFFFFF; --c-shadow:rgba(15,33,40,.22);
  --c-draft-bg:#FFF3C4; --c-draft-ink:#6A4B00;
  /* Blue focus ring (matches the system cue). Not red/orange. */
  --focus-blue:var(--color-focus);
  --focus-ring:0 0 0 2px var(--focus-blue);
}
