/* ============================================
   BiblioTTS — Website Stylesheet
   Stil: Tintenfass (Inkwell)
   Fonts: System Sans-Serif Stack
   Colors: Goldbraun + Pergament
   ============================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ============================================
   DESIGN TOKEN SYSTEM
   2-Ebenen-Hierarchie:
   1. Basis-Farben (unveränderlich)
   2. Semantische Token (wechseln Light/Dark)
   ============================================ */

:root {
  /* ========== TYPOGRAPHY SYSTEM ========== */
  /*
   * Sans-Serif System Font Stack: Zero-Latency, wartungsfrei, modern
   * macOS/iOS → -apple-system, Windows → Segoe UI, Android → Roboto
   */
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Display-Schrift für Überschriften */
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /*
   * Fluid Typography Scale (rem-basiert)
   * clamp(min, ideal, max) = automatische Anpassung an Viewport
   * Basis: 1rem = 16px Browser-Default
   */
  --text-xs: clamp(0.75rem, 1.5vw, 0.8125rem);     /* 12-13px */
  --text-sm: clamp(0.8125rem, 2vw, 0.9375rem);     /* 13-15px */
  --text-base: clamp(0.9375rem, 2.5vw, 1.0625rem); /* 15-17px */
  --text-md: clamp(1rem, 2.5vw, 1.125rem);         /* 16-18px */
  --text-lg: clamp(1.125rem, 3vw, 1.3125rem);      /* 18-21px */
  --text-xl: clamp(1.25rem, 3.5vw, 1.4375rem);     /* 20-23px */
  --text-2xl: clamp(1.5rem, 4vw, 1.75rem);         /* 24-28px */
  --text-3xl: clamp(1.75rem, 4.5vw, 2.3125rem);    /* 28-37px */
  --text-4xl: clamp(2.25rem, 5vw, 3rem);           /* 36-48px */

  /* ========== EBENE 1: BASIS-FARBEN (Tintenfass) ========== */
  /* Brand Colors - Tintenfass Palette */
  --brand-ink: #1c1a14;        /* Fast schwarz, warm */
  --brand-gold: #8a6820;       /* Goldbraun - Primary Accent */
  --brand-gold-light: #d4a644; /* Goldgelb - Dark Mode Accent */
  --brand-gold-dark: #5c4410;  /* Dunkler Akzent */
  --brand-parchment: #ede0c4;  /* Pergament - Light BG */

  /* Pergament-Skala (Light Mode) */
  --parchment-50: #f5edd8;     /* Hellstes Pergament */
  --parchment-100: #ede0c4;    /* Standard Pergament */
  --parchment-200: #e4d4b0;    /* Etwas dunkler */
  --parchment-300: #d4bf96;    /* Karten-Hintergrund */
  --parchment-400: #c9b88a;    /* Fließtext Dark */

  /* Ink-Skala (Dark Mode) */
  --ink-900: #1c1a14;          /* Dunkelster Ink */
  --ink-800: #252218;          /* Etwas heller */
  --ink-700: #2a2518;          /* Karten Dark */
  --ink-600: #332e20;          /* Elevated Dark */
  --ink-500: #3a3220;          /* Text Secondary Light */
  --ink-400: #6b5c3e;          /* Muted Light */
  --ink-300: #8a7a5a;          /* Muted Dark */

  /* Semantic Colors (Tintenfass-angepasst) */
  --diff-red: #a04030;
  --diff-red-dark: #c05040;
  --diff-green-light: #5c7a40;
  --diff-green-dark: #8aaa60;
  --price-red: #a04030;
  --price-red-bg: #f5e8e0;
  --price-red-border: #d4a090;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1160px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

/* ========== EBENE 2: SEMANTISCHE TOKEN - LIGHT MODE (Tintenfass) ========== */
:root, :root.light {
  /* Backgrounds - Pergament */
  --bg-page: #e8dcc8;                   /* Pergament (korrigiert) */
  --bg-card: var(--parchment-300);      /* #d4bf96 Karten */
  --bg-inset: var(--parchment-200);     /* #e4d4b0 Sektionen */
  --bg-nav: var(--parchment-100);       /* #ede0c4 Navigation */
  --bg-elevated: var(--parchment-50);   /* #f5edd8 Hover */

  /* Text - Ink */
  --text-primary: var(--brand-ink);     /* #1c1a14 fast schwarz */
  --text-secondary: var(--ink-500);     /* #3a3220 Fließtext */
  --text-muted: var(--ink-400);         /* #6b5c3e Labels */
  --text-on-accent: var(--parchment-50); /* #f5edd8 auf Gold */
  --text-on-light: var(--brand-ink);    /* Dunkel auf hellen Hintergründen */

  /* Borders - Warme Töne */
  --border-default: #c4b090;
  --border-subtle: #d4c0a0;

  /* Accent - Goldbraun */
  --accent: var(--brand-gold);          /* #8a6820 */
  --accent-light: var(--parchment-300); /* #d4bf96 */
  --accent-dark: var(--brand-gold-dark); /* #5c4410 */
  --accent-glow: rgba(138, 104, 32, 0.08);
  --accent-hover-shadow: rgba(138, 104, 32, 0.25);

  /* Highlights & Overlays */
  --highlight-bg: rgba(138, 104, 32, 0.15);
  --corrected-bg: rgba(138, 104, 32, 0.12);
  --overlay-light: rgba(237, 224, 196, 0.92);

  /* Diff Colors */
  --diff-old-text: rgba(160, 64, 48, 0.7);
  --diff-old-strike: rgba(160, 64, 48, 0.6);
  --diff-new-bg: rgba(92, 122, 64, 0.12);
  --diff-new-text: var(--diff-green-light);

  /* Special */
  --amber-light: var(--parchment-50);
  --comparison-border: rgba(138, 104, 32, 0.15);
  --pricing-new-border: rgba(138, 104, 32, 0.2);
  --info-tooltip-bg: var(--brand-ink);
  --info-tooltip-text: var(--parchment-50);

  /* Shadows - Wärmer */
  --shadow-sm: 0 1px 3px rgba(28, 26, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(28, 26, 20, 0.08);
  --shadow-lg: 0 8px 30px rgba(28, 26, 20, 0.12);

  /* Legacy Aliases (für Kompatibilität) */
  --white: var(--parchment-50);
  --navy-base: var(--brand-ink);
  --teal-base: var(--brand-gold);
  --teal-dark-base: var(--brand-gold-dark);
  --amber: var(--brand-gold-light);
  --bg-primary: var(--bg-page);
  --bg-secondary: var(--bg-card);
  --bg-tertiary: var(--bg-inset);
  --border: var(--border-default);
  --border-light: var(--border-subtle);
  --teal: var(--accent);
  --teal-light: var(--accent-light);
  --teal-dark: var(--accent-dark);
  --teal-glow: var(--accent-glow);
  --off-white: var(--bg-card);
  --light-gray: var(--bg-inset);
  --navy: var(--text-primary);
  --navy-light: var(--ink-500);
  --navy-90: rgba(28, 26, 20, 0.9);
  --text: var(--text-primary);
}

/* ========== EBENE 2: SEMANTISCHE TOKEN - DARK MODE (Tintenfass) ========== */
:root.dark {
  /* Backgrounds - Ink */
  --bg-page: var(--ink-900);           /* #1c1a14 fast schwarz */
  --bg-card: var(--ink-700);           /* #2a2518 Karten */
  --bg-inset: var(--ink-800);          /* #252218 Sektionen */
  --bg-nav: var(--ink-900);            /* #1c1a14 Navigation */
  --bg-elevated: var(--ink-600);       /* #332e20 Hover */
  --bg-deep: var(--ink-900);

  /* Text - Pergament */
  --text-primary: var(--parchment-100); /* #ede0c4 Haupttext */
  --text-secondary: var(--parchment-400); /* #c9b88a Fließtext */
  --text-muted: var(--ink-300);        /* #8a7a5a Labels */
  --text-on-accent: var(--ink-900);    /* #1c1a14 auf Gold */
  --text-on-light: var(--ink-900);     /* IMMER dunkel auf hellen Hintergründen */

  /* Borders - Warme Töne */
  --border-default: rgba(212, 191, 150, 0.08);
  --border-subtle: rgba(212, 191, 150, 0.05);

  /* Accent - Goldgelb */
  --accent: var(--brand-gold-light);   /* #d4a644 */
  --accent-light: var(--ink-500);      /* #3a3220 Badge-BG */
  --accent-dark: #b88c2a;              /* Hover */
  --accent-glow: rgba(212, 166, 68, 0.08);
  --accent-hover-shadow: rgba(212, 166, 68, 0.3);

  /* Highlights & Overlays */
  --highlight-bg: rgba(212, 166, 68, 0.15);
  --corrected-bg: rgba(212, 166, 68, 0.12);
  --overlay-light: rgba(28, 26, 20, 0.92);

  /* Diff Colors */
  --diff-old-text: rgba(192, 80, 64, 0.75);
  --diff-old-strike: rgba(192, 80, 64, 0.5);
  --diff-new-bg: rgba(138, 170, 96, 0.15);
  --diff-new-text: var(--diff-green-dark);

  /* Special */
  --amber-light: rgba(212, 166, 68, 0.15);
  --comparison-border: rgba(212, 166, 68, 0.15);
  --pricing-new-border: rgba(212, 166, 68, 0.2);
  --info-tooltip-bg: var(--parchment-100);
  --info-tooltip-text: var(--ink-900);

  /* Shadows - Tiefer */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);

  /* Legacy Aliases */
  --bg-primary: var(--bg-page);
  --bg-secondary: var(--bg-card);
  --bg-tertiary: var(--bg-inset);
  --border: var(--border-default);
  --border-light: var(--border-subtle);
  --teal: var(--accent);
  --teal-light: var(--accent-light);
  --teal-dark: var(--accent-dark);
  --teal-glow: var(--accent-glow);
  --accent-bg: var(--accent-glow);
  --accent-border: rgba(212, 166, 68, 0.18);
  --off-white: var(--bg-card);
  --light-gray: var(--bg-inset);
  --navy: var(--text-primary);
  --navy-light: var(--parchment-400);
  --navy-90: rgba(28, 26, 20, 0.9);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

h1 { font-size: var(--text-4xl); letter-spacing: -0.5px; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-lg); }

.highlight {
  background: linear-gradient(180deg, transparent 60%, var(--highlight-bg) 60%);
}

/* --- Navigation --- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

:root.light .nav {
  background: rgba(232, 220, 200, 0.95);  /* Pergament transparent */
}

