/* Anfrageformular Entwurf W (08.11.2026): eine Frage pro Schritt, große Antwort-Kästen, rechts wächst „Ihre Anfrage“ mit.
   Formsprache wie die Startseite: Switzer, monochrom, Kästen 8 px, Kennzeichen 4 px. */
.af-seite { background: var(--bg); }
.af-kopf { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--linie); }
.af-zu { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; font-size: 15px; font-weight: 500; color: var(--fg); }
.af-zu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.af-fortschritt { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.af-fortschritt span { display: block; width: 0; height: 100%; background: var(--fg); transition: width 480ms cubic-bezier(.3, .7, .2, 1); }

.af { padding: 64px 0 120px; }
.af-raster { max-width: 1560px; margin: 0 auto; /* so breit wie die Startseite (.rahmen), Kanten bündig mit Logo und „Schließen“ (Mischa, 08.11.; vorher 1320) */ padding: 0 clamp(40px, 5.5vw, 96px); display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(48px, 6vw, 104px); align-items: start; }
.af-raster.fertig { grid-template-columns: minmax(0, 1fr); }
.af-raster.fertig .af-info, .af-raster.fertig .af-leiste { display: none; }

/* Kopf jeder Frage */
.af-zaehler { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--fg-2); }
.af-chip { height: 26px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 4px; font-size: 12.5px; color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); border: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.af-frage { margin-top: 16px; max-width: 18em; font-size: clamp(30px, 18px + 1.7vw, 44px); font-weight: 500; line-height: 1.08; letter-spacing: -0.032em; text-wrap: balance; outline: none; }
.af-hinweis { margin-top: 14px; max-width: 34em; font-size: 17px; line-height: 1.5; color: var(--fg-2); text-wrap: pretty; }
.af-hinweis a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* Antwort-Kästen */
.af-optionen { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.af-optionen.af-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.af-optionen.af-drei { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.af-option { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent); border-radius: 8px; background: var(--bg); font: inherit; color: var(--fg); text-align: left; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 120ms ease; }
.af-option:hover { background: var(--karte); }
.af-option:active { transform: scale(0.99); }
.af-option:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.af-option[aria-checked="true"] { border-color: var(--fg); background: var(--karte); box-shadow: inset 0 0 0 0.5px var(--fg); }
.af-text { min-width: 0; }
.af-text b { display: block; font-size: 15.5px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; text-wrap: pretty; }
.af-text small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--fg-2); text-wrap: pretty; }
/* Haken rechts: rund bei einer Antwort, eckig bei mehreren */
.af-haken { flex: none; margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--fg) 28%, transparent); display: grid; place-items: center; transition: background-color 160ms ease, border-color 160ms ease; }
[data-art="mehrere"] .af-haken { border-radius: 4px; }
.af-haken svg { width: 12px; height: 12px; fill: none; stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); transition: opacity 160ms ease, transform 200ms cubic-bezier(.2, .8, .2, 1.2); }
.af-option[aria-checked="true"] .af-haken { background: var(--fg); border-color: var(--fg); }
.af-option[aria-checked="true"] .af-haken svg { opacity: 1; transform: none; }
/* Branchen als längliche Zeilen, zwei nebeneinander (Mischa, 08.11.; vorher 4 Kacheln je Reihe): Icon links, Name und Beispiele, Haken rechts */
.af-kacheln .af-option { gap: 16px; min-height: 78px; padding: 14px 18px; }
.af-icon { flex: none; }
.af-icon svg { display: block; width: 24px; height: 24px; fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Zusatzfelder (Andere Branche, Webseiten-Adresse) und Kontakt */
.af-zusatz { margin-top: 18px; max-width: 520px; }
.af-zusatz[hidden] { display: none; }
.af-gruppe { margin-top: 34px; }
.af-gruppe + .af-gruppe { margin-top: 30px; }
.af-gruppe-titel { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.af-gruppe .af-optionen { margin-top: 0; }
.af-felder { margin-top: 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.af-voll { grid-column: 1 / -1; }
.af-feld label, .af-feld .af-gruppe-titel { display: block; margin: 0 0 7px; font-size: 13.5px; font-weight: 500; }
.af-optional { font-weight: 400; color: var(--fg-2); }
.af-feld input, .af-feld textarea { width: 100%; height: 52px; padding: 0 14px; border: 1px solid color-mix(in srgb, var(--fg) 16%, transparent); border-radius: 8px; background: var(--bg); font: inherit; font-size: 16px; color: var(--fg); transition: border-color 160ms ease, box-shadow 160ms ease; }
.af-feld textarea { height: 112px; padding: 13px 14px; resize: vertical; line-height: 1.5; }
.af-feld input::placeholder, .af-feld textarea::placeholder { color: color-mix(in srgb, var(--fg) 38%, transparent); }
.af-feld input:focus, .af-feld textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent); }
.af-feld.fehlt input { border-color: #c23a2b; }
.af-fehler { margin-top: 6px; font-size: 13px; color: #c23a2b; }
.af-fehler:empty { display: none; }
.af-drei .af-option { min-height: 52px; padding: 12px 14px; }
.af-recht { margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--fg-2); }
.af-recht a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* Leiste unten: Zurück links, Weiter rechts */
.af-leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--linie); }
.af-zurueck { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--fg-2); cursor: pointer; transition: color 160ms ease; }
.af-zurueck:hover { color: var(--fg); }
.af-zurueck svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.af-zurueck.weg { visibility: hidden; }
.af-weiter { border: 0; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity 200ms ease, background-color 160ms ease; }
.af-weiter:disabled { opacity: 0.28; cursor: not-allowed; }

