/* Dembrandt design tokens — extracted from https://www.dembrandt.com/
   Dark is the default. Light mode: follows the OS (prefers-color-scheme: light), or force with <html data-theme="light"> / "dark".
   2026-11-29: added missing vars used by components.css (space-16, control sizes, tints, line-height). */
:root {
  color-scheme: dark;
  /* Color */
  --color-background: #06090f;
  --color-surface: #0c1016;
  --color-surface-elevated: #151b24;
  --color-text: #e2ecef;
  --color-text-secondary: #8294a1;
  --color-text-tertiary: #828a97;
  --color-text-neutral: #c0c4cc;
  --color-brand-500: #38bdf8;
  --color-action: #38bdf8; /* buttons and links: text contrast 4.5:1 or more */
  --color-brand-900: #0a1a3d;
  --color-highlight: #ea580c;
  --color-border: #202733;
  --color-border-hover: #2f3846;
  --color-border-brand: var(--color-brand-500);
  --color-border-subtle: rgba(255, 255, 255, 0.09);
  --color-border-faint: rgba(255, 255, 255, 0.08);
  --color-status-neutral-surface: rgba(255, 255, 255, 0.078);
  --color-status-neutral-solid: #4b5563;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-fill-ghost: rgba(255, 255, 255, 0.05);
  --color-fill-ghost-soft: rgba(226, 236, 239, 0.03);
  --color-fill-hover: rgba(255, 255, 255, 0.08);
  --color-brand-tint: rgba(56, 189, 248, 0.06);
  --color-brand-ring: rgba(56, 189, 248, 0.45);
  --color-underline-muted: rgba(255, 255, 255, 0.2);
  --color-selection: rgba(56, 189, 248, 0.3);
  --color-success-surface: rgba(34, 197, 94, 0.12);
  --color-success-text: #86efac;
  --color-warning-surface: rgba(234, 88, 12, 0.12);
  --color-warning-text: #fdba74;

  /* Typography */
  --font-display: "Red Hat Display", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-size-12: 12px;
  --font-size-13: 13px;
  --font-size-14: 14px;
  --font-size-16: 16px;
  --font-size-18: 18px;
  --font-size-24: 24px;
  --font-size-30: 30px;
  --font-size-40: 40px;
  --font-size-43: 43px;
  --font-size-48: 48px;
  --font-size-52: 52px;
  --font-size-96: 96px;
  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-body: 1.6;
  --letter-spacing-display: -0.02em;
  --measure: 72ch;

  /* Spacing (8px system) */
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-3-5: 14px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Control sizes */
  --size-control: 34px;
  --size-control-sm: 32px;

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 5.44px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Border / Shadow */
  --border-width: 1px;
  --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* Motion */
  --duration-fast: 75ms;
  --duration-base: 150ms;
  --duration-slow: 200ms;
  --duration-enter: 300ms;
  --easing-default: cubic-bezier(0.4, 0, 0.2, 1);

  /* Breakpoint (for reference; CSS vars can't be used in media queries) */
  --breakpoint-sm: 640px;
}

/* Light theme — same token names, so components need no changes */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --color-background: #f6f8fa;
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;
    --color-text: #0e1822;
    --color-text-secondary: #4a5a68;
    --color-text-tertiary: #66707c;
    --color-text-neutral: #2c3540;
    --color-brand-500: #0284c7;
    --color-action: #0369a1;
    --color-brand-900: #e0f2fe;
    --color-highlight: #c2410c;
    --color-border: #dde3ea;
    --color-border-hover: #c2cbd5;
    --color-border-subtle: rgba(14, 24, 34, 0.1);
    --color-border-faint: rgba(14, 24, 34, 0.07);
    --color-status-neutral-surface: rgba(14, 24, 34, 0.05);
    --color-status-neutral-solid: #4b5563;
    --color-fill-ghost: rgba(14, 24, 34, 0.04);
    --color-fill-ghost-soft: rgba(14, 24, 34, 0.02);
    --color-fill-hover: rgba(14, 24, 34, 0.07);
    --color-brand-tint: rgba(2, 132, 199, 0.07);
    --color-brand-ring: rgba(2, 132, 199, 0.35);
    --color-underline-muted: rgba(14, 24, 34, 0.25);
    --color-selection: rgba(2, 132, 199, 0.2);
    --color-success-surface: #e3f2e8;
    --color-success-text: #1a6b3c;
    --color-warning-surface: #fff4e5;
    --color-warning-text: #8a4b00;
    --shadow-elevated: 0 20px 40px -16px rgba(14, 24, 34, 0.18);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --color-background: #f6f8fa;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-text: #0e1822;
  --color-text-secondary: #4a5a68;
  --color-text-tertiary: #66707c;
  --color-text-neutral: #2c3540;
  --color-brand-500: #0284c7;
  --color-action: #0369a1;
  --color-brand-900: #e0f2fe;
  --color-highlight: #c2410c;
  --color-border: #dde3ea;
  --color-border-hover: #c2cbd5;
  --color-border-subtle: rgba(14, 24, 34, 0.1);
  --color-border-faint: rgba(14, 24, 34, 0.07);
  --color-status-neutral-surface: rgba(14, 24, 34, 0.05);
  --color-status-neutral-solid: #4b5563;
  --color-fill-ghost: rgba(14, 24, 34, 0.04);
  --color-fill-ghost-soft: rgba(14, 24, 34, 0.02);
  --color-fill-hover: rgba(14, 24, 34, 0.07);
  --color-brand-tint: rgba(2, 132, 199, 0.07);
  --color-brand-ring: rgba(2, 132, 199, 0.35);
  --color-underline-muted: rgba(14, 24, 34, 0.25);
  --color-selection: rgba(2, 132, 199, 0.2);
  --color-success-surface: #e3f2e8;
  --color-success-text: #1a6b3c;
  --color-warning-surface: #fff4e5;
  --color-warning-text: #8a4b00;
  --shadow-elevated: 0 20px 40px -16px rgba(14, 24, 34, 0.18);
  color-scheme: light;
}
