/* Gems by rarity, the full-screen test and the gem opening (js/lesson-quiz.js, js/gem-reveal.js). */

body.exam-open,
body.reveal-open {
  overflow: hidden;
}
body.exam-open .toast,
body.reveal-open .toast {
  z-index: 320;
}

/* ---------- rarity marks in the library, vault and session badge ---------- */
.lr-tier.is-opened::before {
  background: var(--rarity);
  border-color: var(--rarity);
  box-shadow: 0 0 10px var(--rarity);
}
.lr-tier.is-raw::before {
  background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 3px);
}
.session-gem {
  box-shadow: inset 0 -2px 0 var(--rarity, transparent);
}
.session-gem.is-raw #session-gem-label::after {
  content: " →";
}
.vault-item {
  position: relative;
}
.vault-item[class*="is-r"] {
  box-shadow: inset 0 3px 0 var(--rarity);
}
.vault-item.is-r5,
.vault-item.is-r6 {
  background: radial-gradient(120% 80% at 50% 30%, color-mix(in srgb, var(--rarity) 16%, var(--paper)), var(--paper));
}
.vault-rarity {
  color: var(--rarity, var(--muted));
}
.vault-lesson {
  font-size: 0.85em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- codex ---------- */
.codex {
  margin-top: clamp(28px, 3vw, 56px);
  scroll-margin-top: calc(var(--g) * 2 + clamp(42px, 3vw, 52px)); /* clear of the fixed header */
}
.codex-lede {
  max-width: 62ch;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: var(--fs-body);
}
.codex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.codex-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--paper);
  border-left: 3px solid var(--rarity);
}
.codex-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
}
.codex-head .faint {
  grid-column: 2;
}
.codex-pip {
  grid-row: span 2;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: var(--rarity);
  box-shadow: 0 0 12px var(--rarity);
}
.codex-head strong {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.codex-gems {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.codex-gem {
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  opacity: 0.5;
}
.codex-gem.is-found {
  opacity: 1;
}
.codex-gem:not(.is-found) canvas {
  filter: brightness(0) drop-shadow(0 0 1px var(--rarity));
  opacity: 0.55;
}
.codex-gem canvas {
  width: 64px;
  height: 64px;
}
.codex-gem span {
  font-size: 10px;
  line-height: 1.2;
}
@media (max-width: 640px) {
  .codex-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- the test card under a lesson ---------- */
.test-card {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  align-items: center;
  padding: clamp(16px, 2vw, 28px);
  border: 1px solid var(--border);
  background: linear-gradient(110deg, #0b0c10, #15171e 60%, #0b0c10);
  color: #f2f3f5;
  --ink: #f2f3f5;
  --muted: rgba(242, 243, 245, 0.62);
  --border: rgba(242, 243, 245, 0.18);
}
.test-card .quiz-title {
  color: #fff;
}
.test-card .button.primary {
  background: #fff;
  border-color: #fff;
  color: #0b0c10;
}
.test-card .button.primary:not(:disabled):hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.test-card .button.secondary {
  color: #f2f3f5;
  border-color: rgba(242, 243, 245, 0.4);
  background: transparent;
}
.test-card .button.secondary:not(:disabled):hover {
  background: #f2f3f5;
  color: #0b0c10;
}
.test-gem {
  flex: none;
  width: clamp(96px, 10vw, 150px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.test-gem canvas {
  width: 100%;
  height: 100%;
}
.test-gem.is-raw {
  animation: test-gem-breathe 3.2s ease-in-out infinite;
}
@keyframes test-gem-breathe {
  50% {
    filter: brightness(1.25) drop-shadow(0 0 14px rgba(255, 255, 255, 0.18));
  }
}
.test-card-body {
  min-width: 0;
  flex: 1;
}
.test-last {
  margin: 4px 0 12px;
  font-family: var(--mono);
}
.test-last strong {
  font-size: 1.4em;
  font-weight: 500;
  margin-right: 4px;
}
.test-last.is-pass strong {
  color: #6ee7a0;
}
.test-last.is-fail strong {
  color: #ffb4a8;
}
.test-open {
  animation: test-open-pulse 1.6s ease-in-out infinite;
}
@keyframes test-open-pulse {
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent);
  }
}
.quiz-review-label {
  margin-top: clamp(22px, 2.4vw, 40px);
}
@media (max-width: 560px) {
  .test-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- the full-screen test ---------- */
.exam {
  --ink: #f4f4f5;
  --muted: rgba(244, 244, 245, 0.55);
  --faint: rgba(244, 244, 245, 0.28);
  --border: rgba(244, 244, 245, 0.14);
  --c-blue: #74a7ff;
  --c-orange: #ffa94d;
  --c-green: #69db7c;
  --c-red: #ff8787;
  --c-purple: #da77f2;
  --c-teal: #3bc9db;
  --hl: rgba(255, 212, 59, 0.3);
  --charge: 0;
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 880px) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  color: var(--ink);
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(80, 96, 140, 0.18), transparent 70%),
    #07080b;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.38s var(--ease), transform 0.5s var(--ease);
  overflow: hidden;
}
.exam.is-in {
  opacity: 1;
  transform: none;
}
.exam.is-out {
  opacity: 0;
  transform: scale(0.99);
}
.exam:focus {
  outline: none;
}
.exam-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px var(--g);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.exam-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exam-count {
  color: var(--ink);
}
.exam-exit,
.exam-nav {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  padding: 9px 14px;
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.exam-exit:hover,
.exam-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--muted);
}
.exam-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.exam-progress {
  grid-column: 1 / -1;
  display: flex;
  gap: 4px;
  padding: 0 var(--g);
}
.exam-seg {
  flex: 1;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
}
.exam-seg::after {
  content: "";
  position: absolute;
  inset: -8px 0;
}
.exam-seg.is-answered {
  background: rgba(255, 255, 255, 0.72);
}
.exam-seg.is-current {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.exam-seg:disabled {
  cursor: default;
}
.exam-gem {
  grid-column: 3;
  grid-row: 3;
  align-self: start;
  justify-self: center;
  width: clamp(120px, 14vw, 220px);
  margin-top: 4vh;
  text-align: center;
  pointer-events: none;
}
.exam-gem-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.exam-gem-stage::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, calc(0.03 + 0.12 * var(--charge))), transparent 70%);
  transition: background 0.6s;
}
.exam-gem-label {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.exam-body {
  grid-column: 2;
  grid-row: 3;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(24px, 6vh, 72px) var(--g) 24px;
  scrollbar-width: thin;
}
.exam-q {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.42s var(--ease), transform 0.55s var(--ease);
}
.exam-q.is-in {
  opacity: 1;
  transform: none;
}
.exam-meta {
  margin: 0 0 14px;
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  filter: brightness(1.5);
}
.exam-prompt {
  margin: 0 0 clamp(20px, 3.5vh, 40px);
  font-size: clamp(22px, 2.1vw, 38px);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.exam-choices {
  display: grid;
  gap: 8px;
}
.exam-choice {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  font: inherit;
  font-size: clamp(15px, 1.15vw, 20px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s var(--ease);
}
.exam-choice:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
}
.exam-choice.is-picked {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: var(--accent);
  animation: exam-pick 0.35s var(--ease);
}
@keyframes exam-pick {
  40% {
    transform: scale(1.012);
  }
}
.exam-key {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.exam-choice.is-picked .exam-key {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.exam-hint {
  margin: -10px 0 12px;
  font-size: var(--fs-mono);
  color: var(--muted);
}
/* The whiteboard is a sheet of paper on the dark desk. */
.exam-sheet {
  max-width: max(320px, calc((100vh - 380px) * 1000 / 560));
  margin: 0 auto;
  --ink: #1b1b1b;
  --muted: rgba(16, 16, 16, 0.5);
  --border: rgba(16, 16, 16, 0.14);
  --bg: #f1f1f1;
  --surface: #ffffff;
  --c-blue: #2563eb;
  --c-red: #e03131;
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.exam-sheet .board {
  border-radius: 0;
  background: #fff;
}
.exam-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px var(--g) 20px;
  border-top: 1px solid var(--border);
}
.exam-keys {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.exam-submit,
.exam-cta {
  border: 0;
  padding: 12px 22px;
  font: 500 var(--fs-body) / 1 var(--display);
  color: #07080b;
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.exam-submit:hover,
.exam-cta:hover {
  background: #fff;
  transform: translateY(-1px);
}
.exam-submit.is-ready {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 50%, transparent);
}
.exam-warn {
  flex-basis: 100%;
  margin: 0;
  text-align: right;
  font-size: 11px;
  color: #ffb4a8;
}

/* marking */
.exam-big {
  margin: 0 0 22px;
  font-size: clamp(30px, 3.4vw, 64px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.exam-mark-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.exam-mark {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  animation: exam-row 0.45s var(--ease) both;
}
@keyframes exam-row {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
}
.exam-mark-state {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.exam-mark.is-pending .exam-mark-state::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: quiz-blink 1s ease-in-out infinite;
}
/* Marking does not give answers away before the score: every marked row looks the same. */
.exam-mark:not(.is-pending) .exam-mark-state::before {
  content: "✓ ";
  color: var(--ink);
}

/* score */
.exam-score {
  display: grid;
  justify-items: center;
  text-align: center;
  padding-top: 2vh;
}
.exam-ring {
  position: relative;
  width: clamp(200px, 26vh, 300px);
  aspect-ratio: 1;
  margin-bottom: 18px;
}
.exam-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.exam-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 10;
}
.exam-ring-fill {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke 0.3s, filter 0.3s;
}
.exam-ring-mark {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 3;
  transition: stroke 0.3s, filter 0.3s;
}
.exam-score.is-over .exam-ring-fill {
  stroke: #6ee7a0;
  filter: drop-shadow(0 0 10px rgba(110, 231, 160, 0.7));
}
.exam-score.is-over .exam-ring-mark {
  stroke: #6ee7a0;
  filter: drop-shadow(0 0 6px #6ee7a0);
}
.exam-score.is-fail.is-done .exam-ring-fill {
  stroke: #ffb4a8;
}
.exam-ring-mid {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.exam-ring-num {
  font-size: clamp(56px, 8vh, 96px);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.exam-ring-unit {
  align-self: center;
  margin-top: 0.8em;
  color: var(--muted);
}
.exam-verdict,
.exam-line,
.exam-actions,
.exam-note {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.exam-score.is-done .exam-verdict,
.exam-score.is-done .exam-line,
.exam-score.is-done .exam-actions,
.exam-score.is-done .exam-note {
  opacity: 1;
  transform: none;
}
.exam-score.is-done .exam-line {
  transition-delay: 0.1s;
}
.exam-score.is-done .exam-actions {
  transition-delay: 0.25s;
}
.exam-verdict {
  margin-bottom: 8px;
}
.exam-line {
  margin: 0 0 14px;
  max-width: 46ch;
  font-size: var(--fs-body);
  color: var(--muted);
}
.exam-note {
  max-width: 60ch;
  font-size: 11px;
  color: var(--faint);
}
.exam-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 14px;
}
.exam-score.is-pass .exam-cta:not(.is-quiet) {
  background: #fff;
  padding: 16px 30px;
  font-size: clamp(16px, 1.3vw, 22px);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  animation: exam-cta 1.8s ease-out 1.8s infinite;
}
@keyframes exam-cta {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  }
  100% {
    box-shadow: 0 0 0 22px rgba(255, 255, 255, 0);
  }
}
@media (max-width: 900px) {
  .exam {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr auto;
  }
  .exam-top {
    gap: 10px;
  }
  .exam-clock {
    display: none;
  }
  .exam-gem {
    grid-column: 1;
    grid-row: 3;
    width: 84px;
    margin: 6px auto 0;
  }
  .exam-gem-label {
    display: none;
  }
  .exam-body {
    grid-column: 1;
    grid-row: 4;
    padding-top: 12px;
  }
  .exam-keys {
    display: none;
  }
  .exam-foot .exam-submit {
    margin-left: auto;
  }
}

/* ---------- opening a gem ---------- */
.reveal {
  --cy: 44%;
  --leak: #ffffff;
  --leak-a: 0.05;
  --gem: #ffffff;
  position: fixed;
  inset: 0;
  z-index: 310;
  overflow: hidden;
  color: #f5f5f7;
  background: #040406;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  user-select: none;
}
.reveal.is-in {
  opacity: 1;
}
.reveal.is-out {
  opacity: 0;
}
.reveal:focus {
  outline: none;
}
.reveal [hidden] {
  display: none !important;
}
.reveal-leak {
  position: absolute;
  inset: -20%;
  background: radial-gradient(40% 36% at 50% var(--cy), var(--leak), transparent 70%);
  opacity: var(--leak-a);
  transition: opacity 0.6s var(--ease), background 0.35s;
}
.reveal-rays {
  position: absolute;
  left: 50%;
  top: var(--cy);
  width: 180vmax;
  height: 180vmax;
  translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--leak) 55%, transparent) 0deg 5deg, transparent 5deg 18deg);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.5) 18%, transparent 42%);
  opacity: 0;
  scale: 0.4;
  transition: opacity 0.9s var(--ease), scale 1.4s var(--ease);
  animation: reveal-spin 30s linear infinite;
  pointer-events: none;
}
.reveal.is-reveal .reveal-rays {
  opacity: 0.22;
  scale: 1;
}
.reveal.is-uncommon .reveal-rays {
  opacity: 0.35;
}
.reveal.is-rare .reveal-rays,
.reveal.is-epic .reveal-rays {
  opacity: 0.55;
}
.reveal.is-legendary .reveal-rays,
.reveal.is-mythic .reveal-rays {
  opacity: 0.85;
  animation-duration: 16s;
}
@keyframes reveal-spin {
  to {
    rotate: 360deg;
  }
}
.reveal-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 88%;
  cursor: pointer;
}
.reveal.is-reveal .reveal-stage {
  cursor: grab;
}
.reveal-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.reveal-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% var(--cy), #fff 0%, var(--leak) 35%, transparent 75%);
  opacity: 0;
}
.reveal-flash.is-on {
  animation: reveal-flash 0.9s ease-out;
}
.reveal-flash.is-on.is-soft {
  animation-duration: 1.4s;
}
@keyframes reveal-flash {
  0% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
  }
}
.reveal.is-shake {
  animation: reveal-shake 0.32s ease-out;
}
@keyframes reveal-shake {
  20% {
    transform: translate(-6px, 3px);
  }
  40% {
    transform: translate(5px, -4px);
  }
  60% {
    transform: translate(-3px, 2px);
  }
  80% {
    transform: translate(2px, -1px);
  }
}
.reveal-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px var(--g);
  z-index: 2;
}
.reveal-score {
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.6);
}
.reveal-tools {
  display: flex;
  gap: 6px;
}
.reveal-btn {
  border: 1px solid rgba(245, 245, 247, 0.22);
  background: transparent;
  color: #f5f5f7;
  padding: 9px 14px;
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.reveal-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.reveal-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  text-align: center;
  pointer-events: none;
}
.reveal-hint-text {
  min-height: 1.4em;
  margin: 0 0 12px;
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.75);
  animation: reveal-breathe 2s ease-in-out infinite;
}
@keyframes reveal-breathe {
  50% {
    opacity: 0.45;
  }
}
.reveal-taps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.reveal-taps li {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border: 1px solid rgba(245, 245, 247, 0.5);
  transition: background 0.2s, box-shadow 0.2s;
}
.reveal-taps li.is-on {
  background: var(--leak);
  border-color: var(--leak);
  box-shadow: 0 0 12px var(--leak);
}
.reveal-ladder {
  position: absolute;
  left: 50%;
  bottom: 7%;
  translate: -50% 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), bottom 0.8s var(--ease);
  pointer-events: none;
}
.reveal-ladder.is-on {
  opacity: 1;
  transform: none;
}
.reveal-ladder.is-done {
  bottom: 3%;
  opacity: 0.75;
}
.reveal-ladder li {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: clamp(48px, 9vw, 108px);
  opacity: 0.32;
  transition: opacity 0.2s;
}
.reveal-ladder i {
  display: block;
  width: 100%;
  height: 6px;
  background: rgba(245, 245, 247, 0.2);
  transition: background 0.15s, box-shadow 0.15s;
}
.reveal-ladder span {
  font-size: clamp(8px, 0.7vw, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.reveal-ladder li.is-lit {
  opacity: 1;
}
.reveal-ladder li.is-lit i {
  background: var(--c);
  box-shadow: 0 0 14px var(--c);
  animation: reveal-rung 0.3s var(--ease);
}
@keyframes reveal-rung {
  from {
    transform: scaleY(3);
  }
}
.reveal-ladder li.is-final i {
  height: 8px;
  box-shadow: 0 0 26px var(--c), 0 0 4px #fff;
}
.reveal-ladder li.is-final span {
  color: var(--c);
  font-weight: 500;
}
.reveal-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0 var(--g);
  z-index: 1;
}
.reveal-card > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}
.reveal-card.is-in > * {
  opacity: 1;
  transform: none;
}
.reveal-card.is-in .reveal-rarity {
  transition-delay: 0.3s;
}
.reveal-card.is-in .reveal-name {
  transition-delay: 0.45s;
}
.reveal-card.is-in .reveal-fact {
  transition-delay: 1.1s;
}
.reveal-card.is-in .reveal-ct,
.reveal-card.is-in .reveal-new {
  transition-delay: 1.3s;
}
.reveal-card.is-in .reveal-actions {
  transition-delay: 1.6s;
}
.reveal-rarity {
  margin: 0 0 6px;
  font-size: var(--fs-mono);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--leak);
  text-shadow: 0 0 18px var(--leak);
}
.reveal-name {
  margin: 0;
  font: 500 clamp(44px, 7vw, 128px) / 0.95 var(--display);
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 0 40px color-mix(in srgb, var(--gem) 60%, transparent);
}
.reveal-name span {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.35em) scale(0.8);
  filter: blur(8px);
  animation: reveal-letter 0.6s var(--ease) forwards;
}
@keyframes reveal-letter {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.reveal-fact {
  max-width: 44ch;
  margin: 14px 0 6px;
  font-size: var(--fs-body);
  color: rgba(245, 245, 247, 0.7);
}
.reveal-ct {
  margin: 0;
  font-size: clamp(16px, 1.4vw, 24px);
  color: var(--leak);
  font-variant-numeric: tabular-nums;
}
.reveal-new {
  margin: 8px 0 0;
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #040406;
  background: var(--leak);
}
.reveal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.reveal-cta {
  border: 0;
  padding: 14px 28px;
  font: 500 clamp(15px, 1.2vw, 20px) / 1 var(--display);
  color: #040406;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.reveal-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px color-mix(in srgb, var(--leak) 60%, transparent);
}
.reveal.is-reveal {
  --cy: 32%;
}
.reveal.is-reveal .reveal-stage {
  height: 64%;
}
@media (max-height: 640px) {
  .reveal-fact {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-rays,
  .reveal-hint-text,
  .test-gem.is-raw,
  .test-open,
  .exam-score.is-pass .exam-cta:not(.is-quiet) {
    animation: none;
  }
  .reveal-name span {
    animation-duration: 0.01s;
  }
}
