/* AI literacy quiz (js: /js/quiz.js). On-brand, flat (no borders/shadows). */

/* Reserve the scrollbar gutter on both sides so the centred card stays dead
   centre (a classic scrollbar otherwise shifts it left). Scoped to /quiz. */
html { scrollbar-gutter: stable both-edges; }

.quiz-wrap {
  padding: calc(var(--nav-height) + clamp(3rem, 10vh, 6rem)) var(--gutter) var(--space-section);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quiz-shell { width: 100%; max-width: 680px; }

/* Language toggle */
.quiz-lang { display: flex; justify-content: flex-end; margin-bottom: 0.9rem; }
.quiz-lang .seg {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: var(--soft);
  border-radius: 999px;
}
.quiz-lang button {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.quiz-lang button.active { background: #fff; color: var(--blue); }

.quiz-card {
  width: 100%;
  background: #fff;
  border-radius: var(--r-panel);
  padding: clamp(1.75rem, 4vw, 3.25rem);
}

.quiz-eyebrow {
  display: block;
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

.quiz-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: var(--track-5);
  line-height: 1;
  margin-bottom: 1rem;
}

.quiz-sub {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 50ch;
}

/* Progress + step */
.quiz-progress {
  height: 6px;
  border-radius: 4px;
  background: var(--soft);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.quiz-progress span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
  transition: width 0.35s var(--ease-out, ease);
}
.quiz-step {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: var(--track-3);
  text-transform: uppercase;
  color: var(--muted);
}
.quiz-q {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--track-3);
  margin: 0.6rem 0 1.5rem;
  text-wrap: balance;
}

/* Options */
.quiz-options { display: grid; gap: 0.7rem; }
.quiz-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 15px 18px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--ink);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out, ease), background-color 0.18s ease;
}
.quiz-opt:hover:not(.locked) { background: #c7dbff; transform: translateY(-1px); }
.quiz-opt-key {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}
.quiz-opt-text { line-height: 1.35; }
.quiz-opt.locked { cursor: default; }
.quiz-opt.correct { background: #dcf3e5; color: #0f7a3d; }
.quiz-opt.correct .quiz-opt-key { background: #1aa35a; color: #fff; }
.quiz-opt.wrong { background: #fde0e2; color: #b4232c; }
.quiz-opt.wrong .quiz-opt-key { background: #e23b44; color: #fff; }

.quiz-explain {
  margin-top: 1.25rem;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
.quiz-foot { margin-top: 1.5rem; }

/* Buttons */
.quiz-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--on-dark);
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.45s var(--ease-pill, ease);
}
.quiz-btn:hover { transform: scale(1.05); }
.quiz-btn svg { width: 20px; height: 20px; flex: none; }
.quiz-cta { background: var(--blue); }

/* Intro spacing */
.quiz-intro .quiz-sub { margin-bottom: 1.75rem; }

/* Result */
.quiz-result .quiz-score {
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 300;
  color: var(--blue);
  line-height: 1;
  letter-spacing: var(--track-3);
}
.quiz-result .quiz-score span { color: var(--muted); font-size: 0.4em; }
.quiz-verdict {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: var(--track-5);
  line-height: 1;
  margin: 0.5rem 0 0.75rem;
}
.quiz-result-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.75rem; }

@media (prefers-reduced-motion: reduce) {
  .quiz-progress span, .quiz-opt, .quiz-btn { transition: none; }
}
