/* ==========================================================================
   Meine Augenspritze (www.augenzentrum-stralsund.de/meine-augenspritze/)
   Augenzentrum Stralsund – gemeinsames Stylesheet für alle Seiten.

   Grundsätze:
   - Große Grundschrift (21px), über den Schalter oben auf 25px / 30px
   - Kontraste durchgehend über 7:1 (WCAG AAA)
   - Klickflächen mindestens 3rem hoch
   - Zentriertes, ruhiges Layout; Fließtext bleibt aus Gründen der
     Lesbarkeit linksbündig innerhalb der zentrierten Spalte
   - Keine Animationen, keine Webfonts, keine externen Ressourcen
   ========================================================================== */

/* --- 1. Farben und Grundgrößen ------------------------------------------ */

:root {
  /* Farbwelt angelehnt an www.augenzentrum-stralsund.de:
     dunkles Marineblau (#082A42, #1B4F72) mit Türkis-Akzent (#00AFC8).
     Türkis ist zu hell für Text und wird nur dekorativ eingesetzt –
     alle Textfarben halten weiterhin einen Kontrast über 7:1. */
  --tinte:        #132938;   /* Fließtext */
  --tinte-leise:  #3e4f5a;   /* Nebeninformation, weiterhin > 7:1 */
  --blau:         #1b4f72;   /* Überschriften, Links, Knöpfe */
  --blau-dunkel:  #082a42;
  --blau-tief:    #0e3b58;   /* zweiter Ton des Marineblau-Verlaufs */
  --blau-hell:    #2077a8;
  --blau-flaeche: #e8f4f8;
  --flaeche:      #eef7fa;
  --linie:        rgba(8, 42, 66, 0.10);
  --tuerkis:      #00bcd4;   /* Akzent: Knöpfe (mit dunkler Schrift), Flächen */
  --tuerkis-hell: #66ddeb;
  --tuerkis-tief: #0097ad;   /* dunkleres Türkis für Symbole (Kontrast > 3:1) */
  --tuerkis-flaeche: #e3f6f9;
  --gruen:        #0a5c3e;
  --gruen-flaeche:#e4f1eb;
  --warn:         #8a3b00;
  --warn-flaeche: #fbeee2;
  /* Tastatur-Markierung im dunklen Marineblau der Seite (Kontrast 14,8:1).
     Auf dunklem Grund – Fußzeile und Kasten – wird sie weiß überschrieben. */
  --fokus:        var(--blau-dunkel);
  /* Warmes Papier als Seitengrund wie auf der Hauptseite; Karten bleiben weiß
     und heben sich dadurch überhaupt erst ab. Kontrast Text/Grund = 13,6:1. */
  --grund:        #f6f4ef;
  --papier:       #ffffff;
  --schatten:       0 8px 26px rgba(8, 42, 66, 0.07);
  --schatten-karte: 0 18px 45px rgba(8, 42, 66, 0.10);

  /* Radien-Skala der Hauptseite */
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 22px;

  --schrift: 21px;
  --rand: 1.2rem;
  --textbreite: 36rem;
}

html[data-schrift="mittel"] { --schrift: 25px; }
html[data-schrift="gross"]  { --schrift: 30px; }

