/* ANLEITUNGEN, Inhaltsregeln: Abschnitte, Schritte, Bilder, Wegweiser, Karten. Gilt auf den Seiten
   (neben anleitung.css) und in der App (web/src/hilfe/AnleitungInhalt.tsx, dort setzt die Klasse
   .anl-inhalt die Farben aus den Rollen von Sereno). Keine Regel auf body, kein Inline-Stil. */

.anl-abschnitt {
  margin: 0 0 16px;
  padding: 16px 18px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 16px;
  scroll-margin-top: 16px;
}
.anl-abschnitt:target { border-color: var(--link); box-shadow: 0 0 0 2px var(--link); }
.anl-abschnitt h2 { margin: 0 0 10px; font-size: 1.25rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.anl-schritte { margin: 0; padding-left: 1.6em; }
.anl-schritte li { margin: 0 0 8px; padding-left: 4px; overflow-wrap: anywhere; }
.anl-schritte li::marker { font-weight: 700; color: var(--link); }
/* Schritt mit Bild (Inhaber 18.11.2026): breite Seite, links das Bild, rechts der Text.
   Nur Computer; schmal stapelt es (Text ueber dem Bild), damit nichts quer scrollt. */
.anl-schritte li.anl-schritt-bild { margin: 0 0 18px; }
.anl-schritt-bild p { margin: 0; }
.anl-schritt-bild .anl-bild { margin: 8px 0 0; }
/* Kleine Ausschnitte (Menue, 323 px) nicht hochskalieren - sonst gross und unscharf. */
.anl-schritt-bild .anl-bild img { width: auto; max-width: 100%; }
@media (min-width: 56rem) {
  /* Eine Zaehlung fuer ALLE Schritte: ein Grid-Punkt ist kein list-item und zaehlt im Browser-Marker
     nicht mit (Gestaltung 18.11.: "2. Aendern", "2. Vergessen"). Darum eigener Zaehler, Marker aus. */
  .anl-schritte:has(.anl-schritt-bild) { list-style: none; padding-left: 0; }
  .anl-schritte:has(.anl-schritt-bild) > li:not(.anl-schritt-bild)::before {
    content: counter(anl-schritt) ". "; font-weight: 700; color: var(--link);
  }
  .anl-schritte li.anl-schritt-bild {
    display: grid;
    /* Bildspalte hoechstens so breit wie die grossen Ausschnitte: kleine Menuebilder lassen sonst Leerraum. */
    grid-template-columns: minmax(0, 38rem) minmax(0, 1fr);
    grid-template-areas: "bild text";
    gap: 20px;
    align-items: start;
  }
  .anl-schritt-bild p { grid-area: text; padding-top: 4px; font-size: 1.125rem; }
  /* display:grid nimmt dem Punkt die Listennummer - sie kommt als Zaehler vor den Text. */
  .anl-schritte { counter-reset: anl-schritt; }
  .anl-schritte > li { counter-increment: anl-schritt; }
  .anl-schritt-bild p::before { content: counter(anl-schritt) ". "; font-weight: 700; color: var(--link); }
  .anl-schritt-bild .anl-bild { grid-area: bild; margin: 0; }
}
strong[data-eigenname] { font-weight: 600; }

.anl-hinweis {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--hinweis-bg);
  border-left: 4px solid var(--hinweis-rand);
  border-radius: 8px;
}
.anl-klein { margin: 14px 0 6px; font-size: 0.95rem; font-weight: 600; color: var(--leise); }

.anl-links, .anl-punkte, .anl-karten { list-style: none; margin: 0; padding: 0; }
.anl-link {
  /* inline-block, nicht flex: sonst wird jeder Eigenname im Link eine eigene Spalte. */
  display: inline-block;
  padding: 10px 0;
  line-height: 1.5;
  min-height: 44px;
  min-width: 44px;
  font-weight: 600;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.anl-raus { margin-left: 6px; font-weight: 400; }

.anl-regionen { display: grid; gap: 6px; margin-top: 8px; }
.anl-region { border: 1px solid var(--rand); border-radius: 12px; background: var(--bg); }
.anl-region summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}
.anl-region[open] summary { border-bottom: 1px solid var(--rand); }
.anl-punkte { padding: 8px 14px 6px; }
.anl-punkte li { margin: 0 0 6px; overflow-wrap: anywhere; }

