/* Grundgerüst aller Themenseiten unter erklaert/.
   Farbwerte, Schrift und Thema kommen aus /gemeinsam/ der Website:
   /gemeinsam/thema.js im <head>, dann diese Datei und die Datei der Seite,
   danach /gemeinsam/farben.css, /gemeinsam/kopf.css und /gemeinsam/rahmen.css.
   Alle Regeln stehen unter body.mw-neu, damit sie die Grundregeln aus rahmen.css
   (Abstände, Überschriftengrößen) ersetzen können. Hier steht nur, was die
   Themenseiten selbst brauchen.

   Farbnamen wie in farben.css: --tinte für Überschriften, --marke, --marke-text
   und --marke-zart für den Akzent der Website (Bedienung: Links, aktive Schalter,
   Fokus). Schrift auf einer Akzentfläche steht in --auf-akzent auf --marke.
   Was in einem Schaubild eine Rolle meint, nimmt --rolle-* und die drei Töne unten. */

:root {
  /* Abstufungen der Rolle Netz, die farben.css nicht kennt. Werte wie vor dem
     Umbau, damit die Schaubilder dieselben Farben zeigen. */
  --rolle-netz-text:   #155FD6;   /* Schrift in der Rolle Netz */
  --rolle-netz-zart:   #E8F0FF;   /* Fläche in der Rolle Netz */
  --rolle-netz-dunkel: #012F60;   /* zweite Netzrolle neben dem Netzbetreiber (Messstellenbetreiber, ÜNB) */
}

@media screen {
  :root[data-thema="dunkel"] {
    --rolle-netz-text:   #8AB8FF;
    --rolle-netz-zart:   #1A2A42;
    --rolle-netz-dunkel: #A9C8F5;
  }
}

/* ---------- Kopf der Seite: Brotkrumen, Titel, Unterzeile, Stand ---------- */
body.mw-neu .thema-kopf { padding-top: 32px; }
body.mw-neu .mw-brot { display: flex; flex-wrap: wrap; margin: 0 0 24px; font-size: 15px; line-height: 1.5; color: var(--text-still); }
body.mw-neu .mw-brot li + li::before { content: "\203A"; margin: 0 8px; }
body.mw-neu main .mw-brot a { color: var(--text-still); }
body.mw-neu .thema-kopf h1 { margin: 0 0 8px; }
body.mw-neu .untertitel { margin: 0 0 8px; font-size: 19px; line-height: 1.4; font-weight: 400; color: var(--text-still); }
body.mw-neu .thema-stand { margin: 0; font-size: 15px; color: var(--text-still); }

/* ---------- Das Wichtigste in Kürze und Auf dieser Seite ---------- */
body.mw-neu .thema-einstieg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 48px; }
@media (min-width: 1100px) {
  body.mw-neu .thema-einstieg { grid-template-columns: minmax(0, 70ch) minmax(240px, 320px); justify-content: space-between; gap: 64px; align-items: start; }
}
body.mw-neu .thema-kurz { max-width: 70ch; }
body.mw-neu .thema-kurz h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.3; }
body.mw-neu .thema-kurz .einleitung { margin: 0; color: var(--text); font-size: 17px; }
body.mw-neu .thema-kurz .einleitung p { margin: 0; }
body.mw-neu .thema-kurz .einleitung p + p { margin-top: 12px; }
body.mw-neu .thema-kurz .einleitung .satz + .satz { margin-top: 4px; }
body.mw-neu .thema-inhalt h2 { margin: 0 0 8px; font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--text-still); }
body.mw-neu .thema-inhalt li { padding: 2px 0; font-size: 15px; line-height: 1.5; }