:root.dark .nav {
  background: rgba(28, 26, 20, 0.95);     /* Ink transparent */
}

.logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--navy-base);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: var(--text-md);
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--off-white);
}

.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-links .nav-cta {
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  margin-left: 4px;
}

.nav-links .nav-cta:hover {
  background: var(--teal-dark);
}

:root.dark .nav-links .nav-cta {
  color: #1c1a14;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 23px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  transform: scale(1.05);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.2s;
}

/* --- Buttons --- */
.btn {
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-hover-shadow);
}

:root.dark .btn-primary {
  background: var(--accent);           /* Goldgelb #d4a644 */
  color: var(--text-on-accent);        /* Ink #1c1a14 */
}

:root.dark .btn-primary:hover {
  background: var(--accent-dark);      /* Hover-Gold #b88c2a */
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-primary);
}

:root.dark .btn-outline {
  border-color: rgba(212, 191, 150, 0.2);  /* Warmes Pergament */
}

:root.dark .btn-outline:hover {
  border-color: rgba(212, 191, 150, 0.4);  /* Warmes Pergament */
}

.btn-white {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-white:hover {
  background: var(--bg-inset);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: var(--text-sm);
}

/* --- Sections --- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 48px;
}

.section-sm {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 48px;
}

.section--no-top {
  padding-top: 0;
}

/* --- Utility Classes --- */
.mb-md {
  margin-bottom: var(--space-md);
}

.mb-sm {
  margin-bottom: 12px;
}

.mb-lg {
  margin-bottom: 20px;
}

.mt-lg {
  margin-top: 32px;
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--text-secondary);
}