/* rechte Spalte: Zusammenfassung wächst mit, jede Zeile springt zurück zur Frage */
.af-info { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 12px; }
.af-zusammen { padding: 22px 22px 10px; border-radius: 8px; background: var(--karte); }
.af-zusammen h2 { font-size: 15px; font-weight: 600; }
.af-leer { margin: 8px 0 12px; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.af-liste { margin-top: 10px; }
.af-eintrag { position: relative; display: block; width: 100%; padding: 12px 64px 12px 0; border: 0; border-top: 1px solid var(--linie); background: none; font: inherit; color: var(--fg); text-align: left; cursor: pointer; animation: af-eintrag 360ms cubic-bezier(.2, .7, .2, 1) both; }
.af-eintrag span { display: block; }
.af-e-label { font-size: 12.5px; color: var(--fg-2); }
.af-e-wert { margin-top: 1px; font-size: 14.5px; font-weight: 500; line-height: 1.4; }
.af-e-aendern { position: absolute; right: 0; top: 12px; font-size: 12.5px; color: var(--fg-2); opacity: 0; transition: opacity 160ms ease; }
.af-eintrag:hover .af-e-aendern, .af-eintrag:focus-visible .af-e-aendern { opacity: 1; }
@keyframes af-eintrag { from { opacity: 0; transform: translateY(6px); } }
.af-team { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 8px; border: 1px solid var(--linie); }
.af-avatare { display: flex; flex: none; }
.af-avatare img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }
.af-avatare img + img { margin-left: -10px; }
.af-team b { display: block; font-size: 14.5px; font-weight: 600; }
.af-team small { display: block; font-size: 13px; color: var(--fg-2); }

