/*
 * fit Design-Tokens (Issue #7)
 *
 * Vertrag zwischen ux und frontend. Namen umbenennen oder Werte entfernen = Breaking Change (ADR).
 * Synchron mit tokens.json; Prüfung + Kontrast-Tabelle: bun design-system/scripts/tokens.ts
 *
 * Regeln in Kurzform (Details: design-system/components/*.md, design-system/contrast.md):
 *  - Lime (--accent) NUR für Aktionen und "heute". Nie für Status.
 *  - Status (good/ok/warn/bad/future/unplanned) ist eine eigene Skala. Status nie nur über Farbe
 *    vermitteln: immer zusätzlich Text, Zahl oder Symbol.
 *  - --muted nur auf --bg und --card. Auf --line und --status-*-bg ist es < 4.5:1.
 *  - Auf --status-*-bg steht Text in --text oder in der passenden --status-*-Farbe.
 *  - Mobile-first: Basiswerte gelten ab 375 px; größere Viewports per min-width-Query.
 */

:root {
  /* Farbe: Flächen und Text (Werte fix aus CLAUDE.md #10) */
  --bg: #0e0f12;
  --card: #17191e;
  --line: #2a2e37;
  --line-strong: #636a78;
  --text: #eef0f4;
  --muted: #8b92a1;
  --accent: #c8f25c;
  --on-accent: #0e0f12;
  --focus: var(--text);

  /* Quellen-Kennzeichnung ("Garmin" / "Oura"): Text-Chip ohne eigenen Farbton */
  --source-fg: var(--muted);
  --source-border: var(--line);

  /* Status-Skala. Solid = Text/Icon/Balken auf --card oder --bg; -bg = deckende 18-%-Tönung über --card */
  --status-good: #34d399;
  --status-good-bg: #1c3a34;
  --status-ok: #facc15;
  --status-ok-bg: #40391c;
  --status-warn: #fb923c;
  --status-warn-bg: #402f23;
  --status-bad: #f87171;
  --status-bad-bg: #40292d;
  --status-future: #9ca3af;
  --status-future-bg: #2f3238;
  --status-unplanned: #60a5fa;
  --status-unplanned-bg: #243246;
  --on-status: #0e0f12;

  /* Typografie. Inter wird von frontend selbst gehostet (kein Google-Fonts-Request). */
  --font-sans:
    Inter, InterVariable, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-numeric: tabular-nums;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;

  /* Abstände: 4-pt-Raster */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radien */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Schatten: nur für schwebende Elemente */
  --shadow-overlay: 0 8px 24px rgb(0 0 0 / 0.45);

  /* Bewegung: kurz; bei prefers-reduced-motion auf 0 (siehe unten) */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Größen */
  --touch-min: 44px;
  --touch-lg: 48px;
  --tabbar-height: 64px;
  --content-max: 720px;
  --content-narrow: 480px;
  --focus-width: 2px;
  --focus-offset: 2px;

  /* Breakpoints: nur Doku, in @media als Literal (min-width: 768px / 1280px) verwenden */
  --bp-md: 768px;
  --bp-lg: 1280px;

  /* Ebenen */
  --z-tabbar: 10;
  --z-toast: 20;

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
  }
}
