/* Häufige Fragen (/faq). Seite erzeugt von docs/faq/bauen.py; Markierungen in faq-bilder.css */
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kopf-nav a[aria-current="page"] { color: #fff; font-weight: 700; }

.faq-held { background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 60%, var(--petrol) 100%); color: #fff; padding: 56px 0 40px; }
.faq-held h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.15; }
.faq-held .lead { color: var(--hell-text); margin-top: 12px; max-width: 680px; font-size: 17px; }
.faq-held :focus-visible { outline-color: var(--gold); }
.faq-suche { margin-top: 26px; position: relative; max-width: 680px; }
.faq-suche input { width: 100%; height: 56px; border-radius: 14px; border: 0; padding: 0 18px 0 52px; font: 500 17px Inter, sans-serif; color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); -webkit-appearance: none; appearance: none; }
.faq-suche svg { position: absolute; left: 18px; top: 18px; }
.faq-suche small { display: block; margin-top: 8px; color: var(--hell-text); font-size: 13.5px; }
.faq-rollen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.faq-rollen button { border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: #fff; border-radius: 999px; padding: 8px 16px; font: 600 14.5px Inter, sans-serif; cursor: pointer; }
.faq-rollen button:hover { border-color: #fff; }
.faq-rollen button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.faq-raster { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 80px; }
.faq-index { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 104px); overflow: auto; font-size: 14.5px; padding-right: 4px; }
.faq-index h2 { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mut); margin: 22px 0 6px 10px; }
.faq-index h2:first-child { margin-top: 0; }
.faq-index a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.faq-index a span { color: var(--mut); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.faq-index a:hover { background: var(--bg); }
.faq-index a.aktiv { background: var(--teal-l); color: var(--teal); font-weight: 700; }
.faq-index a.ds { color: var(--petrol); }
.faq-index a[hidden] { display: none; }

.faq-kapitel { margin-bottom: 56px; }
.faq-kapitel[hidden], .faq-liste[hidden], .faq-unter[hidden], details[hidden] { display: none; }
.faq-kapitel-kopf, .faq-ds-kopf { display: flex; gap: 16px; align-items: flex-start; }
.faq-symbol { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--teal-l); color: var(--teal); display: grid; place-items: center; }
.faq-kapitel-kopf .kicker, .faq-ds-kopf .kicker { margin-bottom: 2px; }
.faq-kapitel h2 { font-size: 26px; color: var(--navy); }
.faq-kapitel-kopf p:last-child, .faq-ds-kopf p:last-child { color: var(--mut); margin: 4px 0 0; }
.faq-unter { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mut); font-weight: 700; margin: 28px 0 0; }