/* Wechsel zwischen den Fragen */
.af-raus { opacity: 0; transform: translateY(-8px); transition: opacity 140ms ease, transform 140ms ease; }
.af-rein { animation: af-rein 380ms cubic-bezier(.2, .7, .2, 1) both; }
.af-rein-zurueck { animation: af-rein-zurueck 380ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes af-rein { from { opacity: 0; transform: translateY(14px); } }
@keyframes af-rein-zurueck { from { opacity: 0; transform: translateY(-14px); } }

/* Danke-Seite */
.af-danke { max-width: 900px; }
.af-danke-haken { width: 48px; height: 48px; border-radius: 8px; background: var(--fg); display: grid; place-items: center; }
.af-danke-haken svg { width: 22px; height: 22px; fill: none; stroke: var(--bg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.af-danke .af-frage { margin-top: 26px; }
.af-karten2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.af-karte { padding: 22px 22px 12px; border-radius: 8px; background: var(--karte); }
.af-karte h2 { margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.af-vorschlag li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie); }
.af-vorschlag svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.af-vorschlag b { display: block; font-size: 15px; font-weight: 500; line-height: 1.35; }
.af-vorschlag small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--fg-2); }
.af-karte .af-eintrag { cursor: default; padding-right: 0; animation: none; }
.af-danke-fuss { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.af-danke-fuss .af-team { border: 0; padding: 0; }

/* Tablet: eine Spalte, Zusammenfassung nur auf großen Bildschirmen */
@media (max-width: 1080px) {
  .af-raster { grid-template-columns: minmax(0, 1fr); }
  .af-info { display: none; }
}
/* Handy: Kacheln zweispaltig, Leiste klebt unten, Zurück als Kästchen */
@media (max-width: 719.98px) {
  .af { padding: 28px 0 0; }
  .af-raster { padding: 0 16px; }
  .af-frage { margin-top: 12px; font-size: 29px; }
  .af-hinweis { margin-top: 10px; font-size: 16px; }
  .af-optionen { grid-template-columns: minmax(0, 1fr); margin-top: 24px; gap: 8px; }
  .af-optionen.af-kacheln { grid-template-columns: minmax(0, 1fr); } /* Branchen als Liste untereinander */
  .af-kacheln .af-option { min-height: 64px; gap: 14px; padding: 12px 16px; }
  .af-kacheln .af-text small { font-size: 12.5px; }
  .af-option { min-height: 56px; }
  .af-felder { grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
  .af-optionen.af-start { grid-template-columns: minmax(0, 1fr); } /* Start-Antworten sind zu lang für drei Spalten */
  .af-start .af-option { min-height: 56px; padding: 14px 16px; }
  .af-leiste { position: sticky; bottom: 0; z-index: 5; margin: 28px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg);
    transform: translateZ(0); /* iOS Safari: eigene Ebene, sonst bleibt beim Einblenden von Zurück ein schwarzer Rest vom breiten Weiter-Knopf stehen */ }
  .af-zurueck { flex: none; width: 50px; height: 50px; justify-content: center; padding: 0; border: 1px solid var(--linie); border-radius: 8px; color: var(--fg); background: var(--bg); }
  .af-zurueck span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .af-zurueck.weg { display: none; }
  .af-weiter { flex: 1; height: 50px; }
  .af-karten2 { grid-template-columns: minmax(0, 1fr); margin-top: 30px; }
  .af-danke { padding-bottom: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .af-rein, .af-rein-zurueck, .af-eintrag { animation: none; }
  .af-raus { transition: none; }
}
/* Versandfehler unter dem Senden-Knopf (Mischa 10.11.) */
.af-sendefehler { flex-basis: 100%; margin: 12px 0 0; padding: 12px 14px; border-radius: 8px; background: #fff3f0; color: #7a2a14; font-size: 14px; line-height: 1.5; }
.af-sendefehler a { color: inherit; text-decoration: underline; }
.af-weiter.sendet { opacity: .7; pointer-events: none; }

/* Kontaktfragen als Gespräch mit dem KI-Assistenten (Mischa 10.11.): Seite wird dunkel, oben der Partikel-Kopf aus dem Chat,
   jede Frage als Sprechblase, die letzte Antwort rechts als eigene Blase */
body.af-seite { transition: background-color 520ms ease, color 520ms ease; }
.af-kopf { transition: background-color 520ms ease, border-color 520ms ease; }
body.af-dunkel { --bg: rgb(11, 11, 12); --fg: rgb(245, 245, 246); --fg-2: rgba(245, 245, 246, 0.62); --linie: rgba(245, 245, 246, 0.12); --karte: rgb(28, 28, 31); color: var(--fg); }
.af-agent { position: relative; display: flex; align-items: center; gap: 16px; max-width: 640px; animation: af-rein 520ms cubic-bezier(.2, .7, .2, 1) both; }
.af-agent[hidden] { display: none; }
.af-agent .bot-flug { display: none; }
.af-agent .bot-gesicht { order: 0; flex: none; width: 104px; aspect-ratio: 1; margin: 0 0 0 -10px; color: var(--fg); }
.af-agent-name { order: 1; }
.af-agent .bot-gesicht canvas { display: block; width: 100%; height: 100%; }
.af-agent-name b { display: block; font-size: 15px; font-weight: 600; }
.af-agent-name small { display: block; font-size: 13px; color: var(--fg-2); }
.af-chat { max-width: 640px; }
.af-chat .af-zaehler { display: none; }
.af-du { display: table; margin: 18px 0 0 auto; max-width: 80%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--fg); color: var(--bg); font-size: 15.5px; line-height: 1.4; }
.af-blase { margin-top: 14px; max-width: none; min-height: 2.3em; padding: 18px 20px; border-radius: 4px 16px 16px 16px; background: var(--karte); font-size: clamp(22px, 15px + 0.9vw, 28px); line-height: 1.25; letter-spacing: -0.02em; }
.af-chat-feld { margin-top: 22px; }
.af-chat-feld input { height: 58px; padding: 0 18px; font-size: 17px; background: var(--karte); border-color: var(--linie); }
.af-weg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.af-chat-optional { margin-top: 8px; font-size: 13px; color: var(--fg-2); }
.af-optionen.af-chat-wahl { margin-top: 22px; }
.af-chat-wahl .af-option { min-height: 58px; }
body.af-dunkel .af-fehler, body.af-dunkel .af-feld.fehlt input { color: #ff8a73; border-color: #ff8a73; }
body.af-dunkel .af-feld.fehlt input { color: var(--fg); }
@media (max-width: 719.98px) {
  .af-agent .bot-gesicht { width: 76px; margin: 0 0 0 -6px; }
  .af-blase { font-size: 21px; padding: 15px 16px; }
  .af-chat-wahl.af-optionen { grid-template-columns: minmax(0, 1fr); }
}

/* Danke: Haken links neben der Überschrift (Mischa 10.11.) */
.af-danke-kopf { display: flex; align-items: center; gap: 18px; margin-top: 8px; }
.af-danke-kopf .af-danke-haken { flex: none; }
.af-danke .af-danke-kopf .af-frage { margin-top: 0; }
@media (max-width: 719.98px) { .af-danke-kopf { align-items: flex-start; gap: 14px; } .af-danke-kopf .af-danke-haken { width: 40px; height: 40px; margin-top: 2px; } }

/* Letzter Schritt: Text links, Pfeil rechts statt zentriert (Mischa 10.11.) */
.af-weiter.kn-pfeil { justify-content: space-between; gap: 16px; padding-left: 22px; padding-right: 6px; }
@media (max-width: 719.98px) { .af-weiter.kn-pfeil { padding-left: 20px; padding-right: 8px; } }
