/* ═════════════════════════════════════════════════════════════════════════
   Unternehmen prüfen — vier Schritte, eine Frage je Bildschirm

   Nutzt ausschließlich die Tokens aus main.css (--canvas, --ink, --muted,
   --line, --line-2, --cta, --cta-tief, --cta-text, --serif, --sans, --ease,
   --dur-fast). Keine eigene Palette, keine zweite Schriftfamilie.

   Die hochwertige Wirkung kommt aus Typografie, Abstand und Ruhe — nicht aus
   Schatten, Verläufen oder Karten. Deshalb: keine Fläche auf der Fläche.
   ═════════════════════════════════════════════════════════════════════════ */

.pruef {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--canvas);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pruef[hidden] { display: none; }

/* Auf projektprofil.html läuft derselbe Ablauf ohne Überlagerung — gleiche
   Bausteine, gleiche Logik, nur nicht über der Seite liegend. */
.pruef--seite {
  position: static;
  /* dvh, nicht vh: auf iOS zählt vh die Adressleiste mit, und der Schritt
     rutscht unter den Bildrand. Der Rahmen scrollt notfalls in sich, damit
     die Seite selbst nie scrollt. */
  height: 100dvh;
  z-index: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ── Kopf: Marke links, Schließen rechts ───────────────────────────────── */

.pruef__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 28px) var(--gutter);
}
/* Wie in Kopf- und Fusszeile: der Punkt sitzt auf der Schriftgrundlinie,
   nicht auf halber Bildhoehe, und Groesse, Abstand und Lage rechnen aus der
   Hoehe der Wortmarke. */
.pruef__marke { --marke-h: 19px; display: inline-flex; align-items: flex-end; gap: 0; }
.pruef__marke .marke__punkt {
  width: calc(var(--marke-h) * 0.205); height: calc(var(--marke-h) * 0.205);
  margin-left: calc(var(--marke-h) * -0.034);
  margin-bottom: calc(var(--marke-h) * 0.15);
}
.pruef__marke img { height: var(--marke-h); width: auto; display: block; }

.pruef__zu {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 6px 9px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border-radius: 999px;
  transition: color var(--dur-fast) var(--ease);
}
.pruef__zu:hover { color: var(--ink); }
.pruef__zu svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.pruef--seite .pruef__zu svg { transform: rotate(180deg); }

/* ── Mitte: Fortschritt, Frage, Antworten ──────────────────────────────── */

.pruef__mitte {
  display: grid;
  align-content: center;
  justify-items: stretch;
  padding: clamp(16px, 3vw, 40px) var(--gutter) clamp(28px, 4vw, 56px);
}
.pruef__bahn { width: 100%; max-width: 700px; margin: 0 auto; }

.pruef__fortschritt { display: grid; gap: 12px; margin-bottom: clamp(26px, 3.4vw, 44px); }
.pruef__zaehler {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pruef__linie { height: 1px; background: var(--line); position: relative; }
.pruef__linie i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 25%;
  background: var(--cta-tief);
  transition: width 620ms var(--ease);
}

/* Ein Schritt liegt immer allein im Bild. */
.pruef__schritt { display: none; }
.pruef__schritt.is-an { display: block; }
.pruef__schritt.is-kommt { animation: pruef-auf 320ms var(--ease) both; }
@keyframes pruef-auf {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}
.pruef__schritt.is-geht { animation: pruef-ab 180ms var(--ease) both; }
@keyframes pruef-ab {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateY(-7px); }
}

.pruef__frage {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 19ch;
}
/* Die Frage bekommt beim Schrittwechsel den Fokus, damit Vorlesehilfen den
   Wechsel mitbekommen. Sie ist aber nichts zum Bedienen — also kein Rahmen. */
.pruef__frage:focus,
.pruef__dank:focus { outline: none; }

