/* ==========================================================================
   KlimaGG-Web — style.css
   --------------------------------------------------------------------------
   Version:        v1.0.12
   Rolle:          Globales Stylesheet (Landing + App/Entwurfsbereich)
   DOM/API-Hooks:  Kompatibel zu /static/script.js (Toggles, TOC, Panels, Log,
                  Kommentar-Panel, Stimmungsbild)
   FEATURES_v09:   - juristisch2 (Rechtsverordnungen) sichtbar & togglebar
                  - TOC Mood/Mehrheit/Indicator
                  - Kommentare/Log/Review-Boxen als “ruhige” UI
   ========================================================================== */

:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #eef3fb;
  --color-primary: #155e79;
  --color-primary-soft: #d6e5f6;
  --color-accent: #f59e0b;
  --color-muted: #6b7280;
  --color-border: #d1d5db;
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.12);
  --radius-lg: 18px;
  --radius-pill: 999px;
  --max-width: 1100px;
  --mood-ppp: #16a34a;
  --mood-plus: #4ade80;
  --mood-o: #f1c40f;
  --mood-minus: #fb923c;
  --mood-mmm: #ef4444;
  
  /* Sticky-Header / Anker-Offset (wird zusätzlich in /static/script.js dynamisch gesetzt) */
  --sticky-header-offset: 84px;
}

/* Base */
* { box-sizing: border-box; }
html {
  font-size: 17px;
  /* verhindert Layout-Zittern durch wechselnde Scrollbar-Breiten */
  scrollbar-gutter: stable;
  
  /* Anchor-Jumps berücksichtigen den sticky Header */
  scroll-padding-top: calc(var(--sticky-header-offset) + 14px);
}

