/* AI Literacy Exam (/exam). Same house tokens as the quiz, but a heavier,
   calmer register: no per question colour feedback, a visible clock, an answer
   sheet grid, and a long review list at the end. */

.exam-wrap {
  min-height: 100svh;
  padding: calc(var(--nav-height, 5.5rem) + clamp(1.5rem, 5vh, 3rem)) var(--gutter, 1.5rem) clamp(3rem, 9vh, 6rem);
}
.exam-shell { width: 100%; max-width: 46rem; margin: 0 auto; }

.exam-lang { display: flex; justify-content: flex-end; margin-bottom: 0.9rem; }
.exam-lang .seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 0.25rem; gap: 0.15rem; }
.exam-lang .seg button {
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.35rem 0.85rem; border-radius: 999px; color: var(--dark-2); cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.exam-lang .seg button.active { background: var(--ink); color: var(--on-dark); }

/* ---------- card ---------- */
.ex-card {
  background: #fff;
  border-radius: var(--r-panel, 1.5rem);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 24px 60px -34px rgba(16, 42, 102, 0.32);
  animation: ex-in 0.45s cubic-bezier(.16, 1, .3, 1) both;
}
.ex-card + .ex-card { margin-top: 1.25rem; }
@keyframes ex-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.ex-eyebrow {
  display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 0.75rem;
}
.ex-title {
  font-size: clamp(1.9rem, 5.4vw, 3rem); font-weight: 700; line-height: 1.02;
  letter-spacing: var(--track-5, -0.03em); margin-bottom: 0.9rem;
}
.ex-sub { color: var(--dark-2); line-height: 1.6; margin-bottom: 1.5rem; }

.ex-rules { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: 0.55rem; }
.ex-rules li {
  position: relative; padding-left: 1.9rem; font-size: 0.95rem; color: var(--ink); line-height: 1.5;
}
.ex-rules li::before {
  content: ""; position: absolute; left: 0; top: 0.38em;
  width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--soft);
}
.ex-rules li::after {
  content: ""; position: absolute; left: 0.35rem; top: 0.62em;
  width: 0.44rem; height: 0.22rem; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

/* ---------- progress bar + clock ---------- */
.ex-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.ex-step { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ex-clock {
  font-variant-numeric: tabular-nums; font-size: 1.05rem; font-weight: 700;
  color: var(--dark-2); letter-spacing: 0.02em;
}
.ex-clock.low { color: var(--error, #fb2c36); }
.ex-progress { height: 5px; background: var(--soft); border-radius: 3px; overflow: hidden; margin-bottom: 1.6rem; }
.ex-progress span { display: block; height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.4s var(--ease-out, ease); }

/* ---------- question ---------- */
.ex-q {
  font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 700; line-height: 1.25;
  letter-spacing: var(--track-3, -0.01em); margin-bottom: 1.35rem;
}
.ex-options { display: grid; gap: 0.6rem; margin-bottom: 1.6rem; }
.ex-opt {
  display: flex; align-items: flex-start; gap: 0.85rem; width: 100%; text-align: left;
  background: var(--bg); border: 2px solid transparent; border-radius: 14px;
  padding: 0.95rem 1.1rem; cursor: pointer; font-size: 1rem; line-height: 1.45;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.1s ease;
}
.ex-opt:hover { border-color: rgba(37, 99, 255, 0.4); }
.ex-opt:active { transform: scale(0.995); }
/* Picked, not "correct". The exam never says correct until it is submitted. */
.ex-opt.picked { border-color: var(--blue); background: #fff; }
.ex-key {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--soft); color: var(--dark-2);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
}
.ex-opt.picked .ex-key { background: var(--blue); color: #fff; }

/* ---------- buttons ---------- */
.ex-foot, .ex-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.ex-foot { justify-content: space-between; }
.ex-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: inherit; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.01em;
  padding: 0.75rem 1.4rem; border-radius: 999px; cursor: pointer;
  transition: transform 0.4s var(--ease-pill, ease), background 0.18s ease, color 0.18s ease;
}
.ex-btn:hover { transform: scale(1.04); }
.ex-btn[disabled] { opacity: 0.4; pointer-events: none; }
.ex-primary { background: var(--ink); color: var(--on-dark); }
.ex-ghost { background: var(--soft); color: var(--ink); }
.ex-arrow { width: 1rem; height: 1rem; }

/* ---------- answer sheet ---------- */
.ex-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr));
  gap: 0.45rem; margin: 1.2rem 0 1.8rem;
}
.ex-cell {
  aspect-ratio: 1; border-radius: 10px; background: var(--bg); color: var(--muted);
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; transition: 0.15s;
}
.ex-cell:hover { border-color: rgba(37, 99, 255, 0.45); }
.ex-cell.done { background: var(--blue); color: #fff; }

/* ---------- result ---------- */
.ex-result { text-align: center; }
.ex-timeup {
  background: #fff4f4; color: #b42318; border-radius: 12px;
  padding: 0.8rem 1rem; font-size: 0.9rem; font-weight: 600; margin-bottom: 1.25rem;
}
.ex-score {
  font-size: clamp(3.4rem, 12vw, 6rem); font-weight: 700; line-height: 1;
  letter-spacing: var(--track-7, -0.05em); color: var(--blue);
}
.ex-score span { font-size: 0.32em; color: var(--muted); letter-spacing: 0; }
.ex-pct { font-size: 0.9rem; font-weight: 600; color: var(--muted); margin-top: 0.5rem; }
.ex-band {
  font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; letter-spacing: var(--track-5, -0.03em);
  margin: 1rem 0 0.6rem;
}
.ex-result .ex-sub { max-width: 44ch; margin-inline: auto; }
.ex-actions { justify-content: center; margin-top: 1.5rem; }

/* ---------- review ---------- */
.ex-rev-head { font-size: 1.15rem; font-weight: 700; letter-spacing: var(--track-3, -0.01em); margin-bottom: 1.25rem; }
.ex-reviews { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; counter-reset: none; }
.ex-rev {
  display: grid; grid-template-columns: 2rem 1fr; gap: 0.9rem;
  background: var(--bg); border-radius: 14px; padding: 1rem 1.1rem;
  border-left: 4px solid var(--soft);
}
.ex-rev.ok { border-left-color: #1aa35a; }
.ex-rev.no { border-left-color: #fb2c36; }
.ex-rev.blank { border-left-color: var(--muted); }
.ex-rev-n { font-size: 0.85rem; font-weight: 800; color: var(--muted); }
.ex-rev-q { font-weight: 700; line-height: 1.4; margin-bottom: 0.5rem; }
.ex-rev-line { font-size: 0.9rem; line-height: 1.5; color: var(--dark-2); }
.ex-rev-line.mine { color: #b42318; }
.ex-rev-why { font-size: 0.85rem; line-height: 1.55; color: var(--muted); margin-top: 0.45rem; }

@media (prefers-reduced-motion: reduce) {
  .ex-card { animation: none; }
  .ex-btn:hover { transform: none; }
}
