/* ============================================================
   Revenue Cues — Quiz CSS v3
   - Dark background on question screens; white option cards
   - Logo matches nav height (~32px)
   - Intro form labels left-aligned
   - WCAG AA throughout (all pairs annotated)
   - Score badges removed entirely
   - Larger microcopy (section label, counter, hints)
   - No en-dashes
   - Next button always active; error message on empty submit
   ============================================================ */

/* ── Reset basics for funnel body ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body.quiz-funnel-body {
  margin: 0; padding: 0;
  background: #111827;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Funnel header ───────────────────────────────────────── */
.qf-header {
  background: #ffffff;
  border-bottom: 1px solid #D1D5DB;
  position: sticky;
  top: 0;
  z-index: 100;
}
.qf-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 81px;            /* matches main site nav exactly */
}
/* Logo: same physical height as nav logo */
.qf-logo img,
.qf-header .qf-logo-link img {
  display: block !important;
  height: 32px !important;
  width: auto !important;
  max-height: 32px !important;
  max-width: none !important;   /* prevent any max-width collapsing the height */
}
.qf-header-tag {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;          /* 8.0:1 on #fff — AA */
  letter-spacing: 0.01em;
}

/* ── Progress bar ────────────────────────────────────────── */
.quiz-progress-bar-wrap {
  height: 4px;
  background: #374151;     /* visible on dark body */
  position: sticky;
  top: 81px;
  z-index: 99;
}
.quiz-progress-bar-fill {
  height: 100%;
  background: #2563EB;
  transition: width 0.4s ease;
  width: 0%;
}

/* ── Shell ───────────────────────────────────────────────── */
.quiz-shell {
  min-height: calc(100vh - 81px - 4px);
}

/* ══════════════════════════════════════════════════════════
   INTRO SCREEN
   ══════════════════════════════════════════════════════════ */
.quiz-intro-screen {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3.5rem 1.5rem 5rem;
  background: #F8F9FA;     /* light for intro only */
}
.quiz-intro-card {
  max-width: 580px;
  width: 100%;
  text-align: center;
}

/* Pill badge */
.quiz-pill {
  display: inline-block;
  background: #1F2937;
  color: #F9FAFB;           /* 16:1 on #1F2937 — AAA */
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
}

