:root, [data-theme="volt"] {
  color-scheme: light;
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;
  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.5625rem; --text-2xl: 1.953rem; --text-3xl: 2.441rem;
  --text-display-s: clamp(2.25rem, 4vw + 0.5rem, 3.75rem); --text-display: clamp(2.75rem, 5vw + 1rem, 5.25rem);
  --text-section: clamp(2rem, 2.5vw + 1rem, 3.5rem); --text-title: clamp(1.25rem, 0.75vw + 0.875rem, 1.625rem); --text-lead: clamp(1rem, 0.15vw + 1rem, 1.175rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --ease-in: cubic-bezier(0.7, 0, 0.84, 0); --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;
  --color-error: oklch(52% 0.19 27); --color-success: oklch(50% 0.12 150);
  --container: 1440px; --gutter: 64px; --gap-columns: 32px; --section-gap-s: 120px; --section-gap: 144px; --section-gap-l: 176px;
  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500; --z-tooltip: 600;
  --color-paper: oklch(98% 0.005 250); --color-paper-2: oklch(95% 0.006 250); --color-paper-3: oklch(91.5% 0.007 250);
  --color-ink: oklch(16% 0.080 260); --color-ink-2: oklch(22% 0.060 258); --color-muted: oklch(50% 0.020 250);
  --color-rule: oklch(78% 0.008 250); --color-rule-2: oklch(36% 0.060 255);
  --color-accent: oklch(88% 0.200 120); --color-accent-ink: oklch(16% 0.080 260); --color-accent-deep: oklch(58% 0.145 125);
  --color-focus: oklch(58% 0.145 125); --color-slot: oklch(76% 0.07 258);
  /* the original myspottr faces: Inter for heads and body, Space Grotesk for figures and times */
  --font-display: "Inter", system-ui, sans-serif; --font-body: "Inter", system-ui, sans-serif;
  --font-outlier: "Space Grotesk", "Inter", system-ui, sans-serif;
  --radius-card: 4px; --radius-pill: 4px; --rule-hair: 1px; --rule-bar: 2px;
  --shadow-card: none;
  --tracking-display: -0.045em; --display-weight: 600; --display-case: none; --wordmark-weight: 800; --tracking-wordmark: -0.065em;
}

/* ------------------------------------------------------------------
   myspottr semantic layer. Components read only these names, so a new
   brand is one theme block below: no page CSS changes.
   Default theme: "volt" (Sport). Switch with <html data-theme="…">,
   ?theme=ember in the URL, or localStorage "spottr-theme".
   ------------------------------------------------------------------ */
:root, [data-theme] {
  --color-band: var(--color-ink);            /* the one dark band */
  --color-on-band: var(--color-paper);
  --color-on-band-muted: oklch(78% 0.03 255);
  --color-band-rule: oklch(34% 0.06 258);
  --color-pin: var(--color-accent);          /* the meeting point, the dot in the wordmark */
  --color-route-you: var(--color-ink);
  --color-route-them: var(--color-accent-deep);
  --color-map: var(--color-paper-2);
  --color-map-street: var(--color-paper);
  --color-map-park: oklch(92% 0.025 150);
  --color-map-water: oklch(90% 0.03 240);
  /* pixel athletes (the before and after) */
  --px-skin: oklch(76% 0.07 60); --px-skin-2: oklch(66% 0.08 50);
  --px-hair: oklch(24% 0.03 260); --px-hair-2: oklch(18% 0.03 260);
  --px-shirt: var(--color-accent); --px-shirt-shade: oklch(76% 0.17 122);
  --px-shirt-2: oklch(93% 0.01 250); --px-shirt-2-shade: oklch(80% 0.015 250);
  --px-shorts: oklch(40% 0.06 258); --px-shorts-2: oklch(52% 0.04 255);
  --px-shoe: oklch(96% 0.005 250); --px-metal: oklch(74% 0.02 250);
  --px-floor: oklch(42% 0.05 258); --px-shadow: oklch(8% 0.04 260);
  --font-wordmark: var(--font-display);
}

/* Ember: taken from the current logo (orange into magenta), set as one
   orange signal on warm paper. A candidate, not a decision. */
[data-theme="ember"] {
  --color-paper: oklch(97.5% 0.008 70); --color-paper-2: oklch(94.5% 0.012 65); --color-paper-3: oklch(91% 0.016 62);
  --color-ink: oklch(20% 0.035 285); --color-ink-2: oklch(27% 0.035 285); --color-muted: oklch(49% 0.025 285);
  --color-rule: oklch(80% 0.015 60); --color-rule-2: oklch(38% 0.05 300);
  --color-accent: oklch(76% 0.165 58); --color-accent-ink: oklch(20% 0.035 285); --color-accent-deep: oklch(56% 0.2 20);
  --color-focus: oklch(56% 0.2 20); --color-slot: oklch(80% 0.06 50);
  --color-on-band-muted: oklch(80% 0.03 300); --color-band-rule: oklch(36% 0.05 290);
  --color-map-park: oklch(92% 0.03 120); --color-map-water: oklch(91% 0.03 230);
  --px-shirt-shade: oklch(64% 0.17 45);
}

/* Night: the volt system on a dark ground. Derived, never inverted. */
[data-theme="night"] {
  color-scheme: dark;
  --color-paper: oklch(17% 0.035 260); --color-paper-2: oklch(21% 0.04 260); --color-paper-3: oklch(25% 0.04 260);
  --color-ink: oklch(95% 0.01 250); --color-ink-2: oklch(86% 0.015 250); --color-muted: oklch(72% 0.02 250);
  --color-rule: oklch(34% 0.03 258); --color-rule-2: oklch(70% 0.04 255);
  --color-accent: oklch(88% 0.2 120); --color-accent-ink: oklch(16% 0.08 260); --color-accent-deep: oklch(84% 0.19 122);
  --color-focus: oklch(84% 0.19 122); --color-slot: oklch(40% 0.05 258);
  --color-band: oklch(12% 0.04 262); --color-on-band: oklch(95% 0.01 250); --color-on-band-muted: oklch(76% 0.02 250); --color-band-rule: oklch(30% 0.04 258);
  --color-route-you: oklch(95% 0.01 250); --color-route-them: oklch(66% 0.05 255);
  --color-map: oklch(21% 0.04 260); --color-map-street: oklch(26% 0.04 260);
  --color-map-park: oklch(25% 0.045 160); --color-map-water: oklch(25% 0.05 240);
}

/* ------------------------------------------------------------------
   Product layer: tokens named after what myspottr is about.
   Two people (you, your partner) meet at one spot, in one of four
   sports, through four match states, without sharing a live location.
   Rationale and live demos: design-tokens.html
   ------------------------------------------------------------------ */
:root, [data-theme] {
  /* primitives: each hue comes from a place you train */
  --p-heat: oklch(55% 0.215 355);      /* the partner: heart-rate magenta, carried from the earlier logo */
  --p-clay: oklch(52% 0.17 38);       /* tennis: a clay court */
  --p-court: oklch(47% 0.11 160);     /* badminton: the green of a sports-hall court */
  --p-iron: oklch(44% 0.035 255);      /* gym: plates and rubber flooring */
  --p-road: oklch(52% 0.115 75);        /* cycling: the amber centre line of a road */
  --p-lane: oklch(52% 0.11 222);       /* swimming: pool tile and lane-rope blue */

  /* the pair and the meeting */
  --color-you: var(--color-ink);                 /* your own route: the ink you already write in */
  --color-partner: var(--p-heat);                /* the other person: the one warm hue on the page */
  --color-spot: var(--color-accent);             /* where you meet: hi-vis, the dot in myspottr. */
  --color-on-spot: var(--color-accent-ink);

  /* the five launch activities (product-spec.md): a hue for chips, tab markers and photo plates; text on them is paper */
  --color-sport-tennis: var(--p-clay);
  --color-sport-badminton: var(--p-court);
  --color-sport-run: var(--p-clay);    /* only for the switched-off In sync stage; running is not a launch activity */
  --color-sport-gym: var(--p-iron);
  --color-sport-ride: var(--p-road);
  --color-sport-swim: var(--p-lane);
  --color-on-sport: var(--color-paper);

  /* the match, in the order it happens */
  --color-state-searching: var(--color-muted);   /* looking nearby: quiet, nothing yet */
  --color-state-common: var(--color-spot);       /* common ground found: the signal */
  --color-state-mutual: var(--color-partner);    /* both said yes: the other person has arrived */
  --color-state-planned: var(--color-ink);       /* session booked: settled, solid */

  /* privacy: an approximate area is drawn as a soft field, never a point */
  --color-area: color-mix(in oklab, var(--p-lane) 16%, transparent);
  --color-area-edge: color-mix(in oklab, var(--p-lane) 55%, transparent);

  /* motion, named for training */
  --motion-rep: var(--dur-micro);      /* 120ms: a press, a tick */
  --motion-set: var(--dur-short);      /* 220ms: hover, a tab, a chip */
  --motion-interval: var(--dur-long);  /* 420ms: a panel, a reveal */
  --ease-stride: var(--ease-out);      /* arrivals settle like a stride landing */
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1); /* the site-wide fluid curve: quick out, long soft landing */
  --radius-app: 16px;                  /* app cards: rounder than controls, like a phone screen */
  --loop-start: 6s;                    /* on your marks, get set, go */
  --loop-meet: 12s;                    /* two routes meet */
  --loop-session: 28s;                 /* in sync: four sports, seven seconds each */
}
[data-theme="night"] {
  --p-heat: oklch(72% 0.17 355); --p-clay: oklch(74% 0.15 42); --p-court: oklch(76% 0.11 160); --p-iron: oklch(76% 0.03 255);
  --p-road: oklch(84% 0.13 85); --p-lane: oklch(76% 0.1 222);
  --color-on-sport: oklch(16% 0.08 260);
}
[data-theme="ember"] {
  --p-clay: oklch(56% 0.16 30);
}
