/* The owner page tokens: the restyle set the owner approved on 2026-11-09 (the restyle spec, "Proposed token
   changes"). It replaces the 2026-10-21 set. What changed: system fonts (no web fonts), a cooler neutral base,
   larger radii, a new default colour Cobalt, the dark desk rail, chart colours, and a few helper tokens. Status
   colours keep their approved values (ruleset A8). Spruce, Harbor, Clay and Plum stay as choices.
   Mode: html[data-mode="light"|"dark"]; with no data-mode the device decides.
   Scheme: html[data-scheme="cobalt"|"spruce"|"harbor"|"clay"|"plum"]; Cobalt is the default. */

:root {
  /* type: the phone's own system font, as the reference uses */
  --font-display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  --font-ui: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  --font-quote: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-md: 1rem;        /* 16px */
  --text-lg: 1.125rem;    /* 18px: card titles */
  --text-xl: 1.5rem;      /* 24px: page title */
  --text-2xl: 1.625rem;   /* 26px: tile figures */
  --text-3xl: 2.25rem;    /* 36px: the one big money figure */
  --text-hero: 1.875rem;  /* 30px: the home headline on a phone */
  --text-hero-desk: 2.25rem; /* 36px: the home headline on a desk */
  --text-num: 2.125rem;   /* 34px: the ring's centre figure */
  --leading-tight: 1.15;
  --leading-body: 1.5;
  --tracking-tight: -0.02em;

  /* space (4px base, unchanged) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-14: 56px;

  /* shape: rounder, as the reference */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* layout (unchanged) */
  --rail-wide: 248px;
  --rail-narrow: 84px;
  --content-max: 1180px;
  --drawer-width: 400px;
  --tap: 44px;

  /* motion (unchanged) */
  --dur-fast: 150ms;
  --dur-base: 220ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Light */
:root, html[data-mode="light"] {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #EEF2F7;
  --line: #E2E8F0;
  --line-input: #8792A2;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #5B6576;
  --ok: #286B44;      --ok-soft: #E4F2E8;
  --warn: #8A5A0B;    --warn-soft: #FBEFD6;
  --bad: #A3312B;     --bad-soft: #FBE4E1;
  --info: #2D5F8F;    --info-soft: #E3EDF7;
  --bad-strong: #C9362D;  /* count badges only, white text */
  --focus: #B7791F;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-2: 0 18px 48px rgba(15, 23, 42, 0.18);
  --scrim: rgba(15, 23, 42, 0.40);
  /* desk rail: dark in both modes, as the reference's desk */
  --side: #0F172A; --side-ink: #E8EEF7; --side-muted: #A3B1C6; --side-edge: #26334A; --side-selected: #1E2A44;
  /* sign-in splash: always dark */
  --splash: #0A0F1A; --splash-hi: #16264A;
  /* charts: jobs by stage, in stage order */
  --chart-1: #93C5FD; --chart-2: #60A5FA; --chart-3: #8B5CF6; --chart-4: #F59E0B; --chart-5: #2563EB; --chart-6: #22A06B;
  --chart-muted: #A9B4C4;
  /* the Appearance card's swatches: each colour's own accent, whatever the chosen colour */
  --swatch-cobalt: #2563EB; --swatch-spruce: #2E6B53; --swatch-harbor: #2C5F8A; --swatch-clay: #A24E2C; --swatch-plum: #6E3F72;
  color-scheme: light;
}

/* Dark: the reference's navy phone screens */
html[data-mode="dark"] {
  --bg: #0A0F1A;
  --surface: #121A27;
  --surface-2: #1A2433;
  --line: #263244;
  --line-input: #6B7A90;
  --ink: #EEF2F8;
  --ink-2: #C3CCD9;
  --muted: #97A3B6;
  --ok: #6CCB8F;      --ok-soft: #17301F;
  --warn: #E8B45A;    --warn-soft: #33280F;
  --bad: #F08A80;     --bad-soft: #3A1D1A;
  --info: #8DB8E6;    --info-soft: #182A3B;
  --bad-strong: #D9423A;
  --focus: #F2C14E;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-2: 0 18px 48px rgba(0, 0, 0, 0.55);
  --scrim: rgba(0, 0, 0, 0.6);
  --side: #060A12; --side-ink: #E8EEF7; --side-muted: #97A3B6; --side-edge: #1C2638; --side-selected: #152038;
  --splash: #0A0F1A; --splash-hi: #16264A;
  --chart-1: #BFDBFE; --chart-2: #60A5FA; --chart-3: #A78BFA; --chart-4: #FBBF24; --chart-5: #3B82F6; --chart-6: #34D399;
  --chart-muted: #4A5A72;
  --swatch-cobalt: #6EA0FF; --swatch-spruce: #5DBB93; --swatch-harbor: #7AB0E0; --swatch-clay: #EB9670; --swatch-plum: #C99ACD;
  color-scheme: dark;
}

/* Colours: the accent only. Status colours never change with the colour (A8). */
:root, html[data-scheme="cobalt"] { --accent: #2563EB; --accent-text: #1D4ED8; --accent-hi: #60A5FA; --on-accent: #FFFFFF; --accent-soft: #E6EEFD; }
html[data-scheme="spruce"] { --accent: #2E6B53; --accent-text: #2E6B53; --accent-hi: #5DBB93; --on-accent: #FFFFFF; --accent-soft: #E2EFE8; }
html[data-scheme="harbor"] { --accent: #2C5F8A; --accent-text: #2C5F8A; --accent-hi: #7AB0E0; --on-accent: #FFFFFF; --accent-soft: #E3ECF5; }
html[data-scheme="clay"]   { --accent: #A24E2C; --accent-text: #A24E2C; --accent-hi: #EB9670; --on-accent: #FFFFFF; --accent-soft: #F7E6DD; }
html[data-scheme="plum"]   { --accent: #6E3F72; --accent-text: #6E3F72; --accent-hi: #C99ACD; --on-accent: #FFFFFF; --accent-soft: #F1E6F2; }

html[data-mode="dark"], html[data-mode="dark"][data-scheme="cobalt"] { --accent: #6EA0FF; --accent-text: #8DB4FF; --accent-hi: #A9C7FF; --on-accent: #07122A; --accent-soft: #14244A; }
html[data-mode="dark"][data-scheme="spruce"] { --accent: #5DBB93; --accent-text: #6FCBA3; --accent-hi: #9BE0C1; --on-accent: #0D1F17; --accent-soft: #183028; }
html[data-mode="dark"][data-scheme="harbor"] { --accent: #7AB0E0; --accent-text: #8DBDE8; --accent-hi: #B5D4F0; --on-accent: #0B1B2A; --accent-soft: #172A3C; }
html[data-mode="dark"][data-scheme="clay"]   { --accent: #EB9670; --accent-text: #F0A887; --accent-hi: #F6C6AF; --on-accent: #2A120A; --accent-soft: #36211A; }
html[data-mode="dark"][data-scheme="plum"]   { --accent: #C99ACD; --accent-text: #D4ADD7; --accent-hi: #E6CDE8; --on-accent: #24112A; --accent-soft: #2E2232; }

/* Glow around faces, from the accent */
:root { --accent-ring: color-mix(in srgb, var(--accent) 22%, transparent); --glow: color-mix(in srgb, var(--accent) 30%, transparent); }

/* Match my device: no data-mode set and the device asks for dark. Same values as Dark above, with Cobalt first
   as the default colour. */
@media (prefers-color-scheme: dark) {
  html:not([data-mode]) {
    --bg: #0A0F1A;
    --surface: #121A27;
    --surface-2: #1A2433;
    --line: #263244;
    --line-input: #6B7A90;
    --ink: #EEF2F8;
    --ink-2: #C3CCD9;
    --muted: #97A3B6;
    --ok: #6CCB8F;      --ok-soft: #17301F;
    --warn: #E8B45A;    --warn-soft: #33280F;
    --bad: #F08A80;     --bad-soft: #3A1D1A;
    --info: #8DB8E6;    --info-soft: #182A3B;
    --bad-strong: #D9423A;
    --focus: #F2C14E;
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.02);
    --shadow-2: 0 18px 48px rgba(0, 0, 0, 0.55);
    --scrim: rgba(0, 0, 0, 0.6);
    --side: #060A12; --side-ink: #E8EEF7; --side-muted: #97A3B6; --side-edge: #1C2638; --side-selected: #152038;
    --splash: #0A0F1A; --splash-hi: #16264A;
    --chart-1: #BFDBFE; --chart-2: #60A5FA; --chart-3: #A78BFA; --chart-4: #FBBF24; --chart-5: #3B82F6; --chart-6: #34D399;
    --chart-muted: #4A5A72;
    --swatch-cobalt: #6EA0FF; --swatch-spruce: #5DBB93; --swatch-harbor: #7AB0E0; --swatch-clay: #EB9670; --swatch-plum: #C99ACD;
    color-scheme: dark;
  }
  html:not([data-mode]), html:not([data-mode])[data-scheme="cobalt"] { --accent: #6EA0FF; --accent-text: #8DB4FF; --accent-hi: #A9C7FF; --on-accent: #07122A; --accent-soft: #14244A; }
  html:not([data-mode])[data-scheme="spruce"] { --accent: #5DBB93; --accent-text: #6FCBA3; --accent-hi: #9BE0C1; --on-accent: #0D1F17; --accent-soft: #183028; }
  html:not([data-mode])[data-scheme="harbor"] { --accent: #7AB0E0; --accent-text: #8DBDE8; --accent-hi: #B5D4F0; --on-accent: #0B1B2A; --accent-soft: #172A3C; }
  html:not([data-mode])[data-scheme="clay"]   { --accent: #EB9670; --accent-text: #F0A887; --accent-hi: #F6C6AF; --on-accent: #2A120A; --accent-soft: #36211A; }
  html:not([data-mode])[data-scheme="plum"]   { --accent: #C99ACD; --accent-text: #D4ADD7; --accent-hi: #E6CDE8; --on-accent: #24112A; --accent-soft: #2E2232; }
}
