/* Honeypot for the lead form — off-screen, not display:none/visibility:hidden
   (some spam bots specifically skip fields hidden that way), left in normal
   flow so an indiscriminate form-filler still finds it. Real visitors never
   see or reach it: aria-hidden on the wrapper plus tabindex="-1" on the
   input take it out of both the visual and keyboard/screen-reader path. */
.hp-field {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Full-bleed dark photo backdrop behind the whole quiz, same on every step
   (reference: MyHomeQuote's own quiz keeps one photo through the whole
   flow, not a per-step image). Fixed so it never scrolls away behind a
   short step, and sits below everything else via z-index alone (no
   stacking-context tricks needed — nothing else in this page sets one). */
.quiz-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.quiz-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 22, 28, 0.72) 0%, rgba(15, 22, 28, 0.6) 40%, rgba(15, 22, 28, 0.8) 100%);
}
.quiz-bg img { width: 100%; height: 100%; object-fit: cover; }

.quiz-body { min-height: 100vh; display: flex; flex-direction: column; }
.quiz-main { flex: 1; }
.quiz-footer { padding: 18px 0; }
.quiz-footer .footer-nav { margin: 0 0 8px; justify-content: center; }
.quiz-footer .footer-nav a { color: #d7dde1; }
.quiz-footer .footer-copy { text-align: center; color: #b9c1c6; }

.quiz-bar { position: sticky; top: 0; z-index: 100; }
.quiz-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-word { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: #fff; }
.brand-word em { font-style: normal; color: var(--rust); }

.quiz-header-right { display: flex; align-items: center; gap: 20px; }
.header-geo-item {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #d7dde1;
}
@media (min-width: 560px) { .header-geo-item { display: inline-flex; } }
.header-geo-item svg { width: 16px; height: 16px; flex: none; color: var(--rust-tint); }

.quiz-phone { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-decoration: none; }
.quiz-phone-label { font-size: 0.76rem; color: #c9d1d6; }
.quiz-phone-number { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: #fff; }
.quiz-phone:hover .quiz-phone-number { color: var(--rust-tint); }

.progress-bar-full { padding: 0 20px 14px; }
.progress-track { max-width: var(--content-narrow); margin: 0 auto; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.progress-fill { height: 100%; background: var(--rust); border-radius: 4px; transition: width 260ms ease; }
.progress-label { max-width: var(--content-narrow); margin: 6px auto 0; font-family: var(--font-mono); font-size: 0.76rem; color: #c9d1d6; text-align: center; }

.quiz-main { padding: 36px 0 64px; }
.quiz-shell { padding: 0; }

.q-step { display: none; animation: q-in 220ms ease; }
.q-step.is-active { display: block; }
@keyframes q-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.q-title { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.85rem); margin-bottom: 0.35em; color: #ffffff; }
.q-sub { margin-bottom: 1.5em; color: #d7dde1; }

.option-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 1.4em; }
@media (min-width: 560px) { .option-grid { grid-template-columns: repeat(3, 1fr); } }
.option-grid-2 { grid-template-columns: 1fr; }
@media (min-width: 480px) { .option-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.option-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
  text-align: center;
}
.option-card svg { width: 34px; height: 34px; }
.option-card:hover { border-color: var(--slate); color: var(--slate-dark); }
.option-card.is-selected { border-color: var(--rust); color: var(--rust-dark); background: var(--rust-tint); }

/* Auto-focus lands here on every step change (accessibility) — needs its
   own ring, distinct from .is-selected, or a freshly opened step reads as
   "already answered" before the visitor has clicked anything. */
.option-card:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 2px;
  border-color: var(--line-strong);
}
.option-card.is-selected:focus-visible {
  outline-color: var(--slate);
  border-color: var(--rust);
}

.option-card-simple { padding: 16px 14px; }

.q-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.95em 1em;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  margin-bottom: 0.6em;
}
.q-input:focus { border-color: var(--slate); }
.q-input-stack { margin-top: 0; }
.q-input.is-invalid { border-color: var(--rust-dark); }

.field-error {
  display: none;
  color: #ffb199;
  font-size: 0.85rem;
  margin: -0.2em 0 0.9em;
}
.field-error.is-visible { display: block; }

.q-actions { margin-top: 1.2em; display: flex; flex-direction: column; align-items: center; gap: 0.9em; }
.q-back, .q-back-link {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; color: #c9d1d6;
  padding: 4px;
}
.q-back:hover, .q-back-link:hover { color: #ffffff; }
.q-back-link { text-decoration: none; }

.tcpa-text {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #c9d1d6;
  margin-top: 1.3em;
}
.tcpa-link-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: #ffffff; text-decoration: underline;
  cursor: pointer;
}
.tcpa-note {
  font-size: 0.74rem;
  color: #c9d1d6;
  text-decoration: underline;
  margin-top: 0.6em;
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(27, 44, 56, 0.55); }
.lightbox-panel {
  position: relative;
  background: var(--paper-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  max-width: 720px;
  width: 100%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.lightbox-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.lightbox-head h2 { margin: 0; font-size: 1.1rem; }
.lightbox-close {
  background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer;
  color: var(--ink-faint); padding: 4px 8px;
}
.lightbox-close:hover { color: var(--ink); }
.lightbox-body { padding: 18px 22px 24px; overflow-y: auto; }
.partners-text { font-size: 0.82rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }
