/* KI-Workshop – zentrale Gestaltung
 * Farben exakt aus Farbschema/Farbpaletten.json:
 *   Light = Buchdruck-Light, Dark = GitHub-Dark
 * Responsiv (Mobile/Tablet/Desktop), Light/Dark per [data-theme] am <html>.
 */

:root,
[data-theme="light"] {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #555555;
  --accent: #2a4dd0;
  --h3: #333333;
  --h4: #444444;
  --code_bg: #f3f4f8;
  --code_text: #b3306b;
  --pre_bg: #1e1e2e;
  --pre_text: #e6e6e6;
  --th_bg: #2a4dd0;
  --th_text: #ffffff;
  --td_border: #cfd3e0;
  --tr_even_bg: #f6f7fb;
  --quote_border: #f0a500;
  --quote_bg: #fff8e8;
  --quote_text: #6b5300;
  --hr: #dddddd;
  --box_border: #cfd3e0;
  --nav_bg: #2a4dd0;
  --nav_text: #ffffff;
  --achtung: #e35941;
  --fg: var(--text);
}

[data-theme="dark"] {
  --bg: #0d1117;
  --card: #161b22;
  --text: #e6edf3;
  --muted: #9da7b3;
  --accent: #6e9cff;
  --h3: #c9d1d9;
  --h4: #9da7b3;
  --code_bg: #0b0f14;
  --code_text: #a5d6ff;
  --pre_bg: #0b0f14;
  --pre_text: #c9d1d9;
  --th_bg: #21262d;
  --th_text: #e6edf3;
  --td_border: #30363d;
  --tr_even_bg: #1a2029;
  --quote_border: #e3b341;
  --quote_bg: rgba(227,179,65,.10);
  --quote_text: #f0d999;
  --hr: #30363d;
  --box_border: #30363d;
  --nav_bg: #161b22;
  --nav_text: #e6edf3;
  --achtung: #f85149;
  --fg: var(--text);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Cambria, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  font-size: 17px;
}

/* ---------- Header / Navigation / Footer ---------- */
site-header,
.site-header {
  display: block;
  background: var(--nav_bg);
  color: var(--nav_text);
  padding: 0.9rem 1.2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  border-bottom: 1px solid var(--td_border);
}
site-header a,
.site-header a { color: var(--nav_text); text-decoration: none; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem;
  max-width: 1100px; margin: 0 auto; position: relative;
}
.site-title { font-weight: 700; font-size: 1.15rem; flex-shrink: 0; }
.site-nav {
  display: flex; flex-wrap: wrap; gap: 0.4rem .8rem; margin-left: auto;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: .2rem .45rem;
}
.site-nav a { font-size: 0.95rem; opacity: .95; padding: .2rem .55rem; border-radius: 999px; }
.site-nav a:hover { opacity: 1; text-decoration: none; background: rgba(255,255,255,.16); }
.site-nav a.active { opacity: 1; background: rgba(255,255,255,.24); font-weight: 600; }
.header-actions {
  display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}
.theme-toggle {
  background: transparent; border: 1px solid currentColor; color: var(--nav_text);
  border-radius: 999px; padding: 0.25rem 0.7rem; cursor: pointer; font-size: 0.9rem;
}
.nav-toggle {
  display: none;
}