html {
  font-size: var(--schrift);
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

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

/* Muss nach den Layout-Regeln greifen, sonst setzt sich display:flex durch. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

/* --- 2. Fokus und Sprunglink -------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 4px solid var(--fokus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprunglink {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blau);
  color: #fff;
  padding: 1rem 1.4rem;
  z-index: 100;
  font-weight: 700;
}
.sprunglink:focus { left: 0; }

/* --- 3. Kopfzeile ------------------------------------------------------- */

.kopf {
  /* Durchgehendes weißes Band mit Logo, Titel-Link und Schriftschalter.
     Die Türkislinie schließt das Band nach unten ab – rein dekorativ. */
  background: var(--papier);
  border-bottom: 5px solid var(--tuerkis-flaeche);
}

.kopf-innen {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.9rem var(--rand);
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
  align-items: center;
  justify-content: space-between;
}

/* Steht jetzt auf dem weißen Band – keine eigene Karte mehr nötig. */
.marke {
  display: block;
  flex: 0 0 auto;
}

/* In rem, damit das Logo mit dem Schriftgrößen-Schalter mitwächst. */
.marke-logo {
  display: block;
  width: 8.5rem;
  height: auto;
}

.kopf-rechts {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  align-items: center;
}

.schriftwahl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Beschriftung und „A“-Symbole in der Fließtextfarbe. */
.schriftwahl-titel {
  font-size: 0.75rem;
  color: var(--tinte);
  margin-right: 0.2rem;
}
.schriftwahl button {
  font-family: inherit;
  background: var(--papier);
  color: var(--tinte);
  border: 2px solid var(--tinte);
  border-radius: var(--radius-s);
  cursor: pointer;
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0 0.4rem;
  line-height: 1;
  font-weight: 700;
}
.schriftwahl button:hover { background: var(--blau-flaeche); }
.schriftwahl button[aria-pressed="true"] {
  background: var(--tinte);
  color: #fff;
}
.schriftwahl .s1 { font-size: 0.8rem; }
.schriftwahl .s2 { font-size: 1.05rem; }
.schriftwahl .s3 { font-size: 1.3rem; }

/* --- 4. Grundlayout (zentriert) ----------------------------------------- */

.bahn {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* Der Seiteninhalt liegt als weiße Kachel auf dem warmen Untergrund;
   an den Rändern bleibt das warme Papier sichtbar. */
main.bahn {
  max-width: 50rem;
  margin: 2.2rem auto 3rem;
  padding: 2.4rem 2rem 3rem;
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-karte);
}

/* Schritt-Navigation: Pfeile zum Vor- und Zurückblättern */
.schritt-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
}
.schritt-nav .schritt-anzeige { margin: 0; }
.schritt-pfeil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid var(--blau-dunkel);
  background: var(--papier);
  color: var(--blau-dunkel);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}
.schritt-pfeil:hover { background: var(--tuerkis-flaeche); color: var(--blau-dunkel); }

.schritt-anzeige {
  display: table;
  margin: 0 auto 0.8rem;
  font-size: 0.8rem;
  color: var(--blau-dunkel);
  background: var(--tuerkis-flaeche);
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 1rem;
  border-radius: 999px;
  text-align: center;
}

/* Als Überschrift der Versorgungs-Auswahl (Schritt 5) mit mehr Luft. */
legend.schritt-anzeige {
  padding: 0.5rem 1.4rem;
  margin-bottom: 1.1rem;
}

/* Überschriften enger gesetzt wie auf der Hauptseite. Der Fließtext behält
   seine Zeilenhöhe von 1,7 – die Lesbarkeit bleibt unberührt. */
h1 {
  font-size: 2.8rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--blau-dunkel);
  /* Schrumpft auf die Textbreite, damit die Akzentlinie darunter
     genauso breit wird wie die Überschrift selbst. */
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.1rem;
  text-align: center;
}

/* Akzentlinie mit Farbverlauf unter der Seitenüberschrift –
   wie auf der Titelseite der Broschüre, hier zentriert. */
h1::after {
  content: "";
  display: block;
  height: 0.28rem;
  border-radius: 999px;
  background: var(--tuerkis-flaeche);
  margin: 0.6rem 0 0;
}
h2 {
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--blau-dunkel);
  margin: 2.6rem auto 0.9rem;
  max-width: var(--textbreite);
  text-align: center;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--tinte);
  margin: 1.6rem auto 0.5rem;
  max-width: var(--textbreite);
  text-align: center;
}
h4 {
  font-size: 1rem;
  margin: 1.4rem 0 0.4rem;
  color: var(--tinte);
}

/* Fließtext: zentrierte Spalte, Text selbst linksbündig (Lesbarkeit). */
p {
  max-width: var(--textbreite);
  margin: 0 auto 1rem;
}
ul, ol {
  max-width: calc(var(--textbreite) - 1.4rem);
  margin: 0 auto 1.2rem;
  padding-left: 1.4rem;
}
li { margin-bottom: 0.6rem; }

.einleitung {
  font-size: 1.15rem;
  line-height: 1.65;
  text-align: center;
}

strong { font-weight: 700; }

a {
  color: var(--blau);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--blau-dunkel); }

hr {
  border: 0;
  border-top: 2px solid var(--linie);
  margin: 2.5rem auto;
  max-width: var(--textbreite);
}

/* --- 5. Knöpfe ---------------------------------------------------------- */

