
:root {
  color-scheme: dark;

  --bg-app: #1f1f1f;
  --bg-surface: #262626;
  --bg-elevated: #2d2d2d;
  --border-subtle: #3a3a3a;
  --border-strong: #7a7976;
  --text-primary: #e8e6e3;
  --text-secondary: #9b9a97;
  --text-muted: #8a8884;
  --accent: #2ecc87;
  --on-accent: #03200f;
  --success: #7cb87c;
  --warning: #d4a054;
  --error: #d47272;
  --info: #7ca7d4;
  --shadow-pop: 0 4px 16px rgb(0 0 0 / 35%);
  --scrim: rgb(0 0 0 / 50%);

  --font-ui: system-ui, "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", monospace;

  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --leading-body: 1.6;
  --leading-title: 1.2;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-card: 12px;
  --radius-control: 8px;
  --ctl-h: 44px;
  --header-h: 56px;

  --content-max: 1120px;
  --prose-max: 68ch;


  --dur: 150ms;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg-app: #f2f1ef;
  --bg-surface: #ffffff;
  --bg-elevated: #e6e4e0;
  --border-subtle: #cfccc6;
  --border-strong: #85827c;
  --text-primary: #22211f;
  --text-secondary: #56534e;
  --text-muted: #6e6b65;
  --accent: #0e7449;
  --on-accent: #ffffff;
  --success: #2c6e2f;
  --warning: #7a5300;
  --error: #b02a2a;
  --info: #1a5c96;
  --shadow-pop: 0 4px 14px rgb(0 0 0 / 14%);
  --scrim: rgb(0 0 0 / 32%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;

    --bg-app: #f2f1ef;
    --bg-surface: #ffffff;
    --bg-elevated: #e6e4e0;
    --border-subtle: #cfccc6;
    --border-strong: #85827c;
    --text-primary: #22211f;
    --text-secondary: #56534e;
    --text-muted: #6e6b65;
    --accent: #0e7449;
    --on-accent: #ffffff;
    --success: #2c6e2f;
    --warning: #7a5300;
    --error: #b02a2a;
    --info: #1a5c96;
    --shadow-pop: 0 4px 14px rgb(0 0 0 / 14%);
    --scrim: rgb(0 0 0 / 32%);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur: 1ms;
  }
}
