/* ShopConnect Pro quiz funnel (U2). Reuses styles.css brand tokens; no second
   design system. */

.quiz-page { background: var(--bg); }
.quiz-main { padding-bottom: 96px; }

.quiz-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ====== HERO + Q1 (one screen) ====== */
.quiz-hero { padding-top: clamp(32px, 6vw, 72px); text-align: center; }
.quiz-hero h1 { font-size: clamp(30px, 4.6vw, 56px); max-width: 22ch; margin-inline: auto; }
.quiz-hero .lead { margin: 16px auto 0; }

.quiz-shell { max-width: 720px; padding-top: 20px; }

.quiz-topbar {
  display: flex; align-items: center; gap: 16px;
  min-height: 44px; margin-bottom: 12px;
}
.quiz-back {
  background: transparent; border: 1px solid var(--line-2);
  border-radius: 999px; padding: 10px 18px; min-height: 44px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.quiz-back:hover { background: var(--bg-soft); }
.quiz-progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.quiz-topbar .v4-progress { width: 100%; margin-bottom: 0; }
.quiz-progress-track {
  flex: 1; height: 6px; border-radius: 999px; background: var(--bg-tint);
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--accent); transition: width 240ms ease;
}
.quiz-progress-label {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* Q1 and the Q8 gate retain the live shell rather than the v4 option stage. */
.quiz-card { padding: 8px 0 16px; }
.quiz-stem {
  font-size: clamp(20px, 2.6vw, 28px); line-height: 1.25;
  margin: 0 0 20px;
}

/* Q1 tiles: exactly five in one row on desktop; text tiles on brand tokens */
.quiz-tiles {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.quiz-option {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  font-size: 15px; font-weight: 600; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms, background 140ms, transform 140ms;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option[aria-pressed="true"] {
  border-color: var(--accent-deep); background: var(--accent-soft);
  color: var(--accent-deep);
}
.quiz-option-other { width: 100%; margin-top: 12px; }

/* Q1 logo/name tiles: local decorative marks on the site brand-mark pattern */
.quiz-option-tile {
  flex-direction: column; gap: 8px;
  min-height: 84px; padding: 14px 10px;
}
.quiz-tile-mark {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
  background: oklch(42% var(--accent-c) var(--tile-h, var(--accent-h)));
  color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: 0 4px 12px -2px oklch(60% var(--accent-c) var(--tile-h, var(--accent-h)) / 0.5);
}
.quiz-tile-name { line-height: 1.2; }
.quiz-reassure { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.quiz-microtrust {
  margin-top: 20px; text-align: center;
  font-size: 13px; color: var(--ink-4);
}

/* ====== Typeahead ====== */
.quiz-typeahead { position: relative; margin-bottom: 4px; }
.quiz-typeahead input {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
}
.quiz-typeahead input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.quiz-typeahead-list {
  position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 4px);
  margin: 0; padding: 6px; list-style: none;
  background: var(--bg); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  max-height: 320px; overflow-y: auto;
}
.quiz-typeahead-option {
  padding: 12px 14px; min-height: 44px; display: flex; align-items: center;
  border-radius: var(--radius-sm); font-size: 15px; cursor: pointer;
}
.quiz-typeahead-option:hover, .quiz-typeahead-option.is-active {
  background: var(--accent-soft); color: var(--accent-deep);
}

/* ====== Interstitial ====== */
.quiz-interstitial { text-align: center; padding: 64px 0; }
.quiz-interstitial-line { font-size: 17px; font-weight: 600; margin-top: 12px; }
.quiz-spinner {
  width: 36px; height: 36px; margin: 0 auto 8px;
  border-radius: 999px; border: 3px solid var(--bg-tint);
  border-top-color: var(--accent);
  animation: quiz-spin 800ms linear infinite;
}
@keyframes quiz-spin { to { transform: rotate(360deg); } }

/* ====== Q8 gate ====== */
.quiz-gate { display: grid; gap: 14px; max-width: 480px; }
.quiz-field { display: grid; gap: 6px; }
.quiz-field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.quiz-field input {
  min-height: 52px; padding: 12px 16px; font: inherit; font-size: 16px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--ink); background: var(--bg);
}
.quiz-field input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.quiz-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--ink-2); line-height: 1.4;
}
.quiz-consent input {
  width: 20px; height: 20px; margin-top: 1px; flex: none;
  accent-color: var(--accent-deep);
}
.quiz-submit { min-height: 52px; justify-content: center; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  .quiz-progress-fill, .quiz-option { transition: none; }
  .quiz-spinner { animation-duration: 1600ms; }
}

/* ====== Responsive ====== */
@media (max-width: 640px) {
  .quiz-tiles { grid-template-columns: repeat(2, 1fr); }
}
