/* Zukunftswerkstatt BSW — Shared Styles v2.5
   Design-Refresh: BSW-Farbpalette (Magenta/Orange/Akzent), Newsreader + Source Sans 3.
   Struktur und Klassen-Namen sind identisch zur v1-Version;
   es wurden ausschließlich Farb-, Font- und Akzent-Werte angepasst,
   sodass HTML- und JS-Code unverändert weiterlaufen.
   v2.2: Newsreader statt Fraunces.
   v2.3: IBM Plex Sans + Badge-Experiment.
   v2.4: Zurück zu Newsreader, SWP-Stil: Kapitel-Label oben, Medium-Gewicht,
         kleiner Magenta-Strichakzent unter der Headline.
   v2.5: Bugfixes: Headline-Separator hart im DOM (nicht CSS ::before),
         Comment-Panel ohne Border/Margin wenn geschlossen. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Source+Sans+3:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* ── BSW-Farbsystem ── */
  --bsw-magenta: #C41E68;
  --bsw-magenta-dark: #9A1854;
  --bsw-orange: #E84E1B;
  --bsw-akzent: #F5A623;
  --bsw-gradient: linear-gradient(90deg, #C41E68 0%, #E84E1B 50%, #F5A623 100%);
  --bsw-gradient-soft: linear-gradient(135deg, rgba(196,30,104,0.08) 0%, rgba(232,78,27,0.06) 50%, rgba(245,166,35,0.08) 100%);

  /* Legacy-Aliase — alle bisherigen Klassen referenzieren diese Namen weiter.
     Wir belegen sie neu mit Magenta/Orange/Akzent, damit kein HTML umgebaut
     werden muss. */
  --bsw-purple: var(--bsw-magenta);
  --bsw-purple-mid: var(--bsw-magenta-dark);
  --bsw-purple-light: #FCE6EE;
  --bsw-orange-light: #FFF0E8;

  /* Neutralflächen */
  --bg: #FFFFFF;
  --bg-alt: #F9F9F9;
  --text: #1A1A1A;
  --text-muted: #6B7280;
  --accent: var(--bsw-magenta);
  --accent-light: var(--bsw-purple-light);
  --border: #E5E7EB;
  --border-light: #EEF0F2;
  --source-bg: #F9F9F9;

  /* Typografie — Newsreader für Display, Source Sans 3 für Body. */
  --serif: 'Newsreader', 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --max-w: 780px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.05vw, 1.1rem);
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
}

/* ── Topbar ─────────────────────────────
   Weißer Hintergrund mit dezentem Shadow + 3px-Gradient-Strip unten,
   analog zum KDV-Header. */
.topbar {
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.7rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.topbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bsw-gradient);
}
.topbar a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s, color 0.15s;
}
.topbar a:hover { opacity: 1; color: var(--bsw-magenta); }

.version-badge {
  background: var(--bsw-gradient);
  color: #fff;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: 0.02em;
}

.action-buttons { display: flex; gap: 0.5rem; align-items: center; }
.topbar-btn {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.topbar-btn:hover {
  border-color: var(--bsw-magenta);
  color: var(--bsw-magenta);
  background: rgba(196,30,104,0.04);
}

/* ── Hero ── */
.hero {
  padding: 3rem var(--gutter) 2rem;
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  margin: 0 auto;
}
.hero .doc-type {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--bsw-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 500;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}
.hero .subtitle {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.75rem;
}
.meta-line {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.meta-line strong { font-weight: 600; color: var(--text); }

/* ── Content Container ── */
.content {
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

/* ── TOC ── */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}
.toc-title {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.toc ol { list-style: none; padding: 0; }
.toc li { margin-bottom: 0.3rem; }
.toc a {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.toc a:hover { color: var(--bsw-magenta); }
.toc .toc-l1 { margin-top: 0.9rem; }
.toc .toc-l1 a { font-weight: 700; font-size: 0.95rem; color: var(--bsw-magenta); }

/* ── Headings ── */
h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 1.85rem);
  font-weight: 500;
  color: var(--text);
  margin: 3rem 0 0.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  scroll-margin-top: 3.5rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-optical-sizing: auto;
  position: relative;
}
h2:first-of-type { border-top: none; padding-top: 0; }
h2.teil-header {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bsw-magenta);
  background: var(--bsw-gradient-soft);
  padding: 0.8rem 1.1rem;
  border-radius: 6px;
  border-left: 4px solid var(--bsw-magenta);
  margin-top: 3rem;
}
h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
  scroll-margin-top: 3.5rem;
  letter-spacing: -0.005em;
  font-optical-sizing: auto;
}
h4 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 1.25rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Kapitel-Label (SWP-/Bertelsmann-Stil) ──
   app.js wickelt Kapitel-Überschriften wie "A.4 EUDI-Wallet…" um. Resultat
   sieht im DOM so aus:

     <h2 id="a-4">
       <span class="h-num">
         <span class="h-num-number">A.4</span>
         <span class="h-num-teil">Beschlussvorlage</span>
       </span>
       EUDI-Wallet: Werkzeug des Bürgers, nicht Passierschein
     </h2>

   .h-num wird als Block über dem Titel gerendert. Unter dem H2 zeigt ein
   dünner Magenta-Strich (::after) als dezenter Abschluss. Bei Headlines
   ohne Label-Span (z. B. "Quellenverzeichnis") bleibt alles normal. */
.h-num {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.h-num-number {
  color: var(--bsw-magenta);
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.h-num-sep {
  color: var(--border);
  font-weight: 400;
}
.h-num-teil {
  color: var(--text-muted);
}
/* Dezenter 40px-Magenta-Strich unter Kapitel-Headlines */
h2:has(> .h-num)::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--bsw-magenta);
  margin-top: 1rem;
}
/* Fallback für Browser ohne :has() — h-num selbst bringt einen Strich mit.
   Wird nur sichtbar, wenn :has nicht greift. */
@supports not selector(:has(*)) {
  .h-num::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--bsw-magenta);
    margin-top: 0.3rem;
  }
}

/* ── Body Text ── */
p { margin-bottom: 0.95rem; }
strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }
a {
  color: var(--bsw-magenta);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
a:hover {
  color: var(--bsw-magenta-dark);
  text-decoration-thickness: 2px;
}
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

/* ── Footnotes ── */
sup.fn-ref a {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--bsw-orange);
  text-decoration: none;
  vertical-align: super;
  font-weight: 600;
}
sup.fn-ref a:hover { color: var(--bsw-magenta); }
.fn-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  max-width: 360px;
  width: max-content;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.fn-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
}
sup.fn-ref { position: relative; }
sup.fn-ref:hover .fn-tooltip { opacity: 1; }

/* ── Callout ── */
.callout {
  background: var(--bsw-orange-light);
  border-left: 4px solid var(--bsw-orange);
  border-radius: 0 8px 8px 0;
  padding: 1rem 2.75rem 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
}
.callout-label {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bsw-orange);
  margin-bottom: 0.35rem;
}

/* ── 11-Punkte ── */
.punkt {
  display: flex;
  gap: 0.9rem;
  padding: 0.85rem 2.5rem 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.25rem;
  position: relative;
}
.punkt-num {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--bsw-gradient);
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
  letter-spacing: 0;
}
.punkt-text { flex: 1; font-size: 0.95rem; }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.86rem;
}
th {
  background: var(--bsw-magenta);
  color: #fff;
  font-weight: 600;
  padding: 0.65rem 0.8rem;
  text-align: left;
  letter-spacing: 0.01em;
}
td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
tr:nth-child(even) td { background: var(--bg-alt); }
tr:last-child td { border-bottom: none; }

/* ── Stat Cards ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
}
.stat-card:hover {
  border-color: var(--bsw-magenta);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,30,104,0.08);
}
.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 700;
  color: var(--bsw-magenta);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-num.orange { color: var(--bsw-orange); }
.stat-num.red { color: #C62828; }
.stat-label {
  font-family: var(--sans);
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* ── Compare Box ── */
.compare-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 1.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-side { padding: 1.25rem 2.5rem 1.25rem 1.5rem; position: relative; }
.compare-side.bad {
  background: #FFF5F5;
  border-right: 1px solid var(--border);
}
.compare-side.good { background: #F0FAF0; }
.compare-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.compare-side.bad .compare-label { color: #C62828; }
.compare-side.good .compare-label { color: #2E7D32; }
.compare-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.compare-desc {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Stufen-Visual ── */
.stufen-visual {
  display: flex;
  gap: 0.9rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.stufe {
  flex: 1;
  min-width: 200px;
  border-radius: 10px;
  padding: 1.15rem 2.5rem 1.15rem 1.3rem;
  font-family: var(--sans);
  position: relative;
}
.stufe-1 { background: #E8F5E9; border-left: 4px solid #4CAF50; }
.stufe-2 { background: #FFF8E1; border-left: 4px solid #FFA000; }
.stufe-3 { background: #FFEBEE; border-left: 4px solid #C62828; }
.stufe-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.stufe-1 .stufe-num { color: #2E7D32; }
.stufe-2 .stufe-num { color: #E65100; }
.stufe-3 .stufe-num { color: #C62828; }
.stufe-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.stufe-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Section Divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0 1.75rem;
  color: var(--bsw-magenta);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Sources ── */
.sources {
  background: var(--source-bg);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
}
.sources h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  font-size: 1.25rem;
}
.sources ol {
  list-style: none;
  counter-reset: src-counter;
  padding-left: 0;
}
.sources li {
  counter-increment: src-counter;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 2.5rem;
  position: relative;
  line-height: 1.5;
  scroll-margin-top: 4rem;
}
.sources li::before {
  content: "[" counter(src-counter) "]";
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--bsw-orange);
  font-weight: 600;
  position: absolute;
  left: 0;
}
.sources li a {
  font-size: 0.78rem;
  word-break: break-all;
}

/* ── Glossary ── */
.glossary {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.glossary h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  font-size: 1.25rem;
}
.glossary dt {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bsw-magenta);
  margin-top: 0.85rem;
}
.glossary dd {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
  line-height: 1.5;
}

/* ── FAQ ── */
.faq-section {
  margin: 2.5rem 0;
  padding: 1.75rem 2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.faq-section h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  line-height: 1.4;
  transition: color 0.15s;
}
.faq-q:hover { color: var(--bsw-magenta); }
.faq-q .faq-arrow {
  font-size: 0.8rem;
  transition: transform 0.25s;
  color: var(--text-muted);
  flex-shrink: 0;
}
.faq-q.open .faq-arrow {
  transform: rotate(180deg);
  color: var(--bsw-magenta);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a.open { max-height: 800px; }
.faq-a-inner {
  padding: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.faq-a-inner strong { color: var(--text); }

/* ── Changelog ── */
.changelog {
  margin: 2rem 0;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}
.changelog-toggle {
  width: 100%;
  background: var(--bg-alt);
  border: none;
  padding: 0.95rem 1.3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
.changelog-toggle:hover {
  background: var(--bsw-purple-light);
  color: var(--bsw-magenta);
}
.changelog-toggle .arrow { transition: transform 0.25s ease; }
.changelog-toggle.open .arrow { transform: rotate(180deg); }
.changelog-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.changelog-body.open { max-height: 600px; }
.changelog-entries { padding: 1rem 1.3rem; }
.changelog-entry {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.25rem 0.8rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--sans);
  font-size: 0.86rem;
}
.changelog-entry:last-child { border-bottom: none; }
.cl-version {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bsw-magenta);
}
.cl-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.diff-section {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}
.diff-item {
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  margin-bottom: 0.3rem;
  border-radius: 5px;
  line-height: 1.4;
}
.diff-add {
  background: #E8F5E9;
  border-left: 3px solid #4CAF50;
  color: #2E7D32;
}
.diff-change {
  background: #FFF8E1;
  border-left: 3px solid #FFA000;
  color: #E65100;
}
.diff-label {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.4rem;
}

/* ── Password Overlay ── */
#pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  transition: opacity 0.4s ease;
}
#pw-overlay.hidden { opacity: 0; pointer-events: none; }
#pw-overlay h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-muted);
  border: none;
  padding: 0;
  margin: 0;
}
#pw-overlay input {
  font-family: var(--mono);
  font-size: 1rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  outline: none;
  width: 260px;
  text-align: center;
  transition: border-color 0.15s;
}
#pw-overlay input:focus { border-color: var(--bsw-magenta); }
#pw-overlay button {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 2rem;
  background: var(--bsw-gradient);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}
#pw-overlay button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.pw-error {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: #C62828;
  min-height: 1.2em;
}

/* ── Usage Guide ── */
.usage-guide {
  background: var(--bsw-gradient-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.6;
}
.usage-guide-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--bsw-magenta);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.01em;
}
.usage-guide-toggle .arrow {
  transition: transform 0.25s;
  font-size: 0.8rem;
}
.usage-guide-toggle.open .arrow { transform: rotate(180deg); }
.usage-guide-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.usage-guide-body.open { max-height: 500px; }
.usage-guide-content {
  padding-top: 0.85rem;
  color: var(--text-muted);
}
.usage-guide-content p { margin-bottom: 0.5rem; }
.guide-features {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.65rem;
  margin: 0.6rem 0;
  font-size: 0.84rem;
}
.guide-features .gf-icon {
  font-size: 1rem;
  line-height: 1.4;
}
.guide-features .gf-text { color: var(--text); }
.feedback-hint {
  margin-top: 0.8rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(196,30,104,0.12);
  font-size: 0.82rem;
}
.feedback-hint a {
  color: var(--bsw-magenta);
  font-weight: 600;
}

/* ── Sticky Section Indicator ──
   Nach wie vor eine Top-Leiste. Farbschema von dunkellila
   auf den BSW-Magenta-Gradient umgestellt. */
.section-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(26,26,26,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8rem;
  padding: 0.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9998;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.section-indicator::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--bsw-gradient);
}
.section-indicator.visible { transform: translateY(0); }
.section-indicator .si-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
}
.si-teil {
  font-weight: 700;
  color: var(--bsw-akzent);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.si-sep { color: rgba(255,255,255,0.4); }
.si-section {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}
.si-nav { display: flex; gap: 0.4rem; }
.si-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.si-btn:hover { background: rgba(255,255,255,0.25); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 5rem;
  right: 2rem;
  background: var(--text);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Footer ──
   Dokument-Footer: weißer Hintergrund, dezent.
   Die eigentliche Hub-Landing hat einen dunklen Footer (separat im index.html). */
.footer {
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Back-to-Top (per JS injiziert, hier nur Farbangleichung) ── */
#back-top {
  background: var(--bsw-gradient) !important;
}

/* ── Progress-Bar oben (per JS injiziert) ── */
#progress-bar {
  background: var(--bsw-gradient) !important;
}

/* ── Print ── */
@media print {
  .topbar, .toc, .changelog, #pw-overlay, #back-top, #progress-bar,
  .comment-trigger, .comment-panel, .action-buttons, .toast,
  .section-indicator, .usage-guide, .faq-section,
  .para-comment-trigger { display: none !important; }
  body { font-size: 10pt; background: #fff; }
  h1, h2, h3 { break-after: avoid; color: #000; }
  .callout, .punkt, .sources, .stat-card { break-inside: avoid; }
  a { color: var(--text); text-decoration: none; }
  .hero h1 em,
  .hero .doc-type,
  .logo-url {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text) !important;
  }
  .h-num-number { color: #000 !important; }
  .h-num-teil { color: #000 !important; }
  h2:has(> .h-num)::after { background: #000 !important; }
}

@media (max-width: 600px) {
  .compare-box { grid-template-columns: 1fr; }
  .compare-side.bad {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .meta-line { flex-direction: column; gap: 0.35rem; }
  .changelog-entry { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0.6rem 1rem; font-size: 0.78rem; }
  .topbar-btn { padding: 0.25rem 0.55rem; font-size: 0.7rem; }
}
