/* =============================================================================
   SECTION 5 · THE VERY SERIOUS GIRLFRIEND TEST  (official exam paper)
   ========================================================================== */

.exam {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.exam::before { /* red margin line, like school paper */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 22px;
  width: 1.5px;
  background: rgba(201, 62, 84, .22);
  pointer-events: none;
}

.exam-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 22px 14px 40px;
  border-bottom: 1.5px dashed var(--line-strong);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.exam-candidate {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--cherry);
  transform: rotate(-2deg);
}

.exam-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px clamp(22px, 5vw, 44px) 0 clamp(40px, 6vw, 60px);
}
.exam-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--blush);
  overflow: hidden;
}
.exam-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--cherry));
  transition: width .7s var(--ease-out);
}
.exam-progress-count {
  min-width: 4.5em;
  text-align: right;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.exam-body {
  position: relative;
  min-height: 430px;
  padding: clamp(22px, 5vw, 40px) clamp(22px, 5vw, 44px) clamp(28px, 5vw, 44px) clamp(40px, 6vw, 60px);
}

/* Panels slide in / out */
.q-panel { animation: q-in .55s var(--ease-out) both; }
.q-panel.is-out { animation: q-out .26s ease-in forwards; }
@keyframes q-in {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: none; }
}
@keyframes q-out {
  to { opacity: 0; transform: translateX(-36px); }
}

.q-num {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cherry);
}
.q-text {
  margin: 8px 0 24px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5.6vw, 2.3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
  font-variation-settings: "SOFT" 100;
  text-wrap: balance;
}
.q-intro-text { max-width: 40ch; color: var(--ink-2); font-size: 1.04rem; }
.q-start { margin-top: 26px; }

.q-options { display: grid; gap: 12px; }
.q-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 12px 16px;
  border: 0;
  border-radius: 18px;
  background: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 1.04rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: transform .3s var(--ease-spring), background-color .25s, box-shadow .25s, opacity .35s, color .25s;
}
@media (hover: hover) {
  .q-options:not(.is-answered) .q-opt:hover {
    background: #fff;
    box-shadow: inset 0 0 0 1.5px var(--rose), 0 10px 20px -14px rgba(201, 62, 84, .6);
    transform: translateX(5px);
  }
}
.q-opt:active { transform: scale(.98); }
.q-letter {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: .82rem;
  font-weight: 700;
  transition: background-color .25s, color .25s;
}
.q-check {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
  color: var(--cherry);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .3s, transform .45s var(--ease-spring);
}
.q-check .icon { width: 16px; height: 16px; }

.q-opt.is-chosen {
  background: var(--cherry);
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(201, 62, 84, .9);
  animation: chosen .5s var(--ease-spring);
}
.q-opt.is-chosen .q-letter { background: rgba(255, 255, 255, .2); box-shadow: none; color: #fff; }
.q-opt.is-chosen .q-check { opacity: 1; transform: none; }
.q-options.is-answered .q-opt:not(.is-chosen) { opacity: .42; cursor: default; }
@keyframes chosen { 40% { transform: scale(1.03); } }

.q-reaction {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 2.4em;
  margin-top: 18px;
  font-family: var(--font-hand);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--cherry);
}
.q-reaction:empty { visibility: hidden; }
.q-reaction > span { animation: rise-in .45s var(--ease-out); }
.tick { width: 34px; height: 30px; flex: none; overflow: visible; }
.tick path {
  fill: none;
  stroke: var(--cherry);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw .5s var(--ease-out) .05s forwards;
}
.q-actions { margin-top: 18px; min-height: 50px; }

/* ---------- Result certificate ----------------------------------------------- */
.q-result { position: relative; text-align: center; padding-top: 6px; }
.cert-title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--cherry);
  font-variation-settings: "SOFT" 100;
}
.cert-text { max-width: 30ch; margin: 16px auto 0; font-size: 1.1rem; text-wrap: balance; }
.cert-reward {
  max-width: 420px;
  margin: 22px auto 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--blush);
  font-family: var(--font-hand);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}
.cert-reward b { display: block; margin-bottom: 4px; font-family: var(--font-body); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cherry-deep); }
.cert-score { margin-top: 16px; font-size: .86rem; font-weight: 600; color: var(--ink-3); }
.cert-stamp {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 96px;
  height: 96px;
  font-size: .64rem;
  background: rgba(255, 253, 249, .6);
  animation: stamp-in .7s var(--ease-out) .35s both;
}
@media (max-width: 520px) {
  .cert-stamp { position: relative; top: 0; right: 0; margin: 0 auto 10px; display: grid; }
}
.q-retry { margin-top: 26px; }
