/* Design tokens. Theme: data-t="dark|light" on <html>. Accent: data-acc="blue|violet|lime|orange". */

:root,
[data-t=dark] {
  --bg: #0a0a0a; --sf: #111; --sf2: #1a1a1a; --sf3: #222; --bd: #262626; --bd2: #333; --tx: #ededed; --mu: #8f8f8f; --acf: #fff;
  --ok: oklch(0.74 0.16 152); --warn: oklch(0.8 0.14 78); --err: oklch(0.68 0.19 25);
  --okbg: oklch(0.74 0.16 152 / .12); --warnbg: oklch(0.8 0.14 78 / .12); --errbg: oklch(0.68 0.19 25 / .12);
  --shadow: 0 16px 48px rgba(0,0,0,.6); --qr: #fff;
  --max: oklch(0.7 0.17 295); /* MAX in charts */
  color-scheme: dark;
}
[data-t=light] {
  --bg: #fafafa; --sf: #fff; --sf2: #f3f3f3; --sf3: #ebebeb; --bd: #e6e6e6; --bd2: #d6d6d6; --tx: #171717; --mu: #666; --acf: #fff;
  --ok: oklch(0.55 0.15 152); --warn: oklch(0.6 0.14 70); --err: oklch(0.55 0.2 25);
  --okbg: oklch(0.55 0.15 152 / .1); --warnbg: oklch(0.7 0.14 70 / .14); --errbg: oklch(0.55 0.2 25 / .09);
  --shadow: 0 16px 48px rgba(0,0,0,.12); --qr: #fff;
  color-scheme: light;
  --max: oklch(0.55 0.2 295);
}

:root, [data-t=dark][data-acc=blue] { --ac: oklch(0.64 0.2 262); --act: oklch(0.74 0.15 262); --acbg: oklch(0.64 0.2 262 / .14); }
[data-t=light][data-acc=blue] { --ac: oklch(0.55 0.22 262); --act: oklch(0.5 0.2 262); --acbg: oklch(0.55 0.22 262 / .09); }
[data-t=dark][data-acc=violet] { --ac: oklch(0.64 0.2 295); --act: oklch(0.75 0.15 295); --acbg: oklch(0.64 0.2 295 / .14); }
[data-t=light][data-acc=violet] { --ac: oklch(0.55 0.22 295); --act: oklch(0.5 0.2 295); --acbg: oklch(0.55 0.22 295 / .09); }
[data-t=dark][data-acc=lime] { --ac: oklch(0.86 0.2 128); --act: oklch(0.86 0.2 128); --acf: #0a0a0a; --acbg: oklch(0.86 0.2 128 / .12); }
[data-t=light][data-acc=lime] { --ac: oklch(0.62 0.17 135); --act: oklch(0.48 0.13 135); --acbg: oklch(0.62 0.17 135 / .12); }
[data-t=dark][data-acc=orange] { --ac: oklch(0.7 0.18 48); --act: oklch(0.76 0.15 52); --acbg: oklch(0.7 0.18 48 / .14); }
[data-t=light][data-acc=orange] { --ac: oklch(0.62 0.19 45); --act: oklch(0.54 0.17 45); --acbg: oklch(0.62 0.19 45 / .1); }

:root {
  --font: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --menu-shadow: 0 4px 14px rgba(0,0,0,.12);
  --scrim: rgba(0,0,0,.5);
  --z-sticky: 20; --z-topbar: 30; --z-drawer: 70; --z-sheet: 75; --z-dropdown: 80; --z-modal: 85; --z-confirm: 88; --z-palette: 90;
  --z-session: 92; --z-terms: 93; --z-cookie: 94; --z-toast: 96; --z-impersonation: 99;
}

@keyframes kp-pulse { 0% { box-shadow: 0 0 0 0 currentColor } 70% { box-shadow: 0 0 0 6px transparent } 100% { box-shadow: 0 0 0 0 transparent } }
@keyframes kp-skel { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
@keyframes kp-spin { to { transform: rotate(360deg) } }
@keyframes kp-bar { from { transform: scaleX(1) } to { transform: scaleX(0) } }
@keyframes kp-in { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: none } }
@keyframes kp-flash { from { background: var(--acbg) } to { background: transparent } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
