/* Design tokens – see DESIGN.md. Light is the default; dark via prefers-color-scheme or data-theme="dark".
   Fonts: css/fonts.css (loaded by js/theme.js). */
:root {
  color-scheme: light;
  /* neutrals (Zinc) */
  --canvas: #f5f5f6;
  --surface: #ffffff;
  --surface-sunken: #f0f0f2;
  --surface-hover: #e9e9ec;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #6a6a73;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --scrim: rgb(24 24 27 / 0.42);
  /* accent */
  --accent: #e6be4c;
  --accent-ink: #18181b;
  --accent-hover: #ecc95f;
  --accent-soft: #fbf3d9;
  --accent-strong: #9c7a0f;
  --mark: #f6e3a3;
  /* buttons */
  --btn-primary: #18181b;
  --btn-primary-hover: #2e2e33;
  --btn-primary-ink: #ffffff;
  /* functional */
  --good: #1e7a4c;
  --good-soft: #e7f3ec;
  --bad: #b3261e;
  --bad-soft: #fcebe9;
  --warn: #95600a;
  --warn-soft: #fdf3dc;
  --der: #2f63d4;
  --die: #c23b32;
  --das: #257a49;
  /* skill lines */
  --l-karten: #4f7d2c;
  --l-grammatik: #7a5c9e;
  --l-lesen: #3d79ad;
  --l-schreiben: #b3561a;
  --l-sprechen: #2c568e;
  --l-hoeren: #1c705b;
  --l-pruefung: #7e5330;
  --l-fehler: #b8473c;
  --l-extra: #6a6a73;
  /* type */
  --font: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(2rem, 1.5rem + 1.8vw, 2.75rem);
  --fs-h1: clamp(1.6rem, 1.35rem + 0.9vw, 2rem);
  --fs-h2: 1.2rem;
  --fs-h3: 1.02rem;
  --fs-small: 0.875rem;
  --fs-caption: 0.8rem;
  --fs-eyebrow: 0.75rem;
  /* shape */
  --r-xs: 5px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 1px 2px rgb(24 24 27 / 0.05), 0 1px 1px rgb(24 24 27 / 0.03);
  --shadow-2: 0 12px 32px -16px rgb(24 24 27 / 0.22), 0 2px 6px rgb(24 24 27 / 0.05);
  --shadow-3: 0 24px 64px -24px rgb(24 24 27 / 0.35), 0 4px 12px rgb(24 24 27 / 0.08);
  --focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-strong);
  /* spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 160ms;
  --t-mid: 240ms;
  --t-slow: 420ms;
  /* layout */
  --sidebar-w: 264px;
  --content-max: 1120px;
  --exercise-max: 820px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
}

/* Dark palette: applied by the system setting unless the learner forces light, or forced via data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --canvas: #0e0e10;
    --surface: #18181b;
    --surface-sunken: #1f1f23;
    --surface-hover: #27272a;
    --ink: #f4f4f5;
    --ink-2: #b4b4bb;
    --ink-3: #8e8e96;
    --line: #2a2a2f;
    --line-strong: #3a3a40;
    --scrim: rgb(0 0 0 / 0.6);
    --accent-soft: #3a3220;
    --accent-strong: #e6be4c;
    --mark: #5a4a1c;
    --btn-primary: #f4f4f5;
    --btn-primary-hover: #ffffff;
    --btn-primary-ink: #18181b;
    --good: #5cc98c;
    --good-soft: #12301f;
    --bad: #f2867b;
    --bad-soft: #3a1714;
    --warn: #e8b54a;
    --warn-soft: #33270b;
    --der: #7ea2f2;
    --die: #f0827a;
    --das: #6cc795;
    --l-karten: #8cc260;
    --l-grammatik: #b39ad6;
    --l-lesen: #79aedd;
    --l-schreiben: #f09a5c;
    --l-sprechen: #7fa6da;
    --l-hoeren: #5fbfa4;
    --l-pruefung: #c59a73;
    --l-fehler: #ee8a7f;
    --l-extra: #8e8e96;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 12px 32px -16px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.3);
    --shadow-3: 0 24px 64px -24px rgb(0 0 0 / 0.8), 0 4px 12px rgb(0 0 0 / 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0e0e10;
  --surface: #18181b;
  --surface-sunken: #1f1f23;
  --surface-hover: #27272a;
  --ink: #f4f4f5;
  --ink-2: #b4b4bb;
  --ink-3: #8e8e96;
  --line: #2a2a2f;
  --line-strong: #3a3a40;
  --scrim: rgb(0 0 0 / 0.6);
  --accent-soft: #3a3220;
  --accent-strong: #e6be4c;
  --mark: #5a4a1c;
  --btn-primary: #f4f4f5;
  --btn-primary-hover: #ffffff;
  --btn-primary-ink: #18181b;
  --good: #5cc98c;
  --good-soft: #12301f;
  --bad: #f2867b;
  --bad-soft: #3a1714;
  --warn: #e8b54a;
  --warn-soft: #33270b;
  --der: #7ea2f2;
  --die: #f0827a;
  --das: #6cc795;
  --l-karten: #8cc260;
  --l-grammatik: #b39ad6;
  --l-lesen: #79aedd;
  --l-schreiben: #f09a5c;
  --l-sprechen: #7fa6da;
  --l-hoeren: #5fbfa4;
  --l-pruefung: #c59a73;
  --l-fehler: #ee8a7f;
  --l-extra: #8e8e96;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-2: 0 12px 32px -16px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.3);
  --shadow-3: 0 24px 64px -24px rgb(0 0 0 / 0.8), 0 4px 12px rgb(0 0 0 / 0.4);
}
