/* Shared kit tokens (kit 0.3.0), 9 Nov 2026.
   Glass everywhere, meaningful activity, rolling figures, teal action and D5 maps.
   Owner words and adoption: ../kit-vnext/LOOK-SPEC.md: "D3, D1 then D5", "Build, climb inside".
   Light is the base, including outdoor's glass/live/field fallbacks. Outdoor paints solid surfaces.
   Colour roles: --border identifies controls (3:1); --divider is structure only.
   Action and ordinary decision text: 7:1 minimum; action sheen ends above the label.
   Accent slots, statuses, 48px targets and message timings retain their existing contracts. */
:root {
  color-scheme: light;
  --white: #ffffff;
  --zinc-50: #fafafa;
  --zinc-100: #f4f4f5;
  --zinc-200: #e4e4e7;
  --zinc-300: #d4d4d8;
  --zinc-600: #52525b;
  --zinc-700: #3f3f46;
  --zinc-800: #27272a;
  --zinc-900: #18181b;
  --bg: #d3dde5;
  --surface: #f2f7fa;
  --surface-raised: #f8fbfd;
  --surface-sunken: #e1e9ef;
  --border: #51606b;
  --divider: #c3ced6;
  --border-width: 1.5px;
  --ring: #121f28;
  --ring-width: 2px;
  --ring-offset: 2px;
  --text: #121f28;
  --text-muted: #33424c;
  --scrim: rgb(24 24 27 / 0.5);
  --primary: #17202f;
  --primary-fg: var(--white);
  --accent-light: #134c49;
  --accent-light-fg: var(--white);
  --accent-dark: #99f6e4;
  --accent-dark-fg: var(--zinc-900);
  --accent: var(--accent-light);
  --accent-fg: var(--accent-light-fg);
  --accent-soft: #ccfbf1;
  --danger: #7f1d1d;
  --danger-fg: var(--white);
  --danger-soft: #fee2e2;
  --warning: #663910;
  --warning-fg: var(--white);
  --warning-soft: #fef3c7;
  --success: #134e2b;
  --success-fg: var(--white);
  --success-soft: #dcfce7;
  --info: #1e3a8a;
  --info-fg: var(--white);
  --info-soft: #dbeafe;
  --selected-border: var(--text);
  --selected-bg: #c3d0da;
  --selected-weight: 600;
  --lead-bg: var(--surface-raised);
  --lead-border: #415564;
  --lead-rule-width: 3px;
  --disabled-text: var(--zinc-600);
  --disabled-bg: var(--zinc-200);
  --disabled-border: var(--zinc-300);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --numeric-variant: tabular-nums;
  --text-xs: 0.875rem;
  --text-sm: var(--text-xs);
  --text-base: 1rem;
  --text-lg: 1.142857rem;
  --text-xl: 1.306122rem;
  --caption-size: var(--text-xs);
  --toast-size: var(--text-base);
  --leading-body: 1.5;
  --leading-control: 1.3;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgb(24 24 27 / 0.08);
  --shadow-modal: 0 4px 16px rgb(24 24 27 / 0.16);
  --duration-fast: 150ms;
  --easing: cubic-bezier(0.2, 0, 0, 1);
  --toast-ms: 4000;
  --undo-ms: 7000;
  --touch-min: 48px;
  --topbar-max: 56px;
  --bottombar-max: 64px;
  --action: #0a5a54;
  --action-fg: #ffffff;
  --action-soft: #d5efeb;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --leading-tight: 1.2;
  --tracking-tight: -0.02em;
  --radius-card: 14px;
  --card-gap: var(--space-3);
  --motion-ambient: 18s;
  --motion-enter: 240ms;
  --motion-exit: 180ms;
  --motion-shimmer: 1.6s;
  --motion-ring: 900ms;
  --motion-view: 500ms;
  --motion-view-out: 250ms;
  --motion-lens: 350ms;
  --motion-sheet-open: 500ms;
  --motion-sheet-close: 300ms;
  --motion-puck: 700ms;
  --motion-banner: 350ms;
  --motion-roll: 600ms;
  --motion-draw: 1600ms;
  --motion-assemble-item: 320ms;   /* one slot settles */
  --motion-assemble-gap: 70ms;     /* stagger between slots when data is already there */
  --motion-assemble-cap: 700ms;    /* the whole opening finishes within this, however many slots */
  --motion-grow: 420ms;            /* tapped card grows into the next screen */
  --motion-shrink: 320ms;          /* and shrinks back on return */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --answer-hold: 250ms;
  --grain-opacity: .05; /* documentation only: baked into the grain SVG in the field layer (data URIs can't read tokens) */
  --glass-blur: 24px;
  --lens-blur: 4px;
  --mask-ink: #000;
  --radius-glass: 18px;
  --radius-control: 12px;
  --field-1: #6fb3bc;
  --field-2: #93a9d8;
  --field-3: #dcbf86;
  --field-mix: 80%;
  --field-mix-3: 55%;
  --rim-edge: rgb(18 31 40 / .16);
  --tile-mix: 16%;
  --glass-bg: rgb(248 251 253 / .62);
  --glass-bg-lead: rgb(252 254 255 / .68);
  --field-light: rgb(255 255 255 / .55);
  --rim-light: rgb(255 255 255 / .95);
  --hub-master: #8a5a14;
  --hub-it: #3d5a96;
  --hub-media: #7b4a8c;
  --hub-research: #0e6a80;
  --lens-bg: rgb(255 255 255 / .30);
  --lens-rim: rgb(18 31 40 / .55);
  --glass-border: rgb(255 255 255 / .70);
  --glass-edge: rgb(18 31 40 / .10);
  --glass-highlight: rgb(255 255 255 / .55);
  --glass-glow: rgb(255 255 255 / .55); /* panel highlight (.glass::before) */
  --glass-shadow: rgb(0 0 0 / .10);
  --glass-row-bg: rgb(255 255 255 / .50);
  --glass-bar-bg: rgb(248 251 253 / .80);
  --sheen: rgb(255 255 255 / .28);
  --live: #0f766e;
  --live-wait: #b45309;
  --live-idle: #7b8a95;
  --spark: #0f766e;
  --wash: 8%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="outdoor"]) {
    color-scheme: dark;
    --bg: #0c151b;
    --surface: #233038;
    --surface-raised: #2c3a44;
    --surface-sunken: #151e25;
    --border: #97a3ad;
    --divider: #3a4853;
    --ring: #ebf3f9;
    --text: #ebf3f9;
    --text-muted: #bdc9d2;
    --scrim: rgb(0 0 0 / 0.6);
    --primary: #e5edf3;
    --primary-fg: var(--zinc-900);
    --accent: var(--accent-dark);
    --accent-fg: var(--accent-dark-fg);
    --accent-soft: #042f2e;
    --danger: #fecaca;
    --danger-fg: var(--zinc-900);
    --danger-soft: #450a0a;
    --warning: #fde68a;
    --warning-fg: var(--zinc-900);
    --warning-soft: #422006;
    --success: #bbf7d0;
    --success-fg: var(--zinc-900);
    --success-soft: #052e16;
    --info: #bfdbfe;
    --info-fg: var(--zinc-900);
    --info-soft: #172554;
    --selected-bg: #34444f;
    --lead-bg: var(--surface-raised);
    --lead-border: #a5b7c5;
    --disabled-text: var(--zinc-300);
    --disabled-bg: var(--zinc-700);
    --disabled-border: var(--zinc-600);
    --shadow-sm: none;
    --shadow-modal: none;
    --action: #5eead4;
    --action-fg: #0c151b;
    --action-soft: #12403b;
    --field-1: #1f6f76;
    --field-2: #33507e;
    --field-3: #6b5530;
    --glass-bg: rgb(35 48 56 / .55);
    --glass-bg-lead: rgb(44 58 68 / .62);
    --field-light: rgb(255 255 255 / .16);
    --rim-light: rgb(255 255 255 / .55);
    --hub-master: #e2b768;
    --hub-it: #9db8f0;
    --hub-media: #d3a6e2;
    --hub-research: #6fd0e4;
    --wash: 5%;
    --lens-bg: rgb(12 21 27 / .30);
    --lens-rim: rgb(255 255 255 / .50);
    --field-mix: 60%;
    --field-mix-3: 35%;
    --rim-edge: transparent;
    --tile-mix: 14%;
    --glass-border: rgb(255 255 255 / .16);
    --glass-edge: rgb(0 0 0 / .35);
    --glass-highlight: rgb(255 255 255 / .22);
    --glass-glow: rgb(255 255 255 / .03); /* dark: peak .021 white, keeps panel text >= 7:1 */
    --glass-shadow: rgb(0 0 0 / .30);
    --glass-row-bg: rgb(35 48 56 / .62);
    --glass-bar-bg: rgb(28 38 45 / .82);
    --sheen: rgb(255 255 255 / .22);
    --live: #5eead4;
    --live-wait: #fbbf24;
    --live-idle: #5b6b77;
    --spark: #7fcfbf;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c151b;
  --surface: #233038;
  --surface-raised: #2c3a44;
  --surface-sunken: #151e25;
  --border: #97a3ad;
  --divider: #3a4853;
  --ring: #ebf3f9;
  --text: #ebf3f9;
  --text-muted: #bdc9d2;
  --scrim: rgb(0 0 0 / 0.6);
  --primary: #e5edf3;
  --primary-fg: var(--zinc-900);
  --accent: var(--accent-dark);
  --accent-fg: var(--accent-dark-fg);
  --accent-soft: #042f2e;
  --danger: #fecaca;
  --danger-fg: var(--zinc-900);
  --danger-soft: #450a0a;
  --warning: #fde68a;
  --warning-fg: var(--zinc-900);
  --warning-soft: #422006;
  --success: #bbf7d0;
  --success-fg: var(--zinc-900);
  --success-soft: #052e16;
  --info: #bfdbfe;
  --info-fg: var(--zinc-900);
  --info-soft: #172554;
  --selected-bg: #34444f;
  --lead-bg: var(--surface-raised);
  --lead-border: #a5b7c5;
  --disabled-text: var(--zinc-300);
  --disabled-bg: var(--zinc-700);
  --disabled-border: var(--zinc-600);
  --shadow-sm: none;
  --shadow-modal: none;
  --action: #5eead4;
  --action-fg: #0c151b;
  --action-soft: #12403b;
  --field-1: #1f6f76;
  --field-2: #33507e;
  --field-3: #6b5530;
  --glass-bg: rgb(35 48 56 / .55);
  --glass-bg-lead: rgb(44 58 68 / .62);
  --field-light: rgb(255 255 255 / .16);
  --rim-light: rgb(255 255 255 / .55);
  --hub-master: #e2b768;
  --hub-it: #9db8f0;
  --hub-media: #d3a6e2;
  --hub-research: #6fd0e4;
  --wash: 5%;
  --lens-bg: rgb(12 21 27 / .30);
  --lens-rim: rgb(255 255 255 / .50);
  --field-mix: 60%;
  --field-mix-3: 35%;
  --rim-edge: transparent;
  --tile-mix: 14%;
  --glass-border: rgb(255 255 255 / .16);
  --glass-edge: rgb(0 0 0 / .35);
  --glass-highlight: rgb(255 255 255 / .22);
  --glass-glow: rgb(255 255 255 / .03); /* dark: peak .021 white, keeps panel text >= 7:1 */
  --glass-shadow: rgb(0 0 0 / .30);
  --glass-row-bg: rgb(35 48 56 / .62);
  --glass-bar-bg: rgb(28 38 45 / .82);
  --sheen: rgb(255 255 255 / .22);
  --live: #5eead4;
  --live-wait: #fbbf24;
  --live-idle: #5b6b77;
  --spark: #7fcfbf;
}

:root[data-theme="outdoor"] {
  color-scheme: light;
  --bg: var(--white);
  --surface: var(--white);
  --surface-raised: var(--white);
  --border: var(--zinc-600);
  --border-width: 2px;
  --ring: var(--zinc-900);
  --text: var(--zinc-900);
  --text-muted: var(--zinc-700);
  --primary: var(--zinc-900);
  --primary-fg: var(--white);
  --disabled-text: var(--zinc-700);
  --shadow-sm: none;
  --shadow-modal: none;
  --caption-size: var(--text-base);
  --toast-size: var(--text-lg);
  --surface-sunken: var(--surface);
  --divider: var(--border);
  --lead-bg: var(--accent-soft);
  --lead-border: var(--accent);
  --selected-bg: var(--zinc-200);
  --warning: #713f12;
  --action: var(--primary);
  --action-fg: var(--primary-fg);
  --action-soft: var(--surface-sunken);
  --tile-mix: 0%;
  --spark: var(--text);
}

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