/* Türkis-Knopf wie auf der Augenzentrum-Seite: dunkle Schrift auf hellem
   Verlauf. Die fette, große Schrift hält dabei Kontrast über 4,5:1 (AAA für
   große Schrift); bei 7:1-Bedarf den leisen (umrandeten) Knopf verwenden. */
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--tuerkis), var(--tuerkis-hell));
  color: #062838;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  /* Transparenter Rahmen: kein sichtbarer Rand um die türkisen Knöpfe,
     aber unveränderte Maße. Die hellen Knöpfe setzen ihn wieder farbig. */
  border: 3px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  min-height: 3.2rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--schatten);
}
.knopf:hover {
  background: var(--blau-dunkel);
  border-color: var(--blau-dunkel);
  color: #fff;
}

.knopf-gross {
  display: flex;
  width: 100%;
  max-width: var(--textbreite);
  margin: 0 auto;
  justify-content: center;
  text-align: center;
  font-size: 1.15rem;
  padding: 1.1rem 1.6rem;
  min-height: 4rem;
  /* Ruhezustand wie die „Schritt x von 8“-Plakette: helle Türkisfläche
     mit dunkler Schrift. Beim Überfahren weiterhin dunkelblau. */
  background: var(--tuerkis-flaeche);
  color: var(--blau-dunkel);
  border-color: transparent;
}
.knopf-gross:hover {
  background: var(--blau-dunkel);
  border-color: var(--blau-dunkel);
  color: #fff;
}
.knopf-gross .pfeil { font-size: 1.3rem; }

.knopf-leise {
  background: var(--papier);
  color: var(--blau-dunkel);
  border-color: var(--blau-dunkel);
}
.knopf-leise:hover {
  background: var(--tuerkis-flaeche);
  color: var(--blau-dunkel);
  border-color: var(--blau-dunkel);
}

/* --- 6. Kästen ---------------------------------------------------------- */

/* Ein Grundgerüst, drei Anstriche. Der neutrale Kasten trägt das
   Marineblau-Band der Fußzeile mit heller Schrift; Warn- und Gut-Kasten
   behalten ihre Signalfarbe. Kein kräftiger Rand links mehr. */
.kasten {
  --kasten-grund: linear-gradient(160deg, var(--blau-dunkel), var(--blau-tief));
  --kasten-text:  var(--grund);
  --kasten-titel: #ffffff;
  --kasten-link:  var(--tuerkis-hell);
  --kasten-rand:  transparent;
  --kasten-fokus: #ffffff;

  background: var(--kasten-grund);
  color: var(--kasten-text);
  border: 1px solid var(--kasten-rand);
  border-radius: var(--radius-m);
  box-shadow: var(--schatten);
  padding: 1.2rem 1.4rem;
  margin: 1.8rem auto;
  max-width: var(--textbreite);
  text-align: center;
}
.kasten > :last-child { margin-bottom: 0; }
.kasten h3 { margin-top: 0; color: var(--kasten-titel); }
/* Steht ein Kasten direkt unter der Seitenüberschrift, trägt er eine h2
   (keine übersprungene Ebene) – sie sieht aus wie die h3 der übrigen Kästen. */
.kasten h2 {
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 auto 0.5rem;
  color: var(--kasten-titel);
}
.kasten p { max-width: none; margin-left: 0; margin-right: 0; }
/* Aufzählungen bleiben linksbündig – zentrierter Text neben hängenden
   Punkten liest sich schlecht. Die Liste als Ganzes wird zentriert. */
.kasten ul {
  display: table;
  text-align: left;
  max-width: none;
  margin: 0 auto 1.2rem;
  padding-left: 1.4rem;
}

/* Knöpfe im Kasten behalten ihr eigenes Aussehen. */
.kasten a:not(.knopf) { color: var(--kasten-link); }
.kasten a:not(.knopf):hover { color: var(--kasten-titel); }
.kasten :focus-visible { outline-color: var(--kasten-fokus); }


.kasten-warn {
  --kasten-grund: var(--warn-flaeche);
  --kasten-text:  var(--tinte);
  --kasten-titel: var(--warn);
  --kasten-link:  var(--blau);
  --kasten-rand:  #ecd3bb;
  --kasten-fokus: var(--fokus);
}

.kasten-gut {
  --kasten-grund: var(--gruen-flaeche);
  --kasten-text:  var(--tinte);
  --kasten-titel: var(--gruen);
  --kasten-link:  var(--blau);
  --kasten-rand:  #c4ddd1;
  --kasten-fokus: var(--fokus);
}

/* --- 7. Themenkacheln (Startseite) -------------------------------------- */

.kacheln {
  list-style: none;
  margin: 0 auto 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  max-width: var(--textbreite);
}
.kacheln li { margin: 0; max-width: none; }