.max-w-600 {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.max-w-800 {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.max-w-900 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.gap-sm {
  display: grid;
  gap: 8px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;  /* Mobile base spacing */
}

.section-header p {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;  /* Extra space after paragraph on mobile (compensates icon protrusion) */
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 64px;  /* Desktop: More space before card-grid elements */
  }

  .section-header p {
    margin-bottom: 0;  /* Reset extra spacing on desktop */
  }
}

/* --- Hero (Landing Page) --- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 48px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal);
  margin-bottom: 16px;
}

.hero-eyebrow--accent {
  color: var(--accent);
}

.hero h1 { margin-bottom: 20px; }

.hero-text {
  font-size: var(--text-xl);
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 40px;
}

/* Trust badges */
.trust-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.trust-badge svg { color: var(--teal); width: 15px; height: 15px; }

/* --- Demo Panel --- */
.demo-panel {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.demo-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-panel-title {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.demo-panel-content { padding: 20px; }

.demo-panel-link {
  text-align: center;
  margin-top: var(--space-md);
}

.demo-panel-link a {
  color: var(--accent);
  text-decoration: none;
  font-size: var(--text-md);
  font-weight: 500;
}

/* Comparison boxes */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.comparison-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  line-height: 1.7;
  background: var(--bg-elevated);
  border: 1px solid rgba(138, 104, 32, 0.2);
  color: var(--text-primary);
}

:root.dark .comparison-box {
  background: var(--bg-elevated);
  border: 1px solid rgba(212, 166, 68, 0.25);
  color: var(--text-primary);
}

.comparison-box.before {
  font-family: var(--font-display);  /* Historische Texte - bewusst Display-Schrift */
}

.comparison-box.after {
  /* Gleicher Stil - nur Inhalt unterscheidet sich */
}

.comparison-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.before .comparison-label { color: var(--text-secondary); }
.after .comparison-label { color: var(--accent); }

.corrected {
  background: var(--corrected-bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

/* Inline-Diff Box */
.text-diff {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.85;
  position: relative;
  z-index: 1;
  background: var(--overlay-light);
  border: 1px solid var(--border);
  color: var(--text);
}

.diff-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.diff-old {
  text-decoration: line-through;
  text-decoration-color: var(--diff-old-strike);
  color: var(--diff-old-text);
  font-size: 1.06em;
}

.diff-new {
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--diff-new-bg);
  color: var(--diff-new-text);
}

/* ============================================
   BTT PLAYER SYSTEM (BEM)
   Wiederverwendbare Audio-Player Komponente
   ============================================ */

/* --- Basis Player --- */
.btt-player {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

:root.dark .btt-player {
  background: var(--bg-card);
}

/* --- Player Elements --- */
.btt-player__btn {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  border: none;
}

.btt-player__btn:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 12px var(--accent-hover-shadow);
}

.btt-player__btn svg {
  fill: white;
  margin-left: 2px;
  width: 18px;
  height: 18px;
}

:root.dark .btt-player__btn svg {
  fill: var(--brand-ink);
}

.btt-player__info {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.btt-player__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.btt-player__duration {
  display: none;  /* Duration wird in Progress-Bar integriert */
}

.btt-player__meta {
  grid-column: 2;
  grid-row: 2;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.btt-player__progress {
  grid-column: 1 / 3;
  grid-row: 3;
  width: 100%;
  height: 24px;
  background: var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
}

.btt-player__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  opacity: 0.2;
  transition: width 0.3s;
}

.btt-player__time {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

:root.dark .btt-player__time {
  color: var(--text-secondary);
}

/* --- Legacy Aliases (for backwards compatibility) --- */
.audio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}

:root.dark .audio-row {
  background: var(--bg-card);
}

.play-btn {
  width: 40px;
  height: 40px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  border: none;
}

.play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 2px 12px var(--accent-hover-shadow);
}

.play-btn svg { fill: var(--text-on-accent); margin-left: 2px; }

.audio-info { flex: 1; min-width: 0; }
.audio-title { font-size: var(--text-md); font-weight: 600; color: var(--text); }
.audio-meta { font-size: var(--text-sm); color: var(--text-muted); }
.audio-duration { font-size: var(--text-base); color: var(--text-muted); font-weight: 500; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.audio-progress {
  width: 100%;
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.3s;
}

/* --- Stats Strip (Box-Style) --- */
.stats-strip {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .stats-strip {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .stats-strip {
    padding: 0 48px;
  }
}

.stats-inner {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.stats-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 28px,
    rgba(212, 166, 68, 0.025) 28px,
    rgba(212, 166, 68, 0.025) 29px
  );
  pointer-events: none;
}

:root.dark .stats-inner {
  border-color: var(--border-default);
}

.stat {
  text-align: center;
  flex: 1;
  min-width: 140px;
  position: relative;
  z-index: 1;
}

.stat-number {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 160px;
  margin: 0 auto;
}

/* ============================================
   BTT CARD SYSTEM (BEM)
   Wiederverwendbare Card-Komponente
   ============================================ */

/* --- Basis Card (Mobile-First) --- */
.btt-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.btt-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  z-index: 10; /* Hebt Karte über Nachbarn für Tooltips */
}

/* --- Card Elements --- */
.btt-card__header {
  padding: 48px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.btt-card__header h3 {
  font-size: var(--text-xl);
  margin-bottom: 4px;
}

.btt-card__body {
  padding: 28px 24px;
}

.btt-card__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  position: absolute;
  top: -30px;  /* Slightly less than -32px to sit visually centered on rounded border */
  left: 50%;
  transform: translateX(-50%);
}

.btt-card__icon img {
  width: 48px;
  height: 48px;
}

/* --- Card Modifiers --- */

/* Feature Card (subtle border like Live-Vorschau) */
.btt-card--feature {
  /* Erbt border: 1px solid var(--border) von .btt-card */
}

.btt-card--feature .btt-card__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px 20px;
  border-bottom: 1px solid rgba(212, 166, 68, 0.2);
  position: relative;
}

.btt-card--feature .btt-card__header h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.btt-card--feature .btt-card__body {
  padding: 16px 24px 24px;
}

.btt-card--feature .btt-card__body p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 12px;
}

/* Panel Card (lighter style) */
.btt-card--panel {
  overflow: visible;
}

.btt-card--panel .btt-card__header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btt-card--panel .btt-card__body {
  padding: 20px;
}

/* Sample Card (for demo samples) */
.btt-card--sample {
  position: relative;
  overflow: visible;
}

.btt-card--sample .btt-card__header {
  padding: 20px 20px 16px;
  overflow: visible;
}

.btt-card--sample .btt-card__body {
  padding: 16px 20px;
  overflow: visible;
}

:root.dark .btt-card--sample {
  border: 1px solid rgba(212, 191, 150, 0.08);  /* Warmes Pergament */
}

/* --- Legacy Aliases (for backwards compatibility) --- */
.card {
  background: var(--off-white);
  border: 2px solid var(--teal);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.card-icon {
  width: 44px;
  height: 44px;
  background: var(--teal-light);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  margin-bottom: 16px;
}

.card h3 { font-size: var(--text-lg); margin-bottom: 8px; }

.card p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.6;
}

.card-stat {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--teal);
  font-weight: 600;
}

