/* Design tokens. Light is the default; dark overrides the same names.
   Colours are checked for text contrast against their surfaces (>= 4.5:1
   for body text). Brand navy carries over from the legacy app. */
:root {
  color-scheme: light;
  --brand: #1f4265;
  --brand-hi: #2e5f8f;
  --brand-soft: #e8f0f8;
  --on-brand: #ffffff;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-sunk: #eef2f6;
  --line: #d9e0e7;
  --line-strong: #b9c4cf;
  --text: #17212b;
  --text-2: #4a5866;
  --muted: #5f6d7a;

  --good: #1e6b45;   --good-soft: #e3f3ea;
  --warn: #8a5a10;   --warn-soft: #fbf0dc;
  --bad: #a3302f;    --bad-soft: #fbe6e5;
  --info: #255d91;   --info-soft: #e3eefa;

  /* service colours (chips, board columns) */
  --svc-cabinets: #6a4bb3;      --svc-cabinets-soft: #efe9fa;
  --svc-install: #8a5a10;       --svc-install-soft: #fbf0dc;
  --svc-countertops: #1e6b6b;   --svc-countertops-soft: #e0f2f1;

  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 16px;
  --shadow-1: 0 1px 2px rgba(16, 33, 52, .06), 0 1px 1px rgba(16, 33, 52, .04);
  --shadow-2: 0 6px 20px rgba(16, 33, 52, .10);
  --shadow-3: 0 18px 48px rgba(16, 33, 52, .18);
  --focus: 0 0 0 3px rgba(46, 95, 143, .45);

  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --step--1: .8125rem;
  --step-0: .9375rem;
  --step-1: 1.0625rem;
  --step-2: 1.3125rem;
  --step-3: 1.75rem;

  --nav-w: 232px;
  --topbar-h: 56px;
  --tabbar-h: 64px;

  /* motion: short, ease-out; zeroed under reduced motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 120ms;
  --t: 200ms;
  --t-slow: 320ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #7fb0e0;
  --brand-hi: #a3c8ee;
  --brand-soft: #1b2b3c;
  --on-brand: #0b1622;

  --bg: #0f1720;
  --surface: #16212c;
  --surface-2: #1b2734;
  --surface-sunk: #111a23;
  --line: #2a3846;
  --line-strong: #3b4c5d;
  --text: #e6edf3;
  --text-2: #b6c3cf;
  --muted: #94a3b2;

  --good: #6fcf9a;   --good-soft: #15302a;
  --warn: #e7b35c;   --warn-soft: #33281a;
  --bad: #f08a87;    --bad-soft: #3a1f22;
  --info: #8cbcee;   --info-soft: #172a3e;

  --svc-cabinets: #b9a2f0;      --svc-cabinets-soft: #262040;
  --svc-install: #e7b35c;       --svc-install-soft: #33281a;
  --svc-countertops: #73cfcb;   --svc-countertops-soft: #13302f;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 20px rgba(0, 0, 0, .45);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, .55);
  --focus: 0 0 0 3px rgba(127, 176, 224, .55);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t: 0ms; --t-slow: 0ms; }
}