.kachel {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--papier);
  border: 1px solid var(--blau-dunkel);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-karte);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: var(--tinte);
  min-height: 3.4rem;
}
.kachel:hover {
  border-color: var(--blau);
  background: var(--blau-flaeche);
  color: var(--tinte);
}
.kachel-nr {
  flex: 0 0 auto;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  /* Helle Füllung wie Knopf und Schrittfeld; der Rahmen in der Farbe
     des Themen-Titels daneben. */
  background: var(--tuerkis-flaeche);
  border: 2px solid var(--blau);
  color: var(--blau-dunkel);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kachel-titel {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blau);
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.3;
}
.kachel-text {
  display: block;
  font-size: 0.85rem;
  color: var(--tinte-leise);
  line-height: 1.5;
}

/* --- 8. Weiter-Navigation am Seitenende --------------------------------- */

.weiter {
  margin: 2.8rem auto 0;
  padding-top: 1.8rem;
  border-top: 2px solid var(--linie);
  max-width: var(--textbreite);
  text-align: center;
}
.weiter .zurueck {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.95rem;
}

/* --- 9. Fußzeile -------------------------------------------------------- */

/* Dunkles Marineblau-Band wie die Abschnitte der Hauptseite. Kontraste:
   Text 13,5:1, Links 9:1 – beide weiterhin AAA. */
.fuss {
  background: linear-gradient(160deg, var(--blau-dunkel), var(--blau-tief));
  color: var(--grund);
  padding: 2.6rem 0 3rem;
  margin-top: 3rem;
  text-align: center;
}
.fuss h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: #fff;
}
.fuss-adresse {
  font-size: 0.95rem;
  line-height: 1.6;
}
.fuss a { color: var(--tuerkis-hell); }
.fuss a:hover { color: #fff; }
.fuss a:focus-visible { outline-color: #fff; }
.fuss-rechtlich {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  max-width: none;
}
.fuss-rechtlich a { margin: 0 0.6rem; display: inline-block; }

/* --- 10. Schaubilder ---------------------------------------------------- */

.schaubild {
  max-width: var(--textbreite);
  margin: 1.8rem auto;
}
.schaubild-paar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}
.schaubild-teil {
  flex: 1 1 14rem;
  border: 1px solid var(--linie);
  border-radius: var(--radius-m);
  box-shadow: var(--schatten);
  padding: 1rem;
  background: var(--papier);
}
.schaubild-teil svg { width: 100%; height: auto; display: block; }
.schaubild-teil figcaption {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blau);
  text-align: center;
  margin-top: 0.6rem;
  line-height: 1.4;
}
.schaubild-hinweis {
  font-size: 0.8rem;
  color: var(--tinte-leise);
  margin-top: 0.8rem;
  text-align: center;
}

/* --- 12c. Druckbare Dokumente ------------------------------------------ */

.dokument {
  border: 1px solid var(--blau-dunkel);
  border-radius: var(--radius-m);
  box-shadow: var(--schatten);
  padding: 1.5rem 1.6rem 1.7rem;
  margin: 2rem auto;
  background: var(--papier);
  max-width: 44rem;
}
.dokument-kopf {
  border-bottom: 3px solid var(--blau);
  padding-bottom: 0.8rem;
  margin-bottom: 1.3rem;
}
.dokument-praxis {
  font-size: 0.8rem;
  color: var(--tinte-leise);
  margin: 0 0 0.4rem;
  max-width: none;
}
.dokument-kopf h2 { margin: 0; font-size: 1.3rem; text-align: left; max-width: none; }
.dokument h3 { text-align: left; margin-left: 0; margin-right: 0; }
.dokument p, .dokument li, .dokument ul { max-width: none; margin-left: 0; margin-right: 0; }
.dokument ul { padding-left: 1.4rem; margin-bottom: 1.2rem; }
.dokument > :last-child { margin-bottom: 0; }

/* --- 12e. Eingangs-Hinweis (wird per Skript eingefügt) ------------------ */

