*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* ── Typografie: Familien ─────────────────────────────────── */
  --font-family-base: 'Geist', system-ui, -apple-system, sans-serif;
  --font-family-brand: var(--font-family-base);
  --font-family-icons: 'Material Icons';
  --font-family-mono: 'Geist Mono', 'Courier New', monospace;

  /* ── Typografie: Gewicht & Laufweite ──────────────────────── */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  /* bewusst auf 700 gemappt, damit Headlines weniger gedrängt wirken */
  --font-weight-heavy: 700;

  --letter-spacing-default: 0;
  --letter-spacing-tight-xxs: -0.005em;
  --letter-spacing-tight-xs: -0.01em;
  --letter-spacing-tight-sm: -0.015em;
  --letter-spacing-tight-md: -0.02em;

  /* ── Typografie: 1.25-Skala (Basis: 14px) ─────────────────── */
  --type-scale-ratio: 1.25;

  --font-size-0: 10px;
  --font-size-1: 12px;
  --font-size-2: 14px;
  --font-size-3: 18px;
  --font-size-4: 22px;
  --font-size-5: 28px;
  --font-size-6: 35px;
  --font-size-7: 44px;
  --font-size-8: 56px;

  --line-height-body: 1.6;
  --line-height-heading: 1.2;

  /* ── Spacing-Skala ─────────────────────────────────────────── */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-3: 3px;
  --space-4: 4px;
  --space-5: 5px;
  --space-6: 6px;
  --space-7: 7px;
  --space-8: 8px;
  --space-9: 9px;
  --space-10: 10px;
  --space-11: 11px;
  --space-12: 12px;
  --space-13: 13px;
  --space-14: 14px;
  --space-15: 15px;
  --space-16: 16px;
  --space-17: 17px;
  --space-18: 18px;
  --space-19: 19px;
  --space-20: 20px;
  --space-21: 21px;
  --space-22: 22px;
  --space-23: 23px;
  --space-24: 24px;
  --space-25: 25px;
  --space-26: 26px;
  --space-27: 27px;
  --space-28: 28px;
  --space-29: 29px;
  --space-30: 30px;
  --space-31: 31px;
  --space-32: 32px;
  --space-33: 33px;
  --space-34: 34px;
  --space-35: 35px;
  --space-36: 36px;
  --space-37: 37px;
  --space-38: 38px;
  --space-39: 39px;
  --space-40: 40px;
  --space-41: 41px;
  --space-42: 42px;
  --space-43: 43px;
  --space-44: 44px;
  --space-45: 45px;
  --space-46: 46px;
  --space-47: 47px;
  --space-48: 48px;
  --space-49: 49px;
  --space-50: 50px;
  --space-51: 51px;
  --space-52: 52px;
  --space-53: 53px;
  --space-54: 54px;
  --space-55: 55px;
  --space-56: 56px;
  --space-57: 57px;
  --space-58: 58px;
  --space-59: 59px;
  --space-60: 60px;
  --space-61: 61px;
  --space-62: 62px;
  --space-63: 63px;
  --space-64: 64px;

  /* Speziell für Eingabefelder mit linkem Such-Icon */
  --space-input-icon-gap: var(--space-8);

  /* ══════════════════════════════════════════════════════════════
     Backward-kompatible Aliase
     Alte Variablen-Namen → neue semantische Tokens aus theme-defaults.css.
     Werden schrittweise entfernt sobald alle Module migriert sind.
     ══════════════════════════════════════════════════════════════ */

  /* preview-* → semantische Tokens */
  --preview-sidebar-bg: var(--bg-surface);
  --preview-sidebar-hover: var(--bg-surface-hover);
  --preview-content-bg: var(--bg-app);
  --preview-card-bg: var(--bg-surface);
  --preview-border: var(--border-default);
  --preview-text-primary: var(--text-primary);
  --preview-text-secondary: var(--text-secondary);
  --preview-primary: var(--accent);
  --preview-success: var(--signal-green);

  /* hr-signal Aliase */
  --hr-signal-red: var(--signal-red);
  --hr-signal-red-light: var(--signal-red-light);

  /* c-ink → Text-Tokens */
  --c-ink-900: var(--text-primary);
  --c-ink-700: var(--text-primary);
  --c-ink-500: var(--text-secondary);

  /* c-teal → Accent-Tokens */
  --c-teal-700: var(--accent);
  --c-teal-600: var(--accent);
  --c-teal-500: var(--accent);
  --c-teal-300: var(--accent-hover);
  --c-teal-200: var(--accent-soft);

  /* bg-* Aliase */
  --bg: var(--bg-app);
  --bg-main: var(--bg-app);
  --bg-main-deep: var(--bg-surface-alt);
  --bg-side: var(--bg-surface-alt);
  --bg-side-soft: var(--bg-surface-alt);

  /* card/border Aliase */
  --card-white: var(--bg-surface);
  --border-light: var(--border-default);
  --border: var(--border-default);

  /* text Aliase */
  --text: var(--text-primary);
  --text2: var(--text-secondary);
  --text3: var(--text-tertiary);

  /* accent Aliase */
  --accent-mint: var(--accent);

  --tab-active: var(--accent-soft);

  --menu-font-size: var(--font-size-2);
  --menu-icon-size: var(--font-size-4);

  /* nav Aliase */
  --nav-text: var(--nav-item-color);
  --nav-text-hover: var(--text-on-accent);
  --nav-hover-bg: var(--nav-item-hover-bg);
  --nav-active-text: var(--text-on-accent);
  --nav-active-bg: var(--accent);

  --shell-shadow: var(--shadow-lg);
  --shell-border: var(--border-default);
}


html,
body {
  width: 100%;
  height: 100%;
}

body {
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-family-base);
  font-size: var(--font-size-2);
  line-height: var(--line-height-body);
  background: var(--preview-content-bg);
  -webkit-font-smoothing: antialiased;
}

p {
  font-size: var(--font-size-2);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-regular);
  letter-spacing: var(--letter-spacing-default);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-heavy);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-default);
}

h1 { font-size: var(--font-size-8); }
h2 { font-size: var(--font-size-7); }
h3 { font-size: var(--font-size-6); }
h4 { font-size: var(--font-size-5); }
h5 { font-size: var(--font-size-4); }
h6 { font-size: var(--font-size-3); }