/* Card Grid (Mobile-First) */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;  /* 32px vertical gap for mobile - icons protrude 30px, leaves minimal clear space */
}

@media (min-width: 768px) {
  .card-grid {
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 5rem;     /* 80px vertical spacing for desktop - icons protrude 32px, leaves 48px clear */
    column-gap: 1rem;  /* 16px horizontal spacing */
  }

  .card-grid > * {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

@media (min-width: 1024px) {
  .card-grid > * {
    flex: 1 1 calc(33.333% - 0.67rem);
  }
}

/* --- BFSG Banner & Info-Boxen (Mobile-First v0.50.12) --- */
.bfsg-banner {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .bfsg-banner {
    margin: 0 auto 60px;
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .bfsg-banner {
    padding: 0 48px;
  }
}

/* Einheitliche Info-Box Basis (Mobile-First) */
.bfsg-inner {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 166, 68, 0.15);
  padding: 1rem;
}

@media (min-width: 768px) {
  .bfsg-inner {
    padding: 1.5rem;
  }
}

/* Header-Bereich: Icon/Siegel + Überschrift — IMMER einzeilig */
.bfsg-inner__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 166, 68, 0.2);
  margin-bottom: 1rem;
}

.bfsg-inner__header h3 {
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
}

/* Body-Text unterhalb der Linie */
.bfsg-inner__body {
  color: var(--text-secondary);
  line-height: 1.6;
}

.bfsg-inner__body p {
  color: var(--text-secondary);
  margin: 0;
}

/* Legacy-Support: Inline-Layout (BFSG-Siegel + Text) */
.bfsg-inner--legacy {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Erklärungsbox-Variante (Demo-Seite) */
.bfsg-inner--explanation {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.bfsg-inner--explanation::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 28px,
    rgba(212, 166, 68, 0.025) 28px,
    rgba(212, 166, 68, 0.025) 29px
  );
  pointer-events: none;
}

.bfsg-inner--explanation .bfsg-inner__header {
  border-bottom-color: var(--border-default);
  padding-bottom: 16px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.bfsg-inner--explanation .bfsg-inner__header h3 {
  font-size: var(--text-xl);
  font-weight: 700;
}

.bfsg-inner--explanation .bfsg-inner__body {
  position: relative;
  z-index: 1;
}

.bfsg-inner--explanation .bfsg-inner__body p {
  line-height: 1.7;
  color: var(--text-secondary);
}

.bfsg-inner--explanation .bfsg-inner__body strong {
  color: var(--accent);
  font-weight: 600;
}

.bfsg-inner__icon {
  font-size: 37px;
  flex-shrink: 0;
}

.bfsg-seal {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bfsg-seal-inner {
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: var(--text-primary);
}

.bfsg-text h3 {
  font-size: var(--text-lg);
  color: var(--white);
  margin-bottom: 6px;
}

.bfsg-text p {
  font-size: var(--text-lg);
  color: var(--parchment-400);  /* Warmes Muted statt Slate */
  line-height: 1.6;
}

/* --- Demo Page --- */
.demo-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 48px 48px;
  text-align: center;
}

.demo-hero p {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Demo Samples Grid (Mobile-First) */
.demo-samples {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 0.5rem 2rem;  /* Reduziert von 1rem auf 0.5rem für weniger Einrückung */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: visible;
}

@media (min-width: 768px) {
  .demo-samples {
    padding: 0 2rem 3rem;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .demo-samples > * {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

@media (min-width: 1024px) {
  .demo-samples {
    padding: 0 48px 64px;
  }

  .demo-samples > * {
    flex: 1 1 calc(50% - 0.5rem);  /* 2 Spalten statt 3 → 2×3 Grid für 6 Samples */
  }
}

/* Demo Sample Card (Mobile-First) */
.demo-sample-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
  position: relative;
  transition: all 0.3s ease;
}

:root.dark .demo-sample-card {
  border: 1px solid rgba(212, 191, 150, 0.08);  /* Warmes Pergament */
}

.demo-sample-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  z-index: 10; /* Hebt Karte über Nachbarn für Tooltips */
}

/* Card Content */
.card-content {
  position: relative;
}

.demo-sample-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.demo-sample-header h3 { font-size: var(--text-xl); margin-bottom: 4px; }

.demo-sample-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.demo-sample-body { padding: 16px 20px; overflow: visible; }

/* Tag Container - Tags in einer Zeile */
.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--off-white);
  color: var(--text);
  border: 1px solid var(--border);
  position: relative;
  overflow: visible;
  white-space: nowrap;
}

/* Info Icon inside tags */
.info-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  cursor: help;
  margin-left: 4px;
  position: relative;
}

