/* Fizzy-style CSS: plain files, cascade layers, OKLCH custom properties, no build step. */
@layer reset, base, components, modules, utilities;

:root {
  /* Primitives: OKLCH lightness, chroma, hue. Dark mode overrides these only. */
  --lch-ink: 21% 0.02 265;
  --lch-ink-muted: 50% 0.02 265;
  --lch-canvas: 100% 0 0;
  --lch-subtle: 98.5% 0.003 265;
  --lch-muted: 96% 0.005 265;
  --lch-border: 92% 0.005 265;
  /* Form controls need 3:1 against their surface (WCAG 1.4.11); cards and dividers keep the quiet border. */
  --lch-border-strong: 62% 0.02 265;
  --lch-primary: 50% 0.17 258;
  --lch-primary-hover: 44% 0.17 258;
  --lch-primary-tint: 95% 0.03 258;
  --lch-positive: 46% 0.12 150;
  --lch-positive-tint: 96% 0.04 150;
  --lch-negative: 50% 0.19 27;
  --lch-negative-tint: 96% 0.03 20;
  --lch-warning: 48% 0.12 70;
  --lch-warning-tint: 96% 0.05 85;

  --color-ink: oklch(var(--lch-ink));
  --color-ink-muted: oklch(var(--lch-ink-muted));
  --color-canvas: oklch(var(--lch-canvas));
  --color-subtle: oklch(var(--lch-subtle));
  --color-muted: oklch(var(--lch-muted));
  --color-border: oklch(var(--lch-border));
  --color-border-strong: oklch(var(--lch-border-strong));
  --color-primary: oklch(var(--lch-primary));
  --color-primary-hover: oklch(var(--lch-primary-hover));
  --color-primary-tint: oklch(var(--lch-primary-tint));
  --color-positive: oklch(var(--lch-positive));
  --color-positive-tint: oklch(var(--lch-positive-tint));
  --color-negative: oklch(var(--lch-negative));
  --color-negative-tint: oklch(var(--lch-negative-tint));
  --color-warning: oklch(var(--lch-warning));
  --color-warning-tint: oklch(var(--lch-warning-tint));

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --text-x-small: 0.75rem;
  --text-small: 0.875rem;
  --text-large: 1.25rem;
  --text-x-large: 1.875rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius: 0.375rem;
  --radius-large: 0.75rem;
  --radius-full: 9999px;
  --shadow: 0 1px 2px oklch(0% 0 0 / 6%), 0 2px 8px oklch(0% 0 0 / 6%);
  --focus-ring: 2px solid var(--color-primary);

  --header-height: 3.5rem;
  --sidebar-width: 15rem;
  --main-width: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lch-ink: 96% 0.005 265;
    --lch-ink-muted: 72% 0.02 265;
    --lch-canvas: 20% 0.02 265;
    --lch-subtle: 25% 0.02 265;
    --lch-muted: 32% 0.025 265;
    --lch-border: 32% 0.025 265;
    --lch-border-strong: 58% 0.03 265;
    --lch-primary: 74% 0.12 258;
    --lch-primary-hover: 80% 0.1 258;
    --lch-primary-tint: 30% 0.06 258;
    --lch-positive: 76% 0.12 150;
    --lch-positive-tint: 30% 0.05 150;
    --lch-negative: 74% 0.14 25;
    --lch-negative-tint: 30% 0.06 20;
    --lch-warning: 80% 0.12 80;
    --lch-warning-tint: 32% 0.05 80;
  }
}