/* Navigation Dropdown: Folgen-Direktanwahl */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.95rem;
  opacity: .95;
  padding: .2rem .55rem;
  border-radius: 999px;
  color: var(--nav_text);
  text-decoration: none;
}
.nav-dropdown-toggle:hover {
  opacity: 1;
  text-decoration: none;
  background: rgba(255,255,255,.16);
}
.nav-dropdown-toggle.active {
  opacity: 1;
  background: rgba(255,255,255,.24);
  font-weight: 600;
}
.nav-caret {
  font-size: 0.75rem;
  opacity: 0.8;
  display: inline-block;
  transition: transform 0.15s ease;
}
.nav-dropdown:hover .nav-caret,
.nav-dropdown.is-open .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 290px;
  max-width: 360px;
  background: var(--nav_bg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 0.4rem;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 300;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
  animation: kiDropdownFade 0.15s ease-out;
}
@keyframes kiDropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item {
  display: block;
  font-size: 0.88rem !important;
  line-height: 1.35;
  padding: 0.4rem 0.65rem !important;
  border-radius: 6px !important;
  color: var(--nav_text) !important;
  text-decoration: none !important;
  white-space: normal;
  transition: background 0.12s;
}
.nav-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.16) !important;
}
.nav-dropdown-item.current {
  background: rgba(255, 255, 255, 0.24) !important;
  font-weight: 700;
  border-left: 3px solid #ffffff;
  border-radius: 2px 6px 6px 2px !important;
}
.nav-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0.3rem 0.2rem;
}

/* Responsive Header & Navigation (Mobile: platzsparendes Hamburger-Menü) */
@media (max-width: 820px) {
  .site-header {
    padding: 0.55rem 0.8rem;
  }
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 0.5rem;
  }
  .site-title {
    font-size: 1.15rem;
    font-weight: 700;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
  }
  .theme-toggle {
    font-size: 0.82rem;
    padding: 0.22rem 0.6rem;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: var(--nav_text);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
  }
  .nav-toggle:hover, .nav-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    outline: none;
  }
  .nav-toggle.is-active {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.55);
  }
  .hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 15px;
    height: 11px;
  }
  .hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle.is-active .hamburger-icon span:nth-child(1) {
    transform: translateY(4.5px) rotate(45deg);
  }
  .nav-toggle.is-active .hamburger-icon span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-active .hamburger-icon span:nth-child(3) {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  /* Mobil-Menü Dropdown */
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    right: 0;
    max-height: 82vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--nav_bg);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 100;
    margin: 0;
    box-sizing: border-box;
  }
  .site-nav.is-open {
    display: flex;
    animation: kiNavSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes kiNavSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .site-nav a {
    display: flex;
    align-items: center;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    color: var(--nav_text);
    background: transparent;
    transition: background 0.12s;
  }
  .site-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
  }
  .site-nav a.active {
    background: rgba(255, 255, 255, 0.22);
    font-weight: 700;
    border-left: 3px solid #ffffff;
    border-radius: 4px 8px 8px 4px;
    padding-left: 0.75rem;
  }
  .nav-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  .nav-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    box-sizing: border-box;
  }
  .nav-dropdown-menu {
    display: flex;
    position: static;
    min-width: unset;
    max-width: unset;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: none;
    margin: 0.2rem 0 0.4rem 0.5rem;
    padding: 0.3rem;
  }
  .nav-dropdown-item {
    font-size: 0.86rem !important;
    padding: 0.45rem 0.75rem !important;
  }

  /* Beseitigt überflüssigen Rahmen und doppeltes Padding auf Mobilgeräten */
  .page {
    padding: 0.6rem 0.6rem 1.8rem;
    gap: 0.8rem;
  }
  article {
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    padding: 0.2rem 0;
  }
  .toc {
    padding: 0.75rem 0.75rem;
    border-radius: 10px;
  }
  .quiz-container {
    margin: 1.2rem 0;
  }
  .quiz-card {
    padding: 0.9rem 0.75rem;
    border-radius: 10px;
  }
  .quiz-opt-btn {
    padding: 0.65rem 0.65rem;
    gap: 0.5rem;
  }
  .quiz-opt-letter {
    width: 26px;
    height: 26px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }
  .quiz-opt-text {
    font-size: 0.88rem;
    line-height: 1.4;
  }
  .quiz-question-title {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
  }
  .quiz-header {
    margin-bottom: 0.8rem;
  }
  .quiz-tip-wrapper {
    margin-bottom: 0.9rem;
  }
  .quiz-tip-toggle {
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
  }
  .quiz-tip-content {
    font-size: 0.84rem;
    padding: 0.7rem 0.8rem;
  }
  .figure {
    margin: 1.2rem 0;
  }
  .figure img {
    width: 100%;
    max-width: 100%;
  }
  .box {
    padding: 0.8rem 0.85rem;
    margin: 1rem 0;
  }
  .steckbrief {
    padding: 0.75rem;
    margin: 1rem 0;
  }
  .podcast-banner {
    padding: 0.9rem 0.8rem;
  }
}