/* ---------- Text und Abschnitte ---------- */
body.mw-neu .satz { display: block; text-wrap: balance; }
body.mw-neu main p { margin: 0 0 12px; }
body.mw-neu .still { color: var(--text-still); font-size: 15px; }
body.mw-neu .quelle { font-size: 15px; color: var(--text-still); }
body.mw-neu .fundlink { text-underline-offset: 3px; }
body.mw-neu main section { margin-top: 64px; }
body.mw-neu main section > h2 { margin-bottom: 16px; }
body.mw-neu main h3 { margin: 24px 0 8px; }
@media (max-width: 720px) {
  body.mw-neu main section { margin-top: 48px; }
}

/* ---------- Schaubild ---------- */
body.mw-neu .tab-rolle { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 8px; }
body.mw-neu .tab-rolle:focus-visible { outline: 2px solid var(--marke); outline-offset: 2px; }
body.mw-neu .buehne {
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: var(--weiss);
  overflow: hidden;
}
body.mw-neu .buehne svg { display: block; width: 100%; height: auto; }
body.mw-neu .buehne-hinweis { display: none; }
body.mw-neu .bedienung { margin: 8px 0 0; max-width: none; font-size: 15px; color: var(--text-still); }

/* ---------- Schalter für Fälle und Ansichten ---------- */
body.mw-neu .schalter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
body.mw-neu .schalter button {
  font: inherit;
  font-size: 15px;
  padding: 7px 14px;
  border: 1px solid var(--linie-stark);
  border-radius: 6px;
  background: var(--weiss);
  color: var(--text);
  cursor: pointer;
}
body.mw-neu .schalter button[aria-pressed="true"] {
  background: var(--marke);
  border-color: var(--marke);
  color: var(--auf-akzent);
}
body.mw-neu .schalter button:focus-visible { outline: 2px solid var(--marke); outline-offset: 2px; }

/* ---------- Zum Nachlesen und andere Ausklapper ---------- */
body.mw-neu details {
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
  padding: 0;
  margin-top: 64px;
}
body.mw-neu section details { margin-top: 24px; }
body.mw-neu #vertiefung details, body.mw-neu #sap details { margin-top: 0; }
body.mw-neu details + details { margin-top: 0; border-top: 0; }
body.mw-neu summary {
  cursor: pointer;
  padding: 16px 0;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--tinte);
  list-style-position: outside;
}
body.mw-neu summary:focus-visible { outline: 2px solid var(--marke); outline-offset: 6px; }
body.mw-neu summary .klein { display: block; font-weight: 400; font-size: 15px; color: var(--text-still); }
body.mw-neu .nachlesen { padding: 16px 0 24px; border-top: 1px solid var(--linie); }
body.mw-neu .nachlesen p { max-width: 68ch; }

/* ---------- Nächstes Thema ---------- */
body.mw-neu .thema-weiter { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; margin: 96px 0 0; padding-bottom: 8px; }
body.mw-neu .thema-weiter .mw-karte { flex: 0 1 380px; }
body.mw-neu .thema-weiter .mw-karte-titel { margin: 0; }
body.mw-neu main .thema-weiter-alle { font-size: 17px; font-weight: 600; }
@media (max-width: 720px) {
  body.mw-neu .thema-weiter { margin-top: 64px; }
  body.mw-neu .thema-weiter .mw-karte { flex-basis: 100%; }
}

/* Schmale Fenster: Das Bild behält seine Größe, die Bühne lässt sich seitlich
   schieben. So bleibt die Beschriftung lesbar. Die Breite je Seite steht in
   --bild-min (Vorgabe 1040 px). */
@media (max-width: 700px) {
  body.mw-neu .buehne-hinweis { display: block; margin: 0 0 6px; font-size: 15px; color: var(--text-still); }
  body.mw-neu .buehne:not(.ab-flaeche), body.mw-neu #buehne.buehne { overflow-x: auto; overflow-y: hidden; }
  body.mw-neu .buehne:not(.ab-flaeche) > svg { min-width: var(--bild-min, 1040px); }
  body.mw-neu .buehne:not(.ab-flaeche) > .regler { position: sticky; left: 0; }
  body.mw-neu .buehne:focus-visible { outline: 2px solid var(--marke); outline-offset: 2px; }
}
