/* Erstgespräch — geführter Dialog im eigenen Overlay.
   Farbigkeit und Typografie folgen der bestehenden Seite. */

.eg {
  --eg-line: rgba(8,8,8,.26);
  --eg-soft: rgba(8,8,8,.10);
  --eg-akzent: #5b6b71;
  --eg-fehler: #9a2b22;
  color: #080808;
  font-family: "ABC Diatype Light", "ABC Diatype Light Fallback", sans-serif;
  font-weight: 300;
}
.eg *, .eg *::before, .eg *::after { box-sizing: border-box; }

/* Fortschritt */
.eg__top { margin-bottom: 26px; }
.eg__meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--eg-akzent); margin-bottom: 10px;
}
.eg__bar { height: 2px; background: var(--eg-soft); }
.eg__bar i { display: block; height: 100%; background: #080808; width: 0; transition: width .45s cubic-bezier(.22,.61,.36,1); }

/* Frage */
.eg__gruppe { border: 0; margin: 0; padding: 0; min-width: 0; }
.eg__frage {
  font-size: clamp(21px, 4.2vw, 29px); line-height: 1.22; margin: 0 0 8px;
  padding: 0; font-weight: 400; display: block; float: none; width: 100%;
}
.eg__frage:focus { outline: none; }
.eg__frage:focus-visible { outline: 2px solid #080808; outline-offset: 4px; }
.eg__hinweis { font-size: 14px; color: #55646a; margin: 0 0 22px; max-width: 46ch; line-height: 1.5; }
.eg__opt-mark { text-transform: none; letter-spacing: 0; }

/* Antwortkacheln — echte Optionsfelder, damit Tastatur und Screenreader
   die Gruppe als Auswahl erkennen. */
.eg__optionen { display: grid; gap: 10px; margin-bottom: 26px; }
@media (min-width: 620px) { .eg__optionen--zwei { grid-template-columns: 1fr 1fr; } }

.eg__opt {
  display: flex; align-items: flex-start; gap: 13px; position: relative;
  width: 100%; text-align: left; padding: 16px 18px;
  border: 1px solid var(--eg-line); background: transparent; color: #080808;
  cursor: pointer; transition: background .25s ease, border-color .25s ease;
  font: inherit; line-height: 1.4; min-height: 58px;
}
.eg__opt input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.eg__opt:hover { background: rgba(8,8,8,.045); border-color: #080808; }
.eg__opt:has(input:focus-visible) { outline: 2px solid #080808; outline-offset: 3px; }
.eg__opt.ist-gewaehlt { background: #080808; color: #F2EEE9; border-color: #080808; }
.eg__opt .mark {
  flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px;
  border: 1px solid currentColor; border-radius: 50%; position: relative;
}
.eg__opt.ist-gewaehlt .mark::after {
  content: ""; position: absolute; inset: 3px; background: currentColor; border-radius: 50%;
}
.eg__opt b { display: block; font-weight: 400; }
.eg__opt small { display: block; font-size: 13px; opacity: .78; margin-top: 3px; }

/* Felder */
.eg__feld { margin-bottom: 18px; }
.eg__feld label {
  display: block; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--eg-akzent); margin-bottom: 7px;
}
.eg__feld input, .eg__feld textarea {
  width: 100%; padding: 13px 0; font: inherit; font-size: 16px; color: #080808;
  background: transparent; border: 0; border-bottom: 1px solid var(--eg-line); border-radius: 0;
  min-height: 46px;
}
.eg__feld textarea { min-height: 84px; resize: vertical; }
.eg__feld input:focus, .eg__feld textarea:focus { outline: none; }
/* Sichtbarer Fokus unabhängig davon, ob das Feld gefüllt ist. */
.eg__feld input:focus-visible, .eg__feld textarea:focus-visible {
  outline: 2px solid #080808; outline-offset: 2px; border-bottom-color: #080808;
}
.eg__feld input::placeholder, .eg__feld textarea::placeholder { color: rgba(8,8,8,.58); }
.eg__feld.fehler input, .eg__feld.fehler textarea { border-bottom-color: var(--eg-fehler); border-bottom-width: 2px; }
.eg__feld .fehlertext { display: none; font-size: 12.5px; color: var(--eg-fehler); margin-top: 6px; }
.eg__feld.fehler .fehlertext { display: block; }

.eg__check { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 22px; font-size: 13.5px; line-height: 1.5; }
.eg__check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: #080808; }
.eg__check input:focus-visible { outline: 2px solid #080808; outline-offset: 2px; }
.eg__check a { color: #080808; text-decoration: underline; text-underline-offset: 3px; }

/* Steuerung */
.eg__nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eg__btn {
  font: inherit; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 14px 26px; border: 1px solid #080808; background: #080808; color: #F2EEE9;
  cursor: pointer; transition: opacity .25s ease;
}
.eg__btn:hover { opacity: .85; }
.eg__btn:focus-visible { outline: 2px solid #080808; outline-offset: 3px; }
.eg__btn--ghost { background: transparent; color: #080808; }
.eg__btn[disabled] { opacity: .4; cursor: not-allowed; }

/* Meldung */
.eg__meldung { margin: 0 0 16px; font-size: 13.5px; line-height: 1.5; color: #3f4a4f; min-height: 0; }
.eg__meldung:empty { margin: 0; }
.eg__meldung.ist-fehler { color: var(--eg-fehler); }

/* Ergebnis */
.eg__ergebnis { border: 1px solid var(--eg-line); background: rgba(91,107,113,.09); padding: 20px; margin-bottom: 22px; }
.eg__ergebnis .kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--eg-akzent); }
.eg__ergebnis h3 { font-size: 20px; font-weight: 400; margin: 8px 0 10px; line-height: 1.25; }
.eg__ergebnis p { margin: 0 0 12px; font-size: 14px; color: #3f4a4f; line-height: 1.6; }
.eg__ergebnis a.mehr { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #080808; text-decoration: underline; text-underline-offset: 3px; }

.eg__zusammenfassung { list-style: none; margin: 0 0 22px; padding: 0; font-size: 13px; }
.eg__zusammenfassung li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--eg-soft); }
.eg__zusammenfassung span:first-child { color: var(--eg-akzent); }
.eg__zusammenfassung span:last-child { text-align: right; }

.eg__fertig { text-align: left; }
.eg__fertig .eg__frage { margin-bottom: 12px; }
.eg__fertig p { font-size: 15px; color: #3f4a4f; margin: 0 0 14px; line-height: 1.6; }

/* Honigtopf */
.eg__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .eg__bar i { transition: none; }
}

/* Glut im Dialog: Fortschritt, gewählte Antwort, Weiter-Knopf. */
.eg__bar i { background: var(--in-glut, #B9472E); }
.eg__opt:hover { border-color: var(--in-glut, #B9472E); background: rgba(185,71,46,.06); }
.eg__opt.ist-gewaehlt { background: var(--in-glut, #B9472E); border-color: var(--in-glut, #B9472E); color: #fff; }
.eg__btn { background: var(--in-glut, #B9472E); border-color: var(--in-glut, #B9472E); color: #fff; }
.eg__btn:hover { background: transparent; color: var(--in-glut, #B9472E); }
.eg__btn--ghost { background: transparent; border-color: #080808; color: #080808; }
.eg__btn--ghost:hover { background: #080808; color: #F2EEE9; }
.eg__check input { accent-color: var(--in-glut, #B9472E); }
.eg__feld input:focus, .eg__feld textarea:focus { border-bottom-color: var(--in-glut, #B9472E); outline-color: var(--in-glut, #B9472E); }
.eg { --eg-akzent: #B9472E; }
