:root {
  --color-paper: oklch(97.6% 0.008 245);
  --color-paper-2: oklch(94.8% 0.012 245);
  --color-paper-3: oklch(91.8% 0.018 245);
  --color-ink: oklch(19% 0.018 245);
  --color-ink-2: oklch(32% 0.018 245);
  --color-neutral: oklch(52% 0.014 245);
  --color-muted: oklch(42% 0.014 245);
  --color-rule: oklch(84% 0.018 245);
  --color-rule-2: oklch(76% 0.02 245);
  /* TASK-176: form-field and toggle borders; 3.39:1 on paper, 3.12:1 on paper-2 (WCAG 1.4.11). */
  --color-rule-strong: oklch(62% 0.02 245);
  --color-accent: oklch(54% 0.19 255);
  --color-accent-ink: oklch(98% 0.008 245);
  --color-accent-soft: oklch(91% 0.045 255);
  /* TASK-176: accent text on tinted surfaces; 5.04:1 on accent-soft, 5.65:1 on paper-2, 5.18:1 on warning-soft. */
  --color-accent-strong: oklch(48% 0.19 255);
  --color-focus: oklch(47% 0.2 255);
  --color-success: oklch(48% 0.13 155);
  --color-success-soft: oklch(91% 0.04 155);
  --color-warning: oklch(55% 0.14 75);
  --color-warning-soft: oklch(92% 0.045 85);
  /* TASK-176: warning text; 5.25:1 on warning-soft, 5.72:1 on paper-2. */
  --color-warning-strong: oklch(48% 0.12 75);
  --color-error: oklch(52% 0.16 25);
  --color-error-soft: oklch(92% 0.04 25);
  /* TASK-176: solid destructive buttons (was #991b1b); paper text 7.84:1. */
  --color-error-strong: oklch(44% 0.16 27);
  /* TASK-176: one backdrop for every overlay (dialogs, drawers, sheets). */
  --scrim: oklch(18% 0.018 245 / 0.38);
  --color-scrim: var(--scrim);

  --font-display: "Space Grotesk", ui-sans-serif, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-editor-serif: "Source Serif 4", ui-serif, Georgia, serif;

  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Control heights (TASK-180): .button--sm / --md / --lg and the touch minimum.
     Module rules reuse these instead of their own 30/32/38/50px values. */
  --control-sm: 2.25rem;
  --control-md: 2.75rem;
  --control-lg: 3.25rem;
  --touch-min: 2.75rem;

  /* Minimum text size is 12px; --text-2xs is kept as a deprecated alias of --text-xs. */
  --text-xs: 0.75rem;
  --text-2xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.5625rem;
  --text-xl: 1.9531rem;
  --text-2xl: 2.4414rem;
  --text-display: clamp(2.25rem, 2vw + 1.25rem, 3.25rem);
  --text-label: 0.875rem;
  --tracking-kicker: 0.08em;

  --radius-sm: 0;
  --radius-md: 0;
  --radius-round: 999px;
  /* TASK-186: intentional rounded exceptions to the 0-radius policy. */
  --radius-photo: 1.15rem;
  --radius-card: 3.7% / 5.9%;
  --rule-thin: 1px;
  --shadow-whisper: 0 1px 2px oklch(20% 0.012 245 / 0.06);
  /* TASK-176: the only shadow for raised overlays (drawers, popovers); buttons have none. */
  --shadow-overlay: 0 12px 32px oklch(18% 0.02 245 / 0.14);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-micro: 180ms;
  --dur-short: 320ms;
  --dur-long: 560ms;
  /* Overlays enter with --ease-out and leave with --ease-in. */
  --dur-overlay-in: var(--dur-short);
  --dur-overlay-out: var(--dur-micro);
  --z-sticky: 200;
  --z-modal: 400;
  --z-toast: 500;

  /* TASK-183: named breakpoints. Custom properties cannot be read inside
     @media / @container, so the rem values are written out; use only these:
     sm 40rem (phone) · md 48rem (large phone / small tablet) · lg 60rem
     (sidebar becomes a drawer) · xl 68rem (portrait tablet layout).
     Card grids in the page use `@container content (width < …)`, where
     `content` is #app-main; the shell and overlays use `@media`. */
  --bp-sm: 40rem;
  --bp-md: 48rem;
  --bp-lg: 60rem;
  --bp-xl: 68rem;
}
