/* Sicherheitsanalyse (/sicherheitsanalyse) und Assessment der Passwortverwaltung (/assessment).
   NEU 1.5.23. Eigene Datei, nur auf diesen beiden Seiten geladen. Baut auf der Formularkarte aus
   site.css auf und nutzt nur deren Farben, Ecken und Abstaende; die Auswahlkarten folgen den
   Gespraechsarten der Terminbuchung (termin.css). Ablauf und Logik: docs/FRAGEBOEGEN.md. */

.fb > * { max-width: 820px; }
/* GEAENDERT 1.5.31 (Marcel): keine feste Mindesthoehe, die Karte schiebt den Rest bei Bedarf nach unten */
.fb__hinweis { margin-top: 18px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }

/* Einstieg: zwei grosse Flaechen */
.fb__frage { font-size: clamp(21px, 2vw, 27px); font-weight: 480; letter-spacing: -0.02em; line-height: 1.3; }
.fb__einstieg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.fb__flaeche { display: grid; gap: 6px; padding: 26px 24px; text-align: left; border: 1px solid var(--linie-2); border-radius: var(--ecke); background: var(--grund); cursor: pointer; transition: border-color .3s, background-color .3s, box-shadow .3s; }
.fb__flaeche strong { font-size: 19px; font-weight: 560; letter-spacing: -0.012em; color: var(--ink); }
.fb__flaeche span { font-size: 14.5px; color: var(--ink-3); }
/* GEAENDERT 1.5.39 (Marcel: nach dem Weiterklicken war schon eine Antwort markiert): Hover nur mit echter
   Maus, und erst, wenn sie sich nach dem Wechsel bewegt hat (data-neu, fragebogen.js). Vorher lag die neue
   Antwort unter Finger oder Zeiger und sah aus wie gewaehlt; auf Handy und Tablet blieb der Zustand haengen. */
@media (hover: hover) and (pointer: fine) {
  .fb__flaeche:hover { border-color: var(--blau); box-shadow: inset 0 0 0 1px var(--blau); }
}
.fb__flaeche:focus-visible, .fb__antwort:focus-visible { outline: 2px solid var(--blau); outline-offset: 3px; }
.fb__zeile { margin-top: 18px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* Fortschritt */
.fb__stand { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-3); }
.fb__balken { height: 3px; margin: 10px 0 26px; border-radius: 2px; background: var(--linie); overflow: hidden; }
.fb__balken i { display: block; height: 100%; width: 0; background: var(--blau); transition: width .5s var(--ease); }

