/* =========================================================
   Rawasi Nachhilfe Hagen – gemeinsame Styles für alle Seiten
   (Kopfzeile mit Mega-Menü, Handy-Menü, Unterseiten, Fußzeile)
   ========================================================= */

:root {
  --navy: #0D1B3E;
  --navy-mid: #1A2F5E;
  --navy-light: #243c78;
  --gold: #C9972B;
  --gold-light: #E8B84B;
  --gold-pale: #F7EDD5;
  --white: #FFFFFF;
  --offwhite: #F9F7F2;
  --text-dark: #1a1a2e;
  --text-muted: #5a6080;
  --border: #e2ddd4;
  --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 68px;
}

html { scroll-padding-top: calc(var(--header-h) + 12px); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(13, 27, 62, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 151, 43, 0.25);
  font-family: var(--sans);
}

.nav-inner {
  height: 100%;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 46px; width: auto; display: block; }

.site-menu .menu {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-item { position: relative; }

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: rgba(255, 255, 255, 0.78);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.menu-link:hover,
.menu-item.open > .menu-link,
.has-mega:hover > .menu-link { color: var(--gold-light); background: rgba(255, 255, 255, 0.05); }

.menu-link:focus-visible,
.menu-cta:focus-visible,
.mega a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.chevron {
  width: 12px; height: 12px;
  stroke: currentColor;
  transition: transform 0.2s;
}

.menu-item.open > .menu-trigger .chevron { transform: rotate(180deg); }

.badge-soon {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(201, 151, 43, 0.18);
  border: 1px solid rgba(201, 151, 43, 0.45);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.menu-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  margin-left: 10px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--navy);
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.menu-cta:hover { background: var(--gold-light); }

/* ---------- Mega-Menü (Desktop) ---------- */
.mega {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  width: 600px;
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(13, 27, 62, 0.28);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
}

/* unsichtbare Brücke, damit das Menü beim Herüberfahren offen bleibt */
.mega::before {
  content: '';
  position: absolute;
  top: -16px; left: 0; right: 0;
  height: 16px;
}

.has-mega:hover > .mega,
.has-mega:focus-within > .mega,
.has-mega.open > .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition: opacity 0.18s, transform 0.18s, visibility 0s;
}

.mega-intro {
  background: var(--navy-mid);
  color: rgba(255, 255, 255, 0.78);
  padding: 26px 22px;
  font-size: 13.5px;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}

.mega-intro::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 151, 43, 0.22) 0%, rgba(201, 151, 43, 0) 70%);
}

.mega-intro-title {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--gold-light);
  margin: 0 0 10px;
  line-height: 1.2;
}

.mega-intro p { margin: 0; }

.mega-links {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 2px;
  align-content: start;
}

.mega-links a {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.15s;
}

.mega-links a:hover { background: var(--offwhite); }

.mega-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mega-icon svg { width: 19px; height: 19px; stroke: var(--gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mega-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.mega-title .badge-soon { background: var(--gold-pale); border-color: rgba(201, 151, 43, 0.5); color: #8a6a1e; }

.mega-desc {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Handy-Menü ---------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s, top 0.2s;
}

.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1080px) {
  /* backdrop-filter würde das fixierte Handy-Menü auf die Kopfzeilenhöhe einsperren */
  .site-header { background: var(--navy); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-inner { padding: 0 4%; }
  .nav-toggle { display: block; }

  .site-menu {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--navy);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 4% 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.2s;
  }

  .site-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s, transform 0.2s, visibility 0s;
  }

  .site-menu .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu-item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

  .menu-link {
    width: 100%;
    height: 56px;
    padding: 0 4px;
    font-size: 17px;
    justify-content: flex-start;
    color: rgba(255, 255, 255, 0.9);
  }

  .menu-link:hover, .has-mega:hover > .menu-link { background: none; }
  .menu-trigger .chevron { margin-left: auto; width: 14px; height: 14px; }

  /* Im Handy-Menü klappen Untermenüs nur per Tippen auf */
  .mega,
  .has-mega:hover > .mega,
  .has-mega:focus-within > .mega {
    position: static;
    transform: none;
    width: auto;
    display: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border-radius: 12px;
    margin-bottom: 14px;
    transition: none;
  }

  .has-mega.open > .mega { display: block; transform: none; }
  .mega::before { display: none; }
  .mega-intro { display: none; }
  .mega-links { padding: 6px; }

  .menu-cta-item { border-bottom: 0; padding-top: 22px; }
  .menu-cta { margin: 0; width: 100%; height: 52px; justify-content: center; font-size: 16px; }

  body.menu-open { overflow: hidden; }
}

@media (max-width: 420px) {
  .brand img { height: 40px; }
}

/* =========================================================
   Unterseiten
   ========================================================= */
body.subpage {
  margin: 0;
  font-family: var(--sans);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.subpage *, .subpage *::before, .subpage *::after { box-sizing: border-box; }

.page-hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 70%, #1e3a6e 100%);
  padding: calc(var(--header-h) + 64px) 5% 72px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 56px;
  background: var(--white);
  clip-path: polygon(0 100%, 0 70%, 14% 38%, 26% 62%, 41% 20%, 55% 58%, 68% 34%, 82% 64%, 92% 44%, 100% 70%, 100% 100%);
  opacity: 1;
}

.page-hero.to-offwhite::after { background: var(--offwhite); }

.page-hero-inner { max-width: 1040px; margin: 0 auto; position: relative; z-index: 1; padding-bottom: 24px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: rgba(255, 255, 255, 0.35); }

.page-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  color: var(--white);
  margin: 0 0 18px;
  max-width: 18ch;
  letter-spacing: -0.01em;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
  line-height: 1.75;
  max-width: 58ch;
  margin: 0;
}