.faq-liste { border-top: 1px solid var(--line); margin-top: 16px; }
.faq-unter + .faq-liste { margin-top: 6px; }
.faq-liste details { border-bottom: 1px solid var(--line); }
.faq-liste summary { list-style: none; cursor: pointer; padding: 16px 44px 16px 0; position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.faq-liste summary::-webkit-details-marker { display: none; }
.faq-liste summary::after { content: ""; position: absolute; right: 10px; top: 22px; width: 10px; height: 10px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg); transition: transform 0.15s; }
.faq-liste details[open] > summary::after { transform: rotate(-135deg); top: 27px; }
.faq-liste summary:hover h3 { color: var(--teal); }
.faq-liste h3 { font-size: 17px; color: var(--navy); font-weight: 650; flex: 1 1 320px; letter-spacing: -0.01em; }
.faq-tag { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.faq-tag.k { background: var(--amber-l); color: var(--amber-text); }
.faq-tag.b { background: var(--teal-l); color: var(--teal); }
.faq-tag.s { background: #ece9fb; color: #4b3fa6; }
.faq-tag.a { background: var(--bg); color: var(--navy); }
.faq-tag.bild { background: var(--bg); color: var(--mut); }
.faq-antwort { padding: 0 0 22px; color: var(--ink); max-width: 820px; }
.faq-antwort > * { margin-top: 0; margin-bottom: 0; }
.faq-antwort > * + * { margin-top: 10px; }
.faq-antwort ol, .faq-antwort ul { padding-left: 22px; margin-bottom: 0; }
.faq-antwort li + li { margin-top: 4px; }
.faq-antwort code { background: var(--bg); border-radius: 4px; padding: 1px 5px; font-size: 0.92em; }
.faq-kurz { background: var(--teal-l); border-radius: 10px; padding: 10px 14px; font-weight: 600; color: var(--navy); }
.faq-quelle { font-size: 13.5px; color: var(--mut); border-left: 3px solid var(--gold); padding-left: 10px; }
.faq-fuss { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px !important; font-size: 13.5px; color: var(--mut); }
.faq-fuss a { color: var(--teal); text-decoration: none; font-weight: 600; }
.faq-fuss a:hover { text-decoration: underline; }
.faq-fuss .faq-link { margin-left: auto; }
.faq-fuss .faq-link.kopiert::after { content: " ✓ kopiert"; color: var(--mut); font-weight: 500; }
mark.faq-mark { background: var(--amber-l); color: inherit; border-radius: 3px; padding: 0 1px; }
.faq-leer { background: var(--bg); border-radius: 12px; padding: 18px 20px; color: var(--mut); }

.faq-tabelle-rahmen { overflow-x: auto; }
.faq-tabelle { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.faq-tabelle th, .faq-tabelle td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.faq-tabelle th { background: var(--bg); color: var(--navy); font-size: 13px; }

/* Bildschirmfoto mit Markierungen */
.faq-bild { margin: 16px 0 0; }
.faq-bild.handy { max-width: 340px; }
.faq-bild-rahmen { display: block; width: 100%; position: relative; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; background: #fff; box-shadow: 0 8px 24px rgba(15, 42, 68, 0.12); }
.faq-bild-rahmen img { width: 100%; }
.faq-bild-rahmen::after { content: "Zum Vergrößern klicken"; position: absolute; right: 10px; bottom: 10px; background: rgba(15, 42, 68, 0.85); color: #fff; font: 600 12px Inter, sans-serif; padding: 4px 10px; border-radius: 999px; }
.mk { position: absolute; border: 3px solid var(--gold); border-radius: 8px; box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.3); pointer-events: none; }
.mk b { position: absolute; left: -14px; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy); font: 800 13px/26px Inter, sans-serif; text-align: center; box-shadow: 0 3px 8px rgba(15, 42, 68, 0.35); }
.faq-legende { list-style: none; padding: 0 !important; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 20px; font-size: 14.5px; }
.faq-legende li { display: flex; gap: 10px; align-items: baseline; margin: 0 !important; }
.faq-legende b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 12px; line-height: 22px; text-align: center; }
.faq-bild figcaption { font-size: 13px; color: var(--mut); margin-top: 8px; }

/* Lupe: Bild samt Markierungen groß */
dialog.faq-lupe { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
dialog.faq-lupe::backdrop { background: rgba(10, 25, 40, 0.86); }
.faq-lupe-innen { background: #fff; border-radius: 14px; overflow: auto; max-height: 94vh; }
.faq-lupe-leiste { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--mut); background: #fff; }
.faq-lupe-leiste button { flex: none; border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.faq-lupe .faq-bild-rahmen { border: 0; border-radius: 0; cursor: default; box-shadow: none; width: min(1500px, 94vw); }
.faq-lupe .faq-bild-rahmen.handy { width: min(520px, 94vw); margin: 0 auto; }
.faq-lupe .faq-bild-rahmen::after { display: none; }
.faq-lupe .faq-legende { padding: 4px 16px 16px !important; }
html.lupe-offen { overflow: hidden; }

/* Datenschutz als abgesetzter Block */
.faq-ds { background: linear-gradient(180deg, #f1f7f8 0%, #fff 420px); border: 1px solid #d5e7ea; border-radius: 20px; padding: 32px; margin-bottom: 56px; scroll-margin-top: 80px; }
.faq-ds-kopf .faq-symbol, .faq-ds .faq-symbol { background: var(--petrol); color: #fff; }
.faq-ds-kopf h2 { font-size: 28px; color: var(--navy); }
.faq-ds-kopf .kicker { color: var(--petrol); }
.faq-ds .faq-kapitel { margin: 40px 0 0; }
.faq-ds .faq-kapitel h2 { font-size: 22px; }
.faq-uebersicht { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 22px; }
.faq-uebersicht div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.faq-uebersicht b { display: block; color: var(--navy); font-size: 15px; }
.faq-uebersicht span { color: var(--mut); font-size: 13.5px; }

.faq-kontakt { background: var(--bg); border-radius: 16px; padding: 24px 28px; }
.faq-kontakt h2 { font-size: 20px; color: var(--navy); }
.faq-kontakt p { color: var(--mut); margin: 8px 0 0; }

/* Hilfe-Assistent: Chat-Optik, aber nur Suche in diesen Fragen (keine KI) */
.ha-knopf { position: fixed; right: 22px; bottom: 22px; z-index: 20; display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px 12px 14px; font: 700 15px Inter, sans-serif; box-shadow: var(--schatten); cursor: pointer; }
.ha-knopf[hidden], .ha-fenster[hidden] { display: none; }
.ha-knopf i { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; color: var(--navy); font-style: normal; font-weight: 800; }
.ha-knopf:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ha-fenster { position: fixed; right: 22px; bottom: 86px; z-index: 21; width: 390px; max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 42, 68, 0.35); overflow: hidden; }
.ha-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: var(--navy); color: #fff; padding: 14px 16px; }
.ha-kopf b { display: block; }
.ha-kopf small { display: block; color: var(--hell-text); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.ha-zu { flex: none; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.ha-verlauf { padding: 14px; display: grid; align-content: start; gap: 10px; overflow: auto; flex: 1; min-height: 160px; background: var(--bg); font-size: 14.5px; }
.ha-du { justify-self: end; background: var(--teal); color: #fff; padding: 9px 13px; border-radius: 14px 14px 4px 14px; max-width: 85%; overflow-wrap: anywhere; }
.ha-hilfe { justify-self: start; background: #fff; border: 1px solid var(--line); padding: 10px 13px; border-radius: 14px 14px 14px 4px; max-width: 94%; }
.ha-hilfe p { margin: 0; }
.ha-treffer { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--teal-l); color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14px; }
.ha-treffer:hover { background: #d3ebe9; }
.ha-treffer small { display: block; font-weight: 500; color: var(--mut); margin-top: 2px; }
.ha-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ha-vorschlaege button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font: 500 13px Inter, sans-serif; color: var(--teal); cursor: pointer; }
.ha-eingabe { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ha-eingabe input { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: 16px Inter, sans-serif; }
.ha-eingabe button { height: 42px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; font-weight: 700; padding: 0 14px; cursor: pointer; }
.ha-fuss { font-size: 12px; color: var(--mut); padding: 0 14px 12px; margin: 0; }

@media (max-width: 960px) {
  .faq-raster { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .faq-index { position: sticky; top: 68px; z-index: 5; max-height: none; background: #fff; margin: 0 -24px 28px; padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .faq-index h2 { display: none; }
  .faq-index a { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .faq-index a span { display: none; }
  [id] { scroll-margin-top: 130px; }
}
@media (max-width: 640px) {
  .faq-held { padding: 40px 0 32px; }
  .faq-index { margin: 0 -16px 24px; }
  .faq-ds { padding: 22px 16px; margin-left: -8px; margin-right: -8px; }
  .faq-kapitel h2 { font-size: 22px; }
  .faq-liste h3 { font-size: 16px; }
  .faq-fuss .faq-link { margin-left: 0; }
  .ha-knopf span { display: none; }
  .ha-knopf { padding: 12px; right: 16px; bottom: 16px; }
  .ha-fenster { right: 8px; left: 8px; bottom: 76px; width: auto; max-width: none; max-height: calc(100vh - 96px); }
}
@media (prefers-reduced-motion: reduce) { .faq-liste summary::after { transition: none; } }
@media print {
  .faq-held, .faq-index, .ha-knopf, .ha-fenster, .kopf, .fuss { display: none; }
  .faq-raster { display: block; }
  .faq-liste details { break-inside: avoid; }
}
.ha-kurz { margin-top: 6px !important; font-size: 13.5px; color: var(--mut); }
