/* Quiz page – step layout and cards (uses main.css light theme vars) */
.quiz-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 0 48px;
  background: var(--bg);
}

.quiz-header {
  text-align: center;
  margin-bottom: 32px;
}

.quiz-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 8px;
  color: var(--text-strong);
}

.quiz-header .sub {
  color: var(--muted);
  font-size: 1rem;
}

.quiz-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.quiz-steps {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.quiz-step.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-step h2,
.quiz-step h3 {
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: var(--text-strong);
  text-align: center;
}

.quiz-options {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 480px) {
  .quiz-options {
    grid-template-columns: 1fr;
  }
}

.quiz-option {
  display: block;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
  width: 100%;
  font: inherit;
  color: inherit;
}

.quiz-option img {
  margin: 0 auto;
}

.quiz-option:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.quiz-option.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
}

.quiz-option img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.quiz-option .label {
  display: block;
  padding: 16px;
  font-weight: 600;
  color: var(--text);
}

.quiz-options-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.quiz-options-inline .quiz-option {
  min-width: 120px;
  flex: 1 1 auto;
}

.quiz-options-inline .quiz-option img {
  height: 100px;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 16px;
}

.quiz-nav .btn {
  min-width: 120px;
}

.quiz-loader {
  text-align: center;
  padding: 48px 24px;
}

.quiz-loader .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.quiz-result {
  text-align: center;
  padding: 24px 0;
}

.quiz-result h2 {
  margin-bottom: 16px;
}

.quiz-result .form-row {
  margin-top: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-result input[type="email"],
.quiz-result input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 12px;
}

.quiz-result input::placeholder {
  color: var(--muted);
}

.quiz-thank-you {
  text-align: center;
  padding: 24px 0;
}

.quiz-thank-you h2 {
  margin-bottom: 16px;
  color: var(--text-strong);
}

.quiz-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}

.quiz-progress-inner {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.3s ease;
}
