/* Design tokens — change a value here and it propagates everywhere. */
:root {
  --accent: oklch(0.62 0.19 255);
  --accent-fg: oklch(0.99 0 0);
  --accent-soft: oklch(0.62 0.19 255 / 0.10);

  --bg: oklch(0.985 0 0);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.965 0 0);
  --fg: oklch(0.20 0 0);
  --fg-strong: oklch(0.10 0 0);
  --muted: oklch(0.50 0 0);
  --border: oklch(0.90 0 0);
  --border-strong: oklch(0.78 0 0);

  --code-bg: oklch(0.96 0 0);
  --code-fg: oklch(0.25 0 0);
  --code-border: oklch(0.90 0 0);

  --kbd-bg: oklch(0.95 0 0);

  --link: var(--accent);
  --link-hover: oklch(0.50 0.20 255);

  --selection-bg: oklch(0.62 0.19 255 / 0.25);

  /* Admonition (callout) palette - one accent per type, theme-aware. */
  --admon-example-fg:   oklch(0.50 0.22 305);
  --admon-example-bg:   oklch(0.55 0.22 305 / 0.07);

  --admon-note-fg:      oklch(0.50 0.20 255);
  --admon-note-bg:      oklch(0.62 0.19 255 / 0.07);

  --admon-tip-fg:       oklch(0.45 0.16 165);
  --admon-tip-bg:       oklch(0.55 0.16 165 / 0.07);

  --admon-warning-fg:   oklch(0.55 0.16 75);
  --admon-warning-bg:   oklch(0.70 0.16 75 / 0.10);

  --admon-danger-fg:    oklch(0.50 0.22 25);
  --admon-danger-bg:    oklch(0.60 0.22 25 / 0.08);

  --admon-definition-fg: oklch(0.40 0.06 235);
  --admon-definition-bg: oklch(0.55 0.06 235 / 0.07);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-display: var(--font-serif);
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs--1: clamp(0.82rem, 0.78rem + 0.18vw, 0.92rem);
  --fs-0:  clamp(0.97rem, 0.93rem + 0.22vw, 1.06rem);
  --fs-1:  clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);
  --fs-2:  clamp(1.45rem, 1.25rem + 0.95vw, 1.95rem);
  --fs-3:  clamp(1.85rem, 1.45rem + 1.80vw, 2.85rem);
  --fs-4:  clamp(2.30rem, 1.70rem + 2.80vw, 3.80rem);

  --lh-tight: 1.2;
  --lh-snug: 1.4;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6rem;

  --measure: 72ch;
  --content-max: 80rem;

  --docs-sidebar-width: 16rem;
  --docs-toc-width: 16rem;

  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px oklch(0 0 0 / 0.05);
  --shadow-sm: 0 2px 4px oklch(0 0 0 / 0.06), 0 1px 2px oklch(0 0 0 / 0.04);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.08);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.10), 0 4px 12px oklch(0 0 0 / 0.05);

  --transition: 150ms ease;
  --transition-slow: 250ms ease;

  --header-height: 3.5rem;
}

[data-theme="dark"] {
  --accent: oklch(0.74 0.15 255);
  --accent-fg: oklch(0.14 0.005 255);
  --accent-soft: oklch(0.74 0.15 255 / 0.16);

  --bg: oklch(0.215 0.002 245);
  --surface: oklch(0.255 0.002 245);
  --surface-2: oklch(0.295 0.002 245);
  --fg: oklch(0.90 0.002 245);
  --fg-strong: oklch(0.95 0.002 245);
  --muted: oklch(0.66 0.003 245);
  --border: oklch(0.34 0.002 245);
  --border-strong: oklch(0.46 0.002 245);

  --code-bg: oklch(0.265 0.002 245);
  --code-fg: oklch(0.90 0.002 245);
  --code-border: oklch(0.36 0.002 245);

  --kbd-bg: oklch(0.31 0.002 245);

  --link: var(--accent);
  --link-hover: oklch(0.84 0.12 255);

  --selection-bg: oklch(0.74 0.15 255 / 0.32);

  --admon-example-fg:    oklch(0.82 0.18 305);
  --admon-example-bg:    oklch(0.55 0.22 305 / 0.14);

  --admon-note-fg:       oklch(0.78 0.16 255);
  --admon-note-bg:       oklch(0.62 0.19 255 / 0.13);

  --admon-tip-fg:        oklch(0.80 0.14 165);
  --admon-tip-bg:        oklch(0.55 0.16 165 / 0.13);

  --admon-warning-fg:    oklch(0.85 0.14 75);
  --admon-warning-bg:    oklch(0.70 0.16 75 / 0.13);

  --admon-danger-fg:     oklch(0.80 0.18 25);
  --admon-danger-bg:     oklch(0.60 0.22 25 / 0.13);

  --admon-definition-fg: oklch(0.85 0.04 235);
  --admon-definition-bg: oklch(0.55 0.06 235 / 0.13);

  --shadow-xs: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-sm: 0 2px 4px oklch(0 0 0 / 0.5), 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.55);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.55), 0 4px 12px oklch(0 0 0 / 0.30);
}