/* Antworten */
.fb__antworten { display: grid; gap: 10px; margin-top: 22px; }
.fb__antwort { display: block; width: 100%; padding: 15px 18px; text-align: left; font: inherit; font-size: 16px; line-height: 1.45; color: var(--ink); border: 1px solid var(--linie-2); border-radius: var(--ecke); background: var(--grund); cursor: pointer; transition: border-color .25s, background-color .25s, box-shadow .25s; }
@media (hover: hover) and (pointer: fine) {
  /* Nur der Rand: "ausgewaehlt" hat zusaetzlich Flaeche und doppelten Rand, beides ist klar zu unterscheiden */
  .fb__antworten:not([data-neu]) .fb__antwort:hover { border-color: var(--blau); }
}
/* Die Ueberschrift bekommt nach jedem Schritt den Fokus (fuer Bildschirmleser), aber keinen sichtbaren Rahmen */
.fb__karte h2:focus { outline: none; }
.fb__antwort[aria-pressed='true'] { border-color: var(--blau); background: var(--blau-zart); box-shadow: inset 0 0 0 1px var(--blau); }
/* NEU 1.5.45: kleiner Verweis auf eine Erklaerseite (nur Sicherheitsanalyse), kein Kasten, Linkblau */
.fb__erklaerung { margin-top: 14px; font-size: 13.5px; line-height: 1.5; }
.fb__erklaerung a { color: var(--blau-text); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.fb__erklaerung a:hover, .fb__erklaerung a:focus-visible { text-decoration-color: currentColor; }
.fb__fuss { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.fb__leise { padding: 6px 0; font: inherit; font-size: 15px; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.fb__leise:hover { color: var(--ink); }
.fb__leise[hidden] { display: none; }

/* Ergebnis Sicherheitsanalyse */
.fb__lage { font-size: clamp(26px, 2.6vw, 36px); font-weight: 460; letter-spacing: -0.025em; line-height: 1.2; }
.fb__satz { margin-top: 14px; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.fb__luecken { display: grid; gap: 12px; margin-top: 26px; }
.fb__luecken li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.6; }
.fb__luecken li::before { content: ''; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--blau); }
.fb__schluss { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--linie); font-size: 19px; font-weight: 480; line-height: 1.45; letter-spacing: -0.012em; }
.fb__weg { margin-top: 30px; }
.fb__weg strong { display: block; font-size: 17px; font-weight: 560; }
.fb__weg p { margin-top: 6px; color: var(--ink-2); line-height: 1.6; }
.fb__weg .knopfreihe { margin-top: 20px; }
.fb__weg .fb__freiwillig { margin-top: 14px; font-size: 14px; color: var(--ink-3); }
.fb__ausnahme p { margin-top: 14px; line-height: 1.65; color: var(--ink-2); }
.fb__ausnahme p:first-of-type { font-size: 17px; color: var(--ink); }

/* Ergebnis Assessment. GEAENDERT 1.5.36 (Marcel: "viel zu dezent, keiner scrollt bis da runter"):
   Gesamtstufe gross mit dem Namen in Blau, drei Saetze, die fuenf Felder kompakt als Ausschnitt.
   Darunter der naechste Schritt mit Marcels Schritt-Pfad (Grafik 78) und den Knoepfen. */
.fb__stufen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.fb__stufen i { height: 6px; border-radius: 1px; background: var(--linie); }
.fb__stufen i.an { background: var(--blau); }
.fb-erg__marke { font-size: 13.5px; color: var(--ink-3); }
.fb-erg__stufe { margin-top: 6px; font-size: clamp(42px, 5.2vw, 66px); font-weight: 440; letter-spacing: -0.035em; line-height: 1.04; }
.fb-erg__stufe span { color: var(--blau-text); }
.fb-erg__kurz { margin-top: 16px; max-width: 66ch; font-size: clamp(17px, 1.45vw, 19px); line-height: 1.6; color: var(--ink-2); }
.fb-erg__felder { display: grid; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--linie); }
.fb-erg__feld { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 200px) 72px; align-items: center; gap: 18px; font-size: 15px; }
.fb-erg__feld b { font-size: 14px; font-weight: 560; color: var(--blau-text); text-align: right; white-space: nowrap; }
.fb-erg__ausschnitt { margin-top: 20px; font-size: 14.5px; line-height: 1.6; color: var(--ink-3); }

.fb-weiter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(26px, 4vw, 52px); margin-top: 30px; padding: clamp(24px, 3.2vw, 40px); border-radius: var(--ecke-l); border: 1px solid var(--feld-rand); background: var(--feld); }
.fb-weiter h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 460; letter-spacing: -0.025em; line-height: 1.15; }
.fb-weiter__text > p:not(.fb__hinweis):not(.fb__freiwillig) { margin-top: 12px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.fb-weiter .knopfreihe { margin-top: 24px; }
/* NEU 1.5.40 (Marcel: "Termin buchen und Bericht anhaengen" auf dem Handy abgeschnitten): Knoepfe im Kasten
   brechen um statt abzuschneiden, schmal stehen sie untereinander in voller Breite */
.fb-weiter .knopf { max-width: 100%; white-space: normal; text-align: center; line-height: 1.3; padding-block: 12px; }
.fb-weiter .fb__freiwillig { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-3); }