/* Tooltip (CSS-only, position: absolute) */
.info-icon::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--info-tooltip-bg);
  color: var(--info-tooltip-text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  text-align: left;
}

/* Tooltip arrow */
.info-icon::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--info-tooltip-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 101;
}

/* Show tooltip on hover */
.info-icon:hover::before,
.info-icon:hover::after {
  opacity: 1;
}

/* Tooltip nach links öffnen (für rechten Viewport-Rand) */
.info-icon.tooltip-left::before {
  left: auto;
  right: 0;
  transform: none;
}

.info-icon.tooltip-left::after {
  left: auto;
  right: 4px;
  transform: none;
}

/* Mobile: Tooltip Clipping Prevention */
@media (max-width: 900px) {
  .info-icon::before {
    /* Schmaler Tooltip auf Mobile */
    width: calc(100vw - 32px);
    max-width: 280px;
    /* Links ausrichten mit Abstand */
    left: 50%;
    transform: translateX(-50%);
    /* Sicherstellen dass Tooltip innerhalb Viewport bleibt */
    right: auto;
  }

  .info-icon::after {
    /* Arrow zentriert über Icon */
    left: 50%;
    transform: translateX(-50%);
  }

  /* Für Tags am linken Rand: Tooltip nach rechts ausrichten */
  .tag-list .info-icon:first-child::before,
  .tag-list .info-icon:nth-child(2)::before {
    left: 0;
    transform: none;
  }

  .tag-list .info-icon:first-child::after,
  .tag-list .info-icon:nth-child(2)::after {
    left: 12px;
    transform: none;
  }

  /* Rechter Rand: Tooltip nach links ausrichten */
  .info-icon.tooltip-left::before {
    left: auto;
    right: 0;
    transform: none;
  }

  .info-icon.tooltip-left::after {
    left: auto;
    right: 12px;
    transform: none;
  }
}

/* ═══ Problem/Solution 2×2 Grid ═══ */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0 56px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.ps-grid__problem-text    { grid-column: 1; grid-row: 1; }
.ps-grid__problem-visual  { grid-column: 2; grid-row: 1; }
.ps-grid__solution-text   { grid-column: 1; grid-row: 2; }
.ps-grid__solution-visual { grid-column: 2; grid-row: 2; }

.ps-grid__problem-text,
.ps-grid__problem-visual {
  align-self: center;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-default);
}
.ps-grid__solution-text,
.ps-grid__solution-visual {
  align-self: center;
  padding-top: 32px;
}

/* Eyebrows */
.ps-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.ps-eyebrow--problem { color: var(--diff-red); }
:root.dark .ps-eyebrow--problem { color: var(--diff-red-dark); }
.ps-eyebrow--solution { color: var(--diff-green-light); }
:root.dark .ps-eyebrow--solution { color: var(--diff-green-dark); }

/* Text */
.ps-heading {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.ps-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

/* Stat lists */
.ps-stats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ps-stats li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
}
.ps-stats li::before {
  content: '';
  flex-shrink: 0;
  width: 6px; height: 6px;
  margin-top: 9px;
  border-radius: 50%;
}
.ps-stats--red li::before { background: var(--diff-red); opacity: 0.7; }
.ps-stats--green li::before { background: var(--diff-green-light); }
:root.dark .ps-stats--green li::before { background: var(--diff-green-dark); }

/* Price cards */
.ps-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  overflow: hidden;
}
.ps-card--problem::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(160,64,48,0.035) 28px, rgba(160,64,48,0.035) 29px);
  pointer-events: none;
}
.ps-card--solution::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(138,104,32,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.ps-card__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  position: relative;
}
.ps-card__price {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
  position: relative;
}
.ps-card--problem .ps-card__price { color: var(--diff-red); }
:root.dark .ps-card--problem .ps-card__price { color: var(--diff-red-dark); }
.ps-card--solution .ps-card__price { color: var(--accent); }
.ps-card__price-sup { font-size: 0.45em; vertical-align: super; }
.ps-card__unit {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  position: relative;
}
.ps-card__method {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 20px;
  position: relative;
}
.ps-card__divider {
  width: 40px; height: 1px;
  background: var(--border-default);
  margin: 0 auto 20px;
  position: relative;
}
.ps-card__detail {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
}
.ps-card__detail strong { color: var(--text-secondary); font-weight: 600; }
.ps-card__tag {
  margin-top: 20px;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  display: inline-block;
  position: relative;
}
.ps-card__tag--red {
  background: rgba(160, 64, 48, 0.08);
  color: var(--diff-red);
}
:root.dark .ps-card__tag--red {
  background: rgba(192, 80, 64, 0.12);
  color: var(--diff-red-dark);
}
.ps-card__tag--green {
  background: rgba(92, 122, 64, 0.1);
  color: var(--diff-green-light);
}
:root.dark .ps-card__tag--green {
  background: rgba(138, 170, 96, 0.12);
  color: var(--diff-green-dark);
}