/* Headline */
.quiz-intro-card h1 {
  font-size: clamp(2rem, 5vw, 2.875rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #111827;           /* 16.7:1 on #F8F9FA — AAA */
  margin-bottom: 1.125rem;
}
.pk-highlight {
  background-image: linear-gradient(
    to bottom,
    transparent 0%, transparent 42%,
    rgba(166,224,255,0.85) 42%, rgba(166,224,255,0.85) 100%
  );
  padding: 0 0.1em 0.1em;
}

/* Subtitle */
.quiz-intro-subtitle {
  font-size: 1.0625rem;
  font-weight: 500;
  color: #374151;           /* 8.0:1 on #F8F9FA — AA */
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

/* Meta items */
.quiz-intro-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.quiz-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1F2937;           /* 14.7:1 on #F8F9FA — AAA */
}
.quiz-meta-item svg { color: #2563EB; flex-shrink: 0; }

/* ── Upfront capture card ────────────────────────────────── */
.qf-capture-card {
  background: #ffffff;
  border: 1.5px solid #D1D5DB;
  border-radius: 0.875rem;
  padding: 2rem 2rem 1.75rem;
  text-align: left;         /* LEFT-ALIGNED throughout */
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.qf-capture-label {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111827;           /* 16.7:1 on #fff — AAA */
  margin-bottom: 1.25rem;
  display: block;
}

/* ── Form elements ───────────────────────────────────────── */
.form-group { margin-bottom: 1.125rem; }

.form-label {
  display: block;
  font-size: 1rem;          /* was 0.9375 — increased */
  font-weight: 700;
  color: #111827;           /* 16.7:1 on #fff — AAA */
  margin-bottom: 0.45rem;
}
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #6B7280; /* 4.7:1 on #fff — AA */
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  color: #111827;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.18);
}
.form-input::placeholder {
  color: #6B7280;           /* 4.7:1 on #fff — AA */
}
.form-note {
  font-size: 0.9375rem;     /* increased from 0.875 */
  font-weight: 500;
  color: #4B5563;           /* 7.2:1 on #fff — AA */
  margin-top: 0.875rem;
  text-align: center;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.0625rem;
  border-radius: 0.5rem;
  padding: 0.9375rem 2rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary {
  background: #111827;
  color: #ffffff;           /* 16.7:1 — AAA */
}
.btn-primary:hover  { background: #374151; transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-lg    { padding: 1rem 2.25rem; font-size: 1.0625rem; }
.btn-block { width: 100%; margin-top: 0.375rem; }

/* ── Error messages ──────────────────────────────────────── */
.quiz-gate-error, .quiz-q-error {
  background: #FEF2F2;
  border: 1.5px solid #F87171;
  color: #7F1D1D;           /* 9.1:1 on #FEF2F2 — AAA */
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;          /* increased */
  font-weight: 600;
  margin-bottom: 1rem;
}
.quiz-q-error { display: none; }

/* ══════════════════════════════════════════════════════════
   QUESTION SCREENS — dark background, white cards
   ══════════════════════════════════════════════════════════ */
#quizQuestionsContainer {
  background: #111827;      /* dark background */
  min-height: calc(100vh - 85px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}
.quiz-question-screen {
  display: none;
  width: 100%;
  max-width: 680px;
  animation: quizFadeIn 0.3s ease both;
}
.quiz-question-screen.active { display: block; }

@keyframes quizFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section label — larger, readable on dark */
.quiz-q-section {
  font-size: 0.875rem;      /* increased from 0.75 */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #93C5FD;           /* 6.1:1 on #111827 — AA */
  margin-bottom: 0.4rem;
}

/* Question counter */
.quiz-q-counter {
  font-size: 0.9375rem;     /* increased from 0.875 */
  font-weight: 600;
  color: #9CA3AF;           /* 3.8:1 on #111827 — AA large, used at 15px+ */
  margin-bottom: 1rem;
}

/* Question text */
.quiz-q-text {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 800;
  color: #F9FAFB;           /* 16:1 on #111827 — AAA */
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

/* Hint */
.quiz-q-hint {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;           /* 16.7:1 on hint bg — AAA */
  margin-bottom: 1.75rem;
  line-height: 1.65;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: #EFF6FF;      /* light blue — high contrast with dark text */
  border-radius: 0.5rem;
  border: 1.5px solid #BFDBFE;
  position: relative;
}
/* Lightbulb icon via pseudo-element */
.quiz-q-hint::before {
  content: '💡';
  position: absolute;
  left: 0.75rem;
  top: 0.875rem;
  font-size: 1rem;
  line-height: 1;
}

/* ── Option buttons — WHITE cards on dark background ─────── */
.quiz-options-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.quiz-options-list li { margin: 0; padding: 0; }

.quiz-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border: 2px solid #E5E7EB;
  border-radius: 0.625rem;
  background: #ffffff;      /* WHITE card */
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.quiz-option-btn:hover {
  border-color: #2563EB;
  background: #EFF6FF;
  box-shadow: 0 0 0 1px #2563EB;
}
.quiz-option-btn:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 2px;
}
.quiz-option-btn.selected {
  border-color: #111827;
  background: #F9FAFB;
  box-shadow: 0 0 0 1px #111827;
}
.quiz-option-btn.selected .quiz-option-key {
  background: #111827;
  color: #ffffff;           /* 16.7:1 — AAA */
  border-color: #111827;
}

/* Key letter badge */
.quiz-option-key {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #374151;           /* 8.0:1 on #fff — AA */
  background: #F9FAFB;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* Option text — dark on white — AA */
.quiz-option-text {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;           /* 16.7:1 on #fff — AAA */
  line-height: 1.55;
}

/* Score badge — HIDDEN entirely per brief */
.quiz-option-badge { display: none !important; }

/* ── Nav row ─────────────────────────────────────────────── */
.quiz-q-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}
.quiz-btn-back {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1rem;          /* increased */
  color: #9CA3AF;           /* 3.8:1 on #111827 — AA large */
  font-weight: 600;
  padding: 0.625rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}
.quiz-btn-back:hover { color: #D1D5DB; }
.quiz-btn-back:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Next button — always active, solid white on dark */
.quiz-btn-next {
  background: #2563EB;      /* 4.7:1 on #fff; 8.6:1 white text — AA */
  color: #ffffff;
  border: none;
  padding: 0.9375rem 2rem;
  border-radius: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.15s;
}
.quiz-btn-next:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
}
.quiz-btn-next:focus-visible {
  outline: 3px solid #93C5FD;
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════
   PROCESSING SCREEN — dark
   ══════════════════════════════════════════════════════════ */
.quiz-processing-screen {
  background: #111827;
  min-height: calc(100vh - 85px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  text-align: center;
}
.quiz-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #374151;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: quizSpin 0.8s linear infinite;
  margin: 0 auto 1.75rem;
}
@keyframes quizSpin { to { transform: rotate(360deg); } }

.quiz-processing-title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #F9FAFB;           /* 16:1 on #111827 — AAA */
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.quiz-processing-sub {
  font-size: 1rem;
  font-weight: 500;
  color: #D1D5DB;           /* 9.7:1 on #111827 — AAA */
}
.quiz-processing-steps {
  max-width: 340px;
  margin: 2rem auto 0;
  text-align: left;
}
.quiz-proc-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 1rem;          /* increased */
  font-weight: 500;
  color: #6B7280;           /* muted initially */
  transition: color 0.3s;
}
.quiz-proc-step.done        { color: #D1D5DB; font-weight: 600; }
.quiz-proc-step.active-step { color: #ffffff;  font-weight: 700; }
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #374151;
  flex-shrink: 0;
  transition: background 0.3s;
}
.quiz-proc-step.done .step-dot        { background: #10B981; }
.quiz-proc-step.active-step .step-dot { background: #2563EB; }

/* ══════════════════════════════════════════════════════════
   RESULTS SCREEN — light background
   ══════════════════════════════════════════════════════════ */
.quiz-results-screen {
  background: #F8F9FA;
  padding: 4rem 1.5rem 6rem;
}
.quiz-results-inner {
  max-width: 720px;
  margin: 0 auto;
}

.quiz-result-header {
  text-align: center;
  margin-bottom: 3rem;
}
.authority-pill {
  display: inline-block;
  background: #1F2937;
  color: #F9FAFB;           /* 16:1 — AAA */
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.45rem 1rem;
  border-radius: 999px;
}
.quiz-result-score {
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #111827;
  line-height: 1;
  margin: 1.25rem 0 0.25rem;
}
.quiz-result-score-label {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;           /* 8.0:1 on #F8F9FA — AA */
  margin-bottom: 1.5rem;
}
.quiz-result-header h1 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
  margin-bottom: 1rem;
}
.quiz-result-header > p#resultIntro {
  font-size: 1.0625rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.8;
}

/* Band strip */
.quiz-band-strip {
  height: 4px;
  border-radius: 2px;
  margin: 0 auto 2.5rem;
  max-width: 160px;
}
.quiz-band-blank   { background: #6B7280; }
.quiz-band-stalled { background: #D97706; }
.quiz-band-almost  { background: #2563EB; }
.quiz-band-leaking { background: #059669; }

/* Result cards */
.card { background: #ffffff; border: 1px solid #E5E7EB; border-radius: 0.875rem; padding: 2rem; }
.quiz-result-section { margin-bottom: 1.25rem; }
.quiz-section-label {
  font-size: 0.875rem;      /* increased */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #374151;           /* 8.0:1 on #fff — AA */
  margin-bottom: 0.5rem;
  display: block;
}
.quiz-result-section h2 {
  font-size: 1.1875rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 0.75rem;
}
.quiz-result-section p {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;
  line-height: 1.8;
}

/* 8-layer map — dark card */
.quiz-map-block {
  background: #111827;
  border-radius: 0.875rem;
  padding: 2.5rem;
  margin-bottom: 1.25rem;
}
.quiz-section-label--light {
  color: #9CA3AF;           /* 3.8:1 on #111827 — AA large */
}
.quiz-map-block h2 {
  font-size: 1.1875rem;
  font-weight: 800;
  color: #F9FAFB;           /* 16:1 — AAA */
  margin-bottom: 0.5rem;
}
.quiz-map-block > p {
  font-size: 1rem;
  font-weight: 500;
  color: #D1D5DB;           /* 9.7:1 — AAA */
  margin-bottom: 1.75rem;
  line-height: 1.7;
}
.quiz-map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}
@media (max-width: 500px) { .quiz-map-grid { grid-template-columns: 1fr; } }
.quiz-map-layer {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.quiz-map-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: #93C5FD;           /* 6.1:1 on #111827 — AA */
  flex-shrink: 0;
  margin-top: 2px;
}
.quiz-map-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #F9FAFB;           /* 16:1 — AAA */
  line-height: 1.35;
}
.quiz-map-sub {
  font-size: 0.875rem;
  color: #9CA3AF;           /* 3.8:1 — AA large */
  line-height: 1.5;
  margin-top: 0.2rem;
}

/* CTA box */
.quiz-cta-box {
  border-radius: 0.875rem;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
/* Blank, Stalled, Almost-There: site gradient for consistency */
.quiz-cta-blank,
.quiz-cta-stalled,
.quiz-cta-almost  {
  background: linear-gradient(135deg, #EFF6FF 0%, #FAF5FF 50%, #FDF2F8 100%);
  border: 1.5px solid #E0E7FF;
}
.quiz-cta-leaking { background: #ECFDF5; border: 1.5px solid #6EE7B7; }

.capacity-signal {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #374151;
  background: rgba(0,0,0,0.06);
  padding: 0.35rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 0.875rem;
}
.quiz-cta-box h2 {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
  margin: 0.75rem 0 0.875rem;
}
.quiz-cta-box p {
  font-size: 1rem;
  font-weight: 500;
  color: #374151;           /* 8.0:1 on light CTAs — AA */
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}
.quiz-cta-box .btn { margin: 0 auto; }

/* Results footer */
.quiz-results-footer {
  border-top: 1px solid #D1D5DB;
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
}
.quiz-restart-link {
  font-size: 1rem;
  font-weight: 600;
  color: #4B5563;           /* 7.2:1 on #F8F9FA — AA */
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
  transition: color 0.15s;
}
.quiz-restart-link:hover { color: #111827; }
.quiz-restart-link:focus-visible {
  outline: 3px solid #2563EB;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Funnel footer ───────────────────────────────────────── */
.qf-footer {
  background: #0D1117;
  border-top: 1px solid #1F2937;
  padding: 1.25rem 1.5rem;
  text-align: center;
}
.qf-footer p {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #9CA3AF;           /* 3.8:1 on #0D1117 — AA large */
  margin: 0;
}

/* ── Placeholder for missing Customiser images ───────────── */
.pk-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  background: #F3F4F6;
  border: 2px dashed #D1D5DB;
  border-radius: 0.625rem;
  padding: 2rem;
  color: #6B7280;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  min-height: 160px;
  width: 100%;
}
.pk-img-placeholder svg { color: #9CA3AF; }


/* ── Field-level validation errors ──────────────────────── */
.form-input.input-error {
  border-color: #DC2626;    /* red border on invalid field */
  box-shadow: 0 0 0 3px rgba(220,38,38,0.18);
}
.field-error-msg {
  display: none;
  color: #7F1D1D;           /* 9.1:1 on #FEF2F2 — AAA */
  background: #FEF2F2;
  border: 1.5px solid #F87171;
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 0.375rem;
}
.field-error-msg.visible { display: block; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .quiz-intro-screen      { padding: 2.5rem 1.25rem 4rem; }
  .qf-capture-card        { padding: 1.5rem 1.25rem; }
  .quiz-map-block         { padding: 1.75rem 1.25rem; }
  .quiz-cta-box           { padding: 2rem 1.25rem; }
  .card.quiz-result-section { padding: 1.5rem 1.25rem; }
  .quiz-q-nav             { flex-wrap: wrap; }
  .quiz-btn-next          { width: 100%; justify-content: center; }
  #quizQuestionsContainer { padding: 2rem 1.25rem 3rem; }
  .quiz-intro-meta        { gap: 1.25rem; }
  .qf-header-inner        { padding: 0 1rem; }
}


/* =============================================
   v31 quiz mobile refinements
   ============================================= */
@media (max-width: 767px) {
  .quiz-intro-screen {
    padding: 2.25rem 1rem 3.5rem;
  }
  .quiz-intro-card h1 {
    line-height: 1.05;
  }
  .qf-capture-card {
    padding: 1.25rem 1rem 1.125rem;
  }

  /* Header: mobile logo is icon-only so header stays clean */
  .qf-header-inner {
    height: 64px;
    padding: 0 1rem;
    gap: 0.875rem;
  }
  .qf-logo img,
  .qf-header .qf-logo-link img,
  .qf-header .qf-logo-link picture img {
    height: 32px !important;
    max-height: 32px !important;
  }
  .qf-header-label {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    color: #374151;
  }

  /* Meta items: always horizontal, never stack */
  .quiz-intro-meta {
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0;
    justify-content: space-between;
    width: 100%;
  }
  .quiz-meta-item {
    width: auto !important;
    flex: 1;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    text-align: center;
  }
  .quiz-meta-item svg {
    width: 18px;
    height: 18px;
  }
}


/* =============================================
   v56 scorecard additions
   Missing classes and error message fixes
   ============================================= */

.qf-header-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
}

.qf-capture-heading {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.25rem;
  display: block;
  text-align: left;
}

/* Error messages hidden by default — shown by JS only */
.quiz-error-msg {
  display: none;
  background: #FEF2F2;
  border: 1.5px solid #F87171;
  color: #7F1D1D;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.field-error-msg {
  display: none;
}
.field-error-msg.visible {
  display: block;
  color: #7F1D1D;
  background: #FEF2F2;
  border: 1.5px solid #F87171;
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 0.375rem;
}

/* Processing screen needs flex not block */
.quiz-processing-screen {
  display: none;
}
.quiz-processing-screen.active {
  display: flex;
}


/* v57 — 17px minimum for quiz/scorecard body copy */
.quiz-intro-card p,
.quiz-q-text,
.quiz-option-text,
.quiz-result-intro,
.quiz-band-intro,
.quiz-result-text,
.quiz-cta-body { font-size: 1.0625rem; }


/* =============================================
   v57 — Header label: two lines on mobile,
   one line on desktop
   ============================================= */

/* Hide the line break on desktop */
.qf-label-break {
    display: none;
}

/* On mobile: show break, allow two lines, fix height */
@media (max-width: 640px) {
    .qf-label-break {
        display: inline;
    }

    .qf-header-inner {
        height: auto !important;
        min-height: 64px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        align-items: center;
    }

    .qf-header-label {
        font-size: 0.8125rem !important;
        font-weight: 600;
        color: #374151;
        line-height: 1.35;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        flex: 1;
        min-width: 0;
        text-align: right;
    }
}