/* Schritt-Pfad (Marcels Grafik 78): erledigt mit Haken, der jetzige Schritt gross und blau, Leitung dazwischen */
.fb-pfad { display: grid; gap: 26px; align-content: center; }
.fb-pfad li { position: relative; display: flex; align-items: flex-start; gap: 16px; min-height: 28px; font-size: 15.5px; line-height: 1.4; color: var(--ink-2); }
.fb-pfad i { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--linie-2); background: var(--grund); }
.fb-pfad li:not(:last-child)::after { content: ''; position: absolute; left: 12.5px; top: 28px; height: calc(100% - 2px); width: 3px; background: var(--linie); transform-origin: 50% 0; }
.fb-pfad__erledigt i { border-color: var(--blau); background: var(--blau); }
.fb-pfad__erledigt i::after { content: ''; width: 6px; height: 11px; margin-top: -3px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.fb-pfad li.fb-pfad__erledigt:not(:last-child)::after { background: var(--blau); }
.fb-pfad span { padding-top: 3px; }
.fb-pfad__jetzt { font-weight: 560; color: var(--ink); }
.fb-pfad__jetzt i { border-color: var(--blau); background: var(--blau); box-shadow: 0 0 0 6px var(--blau-zart); }
@media (prefers-reduced-motion: no-preference) {
  .fb-pfad li { animation: fb-pfad-rein .5s var(--ease) both; }
  .fb-pfad li:nth-child(2) { animation-delay: .15s; }
  .fb-pfad li:nth-child(3) { animation-delay: .3s; }
  .fb-pfad li:nth-child(4) { animation-delay: .45s; }
  .fb-pfad li:not(:last-child)::after { animation: fb-pfad-leitung .5s var(--ease) both; animation-delay: inherit; }
  .fb-pfad__jetzt i { animation: fb-pfad-puls 2.4s ease-in-out .9s infinite; }
}
@keyframes fb-pfad-rein { from { opacity: 0; transform: translateY(6px); } }
@keyframes fb-pfad-leitung { from { transform: scaleY(0); } }
@keyframes fb-pfad-puls { 50% { box-shadow: 0 0 0 10px var(--blau-zart); } }

.fb__grenzen { margin-top: 30px; padding: 20px 22px; border: 1px solid var(--linie); border-radius: var(--ecke); }
.fb__grenzen strong { font-weight: 560; }
.fb__grenzen ol { display: grid; gap: 10px; margin: 14px 0; padding-left: 20px; list-style: decimal; }
.fb__grenzen p, .fb__grenzen li { line-height: 1.6; color: var(--ink-2); }

@media (max-width: 760px) {
  .fb-weiter { grid-template-columns: minmax(0, 1fr); }
  .fb-weiter .knopfreihe { flex-direction: column; align-items: stretch; }
}
@media (max-width: 640px) {
  .fb__einstieg { grid-template-columns: minmax(0, 1fr); }
  .fb__fuss { flex-wrap: wrap; }
  .fb-erg__feld { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; font-size: 14.5px; }
  .fb-erg__feld > span { grid-column: 1 / -1; }
}
@media print {
  .kopf, .fuss, .fb__fuss, .fb__weg .knopfreihe, .fb__knoepfe { display: none !important; }
}

/* ---------- Seitenaufbau seit 1.5.27 (Marcel: "leer und langweilig") ----------
   GEAENDERT 1.5.30 (Marcel): statt Foto eine technische Kopfgrafik (seit 1.5.31 Marcels Vorlagen ueber scripts/kopfgrafiken.py),
   der Fragebogen steht direkt unter dem Seitenkopf. Bilder nur noch in den Kacheln. */
/* GEAENDERT 1.5.31 (Marcel: "wieso so viel Padding"): Seitenkopf, Fragebogen und naechster Abschnitt
   ruecken zusammen; der Fragebogen-Titel steht naeher an der Karte. */
.seitenkopf--vor-formular { padding-bottom: clamp(24px, 3vw, 48px); }
.seitenkopf + .abschnitt--band { padding-top: clamp(24px, 3vw, 48px); padding-bottom: calc(var(--abstand) * .5); }
.abschnitt--band + .abschnitt { padding-top: calc(var(--abstand) * .5); }
.abschnitt--band .kopfblock { margin-bottom: clamp(24px, 3vw, 40px); }

/* Band: der Fragebogen mittig. GEAENDERT 1.5.29 (Marcel): kein eigener Grund und keine Kanten mehr,
   derselbe Grund wie jede andere Section; sonst sah man die Kante zwischen zwei Schwarztoenen. */
.abschnitt--band .fb { display: grid; justify-items: center; }
.abschnitt--band .fb > * { width: 100%; max-width: 860px; }
.abschnitt--band .kopfblock { max-width: 860px; text-align: center; justify-items: center; }
.abschnitt--band .kopfblock .aussage { justify-self: center; }

/* Datenschutz-Abzeichen unter bzw. ueber dem Fragebogen */
.fb-zeichen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.fb-zeichen div { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--linie); border-radius: var(--ecke); background: var(--grund); font-size: 14.5px; line-height: 1.4; }
.fb-zeichen svg { flex: none; width: 22px; height: 22px; color: var(--blau-text); }

@media (max-width: 860px) {
  .fb-zeichen { grid-template-columns: minmax(0, 1fr); }
}

/* Zweiter Knopf im Schlussblock: der Block hat immer dunklen Grund, auch im hellen Design */
.abschluss .knopf--zweit { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.abschluss .knopf--zweit:hover, .abschluss .knopf--zweit:focus-visible { border-color: #fff; }