/* Mobile: click to show tooltip */
@media (max-width: 900px) {
  .info-icon:focus::before,
  .info-icon:focus::after {
    opacity: 1;
  }

  .info-icon::before {
    width: 200px;
  }
}

/* --- For Libraries Page --- */
.lib-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 48px 48px;
}

.lib-hero h1 { max-width: 700px; margin-bottom: 16px; }

.lib-hero-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.75;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--navy-base);
  padding: 64px 48px;
  text-align: center;
  color: var(--white);
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--parchment-400);  /* Warmes Muted statt Slate */
  font-size: var(--text-xl);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

:root.dark .cta-section {
  background: var(--navy-base);
}

.cta-section .btn { font-size: var(--text-lg); padding: 15px 32px; }

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text); }

/* --- Legal Pages --- */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 48px 80px;
}

.legal h1 { font-size: var(--text-3xl); margin-bottom: 32px; }
.legal h2 { font-size: var(--text-xl); margin-top: 36px; margin-bottom: 12px; }
.legal h3 { font-size: var(--text-lg); margin-top: 24px; margin-bottom: 8px; }

.legal p, .legal li {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal ul { padding-left: 24px; }
.legal li { margin-bottom: 6px; }

.legal a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Timeline (How it Works) --- */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background: var(--border);
}

.timeline-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px 0;
  position: relative;
}

.timeline-number {
  width: 48px;
  height: 48px;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--white);
}

:root.dark .timeline-number {
  color: #1c1a14;
}

.timeline-content {
  flex: 1;
  padding-top: 8px;
}

.timeline-content h3 {
  font-size: var(--text-xl);
  margin-bottom: 6px;
}

.timeline-content p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   BTT TIMELINE BANNER (BEM)
   Success Banner am Ende der Timeline
   ============================================ */

.btt-timeline-banner {
  max-width: 900px;
  margin: var(--space-2xl) auto 0;
  padding: var(--space-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-primary);
}

/* Dark Mode: Keep dark background */
:root.dark .btt-timeline-banner {
  background: #26221a;
  border-color: #3a3020;
}

.btt-timeline-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.btt-timeline-banner__icon img {
  width: 70px;
  height: 70px;
}

.btt-timeline-banner__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

:root.dark .btt-timeline-banner__title {
  color: #ede0c4;
}

.btt-timeline-banner__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

:root.dark .btt-timeline-banner__text {
  color: #b5a07a;
}

.btt-timeline-banner__stats {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  flex-wrap: wrap;
}

.btt-timeline-banner__stat {
  text-align: center;
}

.btt-timeline-banner__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

:root.dark .btt-timeline-banner__stat-value {
  color: #ede0c4;
}

.btt-timeline-banner__stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

:root.dark .btt-timeline-banner__stat-label {
  color: #8a7a5a;
}

/* ============================================
   WERKSTATT / LOGIN & DASHBOARD
   ============================================ */

/* Login Form */
.login-box {
  max-width: 400px;
  margin: 0 auto;
  background: var(--off-white);
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
}

.login-box__label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.login-box__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
}

.login-box__error {
  margin-top: 12px;
  color: #dc2626;
  font-size: var(--text-md);
  display: none;
}

.login-box__error--visible {
  display: block;
}

/* Dashboard Cards */
.dashboard-grid {
  grid-template-columns: repeat(2, 1fr);
}

.dashboard-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-md);
}

.dashboard-card__icon {
  width: 48px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}

.dashboard-card__icon--frontend {
  background: var(--accent);
}

:root.dark .dashboard-card__icon--frontend {
  color: #1c1a14;
}

.dashboard-card__icon--backend {
  background: var(--navy-base);
}

.dashboard-card__icon--lab {
  background: var(--amber);
}

.dashboard-card__icon--tests {
  background: var(--diff-green-light);  /* Warmes Grün statt kaltes Teal */
}

.dashboard-card__title {
  margin: 0;
  font-size: var(--text-lg);
}

.dashboard-card__description {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
}

.dashboard-card__footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.dashboard-card__footer strong {
  color: var(--text-primary);
}

/* Quick Actions */
.quick-actions {
  margin-top: 32px;
  padding: 24px;
  background: var(--off-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.quick-actions__title {
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
}

.quick-actions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-actions__btn {
  font-size: var(--text-md);
}

/* Logout Button */
.logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-md);
  cursor: pointer;
  text-decoration: underline;
}

.logout-btn:hover {
  color: var(--text-primary);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }
.fade-up-d4 { animation-delay: 0.4s; }

/* --- Responsive (Legacy - Navigation & andere Komponenten) --- */
/* Card-Grids und Info-Boxen sind jetzt Mobile-First definiert */

