/* The advertising quiz (index.php). Builds on ../css/site.css; the admin page keeps style.css. */

.quiz-page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}

.quiz {
  max-width: 46rem;
}

.quiz-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.25rem);
}

/* Streaks on the left, "About This Quiz" on the right. */
.quiz-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.75rem 0;
}

.streak-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.streak-info p {
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 560;
}

.streak-info strong {
  color: var(--ink);
}

.about-link {
  font-family: inherit;
  cursor: pointer;
}

.question {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.question p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  font-weight: 560;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.answer-buttons {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 560px) {
  .answer-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

.answer-button {
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.answer-button:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
}

.result {
  margin-top: 1.25rem;
  padding: clamp(1.35rem, 4vw, 2rem);
  border: 1.5px solid;
  border-radius: var(--radius-lg);
  animation: quiz-result-in 0.4s ease;
}

.result p {
  color: var(--text);
}

.result p:first-child {
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.result.correct {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.result.correct p:first-child {
  color: var(--accent);
}

.result.incorrect {
  border-color: #e7a59e;
  background: #fdf3f2;
}

.result.incorrect p:first-child {
  color: #b42318;
}

.next-button {
  margin-top: 0.5rem;
  font-family: inherit;
  cursor: pointer;
}

.quiz h2 {
  margin: 3rem 0 0.9rem 0;
  font-size: clamp(1.35rem, 2.6vw, 1.6rem);
}

.quiz-references li {
  margin-bottom: 0.5rem;
}

@keyframes quiz-result-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result {
    animation: none;
  }
}
