:root {
  --bg: #121219;
  --bg-low: #1a1a1f;
  --surface: #1b1b22;
  --surface-hi: #26262e;
  --surface-focus: #2c2c34;
  --line: #2c2c34;
  --line-hi: #454550;

  --ink: #ffffff;
  --ink-muted: #d1d1d1;
  --ink-subtle: #888888;

  --accent: oklch(0.72 0.145 258);
  --accent-hi: oklch(0.79 0.130 258);
  --accent-dim: oklch(0.72 0.145 258 / 0.16);
  --on-accent: oklch(0.16 0.03 258);

  --play: oklch(0.55 0.18 262);
  --play-hi: oklch(0.62 0.18 262);

  --online: oklch(0.72 0.17 145);

  --ok: #4cc38a;
  --warn: #e2b143;
  --danger: #e5484d;
  --sev: oklch(0.44 0.11 25);
  --sev-hi: oklch(0.52 0.13 25);
  --sev-ink: oklch(0.76 0.075 30);

  --warn-bg: oklch(0.95 0.06 95);
  --warn-ink: oklch(0.38 0.07 78);
  --warn-line: oklch(0.82 0.10 90);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-pill: 62.5rem;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --z-base: 0;
  --z-sticky: 100;
  --z-scrim: 200;
  --z-drawer: 300;
  --z-alert: 400;

  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 260ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --topbar-h: 3.1rem;
  --drawer-w: 15.5rem;
  --blur: 8px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(to top, var(--bg-low), var(--bg)) fixed;
  -webkit-font-smoothing: antialiased;
}

html {
  color-scheme: dark;
  scrollbar-color: var(--line-hi) transparent;
  scrollbar-width: thin;
}

::selection {
  background: color-mix(in oklch, var(--accent) 35%, transparent);
  color: var(--ink);
}

::-webkit-scrollbar {
  inline-size: 10px;
  block-size: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--line-hi);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-subtle);
  background-clip: content-box;
}

a {
  text-underline-offset: 0.15em;
}

input,
textarea,
select {
  caret-color: var(--accent);
  accent-color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