@media (max-width: 900px) {
  .nav { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open a {
    color: var(--text-primary);
  }

  .nav-links.open a:hover {
    color: var(--accent);
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 40px 24px;
    gap: 32px;
  }

  .section, .section-sm, .demo-hero, .lib-hero,
  .legal { padding-left: 24px; padding-right: 24px; }

  .stats-inner {
    padding: 1rem;
  }

  .comparison { grid-template-columns: 1fr; }

  .pricing-compare { grid-template-columns: 1fr; gap: 12px; }
  .pricing-vs { display: none; }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .cta-section { padding: 48px 24px; }
}

@media (max-width: 600px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .trust-row { gap: 12px; }
}

/* ============================================
   MOBILE LAYOUT FIXES (767px und kleiner)
   Problem 1: Container zu schmal
   Problem 2: Zu große Abstände
   Problem 3: Header nicht einzeilig
   ============================================ */
@media (max-width: 767px) {
  /* --- Problem 1: Container auf volle Breite --- */
  section,
  .section,
  .section-sm,
  .cta-section,
  .lib-hero,
  .demo-hero,
  [class*="-section"] {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  /* Problem/Solution Grid: 2×2 → vertikal */
  .ps-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .ps-grid__problem-text    { grid-column: 1; grid-row: 1; }
  .ps-grid__problem-visual  { grid-column: 1; grid-row: 2; }
  .ps-grid__solution-text   { grid-column: 1; grid-row: 3; }
  .ps-grid__solution-visual { grid-column: 1; grid-row: 4; }
  .ps-grid__problem-text {
    border-bottom: none;
    padding-bottom: 24px;
    margin-bottom: 0;
  }
  .ps-grid__problem-visual {
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 40px;
    margin-bottom: 40px;
  }
  .ps-grid__solution-text { padding-top: 0; padding-bottom: 24px; }
  .ps-grid__solution-visual { padding-top: 0; }

  /* --- Problem 2: Kompakte Abstände --- */
  section,
  .section,
  .section-sm,
  .cta-section,
  .lib-hero,
  .demo-hero,
  [class*="-section"] {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    min-height: unset;
  }

  .section--no-top {
    padding-top: 0;
    margin-top: 0;
  }

  /* REMOVED: .section-header margin override - use responsive default */

  .feature-row {
    margin-bottom: 1.5rem;
  }

  /* Karten-Abstände */
  .btt-card,
  .feature-visual,
  .dashboard-card,
  .demo-sample-card,
  .bfsg-inner {
    margin-bottom: 1rem;
  }

  /* BFSG-Banner kompakter */
  .bfsg-banner {
    margin-bottom: 1.5rem;
  }

  /* Stats-Strip kompakter */
  .stats-strip {
    margin-bottom: 1.5rem;
  }

  /* REMOVED: Mobile inline header layout - Icons now sit centered above cards on all screen sizes */

  /* BFSG-Seal kompakter auf Mobile */
  .bfsg-seal {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .bfsg-seal-inner {
    font-size: 9px;
  }
}

/* ============================================
   FIX: Cards ohne __header Wrapper
   (Icon + h3 direkt in __body)
   ============================================ */
.btt-card--feature .btt-card__body {
  display: block;
}

/* Wenn Icon direkt in body: Inline-Header simulieren */
.btt-card--feature .btt-card__body > .btt-card__icon {
  float: left;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

.btt-card--feature .btt-card__body > h3 {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 0.75rem;
}

.btt-card--feature .btt-card__body > p {
  clear: both;
}

/* ============================================
   DARK MODE KONTRAST — WASSERDICHTE REGELN
   ============================================

   DESIGN-REGEL (UNVERÄNDERLICH):
   Gold-Hintergründe = IMMER dunkler Text (#1c1a14)

   Betroffene Backgrounds in Dark Mode:
   - var(--accent)      → Goldgelb (#d4a644)
   - var(--accent-light) → Dunkles Gold-BG (#3a3220)
   - var(--accent-dark)  → Hover-Gold (#b88c2a)
   - Gradients mit accent

   WICHTIG: Direkte Hex-Werte (#1c1a14) statt var(--text-on-light)
   CSS-Variablen werden in manchen Browser-Kontexten nicht aufgelöst!

   NICHT FLICKEN — NUR HIER ÄNDERN!
   ============================================ */

/* --- Regel A: Alle Elemente mit accent-Background --- */

/* Icons mit Gold-Hintergrund */
:root.dark .btt-card__icon,
:root.dark .card-icon {
  color: #1c1a14;
}

/* Play-Button SVG (auf goldenem Button) */
:root.dark .play-btn svg {
  fill: #1c1a14;
}

/* Feature Price auf goldenem Hintergrund */
:root.dark .feature-visual__price--new {
  color: #1c1a14;
}

/* --- Regel B: Bereits implementierte Fixes (Referenz) --- */
/*
   Diese Regeln existieren bereits verstreut in der Datei,
   werden hier als Referenz aufgelistet:

   ✅ .btt-timeline-banner (Zeile 1616-1619)
   ✅ .nav-cta (Zeile 325-327)
   ✅ .btn-primary (Zeile 394-396)
   ✅ .btt-player__btn svg (Zeile 758-760)
   ✅ .comparison-box.after (Zeile 649)
   ✅ .bfsg-inner--explanation (Zeile 1052-1060)
   ✅ .pricing-box.new (Zeile 1429, 1437-1439)
   ✅ .timeline-number (Zeile 1580-1582)
   ✅ .dashboard-card__icon--frontend (Zeile 1742-1744)
   ✅ .after .comparison-label (Zeile 664-666)
*/

/* --- Regel C: Fallback für alle accent-light Kinder --- */
:root.dark [style*="background"][style*="accent"],
:root.dark .accent-bg,
:root.dark .bg-accent {
  color: #1c1a14 !important;
}

/* ============================================
   TOOLTIP STACKING CONTEXT FIX
   ============================================

   Problem: transform auf hover erzeugt neuen Stacking Context,
   Tooltips werden innerhalb dieses Contexts gerendert und
   können nicht über Parent-Grenzen hinaus.

   Lösung (CSS-only):
   1. z-index: 10000 für Tooltips
   2. Transform auf hover für Cards mit Tooltips deaktivieren
   3. Stärkerer Shadow als alternativer "lift" Effekt

   React Frontend Muster: React nutzt Portals mit position: fixed.
   Für CSS-only Tooltips ist Transform-Deaktivierung die beste Lösung.
   ============================================ */

/* Fix: Cards mit Tooltips - kein Transform auf hover (verhindert Stacking Context) */
/* NUR Dark Mode - Light Mode bleibt unverändert */
:root.dark .demo-sample-card:hover,
:root.dark .btt-card--sample:hover {
  transform: none;
  box-shadow: var(--shadow-lg);  /* Stärkerer Shadow als Lift-Ersatz */
  z-index: 10; /* Hebt Karte über Nachbarn für Tooltips */
}

/* Tooltip z-index - bereits in Hauptdefinition gesetzt */

/* ============================================
   ANGEBOTSMODELLE SECTION
   ============================================ */

/* Toggle All Button */
.angebote-toggle-all {
  background: none;
  border: none;
  color: #d4a644;
  font-size: 0.85rem;
  font-family: system-ui, sans-serif;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: opacity 0.2s ease;
}

.angebote-toggle-all:hover {
  opacity: 0.7;
}

/* Stack Layout */
.angebotsmodelle-stack {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Card Container */
.angebot-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.angebot-card.is-open {
  background: var(--bg-elevated);
  border-color: var(--border-default);
}

:root.dark .angebot-card {
  background: #26221a;
  border-color: #3a3020;
}

:root.dark .angebot-card.is-open {
  background: #2e2a1a;
  border-color: #3a3020;
}

.angebot-card[data-accent="#d4a644"].is-open { border-color: rgba(212, 166, 68, 0.5); }
.angebot-card[data-accent="#c97d3a"].is-open { border-color: rgba(201, 125, 58, 0.5); }
.angebot-card[data-accent="#8a6820"].is-open { border-color: rgba(138, 104, 32, 0.5); }
.angebot-card[data-accent="#6b7c3a"].is-open { border-color: rgba(107, 124, 58, 0.5); }

/* Horizontal Bar (always visible) */
.angebot-card__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  min-height: 70px;
}

.angebot-card__bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.angebot-card__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
}

.angebot-card__icon img {
  width: 48px;
  height: 48px;
}

.angebot-card__bar-text {
  flex: 1;
  min-width: 0;
}

.angebot-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  line-height: 1.2;
}

:root.dark .angebot-card__title {
  color: #ede0c4;
}

.angebot-card__subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  font-family: system-ui, sans-serif;
}

:root.dark .angebot-card__subtitle {
  color: #8a7a5a;
}

.angebot-card__arrow {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

:root.dark .angebot-card__arrow {
  color: #7a6c4a;
}

.angebot-card.is-open .angebot-card__arrow {
  transform: rotate(90deg);
}

.angebot-card[data-accent="#d4a644"].is-open .angebot-card__arrow { color: #d4a644; }
.angebot-card[data-accent="#c97d3a"].is-open .angebot-card__arrow { color: #c97d3a; }
.angebot-card[data-accent="#8a6820"].is-open .angebot-card__arrow { color: #8a6820; }
.angebot-card[data-accent="#6b7c3a"].is-open .angebot-card__arrow { color: #6b7c3a; }

/* Details (expandable) */
.angebot-card__details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
}

.angebot-card.is-open .angebot-card__details {
  max-height: 800px;
  opacity: 1;
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.angebot-card__lead {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-family: system-ui, sans-serif;
}

:root.dark .angebot-card__lead {
  color: #ede0c4;
}

.angebot-card__description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-family: system-ui, sans-serif;
}

:root.dark .angebot-card__description {
  color: #9a8c6a;
}

.angebot-card__example {
  border-left: 2px solid;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.angebot-card__example p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-style: italic;
  font-family: system-ui, sans-serif;
  margin: 0;
}

:root.dark .angebot-card__example p {
  color: #7a6c4a;
}

.angebot-card__cta {
  display: inline-block;
  background: rgba(212, 166, 68, 0.1);
  border: 1px solid rgba(212, 166, 68, 0.3);
  color: #d4a644;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: system-ui, sans-serif;
  text-decoration: none;
  transition: all 0.2s ease;
}

.angebot-card__cta:hover {
  background: rgba(212, 166, 68, 0.15);
  border-color: rgba(212, 166, 68, 0.5);
}

.angebot-card[data-accent="#c97d3a"] .angebot-card__cta {
  background: rgba(201, 125, 58, 0.1);
  border-color: rgba(201, 125, 58, 0.3);
  color: #c97d3a;
}

.angebot-card[data-accent="#c97d3a"] .angebot-card__cta:hover {
  background: rgba(201, 125, 58, 0.15);
  border-color: rgba(201, 125, 58, 0.5);
}

.angebot-card[data-accent="#8a6820"] .angebot-card__cta {
  background: rgba(138, 104, 32, 0.1);
  border-color: rgba(138, 104, 32, 0.3);
  color: #8a6820;
}

.angebot-card[data-accent="#8a6820"] .angebot-card__cta:hover {
  background: rgba(138, 104, 32, 0.15);
  border-color: rgba(138, 104, 32, 0.5);
}

.angebot-card[data-accent="#6b7c3a"] .angebot-card__cta {
  background: rgba(107, 124, 58, 0.1);
  border-color: rgba(107, 124, 58, 0.3);
  color: #6b7c3a;
}

.angebot-card[data-accent="#6b7c3a"] .angebot-card__cta:hover {
  background: rgba(107, 124, 58, 0.15);
  border-color: rgba(107, 124, 58, 0.5);
}

@media (max-width: 768px) {
  .angebot-card__bar {
    padding: 1rem;
  }

  .angebot-card__bar-left {
    gap: 0.75rem;
  }

  .angebot-card__icon {
    width: 56px;
    height: 56px;
  }

  .angebot-card__icon img {
    width: 40px;
    height: 40px;
  }

  .angebot-card__title {
    font-size: 1rem;
  }

  .angebot-card__subtitle {
    font-size: 0.75rem;
  }

  .angebot-card.is-open .angebot-card__details {
    padding: 0 1rem 1rem 1rem;
  }
}