.hinweis-schleier {
  position: fixed;
  inset: 0;
  background: rgba(8, 42, 66, 0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}
.hinweis-box {
  background: var(--papier);
  border-radius: var(--radius-l);
  box-shadow: 0 10px 40px rgba(8, 42, 66, 0.4);
  max-width: 30rem;
  width: 100%;
  padding: 1.6rem 1.7rem 1.7rem;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}
.hinweis-box h2 {
  margin: 0 0 0.9rem;
  font-size: 1.3rem;
}
.hinweis-box p {
  font-size: 0.95rem;
  max-width: none;
  margin: 0 0 0.9rem;
}
.hinweis-box .knopf {
  width: 100%;
  margin-top: 0.4rem;
  /* Ruhezustand wie die großen Weiter-Knöpfe. */
  background: var(--tuerkis-flaeche);
  color: var(--blau-dunkel);
  border-color: transparent;
}
.hinweis-box .knopf:hover {
  background: var(--blau-dunkel);
  border-color: var(--blau-dunkel);
  color: #fff;
}
/* Der Dialog erhaelt beim Oeffnen den Fokus – ohne sichtbaren Ring. */
.hinweis-box:focus,
.hinweis-box:focus-visible { outline: none; }

/* --- 13. Tabellen ------------------------------------------------------- */

.tabelle-rahmen { overflow-x: auto; max-width: 44rem; margin: 1.6rem auto; }
table {
  border-collapse: collapse;
  min-width: 26rem;
  font-size: 0.95rem;
  margin: 0 auto;
}
th, td {
  border: 1px solid var(--linie);
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
th { background: var(--blau-dunkel); color: #fff; border-color: var(--blau-dunkel); }
th[scope="row"] { background: var(--blau-flaeche); color: var(--blau-dunkel); border-color: var(--linie); }
caption {
  text-align: center;
  font-weight: 700;
  color: var(--blau-dunkel);
  padding-bottom: 0.6rem;
  font-size: 1rem;
}

/* --- 14. Druck ---------------------------------------------------------- */

@media print {
  @page { margin: 15mm 14mm; }
  html { font-size: 12pt; }
  body { background: #fff; }
  /* Die weiße Inhaltskachel ist auf Papier überflüssig. */
  main.bahn {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .kachel, .dokument { border-color: #000; }
  .kopf, .weiter, .schriftwahl, .sprunglink, .kacheln,
  .schritt-nav, .hinweis-schleier, .nicht-drucken { display: none !important; }
  /* Der dunkle Hinweiskasten würde sonst weiß auf weiß gedruckt –
     Hintergrundbilder druckt der Browser standardmäßig nicht. */
  .kasten {
    background: #fff;
    color: #000;
    border: 1px solid #000;
  }
  .kasten h2, .kasten h3, .kasten a:not(.knopf) { color: #000; }
  .kasten-warn, .kasten-gut { border-color: #000; }

  .fuss { background: #fff; color: #000; border-top: 1px solid #000; }
  .fuss h2 { color: #000; }
  .fuss-rechtlich { border-top-color: #000; }
  th, th[scope="row"] { background: #fff; color: #000; border-color: #000; }
  a, .fuss a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  .kasten, .schaubild-teil { break-inside: avoid; }
  h1, h2, h3 { color: #000; break-after: avoid; }
  h1::after { display: none; }

  /* Ein Dokument pro Blatt. */
  .dokument {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: none;
    break-after: page;
  }
  .dokument:last-of-type { break-after: auto; }
  .dokument-kopf { border-bottom: 2px solid #000; }
  .dokument-kopf h2 { font-size: 15pt; }
}

/* --- 15. Kleine Bildschirme -------------------------------------------- */

@media (max-width: 34rem) {
  :root { --rand: 0.9rem; }
  .knopf-gross { font-size: 1.05rem; }
  /* Auf schmalen Geräten rückt die Kachel dichter an den Rand. */
  main.bahn {
    margin: 1.2rem auto 2rem;
    padding: 1.6rem 1rem 2rem;
    border-radius: var(--radius-m);
  }
}



/* --- 16. Vorlesen (wird per Skript eingefügt) ---------------------------
   Runder weißer Knopf unten rechts. Ein Klick klappt darüber eine Kachel
   mit dem Abspielknopf auf. Abgespielt wird die hinterlegte Tonaufnahme
   (audio/<seite>.mp3); fehlt sie, liest die Sprachausgabe des Geräts vor.
   In beiden Fällen bleibt alles auf dem Gerät. */

.vorlesen {
  position: fixed;
  right: clamp(0.8rem, 2vw, 1.6rem);
  bottom: clamp(0.8rem, 2vw, 1.6rem);
  /* Über dem Menü (90), aber unter dem Eingangs-Hinweis (200). */
  z-index: 150;
  display: flex;
  /* Der Knopf steht im Quelltext zuerst (Tastatur-Reihenfolge),
     dargestellt wird er trotzdem unten. */
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.7rem;
}

/* Der weiße Kreis mit dem Symbol eines Menschen. */
.vorlesen-knopf {
  width: 3.4rem;
  height: 3.4rem;
  padding: 0;
  border: 2px solid var(--linie);
  border-radius: 50%;
  background: var(--papier);
  color: var(--blau);
  box-shadow: var(--schatten-karte);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vorlesen-knopf svg {
  width: 1.9rem;
  height: 1.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vorlesen-knopf:hover { background: var(--tuerkis-flaeche); }
/* Ohne das würde der allgemeine Fokusrahmen eckig um den Kreis liegen. */
.vorlesen-knopf:focus-visible { border-radius: 50%; }
.vorlesen-knopf[aria-expanded="true"] {
  background: var(--blau);
  border-color: var(--blau);
  color: #fff;
}

/* Die Kachel, die über dem Knopf aufgeht. */
.vorlesen-kachel {
  width: min(21rem, calc(100vw - 1.6rem));
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-karte);
  padding: 1rem 1.1rem 1.1rem;
  text-align: center;
}
.vorlesen-titel {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  color: var(--blau);
}

/* Abspielknopf: weiße Pille mit dunkelblauem Rand.
   Beim Überfahren mit der Maus füllt sie sich mit dem hellen Türkis. */
.vorlesen-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  border: 3px solid var(--blau-dunkel);
  border-radius: 999px;
  background: var(--papier);
  color: var(--blau-dunkel);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
/* Dasselbe zarte Türkis wie die Akzentlinie unter der Überschrift. */
.vorlesen-start:hover { background: var(--tuerkis-flaeche); }
.vorlesen-start[disabled] {
  border-color: var(--linie);
  color: var(--tinte-leise);
  cursor: default;
}
.vorlesen-start[disabled]:hover { background: var(--papier); }
.vorlesen-start:focus-visible { border-radius: 999px; outline-offset: 4px; }
/* Das Sinnbild sitzt in einem Kästchen von der Höhe der Großbuchstaben und
   wird darin mittig ausgerichtet – sonst wirkt das Dreieck verrutscht. */
.vorlesen-start .vorlesen-sinnbild {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.9em;
  height: 0.72em;
}
.vorlesen-start svg {
  display: block;
  height: 100%;
  width: auto;
  fill: currentColor;
  stroke: none;
}

/* Zeile unter dem Knopf: vor dem Start die Dauer, danach der Fortschritt. */
.vorlesen-dauer {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--tinte-leise);
  line-height: 1.4;
}

.vorlesen-fortschritt { margin-top: 0.8rem; }

.vorlesen-balken {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--tuerkis-flaeche);
  overflow: hidden;
}
.vorlesen-fuellung {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--tuerkis-tief);
}

.vorlesen-zeile {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--tinte-leise);
}
.vorlesen-vonvorn {
  padding: 0.1rem 0.1rem;
  border: 0;
  background: none;
  font: inherit;
  color: var(--blau);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.vorlesen-vonvorn:hover { color: var(--blau-dunkel); }

/* Der Absatz, der gerade gelesen wird, wird ruhig hervorgehoben.
   Nur bei der Sprachausgabe – eine Tonaufnahme läuft ohne Markierung. */
.wird-vorgelesen {
  background: var(--tuerkis-flaeche);
  box-shadow: 0 0 0 0.35rem var(--tuerkis-flaeche);
  border-radius: 3px;
}

@media (max-width: 34rem) {
  .vorlesen-knopf { width: 3.1rem; height: 3.1rem; }
  .vorlesen-knopf svg { width: 1.7rem; height: 1.7rem; }
}

@media print {
  .vorlesen { display: none !important; }
  .wird-vorgelesen { background: none; box-shadow: none; }
}

/* Vorlese-Knopf: auf dem Smartphone ein Kreis, auf dem Desktop ein Pillen-Button
   mit der Beschriftung „Barrierefreiheit“ rechts neben dem Symbol. */
.vorlesen-knopf-text { display: none; }
@media (min-width: 48rem) {
  .vorlesen-knopf {
    width: auto;
    height: 3.4rem;
    padding: 0 1.25rem 0 0.8rem;
    gap: 0.55rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }
  .vorlesen-knopf:focus-visible { border-radius: 999px; }
  .vorlesen-knopf-text { display: inline; }
}
