:root {
  color-scheme: light;

  /* Primitive palette */
  --color-ink-950: #0b1d33;
  --color-ink-800: #183451;
  --color-ink-700: #294966;
  --color-teal-800: #00584f;
  --color-teal-700: #006b63;
  --color-teal-100: #dff3ef;
  --color-blue-700: #1d4ed8;
  --color-blue-600: #2563eb;
  --color-blue-100: #dbeafe;
  --color-stone-900: #182435;
  --color-stone-700: #46576a;
  --color-stone-600: #5d6b7a;
  --color-stone-400: #94a3b8;
  --color-stone-300: #cbd5e1;
  --color-stone-200: #e2e8f0;
  --color-stone-100: #f1f5f9;
  --color-paper: #faf8f5;
  --color-white: #ffffff;
  --color-success-800: #14532d;
  --color-success-700: #1b6e45;
  --color-success-100: #e7f6ed;
  --color-warning-800: #78350f;
  --color-warning-700: #8a4b08;
  --color-warning-100: #fff4d6;
  --color-error-800: #8f1d16;
  --color-error-700: #b42318;
  --color-error-100: #fde8e7;

  /* Semantic color */
  --color-canvas: var(--color-paper);
  --color-surface: var(--color-white);
  --color-surface-muted: var(--color-stone-100);
  --color-text: var(--color-stone-900);
  --color-text-muted: var(--color-stone-700);
  --color-heading: var(--color-ink-950);
  --color-border: var(--color-stone-300);
  --color-border-strong: var(--color-stone-400);
  --color-action: var(--color-teal-700);
  --color-action-hover: var(--color-teal-800);
  --color-link: var(--color-blue-700);
  --color-focus: var(--color-blue-600);
  --color-focus-offset: var(--color-white);
  --color-error: var(--color-error-700);
  --color-warning: var(--color-warning-700);
  --color-success: var(--color-success-700);

  /* Typography */
  --font-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-size-xs: 0.8125rem;
  --font-size-sm: 0.9375rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --font-size-2xl: clamp(1.75rem, 1.45rem + 1vw, 2.25rem);
  --line-height-tight: 1.2;
  --line-height-heading: 1.3;
  --line-height-body: 1.6;
  --font-weight-regular: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 700;

  /* Spacing: four-pixel base */
  --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;
  --space-16: 4rem;

  /* Shape and depth */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px rgb(11 29 51 / 0.08);
  --shadow-md: 0 8px 24px rgb(11 29 51 / 0.1);

  /* Layout */
  --content-max: 92rem;
  --reading-max: 44rem;
  --field-max: 40rem;
  --sidebar-width: 15rem;
  --help-width: 19rem;
  --control-height: 2.875rem;
  --target-min: 2.75rem;
  --border-width: 1px;
  --focus-width: 3px;

  /* Motion */
  --duration-fast: 120ms;
  --duration-normal: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-normal: 0ms;
  }
}

@media (forced-colors: active) {
  :root {
    --color-focus: Highlight;
    --color-focus-offset: Canvas;
  }
}

