/* ==========================================================================
   caruit Design-Tokens (v2) — DIE EINE STELLE für alle Werte.
   Zwei Ebenen: (1) Primitive = rohe Palette, (2) Semantik = Rollen.
   Komponenten nutzen ausschließlich semantische Tokens, nie rohe Hex-Werte.
   Hinweis: Hex-Werte sind Startwerte und werden hier zentral justiert.
   ========================================================================== */

:root {
  /* ---- (1) PRIMITIVE — rohe Palette ------------------------------------ */

  /* Navy (Sidebar) */
  --c-navy-900: #172033;
  --c-navy-800: #1f2f4d;
  --c-navy-700: #2a3c5e;

  /* Marken-Orange (Zierleiste/Akzent) */
  --c-orange-500: #ef7d22;

  /* Gelb (Tabs/Notizen) und Notiz-Körper — gegebene Werte */
  --c-yellow-400: #f4d03f;
  --c-yellow-100: #fcf3cf;

  /* Tab-Optik: cremegelber Grund (m24_4), Akzent im Markenorange #ef7d22 (Brand-Kit) */
  --c-yellow-200: #fef3c7;
  --c-orange-400: #ef7d22;

  /* Indigo (aktives Nav-Item, Notiz-Text) — gegebener Wert */
  --c-indigo-800: #351c75;

  /* Blau (primäre Interaktion) */
  --c-blue-600: #2563eb;
  --c-blue-700: #1d4ed8;

  /* Grau-Rampe */
  --c-grey-50:  #f8fafc;
  --c-grey-100: #f1f5f9;
  --c-grey-200: #e2e8f0;
  --c-grey-300: #cbd5e1;
  --c-grey-400: #94a3b8;
  --c-grey-500: #64748b;
  --c-grey-600: #475569;
  --c-grey-700: #334155;
  --c-grey-800: #1e293b;
  --c-grey-900: #0f172a;

  --c-white: #ffffff;

  /* Status-Semantik (Fortschritt) */
  --c-green-500: #16a34a;
  --c-amber-500: #d97706;
  --c-red-500:   #dc2626;

  /* Dummy-Fachfarbe (produktiv aus der DB, hier Platzhalter) */
  --c-subject-math: #2f7d9a;

  /* ---- (2) SEMANTIK — Rollen, zeigen auf Primitive --------------------- */

  /* Flächen / Text / Linien */
  --page-bg:       var(--c-grey-50);
  --surface:       var(--c-white);
  --surface-muted: var(--c-grey-100);
  --text:          var(--c-grey-800);
  --text-muted:    var(--c-grey-500);
  --border:        var(--c-grey-200);
  --border-strong: var(--c-grey-300);

  /* Navigation (Sidebar) */
  --nav-bg:           var(--c-navy-900);
  --nav-text:         #c7d2e0;
  --nav-text-strong:  var(--c-white);
  --nav-hover-bg:     var(--c-navy-800);
  --nav-active-bg:    var(--c-indigo-800);
  --nav-active-text:  var(--c-white);
  --nav-group-label:  #7e8aa3;

  /* Marken-Akzent / Zierleiste */
  --topline: var(--c-orange-500);

  /* Primäre Interaktion */
  --action-bg:        var(--c-blue-600);
  --action-bg-hover:  var(--c-blue-700);
  --action-text:      var(--c-white);
  --link:             var(--c-blue-600);
  --focus-ring:       var(--c-blue-600);

  /* Tabs — cremegelber Grund (m24_4), Akzent im Markenorange #ef7d22 (Brand-Kit). Hier zentral justierbar. */
  --tab-selected-bg:  var(--c-yellow-200);
  --tab-accent-line:  var(--c-orange-400);
  --tab-top-line:     var(--c-orange-400);

  --search-mark-bg:   var(--c-yellow-200);

  /* Notizen (für späteres Post-it vorbereitet) */
  --note-header-bg:   var(--c-yellow-400);
  --note-body-bg:     var(--c-yellow-100);
  --note-text:        var(--c-indigo-800);

  /* Bewertung der Erklaerung (m75_1): Blaugruen gegen Rot, auch bei Rot-Gruen-Schwaeche unterscheidbar */
  --feedback-useful:     #00695c;
  --feedback-not-useful: #c62828;

  /* ---- Skalen ---------------------------------------------------------- */

  /* Abstände (4-px-Basis) */
  --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;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Schrift */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-note: "Patrick Hand", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --lh-tight: 1.25;
  --lh-normal: 1.5;

  /* Elevation — flach mit Borders; eine dezente Stufe für erhabene Karten */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);

  /* ---- Layout-Maße ----------------------------------------------------- */
  --w-sidebar: 248px;
  --w-side-right: 320px;
  --h-topbar: 64px;
  --reading-max: 72ch;   /* max. Lesebreite für Fließtext-Inhalte */

  /* Detailseite: max. Breite des Mittelteils (Lesbarkeit ~85 Zeichen) */
  --detail-max-width: 980px;
}
