/* quiz.css — candidate quiz (/am-i-a-candidate). Mobile-first.
   Palette + type inherited from shared.css tokens. No new vocabulary. */

.quiz { max-width: 760px; margin: 0 auto; }

/* progress */
.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
.quiz-progress__bar { flex: 1; height: 2px; background: var(--border); position: relative; overflow: hidden; }
.quiz-progress__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold);
  transition: width .5s var(--ease-silk); }
.quiz-progress__label { font-family: var(--sans); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap; }

/* steps */
.quiz-step { display: none; }
.quiz-step.is-active { display: block; animation: quizIn .5s var(--ease-silk) both; }
@keyframes quizIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.quiz-q { font-family: var(--serif); font-size: clamp(28px, 6vw, 40px); line-height: 1.15;
  color: var(--white); margin: 0 0 8px; font-weight: 300; }
.quiz-q em { color: var(--gold); font-style: italic; }
.quiz-help { font-family: var(--sans); font-size: 15px; line-height: 1.6; color: var(--muted);
  margin: 0 0 26px; }

/* options — 44px+ tap targets */
.quiz-opts { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
@media (min-width: 620px) { .quiz-opts { grid-template-columns: 1fr 1fr; } }

.quiz-opt { position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 56px; padding: 14px 16px; cursor: pointer;
  background: rgba(255,255,255,0.02); border: 1px solid var(--border);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.quiz-opt:hover { border-color: rgba(184,151,90,0.45); background: var(--gold-pale); transform: translateY(-2px); }
.quiz-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.quiz-opt__swatch { width: 30px; height: 30px; border-radius: 50%; flex: none;
  border: 1px solid rgba(255,255,255,0.14); }
.quiz-opt__text { font-family: var(--sans); font-size: 16px; color: var(--white); line-height: 1.35; }
.quiz-opt__note { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.quiz-opt input:checked ~ .quiz-opt__text { color: var(--gold); }
.quiz-opt:has(input:checked) { border-color: var(--gold); background: var(--gold-pale); }
/* keyboard focus must be visible — shared.css ships no :focus-visible */
.quiz-opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }

/* nav */
.quiz-nav { display: flex; gap: 12px; margin-top: 28px; }
.quiz-back { font-family: var(--sans); font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); background: none; border: 0; cursor: pointer; padding: 12px 4px; min-height: 44px; }
.quiz-back:hover { color: var(--gold); }
.quiz-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.quiz-back[hidden] { display: none; }

/* result */
/* Sticky header would clip the verdict on scrollIntoView. */
.quiz-result { display: none; scroll-margin-top: 110px; }
.quiz-result.is-active { display: block; animation: quizIn .6s var(--ease-silk) both; }
.quiz-result__verdict { font-family: var(--serif); font-size: clamp(30px, 6.4vw, 44px); line-height: 1.12;
  color: var(--white); font-weight: 300; margin: 0 0 16px; }
.quiz-result__verdict em { color: var(--gold); font-style: italic; }
.quiz-result__body { font-family: var(--sans); font-size: 16px; line-height: 1.75;
  color: color-mix(in srgb, var(--fg) 72%, transparent); }
.quiz-result__body p { margin: 0 0 14px; }
.quiz-result__panel { border: 1px solid var(--border); border-left: 2px solid var(--gold);
  background: rgba(255,255,255,0.02); padding: 20px 22px; margin: 24px 0; }
.quiz-result__panel h3 { font-family: var(--sans); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 10px; font-weight: 500; }
.quiz-result__disclaimer { font-family: var(--sans); font-size: 13px; line-height: 1.65;
  color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; margin-top: 24px; }
.quiz-restart { background: none; border: 0; color: var(--muted); font-family: var(--sans);
  font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
  padding: 12px 4px; min-height: 44px; }
.quiz-restart:hover { color: var(--gold); }
.quiz-restart:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* no-JS: the quiz is progressive enhancement — show a plain CTA instead */
.quiz-nojs { border: 1px solid var(--border); padding: 24px; }
.js .quiz-nojs { display: none; }
.quiz-shell { display: none; }
.js .quiz-shell { display: block; }

@media (prefers-reduced-motion: reduce) {
  .quiz-step.is-active, .quiz-result.is-active { animation: none; }
  .quiz-opt, .quiz-progress__fill { transition: none; }
  .quiz-opt:hover { transform: none; }
}

/* Shorter hero for utility pages — the full-bleed hero overwhelms a 3-question quiz. */
.hero--short { min-height: 52vh; }
@media (min-width: 900px) { .hero--short { min-height: 58vh; } }

/* ============================================================
   Light ground. The P1 rhythm puts the quiz on warm cream, and the
   base styles above assume dark. Re-point every colour that would
   otherwise render white-on-cream.
   ============================================================ */
.section-light .quiz-q,
.section-light .quiz-opt__text,
.section-light .quiz-result__verdict { color: var(--ink); }
.section-light .quiz-q em,
.section-light .quiz-result__verdict em { color: var(--gold-ink); }
.section-light .quiz-help,
.section-light .quiz-opt__note,
.section-light .quiz-progress__label,
.section-light .quiz-result__disclaimer { color: var(--ink-soft); }
.section-light .quiz-result__body { color: var(--ink-soft); }
.section-light .quiz-progress__bar { background: rgba(13,34,64,.14); }
.section-light .quiz-progress__fill { background: var(--gold-ink); }
.section-light .quiz-opt { background: rgba(255,255,255,.55); border-color: rgba(13,34,64,.14); }
.section-light .quiz-opt:hover { background: rgba(138,109,51,.07); border-color: rgba(138,109,51,.5); }
.section-light .quiz-opt:has(input:checked) { border-color: var(--gold-ink); background: rgba(138,109,51,.09); }
.section-light .quiz-opt input:checked ~ .quiz-opt__text { color: var(--gold-ink); }
.section-light .quiz-opt:has(input:focus-visible) { outline-color: var(--gold-ink); }
.section-light .quiz-opt__swatch { border-color: rgba(13,34,64,.2); }
.section-light .quiz-result__panel { border-color: rgba(13,34,64,.14); border-left-color: var(--gold-ink);
  background: rgba(255,255,255,.5); }
.section-light .quiz-result__panel h3 { color: var(--gold-ink); }
.section-light .quiz-result__disclaimer { border-top-color: rgba(13,34,64,.14); }
.section-light .quiz-result__disclaimer a,
.section-light .quiz-restart:hover,
.section-light .quiz-back:hover { color: var(--gold-ink); }
.section-light .quiz-nojs { border-color: rgba(13,34,64,.14); }
.section-light .quiz-back,
.section-light .quiz-restart { color: var(--ink-mute); }
