/* The "start here" quiz, /quiz and /quiz/results/<profile>. Site tokens only
   (--cream, --gold, --olive, --ink, --line, --card, --radius from site.css).
   .btn stays exactly as site.css defines it; nothing here restyles it. */

.wrap-narrow { width: min(100% - 32px, 640px); margin-inline: auto; }

/* .btn and .js-only set their own display, which beats the UA [hidden] rule.
   Without this, a button JS hides via .hidden stays visually shown. */
[hidden] { display: none !important; }

/* ── Progress ─────────────────────────────────────────────────────────── */
.qprog {
  position: relative;
  margin: 0 0 28px;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-60);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.qprog::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}
.qprog::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: var(--qpct, 16.6%);
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}
@media (prefers-reduced-motion: no-preference) { .qprog::after { transition: width 0.25s ease; } }

/* ── Questions ────────────────────────────────────────────────────────── */
.qstep { border: 0; padding: 0; margin: 0 0 34px; }
.qstep legend { font-family: var(--display); font-size: clamp(20px, 3vw, 26px); padding: 0 0 16px; }
.quiz-js .qstep { display: none; }
.quiz-js .qstep.is-active { display: block; }
.qopts { display: flex; flex-direction: column; gap: 12px; }

.qopt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .qopt { transition: border-color 0.12s, transform 0.1s, box-shadow 0.12s; }
}
.qopt input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.qopt-num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-40);
}
.qopt-label { font-size: 16px; font-weight: 600; }
.qopt:hover { border-color: var(--gold); }
.qopt:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.qopt:has(input:checked) {
  border-color: var(--ink);
  background: var(--cream-deep);
  box-shadow: 4px 4px 0 var(--ink);
}
.qopt:has(input:checked) .qopt-num { border-color: var(--ink); background: var(--ink); color: var(--cream); }
@media (prefers-reduced-motion: no-preference) { .qopt:has(input:checked) { transform: translate(-1px, -1px); } }

/* ── Nav buttons ──────────────────────────────────────────────────────── */
.qnav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.js-only { display: none; }
.quiz-js .js-only { display: inline-flex; }

/* ── Result page ──────────────────────────────────────────────────────── */
.qpath { list-style: decimal; padding-left: 26px; margin: 0; display: flex; flex-direction: column; gap: 22px; }
.qpath li { padding-left: 6px; }
.qoffers-section h2 { font-family: var(--display); font-size: clamp(22px, 3vw, 28px); margin: 0 0 26px; }
.qoffer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.qoffer { display: flex; flex-direction: column; gap: 12px; }
.qreason { font-size: 14.5px; color: var(--ink-60); line-height: 1.55; margin: 0; }

.qsend-section h2 { font-family: var(--display); font-size: clamp(20px, 3vw, 24px); margin: 0 0 16px; }
.qsend { display: flex; flex-wrap: wrap; gap: 12px; }
.qsend input[type=email] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  background: var(--card);
  color: var(--ink);
}
.qsend input[type=email]:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.qerror { color: #a3271f; font-size: 14px; margin-top: 12px; }
.qsend-done { margin-top: 16px; font-weight: 700; }
.qretake { margin-top: 22px; }
.qretake a { color: var(--olive); font-weight: 700; }

@media (max-width: 420px) {
  .qopt { padding: 14px; }
  .qopt-label { font-size: 15px; }
}
