/* SPX Plays — Quiz Funnel — mobile-first, v2 blue */

.qf-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
  color: var(--text, #0f172a);
}

.qf-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 16px;
  display: none;
}

.qf-in-flow .qf-topbar,
.qf-on-results .qf-topbar {
  display: block;
}

.qf-topbar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Quiz steps: logo left, compact */
.qf-in-flow .qf-topbar-inner {
  justify-content: flex-start;
}

.qf-in-flow .qf-logo img {
  height: 22px;
  width: auto;
}

/* Results: logo centered */
.qf-on-results .qf-topbar-inner {
  justify-content: center;
}

.qf-on-results .qf-logo {
  margin-left: auto;
  margin-right: auto;
}

.qf-on-results .qf-logo img {
  height: 28px;
  width: auto;
}

.qf-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.qf-logo img {
  height: 28px;
  width: auto;
}

.qf-topbar-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

/* Landing — single screen, logo + hook + CTA + proof */
.qf-landing {
  flex: 1;
  min-height: 100dvh;
  background: #0A58EB;
  color: #fff;
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.qf-landing-logo {
  display: block;
  align-self: center;
  margin-bottom: auto;
  padding-top: 4px;
  line-height: 0;
}

.qf-landing-logo img {
  height: 28px;
  width: auto;
}

.qf-landing-inner {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.qf-landing h1 {
  font-size: clamp(1.9rem, 6.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
  color: #fff;
  max-width: 14em;
  text-wrap: balance;
}

.qf-landing-sub {
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 28px;
  max-width: 28ch;
  text-wrap: balance;
}

.qf-proof-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 28px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.qf-proof-row strong {
  font-weight: 800;
}

.qf-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  padding: 16px 22px;
  background: #fff;
  color: #0A58EB;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.qf-start:hover {
  background: #f8fafc;
}

.qf-arrow {
  flex-shrink: 0;
  display: block;
}

/* No footer on landing — under-fold only if results show it */
.qf-on-landing .qf-footer-mini {
  display: none;
}

/* Flow — use vertical space, don’t glue content to the top */
.qf-flow {
  flex: 1;
  padding: 12px 16px 28px;
  display: none;
  min-height: calc(100dvh - 52px);
}

.qf-flow.is-active {
  display: flex;
  flex-direction: column;
}

.qf-flow-inner {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.qf-progress {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.qf-progress-track {
  height: 3px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.qf-progress-fill {
  height: 100%;
  width: 0%;
  background: #0A58EB;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.qf-progress-text {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

#qfStepRoot {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 8px;
}

.qf-question {
  font-size: clamp(1.25rem, 4.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 18px;
  text-wrap: balance;
}

.qf-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary, #475569);
  margin-top: -8px;
  margin-bottom: 18px;
  line-height: 1.45;
}

.qf-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qf-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 16px;
  min-height: 56px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.qf-option:hover {
  border-color: #93c5fd;
}

.qf-option.is-selected {
  border-color: #0A58EB;
  background: #eff6ff;
}

.qf-option-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qf-option-icon svg {
  width: 26px;
  height: 26px;
  stroke: #0A58EB;
  stroke-width: 2.5;
}

.qf-icon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qf-icon-grid .qf-option {
  flex-direction: column;
  text-align: center;
  padding: 20px 12px;
  min-height: 108px;
  justify-content: center;
  font-size: 0.9rem;
  gap: 10px;
}

.qf-slider-wrap {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 18px 22px;
}

.qf-slider-value {
  text-align: center;
  font-size: 2.75rem;
  font-weight: 800;
  color: #0A58EB;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.qf-slider {
  width: 100%;
  accent-color: #0A58EB;
  height: 8px;
  margin: 16px 0 10px;
}

.qf-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.qf-continue {
  display: none;
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  background: #0A58EB;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qf-continue.is-visible {
  display: inline-flex;
}

.qf-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Sticky continue on small screens so CTA stays visible */
@media (max-width: 640px) {
  .qf-in-flow .qf-footer-mini {
    display: none;
  }

  .qf-in-flow .qf-continue.is-visible {
    position: sticky;
    bottom: 12px;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  }

  .qf-topbar-meta {
    font-size: 0.7rem;
  }

  .qf-progress-text {
    display: block;
  }
}

/* Info */
.qf-info-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 14px;
  border: 1px solid #e2e8f0;
}

.qf-info-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.25;
}

.qf-info-card > p {
  color: var(--text-secondary, #475569);
  line-height: 1.55;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.qf-quote {
  border-left: 2px solid #0A58EB;
  padding-left: 12px;
  margin-top: 12px;
}

.qf-quote p {
  font-style: italic;
  color: var(--text, #0f172a);
  margin-bottom: 4px;
  line-height: 1.45;
  font-size: 0.88rem;
}

.qf-quote cite {
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 700;
  color: var(--text-muted, #64748b);
}

.qf-proof-line {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

/* Email */
.qf-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qf-email-input {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: #fff;
}

.qf-email-input:focus {
  border-color: #0A58EB;
}

.qf-email-error {
  color: #ef4444;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
}

.qf-email-error.is-visible {
  display: block;
}

/* Loading */
.qf-loading {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.qf-loading.is-active {
  display: flex;
}

.qf-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #0A58EB;
  border-radius: 50%;
  animation: qfSpin 0.7s linear infinite;
  margin: 0 auto 18px;
}

@keyframes qfSpin {
  to { transform: rotate(360deg); }
}

.qf-loading h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.qf-loading p {
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
}

/* Results — verdict + offer only (Funnel Professor: diagnose → sell) */
.qf-results {
  display: none;
  flex: 1;
  padding: 0;
  background: #0A58EB;
}

.qf-results.is-active {
  display: block;
}

.qf-results-shell {
  max-width: 400px;
  margin: 0 auto;
  padding: 24px 16px 0;
  min-height: calc(100dvh - 52px);
  display: flex;
  flex-direction: column;
}

.qf-verdict {
  color: #fff;
  text-align: center;
  margin-bottom: 18px;
}

.qf-arch-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

.qf-verdict h1 {
  font-size: clamp(1.3rem, 4.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 8px;
  text-wrap: balance;
}

.qf-verdict-line {
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 auto;
  max-width: 34ch;
  text-wrap: balance;
}

.qf-verdict-fix {
  margin-top: 12px;
  max-width: 38ch;
  color: #fff;
  font-weight: 500;
}

.qf-verdict-fix strong {
  font-weight: 800;
}

/* Short quiz — score meter on blue */
.qf-score-card {
  margin: 18px auto 0;
  max-width: 320px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  text-align: left;
}

.qf-score-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.qf-score-card-top strong {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 800;
}

.qf-score-track--light {
  background: rgba(255, 255, 255, 0.22);
}

.qf-score-fill--light {
  background: #fff;
}

/* Short quiz — 30-day timeline */
.qf-timeline {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  color: #fff;
}

.qf-timeline-label {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.qf-timeline ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qf-timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
}

.qf-timeline li span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
}

.qf-timeline li p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}

/* Micro-commitment */
.qf-commit {
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px 16px;
  text-align: center;
  margin-bottom: 8px;
}

.qf-commit-q {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text, #0f172a);
  text-wrap: balance;
}

.qf-commit .qf-cta-primary {
  margin-bottom: 8px;
}

.qf-commit-skip {
  display: inline-block;
  background: none;
  border: none;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Pain-mapped includes on offer */
.qf-offer-includes {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qf-offer-includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text, #0f172a);
  font-weight: 600;
}

.qf-offer-includes svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #0A58EB;
  stroke: #0A58EB;
}

.qf-risk--footer {
  color: rgba(255, 255, 255, 0.65) !important;
}

.qf-offer {
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px 18px;
  text-align: center;
}

.qf-offer-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0A58EB;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.qf-offer h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text, #0f172a);
}

.qf-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 0 0 16px;
}

.qf-price-now {
  font-size: 2.4rem;
  font-weight: 800;
  color: #0A58EB;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}

.qf-price-was {
  font-size: 1.15rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.qf-price-note {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 16px;
}

.qf-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 16px;
  background: #0A58EB;
  color: #fff !important;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
}

.qf-cta-primary:hover {
  background: #0847c0;
}

.qf-offer-quote {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary, #475569);
  font-style: italic;
  text-wrap: balance;
}

.qf-offer .qf-proof-line {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
}

/* Risk under the fold */
.qf-risk--footer {
  margin-top: auto;
  padding: 56px 8px 24px;
  font-size: 0.65rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.qf-on-results .qf-footer-mini,
.qf-on-landing .qf-footer-mini {
  display: none;
}

/* Show step progress under bar on mobile (no topbar meta anymore) */
@media (max-width: 640px) {
  .qf-progress-text {
    display: block;
  }
}

.qf-lead {
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--text, #0f172a);
  line-height: 1.5;
  margin-bottom: 10px;
}

.qf-body {
  font-size: 0.94rem;
  color: var(--text-secondary, #475569);
  line-height: 1.6;
}

.qf-score-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qf-score-bars--compact {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.qf-score-row label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.qf-score-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.qf-score-fill {
  height: 100%;
  background: #0A58EB;
  border-radius: 999px;
  width: 0;
  transition: width 0.7s ease;
}

.qf-quote-inline {
  margin: 16px 0 0;
  padding: 0;
  border: none;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text, #0f172a);
  font-style: italic;
}

.qf-quote-inline cite {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
}

.qf-footer-mini {
  text-align: center;
  padding: 16px;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.5;
}

.qf-hidden {
  display: none !important;
}

/* Keep 2x2 icon grid on mobile — single column pushes Continue below fold */
@media (max-width: 360px) {
  .qf-icon-grid .qf-option {
    font-size: 0.8rem;
    padding: 10px 8px;
  }
}

/* Short Quiz Offer Styles */
.qf-offer-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
}

.qf-offer-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.5rem 0 1rem;
  color: var(--text, #0f172a);
}

.qf-offer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: #0A58EB;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s, transform 0.15s;
  margin: 1rem 0;
}

.qf-offer-btn:hover {
  background: #0848c5;
  transform: translateY(-1px);
}

.qf-offer-btn svg {
  flex-shrink: 0;
}

.qf-offer-sub {
  font-size: 0.85rem;
  color: var(--text-secondary, #475569);
  font-style: italic;
  margin: 0.75rem 0 0.5rem;
  line-height: 1.5;
}

.qf-offer-proof {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  margin: 0;
}
