/* Fragebogen /testpaket-auswahl/ – nach !TEMPLATE GENERIC (quiz.css), Farben an tester-clubs.com angepasst */
.pt-page--quiz {
  --c-accent: #3B82F6; --c-accent-dark: #2563EB; --c-accent-deep: #1D4ED8; --c-cta-hover: #93C5FD;
  --c-error: #B3261E; --c-border: #CBD5E1; --c-border-soft: #E2E8F0; --c-quiz-header: #0F172A;
  --c-quiz-bg: #F1F5F9; --c-note-bg: #EFF6FF; --c-white: #FFFFFF; --c-subtle: #64748B;
  --fs-body: 16px; --fs-lead: 15px; --fs-small: 14px; --fs-micro: 12px; --fs-label: 13px;
  --r-pill: 100px; --r-circle: 50%; --card-radius: 12px; --dur: 200ms;
  --sh-panel: 0 4px 24px rgba(15, 23, 42, 0.08); --sh-soft: 0 2px 14px rgba(37, 99, 235, 0.08);
}
.pt-page--quiz [hidden] { display: none !important; }
.pt-page--quiz ol { margin: 0; padding: 0; list-style: none; }
.pt-page--quiz button { font-family: inherit; border: 0; cursor: pointer; }
.pt-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pt-micro, .pt-hedge { margin: 8px 0 0; font-size: var(--fs-micro); line-height: 1.4; text-align: center; }
.pt-micro { color: var(--c-subtle); }
.pt-hedge { color: var(--c-subtle); font-style: italic; }
.pt-quiz__back { border: 1px solid var(--c-border) !important; }
.pt-page--quiz { background: var(--c-quiz-bg); }
/* Footer am unteren Rand: ist der Fragebogen kürzer als das Fenster, wächst der Inhaltsbereich statt einer hellen Fläche unter dem Footer */
body.pt-page--quiz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.pt-page--quiz > .pt-quiz-layout { flex: 1 0 auto; width: 100%; align-content: start; }
.pt-quiz-top { display: flex; align-items: center; min-height: 60px; padding: 12px 16px; background: var(--c-white); border-bottom: 1px solid var(--c-border-soft); }
.pt-quiz-hero { padding: 16px 16px 18px; text-align: center; color: var(--c-white); background: var(--c-quiz-header); }
.pt-quiz-hero h1 { font-size: 20px; line-height: 25px; font-weight: 800; color: var(--c-white); }
.pt-quiz-hero p { margin-top: 8px; font-size: var(--fs-small); line-height: 1.5; opacity: .85; }

.pt-quiz-layout { display: grid; gap: 24px; max-width: 860px; margin: 0 auto; padding: 12px 16px 40px; }
.pt-quiz { padding: 16px; background: var(--c-white); border-radius: var(--card-radius); box-shadow: var(--sh-panel); }

