/* ─────────────────────────────────────────────────────────────
   Techwish — Consultation Quiz styles
   Token consumers with safe fallbacks.
   ───────────────────────────────────────────────────────────── */

.tw-quiz {
  padding: 48px 0 64px;
  max-width: 880px;
  margin: 0 auto;
}

.tw-quiz__header { margin-bottom: 28px; }
.tw-quiz__header .tw-eyebrow { display: inline-block; margin-bottom: 8px; }
.tw-quiz__header .tw-lede { margin-top: 10px; max-width: 56ch; }

.tw-quiz__progress {
  position: relative;
  height: 4px;
  background: var(--tw-line-soft, #ECEFED);
  border-radius: 4px;
  margin-bottom: 28px;
}
.tw-quiz__progress-fill {
  height: 100%;
  background: var(--tw-mint, #2DCE92);
  border-radius: 4px;
  transition: width var(--tw-dur-med, .28s) var(--tw-ease, ease);
  width: 0;
}
.tw-quiz__progress-text {
  position: absolute; right: 0; top: 12px;
  font-family: var(--tw-mono, ui-monospace);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tw-mute, #6B7470);
}

.tw-quiz__form {
  background: var(--tw-paper, #fff);
  border: 1px solid var(--tw-line-soft, #ECEFED);
  border-radius: var(--tw-radius-lg, 18px);
  padding: 32px;
}
.tw-quiz__step { border: 0; padding: 0; margin: 0; }
.tw-quiz__step[hidden] { display: none; }
.tw-quiz__step legend.tw-h3 { padding: 0; margin: 0 0 6px; }
.tw-quiz__help {
  margin: 0 0 22px;
  color: var(--tw-mute, #6B7470);
  font-size: 14px;
}

.tw-quiz__answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .tw-quiz__answers { grid-template-columns: 1fr; }
}

.tw-quiz__answer {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--tw-line, #DDE3E0);
  border-radius: var(--tw-radius-md, 10px);
  cursor: pointer;
  transition: all var(--tw-dur-fast, .15s) ease;
  background: #fff;
}
.tw-quiz__answer input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
}
.tw-quiz__answer:has(input:checked) {
  border-color: var(--tw-mint, #2DCE92);
  background: var(--tw-mint-050, #F1FAF5);
  box-shadow: 0 0 0 1px var(--tw-mint, #2DCE92) inset;
}
.tw-quiz__answer-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--tw-line, #DDE3E0);
  color: var(--tw-mute, #6B7470);
  font-family: var(--tw-mono, ui-monospace);
  font-size: 14px;
}
.tw-quiz__answer:has(input:checked) .tw-quiz__answer-icon {
  border-color: var(--tw-mint, #2DCE92);
  color: var(--tw-mint-600, #1FB37C);
  background: #fff;
}
.tw-quiz__answer-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tw-quiz__answer-label { font-weight: 600; font-size: 14.5px; color: var(--tw-ink, #0B0F0D); line-height: 1.3; }
.tw-quiz__answer-desc  { font-size: 13px; color: var(--tw-mute, #6B7470); line-height: 1.4; }

.tw-quiz__nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--tw-line-soft, #ECEFED);
}
.tw-quiz__nav [data-tw-quiz-prev]   { margin-right: auto; }
.tw-quiz__nav [data-tw-quiz-next],
.tw-quiz__nav [data-tw-quiz-submit] { margin-left: auto; }

.tw-quiz__error {
  margin-top: 14px;
  padding: 12px 14px;
  background: #FCEDEC;
  border: 1px solid #F1B7B5;
  border-radius: 10px;
  color: #7A1F1A;
  font-size: 13px;
}

/* Result block */
.tw-quiz__result {
  margin-top: 32px;
  padding: 32px;
  background: var(--tw-paper-2, #F4F7F5);
  border-radius: var(--tw-radius-lg, 18px);
  border: 1px solid var(--tw-line-soft, #ECEFED);
}
.tw-quiz__result[hidden] { display: none; }
.tw-quiz__result-summary {
  font-family: var(--tw-display, sans-serif);
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 24px;
  color: var(--tw-ink, #0B0F0D);
}
.tw-quiz__recs h3 {
  font-family: var(--tw-display, sans-serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 14px;
}
.tw-quiz__rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.tw-quiz__rec {
  background: #fff;
  border: 1px solid var(--tw-line-soft, #ECEFED);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tw-quiz__rec img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  background: var(--tw-paper-2, #F4F7F5);
}
.tw-quiz__rec-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tw-quiz__rec-name { font-weight: 600; color: var(--tw-ink, #0B0F0D); text-decoration: none; font-size: 14px; line-height: 1.3; }
.tw-quiz__rec-price { font-family: var(--tw-mono, ui-monospace); font-size: 13px; color: var(--tw-mute, #6B7470); }
.tw-quiz__rec .tw-btn { margin-top: auto; height: 32px; font-size: 12px; padding: 0 12px; }

/* Lead capture */
.tw-quiz__lead {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--tw-line, #DDE3E0);
}
.tw-quiz__lead h4 {
  font-family: var(--tw-display, sans-serif);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px;
}
.tw-quiz__lead p { color: var(--tw-mute, #6B7470); font-size: 13px; margin: 0 0 14px; }
.tw-quiz__lead-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.tw-quiz__lead-fields label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--tw-ink-2, #2A2F2C);
}
.tw-quiz__lead-fields input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tw-line, #DDE3E0);
  border-radius: 8px;
  font: inherit;
}
.tw-quiz__lead-consent {
  font-size: 12px;
  color: var(--tw-mute, #6B7470);
}
.tw-quiz__lead-sent {
  padding: 12px 14px;
  background: var(--tw-mint-050, #F1FAF5);
  border: 1px solid var(--tw-mint, #2DCE92);
  border-radius: 10px;
  color: var(--tw-mint-600, #1FB37C);
  font-size: 13px;
}

.tw-quiz__restart {
  margin-top: 24px;
}