/* Zusätzliche Robustheit: wenn direkt auf IDs gesprungen wird, bleibt der Titel sichtbar */
section[id], article[id], h1[id], h2[id], h3[id], h4[id], h5[id] {
  scroll-margin-top: calc(var(--sticky-header-offset) + 14px);
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #e3f2ff, #f5f7fb);
  color: #0f172a;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding: 0 0 3rem; }
section { padding: 2rem 0 1rem; }
section + section { border-top: 1px solid rgba(209, 213, 219, 0.5); }

.shell { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.shell-wide { max-width: 1620px; margin: 0 auto; padding: 0 1.5rem; }

.klein { font-size: 0.86rem; color: var(--color-muted); }
.hint { color: var(--color-muted); line-height: 1.45; }
.hidden { display: none !important; }

.divider {
  height: 1px;
  background: rgba(209, 213, 219, 0.75);
  border-radius: 999px;
  margin: 0.45rem 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: linear-gradient(
    to bottom,
    rgba(245, 247, 251, 0.96),
    rgba(245, 247, 251, 0.85),
    rgba(245, 247, 251, 0.0)
  );
  border-bottom: 1px solid rgba(209, 213, 219, 0.3);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1.5rem;
}
.logo-group { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.logo-group:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px;
  background: conic-gradient(from 210deg,#22c55e,#22c55e,#eab308,#f97316,#ef4444);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.04);
}
.logo-mark span {
  background: #ffffffdd;
  width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: var(--color-primary);
  text-shadow: 0 0 0.7px currentColor; /* „ein Pixel mehr“ */
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text-main {
  font-weight: 700;
  letter-spacing: 0.10em;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--color-primary);
  text-shadow: 0 0 0.7px currentColor; /* „ein Pixel mehr“ */
}
.logo-text-sub { font-size: 0.8rem; color: var(--color-muted); }

.nav-links {
  display: flex; gap: 0.9rem; align-items: center;
  font-size: 0.95rem; color: var(--color-muted);
}
.nav-links a {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: rgba(209, 213, 219, 0.3); text-decoration: none; }
.nav-links a.is-active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.nav-cta { display: flex; align-items: center; gap: 0.5rem; }

/* Dropdown „Über uns“ (ohne JS) */
.nav-dd { position: relative; }
.nav-dd summary { list-style: none; }
.nav-dd summary::-webkit-details-marker { display: none; }

.nav-dd-summary{
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dd-summary::after{
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.9em;
  opacity: 0.75;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav-dd-summary:hover { background: rgba(209, 213, 219, 0.3); }
.nav-dd-summary:focus-visible{
  outline: 2px solid rgba(59, 130, 246, 0.55);
  outline-offset: 2px;
}
.nav-dd[open] .nav-dd-summary{
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.nav-dd[open] .nav-dd-summary::after{
  transform: rotate(180deg);
  opacity: 0.9;
}

.nav-dd-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 320px;
  border-radius: 16px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  padding: 0.5rem;
  display: grid;
  gap: 0.25rem;
  z-index: 50;
}

.nav-dd-menu a{
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  display: grid;
  gap: 0.15rem;
  color: #111827;
}
.nav-dd-menu a:hover{ background: rgba(209,213,219,0.25); text-decoration:none; }
.nav-dd-menu a:focus-visible{
  outline: 2px solid rgba(59, 130, 246, 0.45);
  outline-offset: 2px;
}

.nav-dd-title{ font-weight: 600; }
.nav-dd-desc{ font-size: 0.82rem; color: var(--color-muted); }
 
/* Buttons (ruhiger, weniger „Fett“) */
.btn {
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #0f766e, var(--color-primary));
  color: #fff;
  box-shadow: 0 10px 22px rgba(21, 94, 117, 0.32);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-ghost {
  background: #ffffff;
  color: var(--color-primary);
  border-color: rgba(148, 163, 184, 0.7);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.9); }
.btn-full { width: 100%; }

/* Kompakte Button-Variante (z.B. in Dialogen) */
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.86rem;
}

/* Unified async states (F22): loading / empty / error / retry */
.klimagg-state{
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}
.klimagg-state-icon{ font-size: 1.1rem; line-height: 1.1; margin-top: 0.05rem; }
.klimagg-state-msg{ color: var(--color-muted); }
.klimagg-state-actions{ margin-top: 0.5rem; }
.klimagg-state-loading{ border-color: rgba(15, 118, 110, 0.25); }
.klimagg-state-error{ border-color: rgba(180, 35, 24, 0.35); }
.review-state{ margin-bottom: 0.6rem; }

/* Inputs: Fokus sichtbar, ohne “shouting” */
textarea:focus, input:focus, select:focus { outline: none; }
textarea:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(21, 94, 121, 0.18);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Modal (Login) */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}
.modal{
  width: min(620px, 100%);
  background: var(--color-surface);
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}
.modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.modal-title{ margin: 0; font-size: 1.15rem; }
.modal-sub{ margin: 0.1rem 0 0; }
.modal-x{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(245,247,251,0.9);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.modal-form{ display: grid; gap: 12px; }
.field{ display: grid; gap: 6px; }
.field-label{ font-size: 0.86rem; color: var(--color-muted); }
.field-input{
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(209, 213, 219, 0.95);
  background: #fff;
  font-size: 0.98rem;
}
.row-2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px){
  .row-2{ grid-template-columns: 1fr; }
}
.pseudonym-box{
  background: rgba(238, 243, 251, 0.7);
  border-radius: 16px;
  padding: 12px;
}
.pseudonym-head{ display:flex; align-items:flex-start; justify-content:space-between; gap: 12px; }
.pseudonym-title{ font-weight: 600; }
.suggestion-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
@media (max-width: 620px){
  .suggestion-grid{ grid-template-columns: 1fr; }
}
.suggestion-btn{
  border-radius: 14px;
  border: 1px solid rgba(209, 213, 219, 0.95);
  background: #fff;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  text-align: left;
}
.suggestion-btn:hover{ background: rgba(245, 247, 251, 0.95); }
.suggestion-btn.is-selected{
  border-color: rgba(21, 94, 121, 0.45);
  box-shadow: 0 0 0 3px rgba(21, 94, 121, 0.12);
}
.modal-actions{ display:flex; justify-content:flex-end; gap: 10px; margin-top: 2px; }

/* Hero */
.hero { padding: 2.8rem 0 1.6rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 2.2rem;
  align-items: center;
}
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.7rem;
}
.hero-title {
  font-size: clamp(2.2rem, 3.2vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.7rem;
  font-weight: 600;
}
.hero-title span.highlight {
  background: linear-gradient(120deg, #22c55e, #eab308, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}
.hero-title-sub{
  display:block;
  margin-top: 0.35rem;
  font-size: 0.62em;
  font-weight: 600;
  color: #111827; /* explizit schwarz */
}
.hero-claim {
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 34rem;
  margin-bottom: 1.3rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.1rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.88rem; color: var(--color-muted); }
.hero-meta-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(209, 213, 219, 0.8);
}
.hero-meta-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.2);
}
.hero-panel {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(209, 213, 219, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.hero-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }
.hero-panel-title { font-size: 0.96rem; font-weight: 600; }
.hero-panel-sub { font-size: 0.82rem; color: var(--color-muted); }
.chip {
  font-size: 0.78rem;
  padding: 0.18rem 0.7rem;
  border-radius: var(--radius-pill);
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.chip-beta {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fdba74;
}
.stats-row { display: flex; gap: 0.8rem; }
.stat-card {
  flex: 1;
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
  background: var(--color-surface-alt);
  border: 1px solid rgba(209, 213, 219, 0.9);
}
.stat-label { font-size: 0.78rem; color: var(--color-muted); margin-bottom: 0.15rem; }
.stat-value { font-size: 1.1rem; font-weight: 600; }
.stat-trend { font-size: 0.8rem; color: #16a34a; }

.donut-wrap{ display:flex; align-items:center; gap:0.8rem; }

/* Startseite: neue, kompakte Projekt-Statistik (v1.0.11+) */
.project-stats-header { align-items: flex-start; }
.project-stats-left { display: flex; flex-direction: column; gap: 0.2rem; }
.project-stats-right { text-align: right; display: flex; flex-direction: column; gap: 0.15rem; }
.project-stats-status { font-size: 0.82rem; color: var(--color-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.project-stats-top {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.project-kpi-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.22rem; /* enger */
  flex: 1;
}

.project-kpi-list li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem; /* ~20% weniger als vorher */
}

.kpi-label {
  font-size: 0.84rem;
  color: var(--color-muted);
  flex: 0 0 6.2rem; /* weniger "auseinandergezogen", wirkt kompakter */
}
.kpi-value {
  font-weight: 650;
  color: #16a34a; /* leicht grün */
  flex: 1 1 auto;
  text-align: right;
}

.project-stats-mood {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.donut-wrap-compact { gap: 0.25rem; }

.project-stats-chart { margin-top: 0.1rem; }
.project-stats-chart .chart-placeholder {
  height: 140px;
  padding: 0.35rem 0.45rem 0.55rem;
}

/* Startseiten-Chart: SVG zentrieren */
.project-stats-chart svg[data-chart="project-series"] {
  display: block;
  margin: 0 auto;
}
.project-stats-chart .chart-caption {
  position: static;
  margin-top: 0.35rem;
  background: transparent;
  padding: 0;
}
/* Startseiten-Chart: Caption nicht nutzen */
.project-stats-chart .chart-caption:empty {
  display: none;
}
.project-stats-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.55rem; /* Emojis etwas weiter nach unten */
}

/* Ein gemeinsamer Button-Strip */
.project-series-buttons {
  display: flex;
  gap: 0.28rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Projekt-Statistik: Filter-Icons kleiner + runder (nur scoped) */
#project-series-buttons .article-vote-btn,
#project-series-buttons .article-flag-btn {
  font-size: 0.92rem;          /* kleiner, passt in eine Reihe */
  line-height: 1;
  padding: 0.22rem 0.38rem;    /* kleinere "Boxen" */
  border-radius: 999px;        /* runder */
  min-width: 2.0rem;
}

.donut-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transform: translate(10px, 10px);
  max-width: min(260px, 80vw);
}

/* „Mehr Statistik“: standardmäßig eingeklappt, damit die Hero-Box kompakt bleibt */
.stats-more{ margin-top: 0.1rem; }
.stats-more > summary{ cursor:pointer; list-style:none; user-select:none; }
.stats-more > summary::-webkit-details-marker{ display:none; }
.stats-more > summary::after{
  content: "▾";
  margin-left: 0.35rem;
  opacity: 0.75;
  display:inline-block;
  transform: translateY(-1px);
  transition: transform 0.15s ease;
}
.stats-more[open] > summary::after{ transform: rotate(180deg) translateY(1px); }

.chart-placeholder {
  margin-top: 0.3rem;
  border-radius: 12px;
  background: radial-gradient(circle at top left, #e5f3ff, #eef2ff);
  border: 1px dashed rgba(148, 163, 184, 0.9);
  height: 90px;
  position: relative;
  overflow: hidden;
}
.chart-caption {
  position: absolute;
  bottom: 6px;
  left: 10px;
  font-size: 0.78rem;
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.86);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

/* Section headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.section-title { font-size: 1.4rem; font-weight: 600; margin: 0; }
.section-sub {
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 28rem;
  margin: 0.2rem 0 0;
}
.section-actions { font-size: 0.85rem; color: var(--color-muted); }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.3rem;
  align-items: flex-start;
}
.news-list { display: flex; flex-direction: column; gap: 0.7rem; }
.news-side {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: var(--color-surface-alt);
  border: 1px solid rgba(209, 213, 219, 0.9);
  font-size: 0.9rem;
  color: var(--color-muted);
}
.news-side h4 { margin: 0 0 0.4rem; font-size: 0.98rem; color: #111827; }

/* Einstieg-Teaser (manuelle Textbox) */
#einstieg.entry-teaser{
  padding: 1.6rem 0 0.8rem; /* kompakter Block */
  border-top: none;
}
.entry-card{
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.entry-snippet{
  color: rgba(21, 128, 61, 0.92);
  line-height: 1.65;
  font-size: 1.02rem;
}
.entry-snippet p{ margin: 0 0 0.55rem; }
.entry-snippet p:last-child{ margin-bottom: 0; }
.entry-actions{
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Roadmap (Split: links Phasen, rechts Details) */
.roadmap-split{
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: start;
}
.roadmap-phase-list{
  display: grid;
  gap: 0.6rem;
}
.roadmap-phase-btn{
  text-align: left;
  width: 100%;
  border-radius: 16px;
  background: rgba(241,245,249,0.96);
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.roadmap-phase-btn:hover{
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}
.roadmap-phase-btn.is-active{
  background: rgba(226,232,240,0.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  border-color: rgba(21, 94, 121, 0.30);
}
.rp-top{ display:flex; justify-content: space-between; gap: 0.6rem; align-items: center; margin-bottom: 0.25rem; }
.rp-left{ display:flex; align-items:center; gap: 0.55rem; }
.rp-state{ width: 10px; height: 10px; border-radius: 999px; display:inline-block; }
.rp-state-now{ background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.16); }
.rp-state-next{ background: transparent; border: 2px solid rgba(22,163,74,0.85); }
.rp-badge{
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.rp-tag{
  font-size: 0.78rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgba(21,94,121,0.10);
  color: #0f172a;
  border: 1px solid rgba(21,94,121,0.18);
}
.rp-title{ font-weight: 600; color: #111827; margin-bottom: 0.15rem; }
.rp-sub{ color: var(--color-muted); font-size: 0.92rem; line-height: 1.35; }

.roadmap-detail-box{
  border-radius: 18px;
  background: var(--color-surface);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
  padding: 1rem 1.1rem;
}
.rd-head{ margin-bottom: 0.7rem; }
.rd-title{ font-weight: 700; color: #111827; font-size: 1.02rem; }
.rd-goal{ color: var(--color-muted); font-size: 0.92rem; margin-top: 0.2rem; line-height: 1.45; }
.rd-section{ margin-top: 0.85rem; }
.rd-section h4{ margin: 0 0 0.35rem; font-size: 0.98rem; }
.rd-section p{ margin: 0; color: #111827; line-height: 1.5; }
.rd-section ul{ margin: 0.4rem 0 0; padding-left: 1.1rem; color: #111827; }
.rd-section li{ margin: 0.25rem 0; color: #111827; }

/* Varianten (A/B) */
.divider.divider-spaced{ margin: 1.15rem 0 1.0rem; opacity: 0.9; }
.variant-label-row{ display:flex; gap: 0.6rem; align-items:center; margin: 0.2rem 0 0.75rem; }
.variant-pill{ font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.18rem 0.55rem; border-radius: 999px; background: rgba(15,23,42,0.06); border: 1px solid rgba(148,163,184,0.55); color: #0f172a; }
.variant-text{ font-size: 0.9rem; color: var(--color-muted); }
.variant-title{ margin: 0 0 0.7rem; font-size: 1.08rem; font-weight: 700; color: #111827; }

/* Roadmap Variante B (horizontal) */
.roadmap-horizontal{ display:grid; gap: 0.75rem; }
.roadmap-phase-row{ display:flex; flex-wrap: wrap; gap: 0.55rem; align-items:center; }
.roadmap-phase-chip{ border-radius: 999px; padding: 0.4rem 0.7rem; border: 1px solid rgba(209,213,219,0.9); background: rgba(241,245,249,0.96); cursor: pointer; display:flex; align-items:center; gap: 0.5rem; }
.roadmap-phase-chip.is-active{ background: rgba(226,232,240,0.96); border-color: rgba(21,94,121,0.30); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06); }
.roadmap-phase-chip:hover{ box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06); }
.rp-sep{ color: var(--color-muted); opacity: 0.9; }

/* Mitmachen – größere Karten mit Icon/Title/Motivation */
.join-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.join-card{
  border-radius: 18px;
  padding: 1.05rem 1.1rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  min-height: 138px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 0.35rem;
}
.join-icon{ font-size: 1.6rem; line-height: 1; }
.join-title{ font-weight: 700; color: #111827; }
.join-sub{ color: var(--color-muted); font-size: 0.92rem; line-height: 1.4; }

/* Mitmachen Variante B (6 Quadrate) */
.join-grid-row{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
.join-card-square{ aspect-ratio: 1 / 1; min-height: 150px; }
.join-card-centered{ text-align: center; justify-items: center; align-content: center; grid-template-rows: auto auto auto; }
.join-card-centered .join-icon{ font-size: 1.9rem; }

/* Unterstützer:innen & Partner */
.supporter-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.supporter-card{
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  display:flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.supporter-letter{
  width: 40px; height: 40px;
  border-radius: 14px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid rgba(21,94,121,0.18);
  font-weight: 800;
  display:flex; align-items:center; justify-content:center;
  flex: 0 0 auto;
}
.supporter-title{ font-weight: 700; color: #111827; margin-bottom: 0.15rem; }
.supporter-sub{ color: var(--color-muted); font-size: 0.92rem; line-height: 1.4; }

/* Unterstützer Variante B (6 Quadrate, zentriert) */
.supporter-grid-row{ grid-template-columns: repeat(6, minmax(0, 1fr)); }
.supporter-card-square{ aspect-ratio: 1 / 1; min-height: 160px; padding: 1.05rem 0.95rem; }
.supporter-card-centered{ flex-direction: column; align-items: center; text-align: center; gap: 0.55rem; }
.supporter-letter-lg{ width: 52px; height: 52px; border-radius: 16px; font-size: 1.1rem; }

/* Entwurf section background */
#entwurf {
  padding: 3rem 0 3rem;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

/* Entwurf: volle Breite (zwischen Sidebars), ohne die "doppelte" Card-Hierarchie */
#entwurf .shell-wide.shell-draft{
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0; /* Padding übernimmt #draft-layout dynamisch */
}

/* Entwurf: große Umrandungs-Box deaktivieren (aber Container behalten) */
#entwurf .law-surface.law-surface-flat{
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* Center law surface */
.law-surface {
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(209, 213, 219, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
  padding: 1.2rem 1.3rem;
}

/* App-rendered articles (script.js) – ruhig + lesbar */
#articles-container article {
  border-radius: 16px;
  background: var(--color-surface);
  border: 1px solid rgba(209, 213, 219, 0.9);
  border-left-width: 6px;        /* Stimmungsbild: script.js setzt nur die Farbe */
  border-left-style: solid;
  border-left-color: rgba(209, 213, 219, 0.75);
  padding: 1rem clamp(1rem, 2.5vw, 1.6rem);
  margin: 0 0 0.9rem;
}
#articles-container article h2 {
  margin: 0 0 0.6rem;
  font-size: 2.05rem; /* vorher 1.1rem – Nutzerwunsch: ~doppelt so groß */
  font-weight: 700;
  line-height: 1.12;
  color: #111827;
}

/* Textblöcke: weniger "Boxen" (Einleitung kursiv + grünlich; Anmerkung als helle, randlose Warnbox) */
.einleitung, .juristisch, .juristisch2{
  margin: 0.65rem 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  line-height: 1.65;
}
.einleitung{
  font-style: italic;
  color: rgba(21, 128, 61, 0.92); /* leicht Richtung Grün, nicht hart */
}
.juristisch, .juristisch2{
  color: #111827;
}
.anmerkung{
  margin: 0.85rem 0 0.65rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.16); /* gelb/orange, hell */
  border: 0;
  color: rgba(55, 65, 81, 0.95);
  line-height: 1.6;
}

.article-interactions {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.article-vote-buttons, .article-flag-buttons { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.article-vote-btn, .article-flag-btn, .article-comment-btn {
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
.article-vote-btn.active {
  background: rgba(21, 94, 121, 0.12);
  border-color: rgba(21, 94, 121, 0.35);
}
.article-flag-btn.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}
.article-vote-summary { font-size: 0.88rem; color: var(--color-muted); margin-top: 0.35rem; }

/* Comments toggle (minimal) */
.article-comments { margin-top: 0.7rem; }
.article-comments-toggle {
  border: 0;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 500;
}
.article-comments-list {
  margin-top: 0.5rem;
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: var(--color-surface-alt);
  border: 1px solid rgba(209, 213, 219, 0.85);
}

/* Kommentar-Karten innerhalb der Artikel-Liste (script.js) */
.article-comment {
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(209,213,219,0.75);
  padding: 0.65rem 0.75rem;
  margin: 0.55rem 0;
}

.article-comment-status {
  font-size: 0.78rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #92400e;
}
.article-comment-proposal { color: #111827; line-height: 1.5; }
.article-comment-author { color: var(--color-muted); font-size: 0.86rem; }
.article-comment-sources a { word-break: break-word; }

/* Footer */
footer {
  border-top: 1px solid rgba(209, 213, 219, 0.7);
  background: rgba(248, 250, 252, 0.95);
  padding: 1.4rem 0;
  font-size: 0.86rem;
  color: var(--color-muted);
  margin-top: 1rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.footer-links a { color: var(--color-muted); }

:root{
  --sidebar-gap-top: 14px;
  --sidebar-gap-bottom: 14px;
  --sidebar-hidden-y: 6px;
  --panel-handle-w: 34px;
  --panel-handle-h: 46vh;
  --panel-handle-gap: 10px;
}

/* Startseite: Sidebars nur durch Nutzer-Interaktion sichtbar (kein Scroll-Auto) */
body[data-page="home"] .app-sidebar{
  --sb-y: var(--sidebar-hidden-y);
  opacity: 0;
  pointer-events: none;
}
body.sidebars-manual-on .app-sidebar{
  --sb-y: 0px;
  opacity: 1;
  pointer-events: auto;
}

/* ===== App Sidebars (quiet, not shouting) ===== */
.app-sidebar {
  --sb-x: 0px;
  --sb-y: 0px;
  position: fixed;
  top: calc(72px + var(--sidebar-gap-top));
  bottom: calc(18px + var(--sidebar-gap-bottom));
  width: 300px;
  z-index: 30;
  display: flex;
  transform: translate3d(var(--sb-x), var(--sb-y), 0);
  transition: opacity 0.18s ease, transform 0.22s ease;
}
.app-left { left: 14px; }
.app-right { right: 14px; width: 360px; }
 
/* In der rechten Sidebar: Vorschlagsliste lieber 1-spaltig (bessere Lesbarkeit) */
#user-panel .row-2{ grid-template-columns: 1fr; }
#user-panel .suggestion-grid{ grid-template-columns: 1fr; }
#user-panel .suggestion-btn{ white-space: normal; }

.app-panel {
  width: 100%;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(209, 213, 219, 0.95);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  overflow-x: hidden; /* kein horizontales Scrollen in Sidebars */
}
.app-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}
.app-panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}
.app-panel-header small { color: var(--color-muted); }
.panel-subtitle { color: var(--color-muted); }

.app-details > summary{
  cursor: pointer;
  color: #111827;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  list-style: none;
}
.app-details > summary::-webkit-details-marker{ display:none; }
.app-details > summary::marker{ content: ""; }
.app-details > summary::after{
  content: "▾";
  opacity: 0.65;
  transition: transform 0.14s ease;
  transform: rotate(0deg);
}
.app-details:not([open]) > summary::after{ transform: rotate(-90deg); }
.app-details-body { margin-top: 0.6rem; display: grid; gap: 0.4rem; }
.checkrow { display: flex; gap: 0.5rem; align-items: center; color: #4b5563; font-size: 0.95rem; }


/* Toggle-Chips (Navigation) */
.toggle-row{ display:flex; flex-wrap:wrap; gap: 0.35rem; }
.toggle-chip{ display:inline-flex; }
.toggle-chip input{ position:absolute; opacity:0; pointer-events:none; }
.toggle-chip span{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 0.26rem 0.55rem;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.90);
  background: rgba(255,255,255,0.0);
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.15;
}
.toggle-chip span:hover{ background: rgba(15,23,42,0.04); }
.toggle-chip input:checked + span{
  border-style: solid;
  border-color: rgba(21, 94, 121, 0.55);
  background: rgba(21, 94, 121, 0.10);
  color: #0f172a;
}
.toggle-chip input:focus-visible + span{ outline: 3px solid rgba(21,94,121,0.25); outline-offset: 2px; }

.toggle-chip-btn{
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.90);
  background: transparent;
  color: #334155;
  padding: 0.26rem 0.55rem;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.15;
  cursor: pointer;
}
.toggle-chip-btn:hover{ background: rgba(15,23,42,0.04); }
.toggle-chip-btn.is-on{
  border-style: solid;
  border-color: rgba(21, 94, 121, 0.55);
  background: rgba(21, 94, 121, 0.10);
  color: #0f172a;
}
.toggle-chip-btn.is-disabled{ opacity: 0.55; cursor: not-allowed; }

.nav-block{ display:grid; gap: 0.35rem; }
.nav-block + .nav-block{ margin-top: 0.15rem; }
.user-toggle-row{ margin-top: 0.35rem; }

/* Mood Overview */
body.mood-overview-off .toc-vote-indicator,
body.mood-overview-off .toc-majority-emoji{ display:none; }
body.mood-overview-off #mood-overview-panel{ display:none; }
body.mood-overview-off #articles-container article{
  border-left-color: rgba(209, 213, 219, 0.75) !important;
}

.mood-chart{ display:grid; place-items:center; padding: 0.35rem 0.1rem 0.15rem; }
.mood-chart svg{ width: 100%; max-width: 280px; height: auto; display:block; }
.mood-legend{ display:none !important; }
#mood-chart svg circle{ cursor: help; }
/* Optional: Tooltips besser “treffen” */
#mood-chart svg circle{
  pointer-events: stroke;
}
.mood-legend{ display:grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 0.65rem; margin-top: 0.25rem; }
.mood-legend-item{ display:flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.86rem; color: #334155; }
.mood-legend-left{ display:flex; align-items:center; gap: 0.4rem; }
.mood-legend-dot{ width: 10px; height: 10px; border-radius: 999px; background: rgba(148,163,184,0.8); flex: 0 0 auto; }
.mood-legend-dot.m-ppp{ background: var(--mood-ppp); }
.mood-legend-dot.m-plus{ background: var(--mood-plus); }
.mood-legend-dot.m-o{ background: var(--mood-o); }
.mood-legend-dot.m-minus{ background: var(--mood-minus); }
.mood-legend-dot.m-mmm{ background: var(--mood-mmm); }
.mood-center{ font-size: 0.92rem; fill: #0f172a; font-weight: 650; }
.mood-center-sub{ font-size: 0.72rem; fill: rgba(107,114,128,0.95); }


/* Navigation-Toggles (Anzeige) – wie „gerahmte Texte“ mit On-State
   - Default: gestrichelter Rand, sehr helle Fläche
   - On: dunkler + Rand durchgehend
   (Nur dort, wo index.html die Klasse .nav-toggle setzt.) */
.nav-toggle{
  position: relative;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15, 23, 42, 0.86);
  cursor: pointer;
  user-select: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

/* Checkbox unsichtbar – die ganze Box ist der Toggle */
.nav-toggle > input[type="checkbox"]{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

/* Fokus (Keyboard) */
.nav-toggle:focus-within{
  outline: 2px solid rgba(21, 94, 121, 0.35);
  outline-offset: 2px;
}

/* On-State: robust via JS-Klasse, zusätzlich :has() als „selbstheilend“ */
.nav-toggle.is-on,
.nav-toggle:has(input[type="checkbox"]:checked){
  border-style: solid;
  border-color: rgba(21, 94, 121, 0.52);
  background: rgba(21, 94, 121, 0.09);
  color: rgba(15, 23, 42, 0.92);
}

.nav-toggle:hover{
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(100, 116, 139, 0.9);
}

/* Layout-Block (Wikipedia-ähnlich): Schriftgröße klein/mittel/groß
   - groß ist bewusst (noch) deaktiviert
   - UI-State wird per JS (script.js) via .is-active + body.ui-font-small gesetzt
*/
.layout-block{ margin-top: 0.15rem; }
.layout-block .hint{ margin: 0; }
.layout-seg{
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.seg-btn{
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15, 23, 42, 0.88);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.seg-btn:hover{
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(100, 116, 139, 0.9);
}
.seg-btn.is-active{
  border-style: solid;
  border-color: rgba(21, 94, 121, 0.52);
  background: rgba(21, 94, 121, 0.09);
  color: rgba(15, 23, 42, 0.92);
}
.seg-btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

/* Schriftgröße: klein – Ziel: mehr Übersicht (v.a. Entwurf + TOC + Sidebars) */
body.ui-font-small .app-panel{ font-size: 0.94rem; }
body.ui-font-small .app-toc{ font-size: 0.92rem; }
body.ui-font-small #articles-container{ font-size: 0.94rem; }
body.ui-font-small #articles-container article{ padding: 0.9rem clamp(0.9rem, 2.2vw, 1.45rem); }
body.ui-font-small #articles-container article h2{ font-size: 1.75rem; font-weight: 700; line-height: 1.12; }
body.ui-font-small .einleitung,
body.ui-font-small .juristisch,
body.ui-font-small .juristisch2,
body.ui-font-small .anmerkung{
  line-height: 1.58;
}
body.ui-font-small .article-vote-btn,
body.ui-font-small .article-flag-btn,
body.ui-font-small .article-comment-btn{
  font-size: 0.9rem;
}

.app-toc { margin: 0; padding-left: 1.1rem; width: 100%; }
.app-toc li {
  margin: 0.25rem 0;
  color: #4b5563;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.25;
  min-width: 0; /* wichtig für Ellipsis in flex */
  width: 100%;
  max-width: 100%;
  position: relative;
}
.app-toc li a {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap; /* Titel kürzen, damit Emojis rechts passen */
  display: block;
}
.toc-majority-emoji,
.toc-personal-mood,
.toc-bookmark{
  flex: 0 0 auto;
  white-space: nowrap;
}
.toc-vote-indicator {
  /* Balken statt Kreis – analog zum linken Artikel-Rand (v1.0.9) */
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: rgba(209, 213, 219, 0.9);
  margin-top: 0.18rem;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.03);
}

.toc-bookmark.toc-bookmark-bar{
  margin-top: 0.12rem;
  opacity: 0.95;
}
.toc-bookmark.toc-bookmark-title{
  margin-top: 0.18rem;
  opacity: 0.95;
}
.toc-majority-emoji { margin-left: 0.15rem; opacity: 0.85; }
/* Bookmark (🚩) soll vor Streifen+Text erscheinen, ohne Einrückung zu verändern */
.toc-bookmark {
  position: absolute;
  left: -1.15rem;
  top: 0.05rem;
  margin-top: 0;
  opacity: 0.9;
  pointer-events: none;
}
.toc-personal-mood {
  margin-left: 0.25rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}
body.toc-personal-mood-off .toc-personal-mood { display: none; }
body.toc-personal-mood-off .toc-bookmark { display: none; }

.app-mutedbox {
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: var(--color-surface-alt);
  border: 1px solid rgba(209, 213, 219, 0.85);
  color: #4b5563;
}

textarea, input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.7);
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: rgba(255,255,255,0.95);
}

/* Form helpers (index.html comment panel) */
.field { display: grid; gap: 0.25rem; margin-top: 0.6rem; }
.input, .textarea { width: 100%; }
.textarea { resize: vertical; min-height: 44px; }

/* User Log */
.user-log-list { display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.user-log-entry {
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(209,213,219,0.75);
  padding: 0.7rem 0.8rem;
}
.user-log-entry-header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}
.user-log-entry-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.user-log-entry-date { font-size: 0.82rem; color: var(--color-muted); }
.user-log-entry-text { color: #111827; line-height: 1.5; }

/* Kommentar-Panel Progress */
.comment-progress {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.6rem;
}
.comment-progress-step {
  font-size: 0.78rem;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(255,255,255,0.72);
  color: #334155;
}
.comment-progress-step.active {
  border-color: rgba(21,94,121,0.35);
  background: rgba(21,94,121,0.10);
  color: #0f172a;
}
.comment-progress-step.future { opacity: 0.72; }

/* Review metrics in right panel */
.review-overview-metrics [data-review-metric] { margin-top: 0.2rem; }

/* Main margins for fixed sidebars (script.js resize uses these) */
#hauptinhalt { /* falls du es später wieder nutzt – hier nicht zwingend */
  margin-left: 0;
  margin-right: 0;
}

/* floating toggles */
.panel-toggle-floating {
  position: fixed;
  top: 50%;
  z-index: 80;
  width: var(--panel-handle-w);
  height: var(--panel-handle-h);
  border-radius: 999px;
  border: 1px dashed rgba(148,163,184,0.75);
  background: rgba(255,255,255,0.55);
  color: rgba(15, 23, 42, 0.78);
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 0.78rem;
  line-height: 1;
}
.panel-toggle-left { left: var(--panel-handle-gap); }
.panel-toggle-right { right: var(--panel-handle-gap); }

.panel-toggle-floating:hover{
  background: rgba(255,255,255,0.72);
  border-style: solid;
  color: rgba(15, 23, 42, 0.92);
}

/* collapse states expected by script.js */
body.left-collapsed .app-left{
  --sb-x: calc(-100% - 22px);
  pointer-events: none;
}
body.right-collapsed .app-right{
  --sb-x: calc(100% + 22px);
  pointer-events: none;
}

/* Floating toggles (Handles) sind auf der Startseite immer sichtbar (dezent).
   Sobald Sidebars aktiv/manuell sind: etwas stärker. */
.panel-toggle-floating{ opacity:0.62; pointer-events:auto; }
body.sidebars-manual-on .panel-toggle-floating{ opacity:0.92; }

/* Wenn Panel OFFEN ist: Floating-Handle komplett ausblenden
   (Einklappen passiert über den inneren Hook in der Sidebar) */
body:not(.left-collapsed) #toggle-left-panel{ display:none; }
body:not(.right-collapsed) #toggle-right-panel{ display:none; }

/* Innerer Collapse-Hook (am inneren Rand der Sidebar) */
.panel-collapse-hook{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 74px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.75);
  background: rgba(255,255,255,0.82);
  color: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel-collapse-hook:hover{
  background: rgba(255,255,255,0.92);
}
.panel-collapse-hook-left{ right: -14px; }
.panel-collapse-hook-right{ left: -14px; }

/* Hook nur sichtbar, wenn Panel offen ist */
body.left-collapsed .panel-collapse-hook-left{ display:none; }
body.right-collapsed .panel-collapse-hook-right{ display:none; }

/* Draft-Layout bekommt Platz für Sidebars (wird per JS als CSS-Variablen gesetzt)
   Wichtig: KEINE Transition → verhindert "Zittern" beim Aktivieren. */
#draft-layout{
  --draft-left: 0px;
  --draft-right: 0px;
  --draft-gutter: 22px; /* "Rand" wenn Sidebars zu sind */
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding-left: calc(var(--draft-gutter) + var(--draft-left));
  padding-right: calc(var(--draft-gutter) + var(--draft-right));
  overflow-anchor: none; /* verhindert Scroll-Anker-Jitter bei Reflow */
}

/* Center-Spalte: nutzt den verfügbaren Raum zwischen Sidebars voll aus */
#draft-layout .law-surface{
  width: 100%;
  max-width: none;
  overflow-anchor: none;
}

/* TOC Static Links (Startseite) */
.toc-static-link{ display:block; padding: 0.25rem 0.2rem; color: #4b5563; border-radius: 10px; }
.toc-static-link:hover{ background: rgba(209,213,219,0.25); text-decoration:none; }
.toc-static-divider{ height: 1px; background: rgba(209,213,219,0.65); margin: 0.35rem 0; }

.toc-static-link.is-current{
  font-weight: 650;
  color: #111827;
  background: rgba(209,213,219,0.25);
}

.toc-sitemap{ display:block; }
.sitemap-details{ margin: 0; }
.sitemap-details > summary{ list-style:none; cursor: default; }
.sitemap-details > summary::-webkit-details-marker{ display:none; }
.sitemap-sub{
  margin-left: 0.35rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(209,213,219,0.65);
}
.sitemap-sub .app-toc{ margin: 0.25rem 0 0; }
.sitemap-sub .app-toc li{ margin: 0; }

/* Resize handles expected by script.js */
.resize-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 8px;
  cursor: col-resize;
}
.resize-handle-left { right: -4px; }
.resize-handle-right { left: -4px; }

/* Optional: Diff-Blöcke (Admin/Debug) */
pre.diff, pre.codeblock {
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(209,213,219,0.85);
  padding: 0.85rem 1rem;
  overflow: auto;
}

/* Responsive */
@media (max-width: 1100px) {
  .app-sidebar { position: static; width: auto; top: auto; bottom: auto; }
  .app-left, .app-right { width: auto; }
  .panel-toggle-floating { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .roadmap-split{ grid-template-columns: minmax(0,1fr); }
  .join-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .join-grid-row{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .supporter-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supporter-grid-row{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-links { gap: 0.6rem; font-size: 0.92rem; }
}
@media (max-width: 780px) {
  .nav-bar { flex-wrap: wrap; align-items: flex-start; }
  .nav-cta { margin-left: auto; }
  .join-grid{ grid-template-columns: minmax(0,1fr); }
  .join-grid-row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supporter-grid{ grid-template-columns: minmax(0,1fr); }
  .supporter-grid-row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   KlimaGG: Inline-Notices / Toasts (Punkt 2 – Frontend stabilisieren)
   -------------------------------------------------------------------------- */

.klimagg-toast-root {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 28px));
}

.klimagg-toast {
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
  font-size: 0.92rem;
  line-height: 1.25;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.klimagg-toast-success { background: rgba(15, 80, 40, 0.92); }
.klimagg-toast-warn    { background: rgba(110, 70, 0, 0.92); }
.klimagg-toast-error   { background: rgba(120, 30, 30, 0.92); }

.klimagg-toast.is-hiding {
  opacity: 0;
  transform: translateY(6px);
}

.article-vote-bar.is-busy {
  opacity: 0.7;
}

.article-vote-bar.is-busy .article-vote-btn,
.article-vote-bar.is-busy .article-flag-btn {
  pointer-events: none;
}


/* Rechtliches: Kapitel als eigene Boxen */
.legal-article {
  border-radius: 16px;
  background: var(--color-surface);
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 1rem clamp(1rem, 2.5vw, 1.6rem);
  margin: 0 0 0.9rem;
}
.legal-article h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}