/* Fortschritt */
.pt-quiz__progress { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 8px; }
.pt-quiz__progress li { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.pt-quiz__num { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; font-size: var(--fs-label); font-weight: 700; color: var(--c-subtle); border: 2px solid var(--c-border-soft); border-radius: var(--r-circle); background: var(--c-white); transition: background-color var(--dur), color var(--dur), border-color var(--dur); }
.pt-quiz__lbl { display: none; font-size: 11px; line-height: 1.2; color: var(--c-subtle); text-align: center; }
.pt-quiz__progress .is-active .pt-quiz__num { color: var(--c-white); background: var(--c-accent-dark); border-color: var(--c-accent-dark); }
.pt-quiz__progress .is-active .pt-quiz__lbl { color: var(--c-quiz-header); font-weight: 700; }
.pt-quiz__progress .is-done .pt-quiz__num { color: var(--c-accent-deep); background: var(--c-note-bg); border-color: var(--c-accent-dark); }

/* Schritte */
.pt-quiz__panel { display: none; }
.pt-quiz__panel.is-active { display: block; }
/* Antwortgruppe als fieldset, Frage als legend: ohne Browser-Rahmen und -Abstände */
.pt-quiz__set { min-width: 0; margin: 0; padding: 0; border: 0; }
.pt-quiz__legend { display: block; width: 100%; padding: 0; }
.pt-quiz__panel h2 { margin: 14px 0 6px; font-size: 17px; line-height: 20.4px; font-weight: 700; color: var(--c-quiz-header); text-align: center; }
.pt-quiz__hint { font-size: var(--fs-label); line-height: 19.5px; color: var(--c-accent-dark); text-align: center; transition: color var(--dur); }
.pt-quiz__hint.is-error { color: var(--c-error); font-weight: 700; animation: pt-shake .3s; }
.pt-quiz__count { margin: 6px 0 0; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--c-subtle); text-align: center; }
@keyframes pt-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.pt-quiz__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.pt-quiz__opt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; padding: 10px; font-size: var(--fs-small); line-height: 1.3; text-align: center; color: var(--c-quiz-header); background: var(--c-white); border: 1px solid var(--c-border); border-radius: 10px; cursor: pointer; transition: border-color var(--dur), background-color var(--dur), box-shadow var(--dur), transform 120ms ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.pt-quiz__opt input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pt-quiz__opt img { width: 40px; height: 40px; }
.pt-quiz__opt--pkg img { width: 100px; height: 100px; object-fit: contain; border-radius: 8px; }
.pt-quiz__ico { width: 26px; height: 26px; flex: none; color: var(--c-accent); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.pt-quiz__opt:has(input:checked) { border-color: var(--c-accent); box-shadow: inset 0 0 0 1px var(--c-accent); background: var(--c-note-bg); font-weight: 700; }
.pt-quiz__opt:active { transform: scale(.97); }
.pt-quiz__opt:has(input:focus-visible) { outline: 3px solid var(--c-cta-hover); outline-offset: 2px; }

.pt-quiz__outro { flex-basis: 100%; }

/* Navigation */
/* Mobil bleibt die Navigation samt Hinweis unten im Bild, solange der Fragebogen sichtbar ist */
.pt-quiz__nav { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 16px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--c-white); border-top: 1px solid var(--c-border-soft); }
.pt-quiz__back { min-height: 46px; padding: 0 20px; font-size: var(--fs-lead); font-weight: 700; color: var(--c-subtle); background: transparent; border: 1px solid var(--c-border); border-radius: var(--r-pill); transition: border-color var(--dur), color var(--dur), transform 120ms ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pt-quiz__back:focus-visible { color: var(--c-quiz-header); border-color: var(--c-accent); }
.pt-quiz__next { min-height: 46px; padding: 0 48px; font-size: var(--fs-lead); font-weight: 700; color: var(--c-white); background: var(--c-accent-dark); border-radius: var(--r-pill); transition: background-color var(--dur), transform 120ms ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pt-quiz__next:focus-visible { background: var(--c-accent-deep); }
.pt-quiz__back:active, .pt-quiz__next:active { transform: scale(.97); }

/* Prüf- und Abschluss-Screen */
.pt-quiz__check, .pt-quiz__done { padding: 40px 0 20px; text-align: center; }
.pt-quiz__check { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; }
.pt-quiz__spin { display: block; width: 40px; height: 40px; margin: 0 auto 16px; border: 4px solid var(--c-border-soft); border-top-color: var(--c-accent); border-radius: var(--r-circle); animation: pt-spin 1.6s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes pt-spin { to { transform: rotate(360deg); } }
.pt-quiz__check p, .pt-quiz__done p { font-size: var(--fs-body); line-height: 1.5; color: var(--c-quiz-header); }


@media (min-width: 768px) {
  .pt-quiz-hero h1 { font-size: 32px; line-height: 40px; }
  .pt-quiz { padding: 32px; }
  .pt-quiz-hero { padding: 24px 16px 28px; }
  .pt-quiz-layout { padding-top: 24px; }
  .pt-quiz__grid { gap: 12px; margin-top: 20px; }
  .pt-quiz__opt { gap: 8px; min-height: 109px; padding: 14px 12px 12px; }
  .pt-quiz__opt img { width: 48px; height: 48px; }
  .pt-quiz__ico { width: 30px; height: 30px; }
  .pt-quiz__nav { position: static; margin: 24px 0 0; padding: 0; background: none; border-top: 0; }
  .pt-quiz__lbl { display: block; }
  .pt-quiz__progress li { gap: 8px; }
  .pt-quiz__panel h2 { margin-top: 24px; }
  .pt-quiz__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1025px) {
  .pt-quiz-layout { padding: 32px 24px 48px; }
}
/* Hover nur bei echter Maus, sonst bleibt die Markierung auf Touch-Geräten nach dem Tippen hängen */
@media (hover: hover) {
  .pt-quiz__opt:hover { border-color: var(--c-accent); }
  .pt-quiz__back:hover { color: var(--c-quiz-header); border-color: var(--c-accent); }
  .pt-quiz__next:hover { background: var(--c-accent-deep); }
}
@media (prefers-reduced-motion: reduce) {
  .pt-quiz__hint.is-error { animation: none; }
  .pt-quiz__opt:active, .pt-quiz__back:active, .pt-quiz__next:active { transform: none; }
}

/* Prüf-Screen: Balken und Stufen */
.pt-quiz__bar { width: 100%; max-width: 280px; height: 6px; margin: 18px auto 0; background: var(--c-border-soft); border-radius: var(--r-pill); overflow: hidden; }
.pt-quiz__bar span { display: block; width: 0; height: 100%; background: var(--c-accent-dark); border-radius: inherit; }
.pt-quiz__stages { margin: 20px auto 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 280px; text-align: left; }
.pt-quiz__stages li { position: relative; padding-left: 30px; font-size: var(--fs-small); line-height: 20px; color: var(--c-subtle); opacity: .45; transition: opacity 400ms ease, color 400ms ease; }
.pt-quiz__stages li::before { content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border: 2px solid var(--c-border); border-radius: var(--r-circle); box-sizing: border-box; transition: border-color 300ms ease, background-color 300ms ease; }
.pt-quiz__stages li.is-active { opacity: 1; color: var(--c-quiz-header); }
.pt-quiz__stages li.is-active::before { border-color: var(--c-accent); border-top-color: transparent; animation: pt-spin 1s linear infinite; }
.pt-quiz__stages li.is-done { opacity: 1; color: var(--c-quiz-header); }
.pt-quiz__stages li.is-done::before { border-color: #16A34A; background: #16A34A; }
.pt-quiz__stages li.is-done::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* Prüf-Screen bei „Bewegung reduzieren“: style.css setzt alle Animationen auf 0,01 ms – bei endlosen Drehungen wird daraus ein Flackern.
   Der Screen dauert nur 2,5 s, darum hier die normalen ruhigen Zeiten zurück (höhere Spezifität schlägt das globale !important) */
@media (prefers-reduced-motion: reduce) {
  .pt-page--quiz .pt-quiz__spin { animation-duration: 1.6s !important; }
  .pt-page--quiz .pt-quiz__stages li.is-active::before { animation-duration: 1s !important; }
  .pt-page--quiz .pt-quiz__bar span { transition-duration: 600ms !important; }
  .pt-page--quiz .pt-quiz__stages li { transition-duration: 400ms !important; }
  .pt-page--quiz .pt-quiz__stages li::before { transition-duration: 300ms !important; }
}

/* Paketwahl kompakt: 6 Pakete im 3er-Raster, Navigation am letzten Schritt flacher */
.pt-quiz__grid--pkg { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-quiz__opt--pkg { min-height: 0; padding: 8px 4px; gap: 4px; font-size: 13px; }
.pt-quiz__opt--pkg img { width: 100%; height: 58px; object-fit: contain; border-radius: 6px; }
.pt-quiz__outro .pt-hedge { margin-top: 0; font-size: 11px; line-height: 1.3; }
/* Hedge direkt unter dem Knopf: kein Zeilenabstand zwischen Knopf und Hinweis */
.pt-quiz__nav:has(.pt-quiz__outro:not([hidden])) { gap: 0 6px; padding-top: 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.pt-quiz__nav:has(.pt-quiz__outro:not([hidden])) .pt-quiz__outro { margin-top: 4px; }
/* Mobil kompakt: Logo mit Namen (Kopf ohne Burger/CTA), flacher Hero, Antworten als Zeilen mit Icon links */
.pt-quiz-top { min-height: 52px; padding: 8px 16px; }
.pt-quiz-top .site-logo .logo-text, .pt-quiz-top .site-logo .logo-dot { display: inline !important; }
@media (max-width: 767px) {
  .pt-quiz-hero { padding: 10px 16px 12px; }
  .pt-quiz-hero h1 { font-size: 18px; line-height: 23px; }
  .pt-quiz-hero p { margin-top: 4px; font-size: var(--fs-label); line-height: 1.4; }
  .pt-quiz__panel h2 { margin: 10px 0 4px; }
  .pt-quiz__grid:not(.pt-quiz__grid--pkg) { gap: 8px; margin-top: 10px; }
  .pt-quiz__opt:not(.pt-quiz__opt--pkg) { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 52px; padding: 8px 10px; text-align: left; }
  .pt-quiz__opt:not(.pt-quiz__opt--pkg) img { width: 30px; height: 30px; flex: none; }
  .pt-quiz__opt:not(.pt-quiz__opt--pkg) .pt-quiz__ico { width: 22px; height: 22px; }
  }
@media (max-width: 767px) and (max-height: 600px) {
  .pt-quiz-hero p, .pt-quiz__count { display: none; }
  .pt-quiz__opt:not(.pt-quiz__opt--pkg) { min-height: 46px; padding: 6px 10px; }
}
@media (max-width: 359px) { .pt-quiz__next { padding: 0 24px; } }

/* Auswahlmarke: Haken-Badge oben rechts nur an der gewählten Antwort (alle Schritte), übrige Kacheln unverändert */
.pt-page--quiz { --q-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.pt-quiz__grid { padding-top: 4px; }
.pt-quiz__opt:has(input:checked)::after { content: ""; position: absolute; top: -8px; right: -8px; z-index: 1; width: 24px; height: 24px; box-sizing: border-box; border: 2px solid var(--c-white); border-radius: var(--r-circle); background: var(--c-accent-dark) var(--q-check) center / 14px no-repeat; box-shadow: 0 2px 6px rgba(15, 23, 42, .25); }
/* Mobil, Schritte 2–6: „‹ Zurück“ als graue Textverknüpfung links, Hauptknopf über die volle Breite; Schritt 1 behält den mittigen Knopf */
@media (max-width: 767px) {
  .pt-quiz__nav:has(.pt-quiz__back:not([hidden])) { gap: 4px; }
  .pt-quiz__back { min-height: 46px; padding: 0 12px 0 4px; font-weight: 600; color: var(--c-subtle); background: none; border: 0 !important; }
  .pt-quiz__back::before { content: "‹ "; font-size: 20px; line-height: 1; }
  .pt-quiz__nav:has(.pt-quiz__back:not([hidden])) .pt-quiz__next,
  .pt-quiz__nav:has(.pt-quiz__outro:not([hidden])) .pt-quiz__next { flex: 1 1 0; min-height: 50px; padding: 0 16px; font-size: 16px; }
}
@media (min-width: 768px) {
  .pt-quiz__grid--pkg { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pt-quiz__opt--pkg { padding: 12px 8px; font-size: var(--fs-small); }
  .pt-quiz__opt--pkg img { height: 96px; }
}