.anl-bild { margin: 14px 0 0; }
.anl-bild img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  border: 1px solid var(--rand);
  border-radius: 10px;
}
/* Antippen oeffnet das Bild gross (Dummy-Runde 3, 19.11.2026); Tippziel mindestens 44 px. */
.anl-bild a[data-bild-gross] { display: block; min-height: 44px; }
.anl-bild figcaption { margin-top: 4px; font-size: 0.9rem; color: var(--leise); text-wrap: balance; }

/* WEGWEISER (Inhaber 20.11.2026): Frage am Anfang mit zwei Wegen, je Schritt eine Leiste
   "Schritt n von m" mit Punkten (erledigt = Haken, jetzt = gefuellt), "Sie brauchen" und
   "Wie weiter?". Ohne Skript; jeder Punkt und jeder Weg ist ein Sprung (Tippziel 44 px). */
.anl-weiche {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 2px solid var(--link);
  border-radius: 14px;
  background: var(--bg);
}
.anl-weiche-frage { margin: 0 0 10px; font-weight: 700; font-size: 1.125rem; overflow-wrap: anywhere; }
.anl-wege { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.anl-weg, .anl-weiter {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--rand);
  border-radius: 12px;
  background: var(--karte);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.anl-weg:hover, .anl-weiter:hover { border-color: var(--link); }
.anl-weg-antwort {
  flex: none;
  min-width: 3.2em;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  color: var(--auf-link);
  background: var(--link);
}
.anl-weg[data-weg="nein"] .anl-weg-antwort { color: var(--text); background: var(--rand); }
.anl-weg-text { flex: 1; font-weight: 600; }
.anl-weg-pfeil { flex: none; margin-left: auto; color: var(--link); font-weight: 700; }
.anl-weiter { font-weight: 600; }
.anl-weiter-ende { padding: 10px 14px; border-radius: 12px; background: var(--hinweis-bg); font-weight: 600; }
.anl-danach { margin-top: 14px; }

.anl-fortschritt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 6px;
}
.anl-fortschritt-text { margin: 0; color: var(--leise); font-weight: 600; font-size: 0.95rem; }
.anl-punkte-weg { list-style: none; display: flex; margin: 0; padding: 0; }
.anl-punkte-weg li { display: flex; align-items: center; }
/* Verbindungslinie zwischen den Punkten */
.anl-punkte-weg li + li::before { content: ""; width: 14px; height: 2px; background: var(--rand); }
.anl-punkt {
  /* 44 px Tippziel, sichtbar ein Kreis von 28 px: durchsichtiger Rand, Farbe nur im Innern.
     Farbe direkt am Element (nicht in einem Pseudo-Element) - sonst misst der Kontrast-Waechter 1:1. */
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border: 8px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: var(--karte);
  box-shadow: inset 0 0 0 2px var(--leise);   /* Rand 3:1 (WCAG 1.4.11), Pruefung 20.11. */
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--leise);
}
.anl-punkt[data-stand="fertig"] { background-color: var(--gruen); box-shadow: none; color: var(--auf-link); }
.anl-punkt[data-stand="jetzt"] { background-color: var(--link); box-shadow: none; color: var(--auf-link); }
.anl-braucht {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-left: 4px solid var(--link);
  border-radius: 8px;
  background: var(--bg);
}

.anl-karten { display: grid; gap: 10px; }
.anl-karte {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 14px 18px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
}
.anl-karte strong { color: var(--link); font-size: 1.15rem; }
.anl-karte span { color: var(--leise); }