.site-footer {
  margin-top: 3rem; padding: 1.4rem 1.2rem; border-top: 1px solid var(--hr);
  color: var(--muted); font-size: 0.9rem; text-align: center;
  background: var(--card);
}
.site-footer a { color: var(--accent); }

/* ---------- Layout ---------- */
.page {
  max-width: 1100px; margin: 0 auto; padding: 1.4rem 1.2rem 2rem;
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
}
@media (min-width: 900px) {
  .page { grid-template-columns: 260px 1fr; align-items: start; }
  .toc { position: sticky; top: 92px; }
}

/* ---------- Inhaltsverzeichnis (Sidebar - Modernes Navigationsdesign) ---------- */
.toc {
  background: var(--card);
  border: 1px solid var(--box_border);
  border-radius: 12px;
  padding: 0.85rem 0.75rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--box_border) transparent;
}
.toc::-webkit-scrollbar {
  width: 5px;
}
.toc::-webkit-scrollbar-thumb {
  background: var(--box_border);
  border-radius: 4px;
}
.toc h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  padding: 0 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border-bottom: 1px solid var(--hr);
}
.toc h2::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc ol {
  margin: 0;
  padding-left: 1rem;
}
.toc li {
  margin: 0;
  padding: 0;
  border-radius: 6px;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zebra-Striping: Wechselnde dezent hinterlegte Zeilen */
.toc li:nth-child(even) {
  background: var(--tr_even_bg);
}
.toc li:nth-child(odd) {
  background: transparent;
}

.toc li a {
  display: block;
  padding: 0.42rem 0.65rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  border-left: 3px solid transparent;
  line-height: 1.35;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover-Effekte: dezenter Farbton, Links-Verschiebung & Akzentstreifen */
.toc li:hover {
  background: rgba(42, 77, 208, 0.08) !important;
  transform: translateX(3px);
}
[data-theme="dark"] .toc li:hover {
  background: rgba(110, 156, 255, 0.14) !important;
}
.toc li:hover a {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* Unterpunkte (.sub): saubere Hierarchie mit dezentem Chevron */
.toc li.sub {
  font-size: 0.86rem;
}
.toc li.sub a {
  color: var(--muted);
  padding-left: 1.35rem;
  position: relative;
}
.toc li.sub a::before {
  content: "▸";
  position: absolute;
  left: 0.55rem;
  top: 0.42rem;
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}
.toc li.sub:hover a::before {
  color: var(--accent);
  transform: translateX(2px);
}

/* Aktiver Link-Status */
.toc li.active,
.toc li a.active {
  background: rgba(42, 77, 208, 0.12) !important;
  color: var(--accent) !important;
  font-weight: 600;
  border-left-color: var(--accent);
}

/* ---------- Hauptinhalt ---------- */
article {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--box_border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}
article h1 { color: var(--accent); margin-top: 0; line-height: 1.25; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
article h2 { color: var(--h3); border-bottom: 2px solid var(--hr); padding-bottom: .3rem; margin-top: 2rem; }
article h3 { color: var(--h4); margin-top: 1.5rem; }
article :is(h1, h2, h3, h4, h5, h6)[id] { scroll-margin-top: 110px; }
article a { color: var(--accent); }

.lead { font-size: 1.05rem; color: var(--muted); }

/* ---------- Steckbrief ---------- */
.steckbrief {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem; margin: 1.2rem 0; padding: 1rem; border-radius: 10px;
  background: var(--card); border: 1px solid var(--box_border);
}
.steckbrief div { font-size: 0.92rem; }
.steckbrief b { display: block; color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: .03em; }
.steckbrief .steckbrief-werkzeuge,
.steckbrief > div:last-child { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .steckbrief { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Lern-Kästen ---------- */
.box {
  border-radius: 10px; padding: 0.9rem 1.1rem; margin: 1.2rem 0;
  border-left: 5px solid var(--accent); background: var(--code_bg);
}
.box .box-title {
  display: block; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; font-size: 1rem; margin-bottom: .5rem; color: var(--accent);
}
.box ol, .box ul {
  margin: 0.4rem 0 0.4rem 1.2rem;
  padding-left: 0.3rem;
}
.box li {
  margin: 0.3rem 0;
  line-height: 1.5;
}
.box.ziel { border-left-color: var(--accent); }
.box.ziel .box-title { color: var(--accent); }
.box.uebung { border-left-color: #3fb950; }
.box.uebung .box-title { color: #3fb950; }
.box.tipp { border-left-color: var(--quote_border); }
.box.tipp .box-title { color: var(--quote_border); }
.box.achtung { border-left-color: #e35941; }
.box.achtung .box-title { color: #e35941; }
.box.fazit { border-left-color: var(--muted); }
.box.fazit .box-title { color: var(--muted); }
/* ---------- Pflichtübung: deutlich hervorgehobener Rahmen-Kasten ---------- */
.box.pflicht {
  border: 2px solid #f0883e;
  border-left-width: 6px;
  border-left-color: #f0883e;
  background: var(--quote_bg);
}
.box.pflicht .box-title { color: #f0883e; }
.box.pflicht .box.tipp {
  border-left: 0;
}
/* ---------- Fachbegriff-Kasten (eigene Struktur) ---------- */
.box.fachbegriff { border-left-color: #8b5cf6; background: var(--quote_bg); }
/* Hauptueberschrift UEBER dem Kasten: gross + farbig (klar ueber Textkoerper) */
.begriff-titel {
  color: #8b5cf6; font-size: 1.5rem; line-height: 1.25;
  margin: 1.8rem 0 .35rem; font-weight: 700;
}
/* Beschriftung im Kasten: Einleitung/Label farbig + fett, Text in Normalschrift */
.box.fachbegriff .begriff-sub {
  margin: 0 0 .45rem; font-size: 0.98rem; font-weight: normal; color: var(--text);
}
.box.fachbegriff .begriff-sub strong,
.box.fachbegriff .begriff-sub .begriff-label {
  color: #8b5cf6; font-weight: 700;
}
/* Definition / Erklärung: Fließtext in Normalschrift, nur Labels/Strong hervorgehoben */
.box.fachbegriff .begriff-def {
  color: var(--text); font-size: .95rem; font-weight: normal; line-height: 1.6;
}
.box.fachbegriff strong.begriff-def,
.box.fachbegriff .begriff-def strong {
  color: #8b5cf6; font-weight: 700;
}

/* ---------- Aufklappbare Musterlösung (Akkordion / Details) ---------- */
details.loesung {
  margin: 1rem 0 0.4rem;
  border: 1px solid rgba(240, 136, 62, 0.45);
  border-radius: 8px;
  background: var(--card);
  overflow: hidden;
}
details.loesung summary {
  padding: 0.65rem 0.95rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #f0883e;
  cursor: pointer;
  background: rgba(240, 136, 62, 0.08);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease;
}
details.loesung summary:hover {
  background: rgba(240, 136, 62, 0.16);
}
details.loesung summary::marker,
details.loesung summary::-webkit-details-marker {
  color: #f0883e;
}
details.loesung[open] summary {
  border-bottom: 1px solid rgba(240, 136, 62, 0.3);
}
details.loesung .loesung-content {
  padding: 0.85rem 0.95rem;
  font-size: 0.95rem;
  background: var(--card);
}
details.loesung .loesung-content p:last-child {
  margin-bottom: 0;
}

/* ---------- Podcast-Banner (Deep Dive Podcast) ---------- */
.podcast-banner {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  margin: 1.4rem 0 1.8rem;
  border-radius: 12px;
  border: 1px solid rgba(42, 77, 208, 0.28);
  background: linear-gradient(135deg, rgba(42, 77, 208, 0.05) 0%, rgba(139, 92, 246, 0.08) 100%);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
@media (min-width: 680px) {
  .podcast-banner {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }
}
.podcast-banner-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.podcast-banner-icon img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(42, 77, 208, 0.2);
  display: block;
}
.podcast-banner-body {
  flex-grow: 1;
  min-width: 0;
}
.podcast-banner-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(42, 77, 208, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}
.podcast-banner-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}
.podcast-banner-desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  line-height: 1.45;
}
.podcast-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.podcast-audio-player {
  flex-grow: 1;
  min-width: 220px;
  height: 38px;
  border-radius: 8px;
  outline: none;
}
.btn-podcast-download {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}
.btn-podcast-download:hover {
  background: #1e3aa8;
  border-color: #1e3aa8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 77, 208, 0.25);
}
.btn-podcast-download svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Mermaid-Diagramm als helle, lesbare Karte */
.mermaid,
pre.mermaid,
div.mermaid {
  background: #ffffff !important;
  color: #1a1a1a;
  border: 1px solid var(--box_border);
  border-radius: 10px;
  padding: 1rem;
  margin: 1.2rem 0;
  text-align: center;
  white-space: normal;
  font-family: inherit;
}
.mermaid svg { max-width: 100%; height: auto; }
.figure { margin: 1.4rem 0; }
.figure img,
.zoomable-media {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.figure img:hover,
.zoomable-media:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
}
.figure figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: .5rem;
  display: grid;
  gap: .45rem;
}
.figure figcaption .img-caption {
  display: block;
  color: var(--text);
  font-weight: 600;
}
.figure figcaption .img-hinweis {
  display: block;
  padding: .55rem .7rem;
  border-left: 5px solid #f0883e;
  background: var(--quote_bg);
  color: var(--text);
  border-radius: 0 8px 8px 0;
}
.figure figcaption .img-prompt {
  display: block;
  padding: .55rem .7rem;
  border: 1px solid var(--td_border);
  background: var(--code_bg);
  color: var(--muted);
  border-radius: 8px;
  font-style: italic;
}

.ratio-16x9 { aspect-ratio: 16/9; }
.ratio-9x16 { aspect-ratio: 9/16; max-width: 420px; margin: 1.5rem auto; }
.ratio-4x5  { aspect-ratio: 4/5; max-width: 480px; margin: 1.5rem auto; }
.prompt-text { display:block; font-size: 0.78rem; color: var(--muted); margin-top: .4rem; font-style: italic; }

/* ---------- Lightbox für Bilder & Diagramme ---------- */
.ki-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ki-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ki-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ki-lightbox-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-width: 96vw;
  max-height: 94vh;
  align-items: center;
  animation: kiLbZoom 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes kiLbZoom {
  from { transform: scale(0.93); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.ki-lightbox-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.4rem;
  padding: 0 0.2rem;
}
.ki-lightbox-hint {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}
.ki-lightbox-close {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, transform 0.15s;
}
.ki-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.06);
}
.ki-lightbox-viewport {
  max-width: 96vw;
  max-height: 80vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
}
.ki-lightbox-img {
  max-width: 95vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.ki-lightbox-img.is-zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.ki-lightbox-svg-wrap {
  padding: 1.2rem;
  background: #ffffff;
  border-radius: 6px;
  max-width: 95vw;
  max-height: 78vh;
  overflow: auto;
}
.ki-lightbox-svg-wrap svg {
  max-width: 100%;
  height: auto;
}
.ki-lightbox-caption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  max-width: 90vw;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.dummy {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #eee, #eee 12px, #e3e3e3 12px, #e3e3e3 24px);
  color: #777; font-size: .9rem; border: 1px dashed #bbb; border-radius: 8px;
}

/* ---------- Code / Zitate / Tabellen ---------- */
pre {
  background: var(--pre_bg); color: var(--pre_text);
  padding: 1rem; border-radius: 8px; overflow: auto; font-size: 0.92rem;
}
code { background: var(--code_bg); color: var(--code_text); padding: .1rem .35rem; border-radius: 4px; }
pre code { background: none; color: inherit; padding: 0; }
blockquote {
  border-left: 4px solid var(--quote_border); background: var(--quote_bg);
  color: var(--quote_text); margin: 1.2rem 0; padding: .8rem 1rem; border-radius: 0 8px 8px 0;
}
table { border-collapse: collapse; margin: 1.2rem 0; width: 100%; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
th { background: var(--th_bg); color: var(--th_text); padding: .55rem .8rem; text-align: left; }
td { border: 1px solid var(--td_border); padding: .5rem .8rem; }
tr:nth-child(even) td { background: var(--tr_even_bg); }
hr { border: none; border-top: 1px solid var(--hr); margin: 2rem 0; }

/* ---------- Glossar ---------- */
.glossar-liste { list-style: none; padding: 0; }
.glossar-liste li { padding: .6rem 0; border-bottom: 1px solid var(--hr); }
.glossar-liste .begriff { font-weight: 700; color: var(--accent); }
.glossar-liste .fundstellen a { color: var(--muted); font-size: .88rem; margin-right: .5rem; }

/* ---------- Modul-Übersicht / Karten ---------- */
.module-overview {
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid var(--box_border);
  border-radius: 12px;
  background: var(--code_bg);
}
.module-overview h2 {
  margin: 0 0 .8rem;
  font-size: 1rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.karten { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 0; }
.karte {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--box_border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.karte:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.10);
  border-color: rgba(42, 77, 208, 0.4);
}
.karte-grafik {
  width: 100%;
  aspect-ratio: 2 / 1;
  background: var(--code_bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--box_border);
}
.karte-grafik img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.karte:hover .karte-grafik img {
  transform: scale(1.03);
}
.karte-body {
  padding: 0.9rem 1.1rem 1.1rem;
}
.karte .nr {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.karte .titel {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: .25rem;
  line-height: 1.35;
}

/* ---------- Fortschritt & Resume-Banner ---------- */
.resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 4px 16px rgba(42, 77, 208, 0.08);
  flex-wrap: wrap;
}
.resume-banner-content {
  flex: 1 1 300px;
}
.resume-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
  background: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.resume-banner-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.2rem 0;
  line-height: 1.35;
}
.resume-banner-desc {
  font-size: 0.9rem;
  color: var(--text_muted);
  margin: 0;
}
.resume-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn-resume:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.btn-resume-reset {
  background: none;
  border: none;
  color: var(--text_muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.4rem;
}
.btn-resume-reset:hover {
  color: var(--text);
}

.karte {
  position: relative;
}
.karte.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(42, 77, 208, 0.25);
}
.karte-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.karte-badge.current {
  background: var(--accent);
  color: #ffffff;
}
.karte-badge.completed {
  background: #3fb950;
  color: #ffffff;
}

/* Button zum Verlassen der Seite bei Nicht-Akzeptanz */
.btn-leave-site {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--achtung, #e35941) !important;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  border: 1px solid #c94029;
  text-decoration: none !important;
  transition: all 0.15s ease;
  margin-top: 0.8rem;
  box-shadow: 0 2px 8px rgba(227, 89, 65, 0.35);
  cursor: pointer;
}
.btn-leave-site:hover {
  background-color: #c94029 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(227, 89, 65, 0.45);
}

/* ---------- Bottom-Navigation ---------- */
.lesson-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: .3rem 1.2rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
}
.lesson-nav > * {
  display: block;
  text-align: center;
  padding: .55rem .8rem;
  border-radius: 10px;
  border: 1px solid var(--box_border);
  background: var(--card);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.lesson-nav .disabled {
  color: var(--muted);
  font-weight: 500;
}
@media (min-width: 700px) {
  .lesson-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Interaktives Quiz-Modul ---------- */
[id] {
  scroll-margin-top: 80px;
}
.quiz-container {
  margin: 2.2rem 0;
  scroll-margin-top: 80px;
}
.quiz-card {
  background: var(--card);
  border: 1px solid var(--box_border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  color: var(--text);
}
[data-theme="dark"] .quiz-card {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
@media (min-width: 900px) {
  .quiz-container {
    min-height: 640px;
    scroll-margin-top: 80px;
  }
  .quiz-card {
    min-height: 500px;
    display: flex;
    flex-direction: column;
  }
  .quiz-options-list {
    flex: 1;
  }
}
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.quiz-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.quiz-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(42, 77, 208, 0.12);
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
[data-theme="dark"] .quiz-badge {
  background: rgba(110, 156, 255, 0.18);
  color: #79c0ff;
}
.quiz-source-tag {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}
.quiz-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.quiz-progress-bar {
  height: 6px;
  background: rgba(125, 125, 125, 0.2);
  border-radius: 3px;
  margin: 0.4rem 0 1.2rem;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.quiz-question-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: var(--text);
  line-height: 1.4;
}
.quiz-tip-wrapper {
  margin-bottom: 1.2rem;
}
.quiz-tip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px dashed rgba(240, 165, 0, 0.6);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b45309;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.quiz-tip-toggle:hover {
  background: rgba(240, 165, 0, 0.08);
}
[data-theme="dark"] .quiz-tip-toggle {
  color: #e3b341;
  border-color: rgba(227, 179, 65, 0.6);
}
[data-theme="dark"] .quiz-tip-toggle:hover {
  background: rgba(227, 179, 65, 0.12);
}
.quiz-icon-bulb, .quiz-arrow {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.quiz-tip-content {
  background: rgba(240, 165, 0, 0.08);
  border-left: 3px solid #f0a500;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--text);
  line-height: 1.4;
}
[data-theme="dark"] .quiz-tip-content {
  background: rgba(227, 179, 65, 0.12);
  border-left-color: #e3b341;
}
.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.quiz-opt-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--box_border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  color: var(--text);
}
.quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(42, 77, 208, 0.04);
  transform: translateY(-1px);
}
[data-theme="dark"] .quiz-opt-btn {
  background: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}
[data-theme="dark"] .quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: #282e37;
}
.quiz-opt-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.quiz-opt-letter {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: rgba(125, 125, 125, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
[data-theme="dark"] .quiz-opt-letter {
  background: #30363d;
  color: #f0f6fc;
}
.quiz-opt-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.quiz-opt-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}
[data-theme="dark"] .quiz-opt-text {
  color: #e6edf3;
}
.quiz-opt-badge {
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.2rem;
}
.quiz-opt-badge.correct {
  color: #2ea043;
}
.quiz-opt-badge.incorrect {
  color: #cf222e;
}
[data-theme="dark"] .quiz-opt-badge.correct {
  color: #3fb950;
}
[data-theme="dark"] .quiz-opt-badge.incorrect {
  color: #f85149;
}
.quiz-opt-explanation {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--box_border);
  line-height: 1.4;
}
[data-theme="dark"] .quiz-opt-explanation {
  color: #8b949e;
  border-top-color: #30363d;
}
.quiz-opt-btn.is-correct {
  border-color: #2ea043 !important;
  background: rgba(46, 160, 67, 0.09) !important;
}
.quiz-opt-btn.is-correct .quiz-opt-letter {
  background: #2ea043 !important;
  color: #ffffff !important;
}
.quiz-opt-btn.is-incorrect {
  border-color: #cf222e !important;
  background: rgba(207, 34, 46, 0.09) !important;
}
.quiz-opt-btn.is-incorrect .quiz-opt-letter {
  background: #cf222e !important;
  color: #ffffff !important;
}
[data-theme="dark"] .quiz-opt-btn.is-correct {
  border-color: #3fb950 !important;
  background: rgba(63, 185, 80, 0.18) !important;
}
[data-theme="dark"] .quiz-opt-btn.is-correct .quiz-opt-letter {
  background: #238636 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .quiz-opt-btn.is-incorrect {
  border-color: #f85149 !important;
  background: rgba(248, 81, 73, 0.18) !important;
}
[data-theme="dark"] .quiz-opt-btn.is-incorrect .quiz-opt-letter {
  background: #da3633 !important;
  color: #ffffff !important;
}
.quiz-summary-box {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 8px;
}
.quiz-summary-box.summary-correct {
  background: rgba(46, 160, 67, 0.09);
  border-left: 4px solid #2ea043;
}
.quiz-summary-box.summary-incorrect {
  background: rgba(240, 165, 0, 0.1);
  border-left: 4px solid #f0a500;
}
[data-theme="dark"] .quiz-summary-box.summary-correct {
  background: rgba(63, 185, 80, 0.15);
  border-left-color: #3fb950;
}
[data-theme="dark"] .quiz-summary-box.summary-incorrect {
  background: rgba(227, 179, 65, 0.15);
  border-left-color: #e3b341;
}
.quiz-summary-header {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.quiz-summary-text {
  font-size: 0.9rem;
  margin: 0 0 0.8rem 0;
  line-height: 1.4;
  color: var(--text);
}
.btn-quiz-next, .btn-quiz-retry {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #ffffff !important;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.btn-quiz-next:hover, .btn-quiz-retry:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-quiz-next, 
[data-theme="dark"] .btn-quiz-retry {
  background: #388bfd;
  color: #ffffff !important;
}
.btn-quiz-next svg, .btn-quiz-retry svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.quiz-result-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.quiz-score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(42, 77, 208, 0.1);
  margin: 1.2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
[data-theme="dark"] .quiz-score-circle {
  background: rgba(110, 156, 255, 0.16);
  color: #79c0ff;
}
.quiz-score-number {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.quiz-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.3rem;
}
.quiz-result-title {
  font-size: 1.3rem;
  margin: 0 0 0.6rem 0;
  color: var(--text);
}
.quiz-result-desc {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.5;
}

/* ---------- Druck (PDF via Browser - Buchdruck-Light) ---------- */
@media print {
  site-header, .site-header, .site-footer, .theme-toggle, .toc, .lesson-nav { display: none !important; }
  body {
    background: #ffffff !important;
    color: #1a1a1a !important;
    font-size: 11pt;
    line-height: 1.5;
  }
  .page { display: block; max-width: none; padding: 0; }
  article {
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 0 !important;
  }
  .box, .steckbrief, .karte, .mermaid, .figure, table, details.loesung, .podcast-banner, .quiz-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .quiz-card {
    border: 1px solid #cfd3e0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }
  .btn-quiz-next, .btn-quiz-retry, .quiz-tip-toggle, .resume-banner, .btn-leave-site, .karte-badge {
    display: none !important;
  }
  .box { background: #f8f9fa !important; }
  .box.pflicht, .box.tipp, .box.fachbegriff { background: #fffdf5 !important; }
  .podcast-banner {
    border: 1px solid #cfd3e0 !important;
    background: #f8f9fa !important;
  }
  .podcast-audio-player {
    display: none !important;
  }
  .btn-podcast-download {
    color: #1a1a1a !important;
    background: none !important;
    border: 1px solid #cfd3e0 !important;
    text-decoration: underline !important;
  }
  details.loesung {
    border: 1px solid #cfd3e0 !important;
    background: #ffffff !important;
    margin: 1rem 0 !important;
  }
  details.loesung summary {
    display: block !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #cfd3e0 !important;
  }
  details.loesung > *:not(summary) {
    display: block !important;
  }
  .mermaid { background: #ffffff !important; border: 1px solid #cfd3e0 !important; }
  pre { background: #f3f4f8 !important; color: #1a1a1a !important; border: 1px solid #cfd3e0; }
  a { color: #1a1a1a; text-decoration: underline; }
}
