:root {
  color-scheme: light;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Inter, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --color-page: #f3f5f5;
  --color-surface: #ffffff;
  --color-surface-subtle: #f8f9f9;
  --color-surface-raised: #ffffff;
  --color-border: #d9dfdd;
  --color-border-strong: #bcc7c3;
  --color-text: #182320;
  --color-text-muted: #63716c;
  --color-text-subtle: #82908b;
  --color-accent: #147d6f;
  --color-accent-hover: #0f685d;
  --color-accent-soft: #e7f4f0;
  --color-success: #1c765f;
  --color-success-soft: #e8f5f1;
  --color-warning: #8a5a00;
  --color-warning-soft: #fff5d9;
  --color-error: #b23838;
  --color-error-soft: #fff0f0;
  --color-info: #35699a;
  --color-info-soft: #eaf2f9;
  --color-sidebar: #202927;
  --color-sidebar-hover: #2a3532;
  --color-sidebar-muted: #afbbb7;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --line-tight: 1.25;
  --line-base: 1.5;
  --line-relaxed: 1.62;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius-xs: 0.375rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;

  --control-sm: 2.5rem;
  --control-md: 2.75rem;
  --control-lg: 3rem;
  --touch-target: 2.75rem;

  --shadow-xs: 0 1px 2px rgba(24, 35, 32, 0.05);
  --shadow-sm: 0 5px 18px rgba(24, 35, 32, 0.07);
  --shadow-md: 0 16px 44px rgba(24, 35, 32, 0.14);
  --focus-ring: 0 0 0 3px rgba(20, 125, 111, 0.18);

  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 260ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  --sidebar-width: 15.5rem;
  --sidebar-collapsed-width: 4.5rem;
  --topbar-height: 4.25rem;
  --container-max: 105rem;
  --container-gutter: clamp(1rem, 2vw, 2rem);

  /* Backwards-compatible aliases used by existing page styles. */
  --bg: var(--color-page);
  --surface: var(--color-surface);
  --surface-muted: var(--color-surface-subtle);
  --border: var(--color-border);
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --primary: var(--color-accent);
  --primary-dark: var(--color-accent-hover);
  --green-soft: var(--color-success-soft);
  --amber: var(--color-warning);
  --amber-soft: var(--color-warning-soft);
  --red: var(--color-error);
  --red-soft: var(--color-error-soft);
  --blue: var(--color-info);
  --sidebar: var(--color-sidebar);
  --sidebar-muted: var(--color-sidebar-muted);
  --shadow: var(--shadow-xs);
}
