/* Designsystem: Farben, Schrift, Abstände, Radien, Schatten, Bewegung (Schritt 2.1).
   Eigenes Design, kein Notion-Design (UEBERGABE 1). Hell und Dunkel über [data-theme] oder Systemeinstellung. */
:root {
  /* Schrift: Systemschriften, keine externen Fonts (CSP 'self', keine Fremdabhängigkeit) */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --text-xs: 0.75rem; --text-sm: 0.8125rem; --text-md: 0.9375rem; --text-lg: 1.125rem; --text-xl: 1.5rem; --text-2xl: 2rem;
  --leading: 1.5;
  --weight-normal: 400; --weight-medium: 500; --weight-bold: 650;

  /* Abstände (4er-Raster) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;
  --sidebar-width: 260px;
  --control-height: 32px;

  /* Bewegung: kurz und weich; bei prefers-reduced-motion aus (base.css) */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 120ms; --dur-med: 200ms; --dur-slow: 320ms;

  /* Hell (Standard) */
  --bg: #ffffff;
  --bg-subtle: #f7f7f5;
  --bg-muted: #efefec;
  --bg-hover: rgba(15, 23, 42, 0.05);
  --bg-active: rgba(15, 23, 42, 0.09);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --border: #e4e4e0;
  --border-strong: #cfcfca;
  --text: #1f2328;
  --text-muted: #5f6368;
  --text-faint: #676c73;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #e8f0fe;
  --accent-text: #ffffff;
  --danger: #d1242f;
  --danger-soft: #fdecec;
  --success: #1a7f37;
  --success-soft: #e7f5ec;
  --warning: #8a5c00;
  --warning-soft: #fff4d6;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.75);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
  --scrim: rgba(15, 23, 42, 0.35);

  /* Optionsfarben (docs/schema.md 5: default, gray, brown, orange, yellow, green, blue, purple, pink, red) */
  --opt-default-bg: #ededeb; --opt-default-fg: #37352f;
  --opt-gray-bg: #e3e2e0;    --opt-gray-fg: #4b4a46;
  --opt-brown-bg: #eee0da;   --opt-brown-fg: #5d3a29;
  --opt-orange-bg: #fadec9;  --opt-orange-fg: #7a3d0a;
  --opt-yellow-bg: #fbf0c4;  --opt-yellow-fg: #6b5000;
  --opt-green-bg: #dbeddb;   --opt-green-fg: #1d5130;
  --opt-blue-bg: #d3e5ef;    --opt-blue-fg: #183e5c;
  --opt-purple-bg: #e8deee;  --opt-purple-fg: #46265c;
  --opt-pink-bg: #f5e0e9;    --opt-pink-fg: #6b1f43;
  --opt-red-bg: #ffe2dd;     --opt-red-fg: #7d1c14;
  /* Diagramme (6.2): kräftige Farben mit genug Kontrast auf hellem Grund */
  --chart-1: #2563eb; --chart-2: #ea580c; --chart-3: #16a34a; --chart-4: #db2777; --chart-5: #7c3aed; --chart-6: #0891b2; --chart-7: #ca8a04; --chart-8: #6b7280; --chart-line: #111827;

  color-scheme: light;
}

/* Dunkel: entweder ausdrücklich gewählt oder vom System, solange nichts gewählt ist */
:root[data-theme="dark"] {
  --bg: #191919;
  --bg-subtle: #202020;
  --bg-muted: #2a2a2a;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.1);
  --surface: #1f1f1f;
  --surface-raised: #262626;
  --border: #333333;
  --border-strong: #454545;
  --text: #e8e8e6;
  --text-muted: #a5a5a2;
  --text-faint: #93938f;
  --accent: #6896f0;
  --accent-hover: #7aa2f3;
  --accent-soft: rgba(91, 141, 239, 0.16);
  --accent-text: #0b1220;
  --danger: #f2706a;
  --danger-soft: rgba(242, 112, 106, 0.14);
  --success: #4fbf72;
  --success-soft: rgba(79, 191, 114, 0.14);
  --warning: #e3b341;
  --warning-soft: rgba(227, 179, 65, 0.14);
  --focus-ring: 0 0 0 3px rgba(104, 150, 240, 0.7);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --scrim: rgba(0, 0, 0, 0.55);
  --opt-default-bg: #373737; --opt-default-fg: #e3e3e1;
  --opt-gray-bg: #474747;    --opt-gray-fg: #e3e3e1;
  --opt-brown-bg: #4a3229;   --opt-brown-fg: #f0d6c8;
  --opt-orange-bg: #5c3b1c;  --opt-orange-fg: #fbd3ad;
  --opt-yellow-bg: #574a1c;  --opt-yellow-fg: #f6e4a6;
  --opt-green-bg: #24432e;   --opt-green-fg: #bfe3c8;
  --opt-blue-bg: #1f3b54;    --opt-blue-fg: #bcd8ef;
  --opt-purple-bg: #3d2a4f;  --opt-purple-fg: #e0cdef;
  --opt-pink-bg: #4e2537;    --opt-pink-fg: #f3c8da;
  --opt-red-bg: #5a2621;     --opt-red-fg: #fbcac2;
  --chart-1: #6ea0ff; --chart-2: #fb923c; --chart-3: #4ade80; --chart-4: #f472b6; --chart-5: #a78bfa; --chart-6: #22d3ee; --chart-7: #facc15; --chart-8: #9ca3af; --chart-line: #f3f4f6;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #191919; --bg-subtle: #202020; --bg-muted: #2a2a2a; --bg-hover: rgba(255, 255, 255, 0.06); --bg-active: rgba(255, 255, 255, 0.1);
    --surface: #1f1f1f; --surface-raised: #262626; --border: #333333; --border-strong: #454545;
    --text: #e8e8e6; --text-muted: #a5a5a2; --text-faint: #93938f;
    --accent: #6896f0; --accent-hover: #7aa2f3; --accent-soft: rgba(91, 141, 239, 0.16); --accent-text: #0b1220;
    --danger: #f2706a; --danger-soft: rgba(242, 112, 106, 0.14); --success: #4fbf72; --success-soft: rgba(79, 191, 114, 0.14);
    --warning: #e3b341; --warning-soft: rgba(227, 179, 65, 0.14); --focus-ring: 0 0 0 3px rgba(104, 150, 240, 0.7);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45); --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6); --scrim: rgba(0, 0, 0, 0.55);
    --opt-default-bg: #373737; --opt-default-fg: #e3e3e1; --opt-gray-bg: #474747; --opt-gray-fg: #e3e3e1; --opt-brown-bg: #4a3229; --opt-brown-fg: #f0d6c8;
    --opt-orange-bg: #5c3b1c; --opt-orange-fg: #fbd3ad; --opt-yellow-bg: #574a1c; --opt-yellow-fg: #f6e4a6; --opt-green-bg: #24432e; --opt-green-fg: #bfe3c8;
    --opt-blue-bg: #1f3b54; --opt-blue-fg: #bcd8ef; --opt-purple-bg: #3d2a4f; --opt-purple-fg: #e0cdef; --opt-pink-bg: #4e2537; --opt-pink-fg: #f3c8da;
    --opt-red-bg: #5a2621; --opt-red-fg: #fbcac2;
    --chart-1: #6ea0ff; --chart-2: #fb923c; --chart-3: #4ade80; --chart-4: #f472b6; --chart-5: #a78bfa; --chart-6: #22d3ee; --chart-7: #facc15; --chart-8: #9ca3af; --chart-line: #f3f4f6;
    color-scheme: dark;
  }
}
