/* score.css — Score and review screens after a quiz or mock. */

/* ---------- score / review ---------- */
.scorewrap {
  text-align: center;
}

@keyframes score-pop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  65% {
    transform: scale(1.06);
  }
}

.scorenum {
  animation: score-pop 0.5s var(--ease) both;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin: 16px 0 10px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--brand-ink);
}

.scorenum small {
  font-size: 1.5rem;
  color: var(--ink-3);
}

.stamp {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--r);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 6px 0;
  background: var(--line-1);
  color: var(--ink-2);
}

.stamp.pass {
  background: var(--green);
  color: #fff;
  box-shadow: var(--drop) var(--green-lip);
}

.stamp.fail {
  background: var(--wrong);
  color: #fff;
  box-shadow: var(--drop) var(--wrong-lip);
}

.stamp.pass,
.stamp.fail {
  animation: score-pop 0.45s var(--ease) 0.12s backwards;
}

.resultStatus {
  margin-top: 16px;
  color: var(--ink-2);
}

.fullMarks {
  font-size: 1.25rem;
  margin: 0;
}

.actions {
  max-width: 330px;
  margin: 24px auto 0;
}

/* The card at the end of a mock is the first confetti colour (confetti.css). */
#finCard {
  background: #ffd93d;
}

/* The finished mock card keeps its fixed yellow in both
   themes, so it keeps the light palette too. Dark-theme ink, the amber focus
   ring and dark button faces were unreadable on it. Values match theme.css
   and base.css light tokens. */
[data-theme="dark"] #finCard {
  color-scheme: light;
  --paper: #fff;
  --panel: #f8fbfd;
  --panel-2: #f0f5f9;
  --ink: #404b60;
  --ink-2: #5c6980;
  --ink-3: #6e7b91;
  --line-1: #edf0f2;
  --line-2: #dce1e6;
  --lip: #d4dce0;
  --brand-ink: #026aa2;
  --brand-soft: #e0f2fe;
  --brand-soft-2: #b9e6fe;
  --brand-line: #7cd4fd;
  --brand-lip: #0ba5ec;
  --wrong: #d93d42;
  --wrong-lip: #b52a2f;
  --green: #36bffa;
  --green-lip: #0ba5ec;
  --focus-ring: #b54708;
}

/* ---------- mock result: by topic, revise next, offer ---------- */
.mock-breakdown,
.mock-revise {
  max-width: 330px;
  margin: 28px auto 0;
  text-align: left;
}

.mock-result-heading {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0 0 8px;
  color: var(--ink);
}

.mock-breakdown-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-breakdown-rows li {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-weight: 700;
  color: var(--ink);
}

.mock-breakdown-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  overflow: hidden;
}

.mock-breakdown-bar i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--brand-ink);
}

.mock-breakdown-score {
  min-width: 2.75rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mock-revise .actions {
  margin-top: 0;
}

.mock-offer {
  max-width: 330px;
  margin: 32px auto 0;
}

.mock-offer .actions {
  margin-top: 12px;
}

#mockMisses {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--panel);
  overflow-y: auto;
  display: none;
  padding: calc(72px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 16px 48px;
}

#mockMisses.show {
  display: block;
}

#mockMisses .inner {
  max-width: 540px;
  margin: 0 auto;
}

#mockMisses h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0 0 16px;
}

.miss {
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.miss .mq {
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 12px;
  white-space: pre-line;
}

.miss .you,
.miss .cor {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}

.miss .you {
  color: var(--wrong-ink);
  background: var(--wrong-soft);
}

.miss .cor {
  color: var(--correct-ink);
  background: var(--correct-soft);
  margin-top: 6px;
}

.miss .exp {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 12px;
}

.closex {
  position: fixed;
  top: calc(10px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  right: max(16px, calc(50vw - 254px));
  z-index: 31;
  background: var(--paper);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r);
  padding: 6px 14px;
  box-shadow: 0 3px 0 var(--lip);
}
