/* Design tokens: "operations ledger".
   Warm paper neutrals, a petrol accent, brick for review. Soft 6/8px corners, hairline rules, no shadows.
   IBM Plex Sans for text, Plex Mono for numbers and times. Text colours meet 4.5:1 on their backgrounds. */
:root {
  color-scheme: light;
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --surface-3: #ecebe6;
  --line: #dedbd4;
  --line-strong: #b9b4aa;
  --ink: #1c1e20;
  --ink-2: #474a4f;
  --muted: #5f6266;
  --accent: #0b5f73;
  --accent-hover: #084b5b;
  --accent-tint: #e2eff1;
  --accent-ink: #ffffff;
  --review: #a3301c;  --review-tint: #f8e8e3;
  --warn: #7f4f00;    --warn-tint: #faefd9;
  --ok: #2d6a38;      --ok-tint: #e5efe5;
  --info: #0b5f73;    --info-tint: #e2eff1;
  --neutral-tint: #efeee9;
  /* chart fills (match / verify / no match): alternating lightness (mid, light, dark) so neighbours never blend, and
     teal / amber / red so they stay apart with red-green colour blindness; the text status colours above are too alike for fills */
  --chart-ok: #4a9a86; --chart-warn: #f2b84b; --chart-bad: #a3201c;
  /* Insights: hours at stake (warm) and GPS over timecard (cool), two figures kept apart, never in each other's colour;
     checked as a pair for colour blindness (protan ΔE 25 light, 27 dark) and 3:1 on the surface. Other single figures
     use the accent. */
  --chart-stake: #eb6834; --chart-gps: #2a78d6; --chart-series: var(--accent);
  /* timeline fills (white text on each) */
  --seg-site: #2d6a38; --seg-customer: #5b4a8b; --seg-supply: #2a6a80; --seg-other: #96520f; --seg-home: #686b70;
  --seg-entry: #0b5f73; --seg-gps: #e2eff1; --seg-gps-line: #0b5f73; --seg-gps-text: #084b5b;

  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px; --fs-40: 40px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r: 6px; --r-2: 8px; --r-sm: 4px;
  /* Row density (Display: Comfortable / Compact): a row's least height, the padding and line height of a two-line cell
     (a figure with its times under it), and the size of that second line. Most rows hold two lines, so all four count. */
  --row-h: 38px; --row-quiet-h: 30px; --stack-pad: 5px; --stack-lh: 1.25; --sub-fs: var(--fs-12);
  --focus: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
  --focus-inset: inset 0 0 0 2px var(--accent);
}
:root[data-density="compact"] { --row-h: 28px; --row-quiet-h: 24px; --stack-pad: 2px; --stack-lh: 1.1; --sub-fs: var(--fs-11); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121416; --surface: #1a1d20; --surface-2: #1f2326; --surface-3: #282c30; --line: #2f3439; --line-strong: #454b52;
    --ink: #e9e7e2; --ink-2: #bcb9b1; --muted: #a09d95;
    --accent: #66b8ca; --accent-hover: #8dcbd8; --accent-tint: #14292e; --accent-ink: #0d1517;
    --review: #f0907b; --review-tint: #381d17; --warn: #e2b660; --warn-tint: #31270f; --ok: #87c48f; --ok-tint: #17291b;
    --info: #8dcbd8; --info-tint: #14292e; --neutral-tint: #24282c;
    --seg-gps: #14292e; --seg-gps-line: #66b8ca; --seg-gps-text: #a6d8e3; --seg-entry: #1d7488;
    --chart-ok: #2b7a69; --chart-warn: #f5cd6a; --chart-bad: #f06a52;
    --chart-stake: #d95926; --chart-gps: #3987e5;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121416; --surface: #1a1d20; --surface-2: #1f2326; --surface-3: #282c30; --line: #2f3439; --line-strong: #454b52;
  --ink: #e9e7e2; --ink-2: #bcb9b1; --muted: #a09d95;
  --accent: #66b8ca; --accent-hover: #8dcbd8; --accent-tint: #14292e; --accent-ink: #0d1517;
  --review: #f0907b; --review-tint: #381d17; --warn: #e2b660; --warn-tint: #31270f; --ok: #87c48f; --ok-tint: #17291b;
  --info: #8dcbd8; --info-tint: #14292e; --neutral-tint: #24282c;
  --seg-gps: #14292e; --seg-gps-line: #66b8ca; --seg-gps-text: #a6d8e3; --seg-entry: #1d7488;
  --chart-ok: #2b7a69; --chart-warn: #f5cd6a; --chart-bad: #f06a52;
  --chart-stake: #d95926; --chart-gps: #3987e5;
}