.pruef__hinweis {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ── Antwortzeilen: ganze Zeile klickbar, keine Karten, keine Symbole ──── */

.pruef__liste { margin-top: clamp(26px, 3.2vw, 40px); border-top: 1px solid var(--line); }
.pruef__opt {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 68px;
  padding: 18px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), padding-left var(--dur-fast) var(--ease);
}
.pruef__opt:hover { color: var(--ink); padding-left: 10px; }
.pruef__opt:focus-visible { outline: 2px solid var(--cta-tief); outline-offset: 3px; }

/* Der Auswahlzustand ist ein Punkt, kein Häkchen und kein Symbol. */
.pruef__punkt {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.pruef__opt:hover .pruef__punkt { border-color: var(--muted); }
.pruef__opt.is-gewaehlt { color: var(--ink); }
.pruef__opt.is-gewaehlt .pruef__punkt {
  background: var(--cta);
  border-color: var(--cta-tief);
  transform: scale(1.35);
}
.pruef__opt.is-gewaehlt span:last-child { font-weight: 500; }

/* ── Eingabefelder ─────────────────────────────────────────────────────── */

.pruef__feld { margin-top: clamp(26px, 3vw, 38px); }
.pruef__feld + .pruef__feld { margin-top: 26px; }
.pruef__label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.pruef__eingabe {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  /* Nie unter 16px — sonst zoomt iOS beim Fokus in das Feld hinein. */
  font-size: clamp(17px, 1.5vw, 21px);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.pruef__eingabe::placeholder { color: color-mix(in oklab, var(--muted) 62%, transparent); }
/* Der Fokus faerbt die Linie und setzt denselben Ring wie bei den
   Auswahlzeilen. Ohne eigene Regel zeichnete der Browser seinen Standardring
   in Schwarz — sichtbar, aber eine zweite Formensprache. */
.pruef__eingabe:focus { border-bottom-color: var(--cta-tief); }
.pruef__eingabe:focus-visible { outline: 2px solid var(--cta-tief); outline-offset: 4px; border-radius: 3px; }

.pruef__zusatz { display: none; }
.pruef__zusatz.is-an { display: block; animation: pruef-auf 320ms var(--ease) both; }

.pruef__fehler {
  margin-top: 16px;
  color: #8c2f1f;
  font-size: 14.5px;
  line-height: 1.5;
  display: none;
}
.pruef__fehler.is-an { display: block; }

/* ── Einwilligung: bestehender, abgestimmter Text ──────────────────────── */

.pruef__einwilligung {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: clamp(26px, 3vw, 36px);
  max-width: 52ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  cursor: pointer;
}
.pruef__einwilligung input { margin-top: 3px; flex-shrink: 0; width: 17px; height: 17px; accent-color: var(--cta); }

/* ── Aktionen ──────────────────────────────────────────────────────────── */

.pruef__aktionen {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: clamp(28px, 3.4vw, 40px);
}
.pruef__weiter {
  padding: 15px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--cta);
  color: var(--cta-schrift);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  min-height: 50px;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.pruef__weiter:hover { opacity: 0.9; transform: translateY(-1px); }
.pruef__weiter[disabled] { opacity: 0.4; pointer-events: none; transform: none; }
.pruef__weiter.is-sendet { pointer-events: none; opacity: 0.85; }

.pruef__zurueck {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
  padding: 8px 2px;
  min-height: 44px;
  transition: color var(--dur-fast) var(--ease);
}
.pruef__zurueck:hover { color: var(--ink); }
.pruef__zurueck[hidden] { display: none; }

.pruef__klein { margin-top: 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 46ch; }

/* ── Fuß: die Person, die tatsächlich prüft ────────────────────────────── */

.pruef__fuss {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: clamp(16px, 2vw, 24px) var(--gutter) clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
.pruef__fuss img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  background: var(--canvas-2);
  flex: 0 0 auto;
}
.pruef__fuss b { color: var(--ink); font-weight: 600; }

/* ── Abschluss ─────────────────────────────────────────────────────────── */

.pruef__dank {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.pruef__folge { margin-top: 18px; max-width: 48ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--ink-2); }

.pruef__zusammenfassung {
  margin-top: clamp(30px, 3.6vw, 44px);
  border-top: 1px solid var(--line);
}
.pruef__zeile {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
}
.pruef__zeile dt { color: var(--muted); }
.pruef__zeile dd { color: var(--ink); margin: 0; }

/* ── Mobil: eigene senkrechte Komposition ──────────────────────────────── */

@media (max-width: 719px) {
  .pruef__mitte { align-content: start; padding-top: clamp(20px, 6vw, 34px); }
  .pruef__frage { font-size: clamp(27px, 7.4vw, 34px); max-width: 100%; }
  .pruef__liste { margin-top: 24px; }
  /* Mindestens 48 px Berührfläche, nie zweispaltig. */
  .pruef__opt { min-height: 64px; font-size: 17px; gap: 15px; }
  .pruef__aktionen { gap: 14px; }
  .pruef__weiter { width: 100%; justify-content: center; }
  .pruef__zurueck { width: 100%; text-align: left; }
  .pruef__zeile { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .pruef__fuss { font-size: 13px; }
}

/* ── Flache Schirme ────────────────────────────────────────────────────
   Nicht die Breite entscheidet, ob ein Schritt passt, sondern die Höhe.
   Gemessen: 1366×768 lief 52 px über, 375×667 19 px. Auf flachen Schirmen
   rücken Fortschritt, Frage und Zeilen deshalb zusammen — der aktive Schritt
   muss ohne Seitenscroll lesbar sein. */
@media (max-height: 820px) {
  .pruef__kopf { padding-top: 14px; padding-bottom: 14px; }
  .pruef__mitte { padding-top: 10px; padding-bottom: 18px; }
  .pruef__fortschritt { margin-bottom: 20px; }
  .pruef__frage { font-size: clamp(26px, 3.2vw, 36px); }
  .pruef__liste { margin-top: 18px; }
  .pruef__opt { min-height: 58px; padding: 13px 4px; }
  .pruef__feld { margin-top: 20px; }
  .pruef__feld + .pruef__feld { margin-top: 16px; }
  .pruef__einwilligung { margin-top: 18px; }
  .pruef__aktionen { margin-top: 20px; }
  .pruef__fuss { padding-top: 12px; padding-bottom: 14px; }
  .pruef__fuss img { width: 32px; height: 32px; }
  .pruef__zusammenfassung { margin-top: 20px; }
  .pruef__zeile { padding: 11px 2px; }
}
@media (max-height: 660px) {
  .pruef__frage { font-size: clamp(23px, 3vw, 29px); }
  .pruef__opt { min-height: 52px; padding: 11px 4px; font-size: 16px; }
  .pruef__fortschritt { margin-bottom: 14px; }
  .pruef__liste { margin-top: 14px; }
  /* Die Vertrauenszeile ist wichtig, aber nicht wichtiger als die Frage. */
  .pruef__fuss { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pruef__schritt.is-kommt,
  .pruef__schritt.is-geht,
  .pruef__zusatz.is-an { animation: none; }
  .pruef__linie i,
  .pruef__opt,
  .pruef__punkt,
  .pruef__weiter { transition: none; }
}

/* Der rechtlich maßgebliche deutsche Einwilligungstext unter dem Ankreuzfeld.
   Erscheint nur in den Übersetzungen — auf Deutsch steht er ja schon oben. */
.pruef__massgeblich {
  margin-top: 10px;
  max-width: 46em;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* Ein Fokusring für die ganze Prüfstrecke, nicht drei verschiedene. Ohne
   diese Regel zeichnet der Browser seinen eigenen — 1 px schwarz, eine
   zweite Formensprache neben den 2 px Cyan der Auswahlzeilen. */
.pruef a:focus-visible,
.pruef button:focus-visible,
.pruef__zu:focus-visible,
.pruef__zurueck:focus-visible,
.pruef__weiter:focus-visible {
  outline: 2px solid var(--cta-tief);
  outline-offset: 3px;
  border-radius: 999px;
}