.page-hero .badge-soon { font-size: 13px; padding: 4px 12px; margin-bottom: 18px; }

.page-body { padding: 56px 5% 88px; }
.page-body.alt { background: var(--offwhite); }
.page-body-inner { max-width: 760px; margin: 0 auto; }
.page-body-inner.wide { max-width: 1040px; }

.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.25;
  color: var(--navy);
  margin: 56px 0 14px;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 17px;
  color: var(--navy);
  margin: 28px 0 8px;
}

.prose p, .prose li { color: var(--text-muted); font-size: 17px; line-height: 1.8; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 24px; margin-bottom: 8px; }
.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 0.72em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.prose a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.prose a:hover { color: var(--gold); }
.prose strong { color: var(--text-dark); }

/* Nummerierte Schritte (nur für echte Abfolgen) */
.step-list { list-style: none; counter-reset: step; margin: 22px 0 8px; padding: 0; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 62px;
  margin: 0;
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-list li::after {
  content: '';
  position: absolute;
  left: 19px; top: 42px; bottom: 4px;
  width: 2px;
  background: var(--border);
}
.step-list li:last-child::after { display: none; }
.step-list li:last-child { padding-bottom: 0; }
.step-list .step-head { display: block; color: var(--navy); font-weight: 600; font-size: 17px; margin-bottom: 2px; }

.note {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 26px 0;
}
.note p { margin: 0; font-size: 15.5px; color: #5b4a1f; }

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 8px 0 8px;
}
.fact { background: var(--white); padding: 20px 22px; }
.fact-value { font-family: var(--serif); font-size: 30px; color: var(--navy); line-height: 1.1; }
.fact-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* Häufige Fragen */
.faq-group + .faq-group { margin-top: 48px; }
.faq-group h2 { margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 0;
  position: relative;
  color: var(--navy);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after,
.faq summary::before {
  content: '';
  position: absolute;
  right: 8px; top: 50%;
  width: 14px; height: 2px;
  background: var(--gold);
  transition: transform 0.2s;
}
.faq summary::before { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(0deg); }
.faq summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.faq .answer { padding: 0 0 22px; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Abschluss-Aufruf */
.cta-band {
  margin: 64px auto 0;
  max-width: 1040px;
  background: var(--navy);
  border-radius: 18px;
  padding: 40px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { font-family: var(--serif); font-weight: 400; color: var(--white); font-size: 26px; margin: 0 0 6px; line-height: 1.25; }
.cta-band p { color: rgba(255, 255, 255, 0.68); margin: 0; font-size: 16px; max-width: 52ch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 8px;
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }
.btn:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

/* Informatik: Lektionskarte */
.lesson-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--navy);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  margin: 0 0 8px;
}
.lesson-card-visual {
  background: radial-gradient(ellipse at 50% 30%, #243c78 0%, var(--navy) 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 26px 26px;
}
.lesson-card-visual svg { width: 100%; max-width: 380px; height: auto; display: block; }
.lesson-card-text { padding: 34px 34px 32px; display: flex; flex-direction: column; justify-content: center; }
.lesson-card-text .lesson-card-kicker { color: var(--gold-light); font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.lesson-card-text .lesson-card-title { font-family: var(--serif); color: var(--white); font-size: 30px; line-height: 1.15; margin: 0 0 12px; }
.lesson-card-text p:not([class]) { color: rgba(255, 255, 255, 0.72); font-size: 16px; line-height: 1.7; margin: 0 0 22px; }
.lesson-card .btn { align-self: flex-start; }
.lesson-card:hover .btn-gold { background: var(--gold-light); }
.lesson-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0 0; }
.plan-item { border: 1px solid var(--border); border-radius: 14px; padding: 24px 24px 20px; background: var(--white); }
.plan-item h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 400; font-size: 21px; color: var(--navy); }
.plan-item p { margin: 0; font-size: 15.5px; }

/* ---------- Fußzeile (Unterseiten) ---------- */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(201, 151, 43, 0.15);
  padding: 44px 5% 36px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--sans);
}
.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px 48px;
  align-items: center;
}
.footer-inner img { height: 40px; width: auto; display: block; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.footer-nav a, .footer-legal a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 14px; }
.footer-nav a:hover, .footer-legal a:hover { color: var(--gold-light); }
.footer-legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.footer-legal-links { display: flex; gap: 22px; }

@media (max-width: 768px) {
  .page-hero { padding: calc(var(--header-h) + 44px) 5% 60px; }
  .page-hero .lead { font-size: 16.5px; }
  .page-body { padding: 44px 5% 72px; }
  .prose p, .prose li { font-size: 16px; }
  .fact-row { grid-template-columns: 1fr; }
  .lesson-card { grid-template-columns: 1fr; }
  .lesson-card-text { padding: 26px 24px 28px; }
  .plan-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 30px 26px; }
  .cta-band .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-inner img { margin: 0 auto; }
  .footer-nav { justify-content: center; }
  .footer-legal { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mega, .site-menu, .nav-toggle span, .chevron, .faq summary::before { transition: none !important; }
}

/* =========================================================
   Design-Schalter (hell/dunkel)
   ========================================================= */
.brand { margin-right: auto; }

.theme-toggle {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.theme-toggle:hover { border-color: var(--gold-light); color: var(--gold-light); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 1080px) {
  .theme-toggle { width: 42px; height: 42px; }
}

/* =========================================================
   BuT-Seite: Formulare, Checkliste, Abgabestellen
   ========================================================= */
.doc-grid { display: grid; gap: 16px; margin: 18px 0 8px; }
.doc-card {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}
.doc-icon {
  width: 54px; height: 64px;
  border-radius: 6px 14px 6px 6px;
  background: var(--navy);
  color: var(--gold-light);
  font: 700 12px/1 var(--sans);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  position: relative;
}
.doc-icon.muted { background: var(--offwhite); color: var(--text-muted); border: 1px dashed var(--border); }
.doc-title { color: var(--navy); font-weight: 600; font-size: 16.5px; line-height: 1.4; margin: 0 0 4px; }
.doc-meta { color: var(--text-muted); font-size: 14px; line-height: 1.55; margin: 0; }
.doc-card .btn { min-height: 44px; padding: 0 20px; font-size: 14.5px; }
.prose .doc-meta, .prose .doc-title { margin-bottom: 0; }
.prose .doc-title { margin-bottom: 4px; font-size: 16.5px; color: var(--navy); }
.prose .doc-meta { font-size: 14px; line-height: 1.55; }

.check-list { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 10px; }
.prose .check-list li { padding-left: 0; margin: 0; }
.prose .check-list li::before { display: none; }
.check-list label {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}
.check-list input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px; height: 24px;
  margin: 1px 0 0;
  border: 2px solid var(--gold);
  border-radius: 6px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check-list input::after {
  content: '';
  width: 6px; height: 11px;
  border: solid var(--navy);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}
.check-list input:checked { background: var(--gold); }
.check-list input:checked::after { opacity: 1; }
.check-list input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.check-list label:has(input:checked) { border-color: var(--gold); }
.check-list strong { color: var(--text-dark); font-weight: 600; }

.where-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 8px; }
.where-card { border: 1px solid var(--border); border-radius: 14px; padding: 22px 22px 20px; background: var(--white); }
.where-card .where-who { color: var(--gold); font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.where-card .where-place { font-family: var(--serif); color: var(--navy); font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.prose .where-card p { margin-bottom: 0; font-size: 15.5px; }
.prose .where-card .where-who { font-size: 14px; color: var(--gold); }
.prose .where-card .where-place { font-size: 20px; color: var(--navy); margin-bottom: 6px; }

@media (max-width: 768px) {
  .doc-card { grid-template-columns: 46px 1fr; }
  .doc-icon { width: 46px; height: 56px; }
  .doc-card .btn { grid-column: 1 / -1; width: 100%; }
  .where-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Dunkles Design
   ========================================================= */
html[data-theme="dark"] {
  --d-bg: #0A1430;
  --d-bg-alt: #0E1A3A;
  --d-card: #14234A;
  --d-card-2: #1A2B57;
  --d-border: #26385F;
  --d-text: #E4E7F0;
  --d-muted: #A7AFC9;
  --d-head: #F4F5F9;
  color-scheme: dark;
}

/* --- Startseite --- */
html[data-theme="dark"] body { background: var(--d-bg); color: var(--d-text); }
html[data-theme="dark"] .about,
html[data-theme="dark"] .preise { background: var(--d-bg-alt); }
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .leistung-title,
html[data-theme="dark"] .kontakt-info h3 { color: var(--d-head); }
html[data-theme="dark"] .section-sub,
html[data-theme="dark"] .about-text p,
html[data-theme="dark"] .leistung-text,
html[data-theme="dark"] .kontakt-info p,
html[data-theme="dark"] .preis-note { color: var(--d-muted); }
html[data-theme="dark"] .about-card { background: var(--d-card); border: 1px solid var(--d-border); }
html[data-theme="dark"] .leistung-card { background: var(--d-card); border-color: var(--d-border); }
html[data-theme="dark"] .leistung-card:hover { border-color: var(--gold); }
html[data-theme="dark"] .leistung-icon,
html[data-theme="dark"] .kontakt-item-icon,
html[data-theme="dark"] .mega-icon { background: rgba(201, 151, 43, 0.14); }
html[data-theme="dark"] .vorgehen,
html[data-theme="dark"] .fuer-schueler { background: #0C1838; }
html[data-theme="dark"] .preis-card { background: var(--d-card); border-color: var(--d-border); }
html[data-theme="dark"] .preis-card.featured { background: #0C1838; border-color: var(--gold); }
html[data-theme="dark"] .preis-amount { color: var(--d-head); }
html[data-theme="dark"] .preis-card.featured .preis-amount { color: var(--gold-light); }
html[data-theme="dark"] .preis-label,
html[data-theme="dark"] .preis-unit { color: var(--d-muted); }
html[data-theme="dark"] .preis-features li { color: var(--d-text); border-bottom-color: var(--d-border); }
html[data-theme="dark"] .btn-preis-outline { border-color: var(--d-muted); color: var(--d-head); }
html[data-theme="dark"] .btn-preis-outline:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
html[data-theme="dark"] .preis-note a { color: var(--gold-light); }
html[data-theme="dark"] .kontakt-item { color: var(--d-text); }
html[data-theme="dark"] .kontakt-form { background: var(--d-card); border-color: var(--d-border); }
html[data-theme="dark"] .form-group label { color: var(--d-head); }
html[data-theme="dark"] .form-group input,
html[data-theme="dark"] .form-group select,
html[data-theme="dark"] .form-group textarea { background: var(--d-bg); border-color: var(--d-border); color: var(--d-text); }
html[data-theme="dark"] .form-group input::placeholder,
html[data-theme="dark"] .form-group textarea::placeholder { color: #6F7896; }
html[data-theme="dark"] .form-group input:focus,
html[data-theme="dark"] .form-group select:focus,
html[data-theme="dark"] .form-group textarea:focus { border-color: var(--gold); }
html[data-theme="dark"] .form-submit { background: var(--gold); color: var(--navy); }
html[data-theme="dark"] .form-submit:hover { background: var(--gold-light); }
html[data-theme="dark"] footer,
html[data-theme="dark"] .site-footer { background: #070F25; }
html[data-theme="dark"] .legal-modal { background: var(--d-card); }
html[data-theme="dark"] .legal-modal h2,
html[data-theme="dark"] .legal-modal h3 { color: var(--d-head); }
html[data-theme="dark"] .legal-modal p,
html[data-theme="dark"] .legal-modal li { color: var(--d-muted); }
html[data-theme="dark"] .legal-close { background: var(--d-card-2); color: var(--d-head); }
html[data-theme="dark"] .legal-close:hover { background: var(--d-border); }

/* --- Mega-Menü --- */
html[data-theme="dark"] .mega { background: var(--d-card); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .mega-intro { background: #0C1838; }
html[data-theme="dark"] .mega-links a:hover { background: var(--d-card-2); }
html[data-theme="dark"] .mega-title { color: var(--d-head); }
html[data-theme="dark"] .mega-desc { color: var(--d-muted); }
html[data-theme="dark"] .mega-title .badge-soon { background: rgba(201, 151, 43, 0.18); color: var(--gold-light); }

/* --- Unterseiten --- */
html[data-theme="dark"] body.subpage { background: var(--d-bg); color: var(--d-text); }
html[data-theme="dark"] .page-hero::after { background: var(--d-bg); }
html[data-theme="dark"] .page-hero.to-offwhite::after { background: var(--d-bg-alt); }
html[data-theme="dark"] .page-body.alt { background: var(--d-bg-alt); }
html[data-theme="dark"] .prose h2,
html[data-theme="dark"] .prose h3,
html[data-theme="dark"] .step-list .step-head,
html[data-theme="dark"] .faq summary,
html[data-theme="dark"] .fact-value,
html[data-theme="dark"] .plan-item h3,
html[data-theme="dark"] .doc-title,
html[data-theme="dark"] .prose .doc-title,
html[data-theme="dark"] .prose .where-card .where-place,
html[data-theme="dark"] .where-card .where-place { color: var(--d-head); }
html[data-theme="dark"] .prose p,
html[data-theme="dark"] .prose li,
html[data-theme="dark"] .fact-label,
html[data-theme="dark"] .doc-meta,
html[data-theme="dark"] .check-list label { color: var(--d-muted); }
html[data-theme="dark"] .prose a { color: var(--gold-light); }
html[data-theme="dark"] .prose strong,
html[data-theme="dark"] .check-list strong { color: var(--d-text); }
html[data-theme="dark"] .step-list li::before { background: var(--d-card-2); }
html[data-theme="dark"] .step-list li::after { background: var(--d-border); }
html[data-theme="dark"] .note { background: rgba(201, 151, 43, 0.12); }
html[data-theme="dark"] .note p { color: #E9D9AE; }
html[data-theme="dark"] .fact-row { background: var(--d-border); border-color: var(--d-border); }
html[data-theme="dark"] .fact,
html[data-theme="dark"] .plan-item,
html[data-theme="dark"] .doc-card,
html[data-theme="dark"] .where-card,
html[data-theme="dark"] .check-list label { background: var(--d-card); border-color: var(--d-border); }
html[data-theme="dark"] .check-list label:has(input:checked) { border-color: var(--gold); }
html[data-theme="dark"] .doc-icon { background: var(--d-card-2); }
html[data-theme="dark"] .doc-icon.muted { background: transparent; border-color: var(--d-border); color: var(--d-muted); }
html[data-theme="dark"] .faq details { border-bottom-color: var(--d-border); }
html[data-theme="dark"] .cta-band,
html[data-theme="dark"] .lesson-card { background: var(--d-card); border: 1px solid var(--d-border); }
html[data-theme="dark"] .lesson-card-visual { background: radial-gradient(ellipse at 50% 30%, #243c78 0%, var(--d-card) 75%); }

/* --- Lektion Binärzahlen --- */
html[data-theme="dark"] .lesson {
  --l-panel: #14234A; --l-ink: #F4F5F9; --l-muted: #A7AFC9; --l-line: #26385F;
  --l-amber-deep: #E8B84B; --l-glass: #22325E; --l-glass-edge: #4A5C8C;
  --l-ok: #6FD3A4; --l-warn: #F2B27A;
}
html[data-theme="dark"] .lesson .ctl.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); }
html[data-theme="dark"] .lesson .ctl.primary:hover { background: var(--gold-light); border-color: var(--gold-light); }
html[data-theme="dark"] .lesson ol.steps li::before { background: var(--d-card-2); }

/* Knöpfe innerhalb von Fließtext behalten ihre Farben */
.prose a.btn { text-decoration: none; }
.prose a.btn-gold,
html[data-theme="dark"] .prose a.btn-gold { color: var(--navy); }
.prose a.btn-gold:hover { color: var(--navy); }
html[data-theme="dark"] .preis-note-link { color: var(--gold-light); }
