/* play-glyph.app — the temple's palette (src/constants/temple-theme.ts). */
:root {
  --hero-h: 80svh;
  --stone: #141126;
  --stone-mid: #241534;
  --stone-highlight: #65406f;
  --text: #d3c6d8;
  --muted: #9a93a8;
  --gold: #ffe06b;
  --slab: #b45bce;
  --slab-top: #9e54b4;
  --slab-bottom: #713483;
  --slab-lip: #3f1e4a;
  --slab-text: #f6edf9;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--stone);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.55;
}

a {
  color: var(--text);
}

.pixel {
  font-family: 'Jersey 10', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ----- Landing ----- */

.hero-wrap {
  position: relative;
  overflow: hidden;
}

/* Blurred, darkened copy filling the whole width behind the door. */
.hero-wrap::before {
  content: '';
  position: absolute;
  inset: -60px;
  background: url('door.webp') center top / cover no-repeat;
  filter: blur(28px) brightness(0.45);
}

/* The door itself: full hero height, its own width (941:1672), centred,
   edges feathered into the blur. */
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  /* Its own proportions on a phone (full width); on a wide screen a bit
     wider than that — the extra crops the floor, which fades out anyway. */
  width: min(100%, max(calc(var(--hero-h) * 941 / 1672), 720px));
  background: url('door.webp') center top / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* Fades the bottom into the page. */
.hero-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 17, 38, 0) 40%, var(--stone) 95%);
}

.hero {
  position: relative;
  z-index: 1;
  /* Shorter than the screen on purpose: "Pick a deck" and the top of the
     deck panels peek in below, so it's clear there's more to scroll to. */
  min-height: var(--hero-h);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(72px, 18vw, 120px);
  line-height: 1;
  color: var(--slab-text);
  text-shadow: 0 0 24px rgba(67, 207, 255, 0.35);
}

.hero .tagline {
  margin: 12px 0 28px;
  max-width: 30ch;
  font-size: 26px;
  line-height: 1.2;
}

.slab {
  display: inline-block;
  min-width: min(320px, 100%);
  padding: 14px 24px;
  border-radius: 6px;
  background: linear-gradient(var(--slab-top), var(--slab-bottom));
  box-shadow:
    inset 0 2px 0 #c67ae9,
    0 5px 0 var(--slab-lip);
  color: var(--slab-text);
  font-size: 26px;
  text-decoration: none;
}

.slab:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 2px 0 #c67ae9,
    0 2px 0 var(--slab-lip);
}

.note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

.tracks {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.track {
  padding: 16px 16px 8px;
  background: var(--stone-mid);
  border: 2px solid var(--stone-highlight);
  border-radius: 2px;
  overflow: hidden;
}

.track-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.track-head img {
  width: 64px;
  height: auto;
  flex: none;
}

.track h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.track-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 20px;
}

/* Three cards held in a hand: each is shifted along an arc and turned,
   about its own centre (so the hover tilt below composes cleanly). For a
   pivot ~1.9 card-widths below the centre at ±14°: x = ±0.456w,
   y = +0.056w. */
.fan {
  --card-w: min(130px, 26vw);
  position: relative;
  height: calc(var(--card-w) * 120 / 70 + 48px);
  margin-top: 20px;
}

.fan .card {
  cursor: pointer;
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0deg)) translateY(var(--lift, 0px))
    perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.fan .card:nth-child(1) {
  --tx: calc(var(--card-w) * -0.456);
  --ty: calc(var(--card-w) * 0.056);
  --rot: -14deg;
}

.fan .card:nth-child(2) {
  --ty: -8px;
  z-index: 1;
}

.fan .card:nth-child(3) {
  --tx: calc(var(--card-w) * 0.456);
  --ty: calc(var(--card-w) * 0.056);
  --rot: 14deg;
}

.fan .card:hover,
.fan .card:focus-visible {
  --lift: -10px;
  z-index: 2;
  outline: none;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
}

/* Hidden while it's up in the viewer. */
.fan .card.away {
  visibility: hidden;
}

/* The app's card (src/components/Card.tsx, detail face), drawn at
   --card-w: every length is the app's value for its 320pt-wide card,
   scaled by --u. */
.card {
  --u: calc(var(--card-w) / 320);
  position: absolute;
  left: 50%;
  top: 16px;
  width: var(--card-w);
  aspect-ratio: 70 / 120;
  margin: 0 0 0 calc(var(--card-w) / -2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: calc(var(--u) * 8) solid #fff;
  border-radius: calc(var(--u) * 18);
  overflow: hidden;
  background: #3b4252;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.card .art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card p {
  margin: 0;
}

/* Term + gloss, a dark wash fading out to the right. */
.card .banner {
  position: relative;
  margin-top: calc(var(--u) * 10);
  padding: 0 calc(var(--u) * 24);
  background: linear-gradient(to right, rgba(6, 10, 20, 0.62), rgba(6, 10, 20, 0));
}

.card .term {
  font-family: 'Asul', serif;
  font-weight: 700;
  font-size: calc(var(--u) * 29);
  line-height: 1.15;
}

.card .gloss {
  margin-top: calc(var(--u) * -3);
  font-family: 'Asul', serif;
  font-size: calc(var(--u) * 16);
  line-height: calc(var(--u) * 20);
}

.card .lower {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 6);
  padding-bottom: calc(var(--u) * 2);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* The quote over the art: bold italic with a black keyline. */
.card .example {
  margin: 0 calc(var(--u) * 8);
  padding-top: calc(var(--u) * 3);
  font-style: italic;
  font-weight: 700;
  font-size: calc(var(--u) * 15);
  line-height: calc(var(--u) * 18);
  text-align: center;
  --k: calc(var(--u) * 1);
  text-shadow:
    calc(var(--k) * -1) calc(var(--k) * -1) 0 #000,
    var(--k) calc(var(--k) * -1) 0 #000,
    calc(var(--k) * -1) var(--k) 0 #000,
    var(--k) var(--k) 0 #000,
    0 calc(var(--k) * -1) 0 #000,
    0 var(--k) 0 #000,
    calc(var(--k) * -1) 0 0 #000,
    var(--k) 0 0 #000,
    0 calc(var(--u) * 2) calc(var(--u) * 4) rgba(0, 0, 0, 0.55);
}

/* Dark panels: rounded on the left, running into the outline on the right. */
.card .panel {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 8);
  margin-left: calc(var(--u) * 16);
  padding: calc(var(--u) * 6) calc(var(--u) * 8);
  border-radius: calc(var(--u) * 10) 0 0 calc(var(--u) * 10);
  background: rgba(0, 0, 0, 0.55);
}

.card .panel img {
  flex: none;
  width: calc(var(--u) * 28);
  height: calc(var(--u) * 28);
  margin: calc(var(--u) * 2);
  image-rendering: pixelated;
}

.card .definition {
  font-size: calc(var(--u) * 15);
  line-height: calc(var(--u) * 18);
}

.card .history {
  font-weight: 700;
  font-size: calc(var(--u) * 11);
  line-height: calc(var(--u) * 14);
  color: rgba(255, 255, 255, 0.9);
}

.card .history em {
  font-style: italic;
}

.card .footer {
  margin-top: calc(var(--u) * -4);
  padding-left: calc(var(--u) * 26);
  font-style: italic;
  font-weight: 300;
  font-size: calc(var(--u) * 11);
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-title {
  max-width: 720px;
  margin: 24px auto 0;
  padding: 0 16px;
  font-size: 40px;
  font-weight: 400;
  color: var(--slab-text);
}

.how {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 48px;
  font-size: 22px;
}

.how h2 {
  font-size: 34px;
  margin: 0 0 8px;
}

.how ol {
  margin: 0;
  padding-left: 1.2em;
}

.how li {
  margin-bottom: 8px;
}

/* The second sentence of a step: regular text, not the pixel font. */
.how .plain {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  color: var(--muted);
}

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--stone-highlight);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--muted);
  font-size: 15px;
}

/* ----- Privacy policy ----- */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.doc .back {
  font-size: 22px;
  text-decoration: none;
}

.doc h1 {
  font-size: 48px;
  line-height: 1.1;
  margin: 16px 0 4px;
  color: var(--slab-text);
}

.doc h2 {
  font-size: 30px;
  margin: 36px 0 8px;
  color: var(--slab-text);
}

.doc .updated {
  color: var(--muted);
  margin: 0 0 24px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 8px;
  border: 1px solid var(--stone-highlight);
}

.doc th {
  background: var(--stone-mid);
}

.doc .table-wrap {
  overflow-x: auto;
}

/* ----- Card viewer ----- */

/* While a card is up: no page scrolling (overflow for desktop; the
   viewer's touch-action for iOS Safari, which ignores overflow alone). */
html.no-scroll,
html.no-scroll body {
  overflow: hidden;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(10, 8, 20, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: viewer-in 0.25s ease-out;
  touch-action: none;
  overscroll-behavior: contain;
  /* The open card's size — shared with the hint below it. */
  --card-w: min(320px, 68vw, calc((100svh - 120px) * 70 / 120));
  --card-h: calc(var(--card-w) * 120 / 70);
}

.viewer[hidden] {
  display: none;
}

.viewer.closing {
  animation: viewer-out 0.3s ease-in forwards;
}

@keyframes viewer-in {
  from {
    background: rgba(10, 8, 20, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}

@keyframes viewer-out {
  to {
    background: rgba(10, 8, 20, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}

.stage {
  width: var(--card-w);
  aspect-ratio: 70 / 120;
  perspective: 1200px;
}

.tilt,
.flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.tilt {
  transition: transform 0.15s ease-out;
}

.flipper {
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1);
}

.flipper.flipped {
  transform: rotateY(180deg);
}

.flipper .card,
.flipper .card-back {
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  width: 100%;
  margin: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* The other face: the bundled card-back art with the word, as in the app. */
.card-back {
  --u: calc(var(--card-w) / 320);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--u) * 18);
  overflow: hidden;
  background: url('cards/card-back.webp') center / cover no-repeat;
  transform: rotateY(180deg);
}

.card-back span {
  margin-top: calc(var(--u) * -15);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Asul', serif;
  font-weight: 700;
  font-size: calc(var(--u) * 34.8);
  line-height: calc(var(--u) * 38.1);
}

.nav {
  flex: none;
  width: 44px;
  height: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 64px;
  line-height: 1;
  cursor: pointer;
}

.nav:hover {
  color: var(--slab-text);
}

.viewer-actions {
  position: absolute;
  left: 16px;
  right: 16px;
  /* Centred between the card's bottom edge and the screen's: the card is
     vertically centred, so that gap is (screen - card) / 2 and its middle
     sits a quarter of (screen - card) above the bottom. */
  bottom: calc((100svh - var(--card-h)) / 4);
  transform: translateY(50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.viewer-hint {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}

.slab-small {
  min-width: 0;
  padding: 8px 28px;
  border: 0;
  font-size: 22px;
  cursor: pointer;
}

/* ----- "Test me": the app's practice screen, on the web ----- */

.viewer.quizzing {
  background: #0a0c1d;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.viewer.quizzing .stage,
.viewer.quizzing .nav,
.viewer.quizzing .viewer-actions {
  display: none;
}

.quiz {
  width: min(340px, 100% - 32px);
  max-height: 100svh;
  overflow-y: auto;
  padding: 24px 0;
}

/* !important: rules like `.quiz-buttons .option { display: block }` are
   just as specific and come later, and would otherwise un-hide them. */
.quiz[hidden],
.quiz [hidden] {
  display: none !important;
}

/* The practice screen's ×, top-left as in the app: back to the card. */
.quiz-close {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}

.quiz-close:hover {
  color: #fff;
}

.quiz-ask,
.quiz-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.quiz p {
  margin: 0;
  text-align: center;
}

/* The tested word, big and blue (practice-round's testedTermLarge). */
.quiz-word {
  color: #1989fe;
  font-size: 56px;
  line-height: 60px;
}

.quiz-prompt {
  margin-top: -16px !important;
  color: rgba(255, 255, 255, 0.6);
  font-size: 17px;
}

.quiz-options,
.quiz-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* The "classic" TempleButton: flat dark-stone slab, lit top edge. */
.option {
  width: 100%;
  padding: 13px 24px;
  border: 0;
  border-top: 2px solid var(--stone-highlight);
  border-radius: 2px;
  background: #3c2352;
  color: var(--text);
  font-size: 22px;
  text-align: left;
  cursor: pointer;
}

.option:hover:not(:disabled) {
  background: #46295f;
}

.option:active:not(:disabled) {
  background: #2e1a3f;
  transform: translateY(2px);
}

.option:disabled {
  background: #2e1a3f;
  color: #777487;
  cursor: default;
}

.quiz-buttons .slab,
.quiz-buttons .option {
  display: block;
  width: 100%;
  text-align: center;
}

.quiz-feedback {
  font-size: 38px;
  line-height: 42px;
}

.quiz-feedback.correct {
  color: #1989fe;
}

.quiz-feedback.wrong {
  color: #e5484d;
}

/* The card as the app reveals it after an answer (260pt there). */
.quiz-card {
  --card-w: min(260px, 64vw);
  position: relative;
  width: var(--card-w);
  aspect-ratio: 70 / 120;
  margin-top: -8px;
}

.quiz-card .card {
  inset: 0;
  left: 0;
  top: 0;
  width: 100%;
  margin: 0;
}

/* ----- Join the beta (beta.html) ----- */

.beta-steps {
  padding-left: 1.4em;
  font-size: 17px;
}

.beta-steps li {
  margin: 6px 0;
}

.beta-form {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--stone-highlight);
  border-radius: 8px;
  background: var(--stone-mid);
}

.beta-form label {
  display: block;
  font-size: 26px;
  color: var(--slab-text);
  margin-bottom: 10px;
}

.beta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.beta-row input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--stone-highlight);
  border-radius: 6px;
  background: var(--stone);
  color: var(--slab-text);
  font-size: 17px;
}

.beta-row button:disabled {
  opacity: 0.6;
}

/* The honeypot: off-screen for people, still filled in by bots. */
.hp {
  position: absolute;
  left: -9999px;
}

.beta-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: var(--gold);
}

/* ----- Word pages, decks and tests (scripts/build-word-pages.ts) ----- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.word-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.word-crumbs {
  align-self: flex-start;
  margin: 0;
  font-size: 22px;
}

.word-crumbs a {
  text-decoration: none;
}

/* Card + ‹ › arrows. The card is as big as fits beside the arrows. */
.word-viewer {
  display: flex;
  align-items: center;
  gap: 4px;
}

.word-stage {
  --card-w: min(360px, calc(100vw - 112px), calc((100svh - 260px) * 70 / 120));
  flex: none;
}

/* On word pages the flipper's faces fill the stage (the homepage viewer's
   rule, minus its fly-in). */
.word-stage .flipper {
  cursor: pointer;
}

.word-viewer .nav {
  text-decoration: none;
  text-align: center;
}

.word-hint {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.word-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

/* An underlined text link in the temple voice (deck boxes, word pages). */
.track-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 22px;
  text-decoration: underline;
  cursor: pointer;
}

/* Deck page: the words as small cards — the whole card (art, word,
   example, panels), scaled to the tile's width via a container unit. */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}

.deck-tile {
  display: block;
  container-type: inline-size;
  text-decoration: none;
  transition: transform 0.15s ease-out;
}

a.deck-tile:hover {
  transform: translateY(-3px) rotate(-1deg);
}

.deck-tile .card {
  --card-w: 100cqw;
  position: relative;
  left: auto;
  top: auto;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

/* The rest of the deck: a blurred row with the count over it. */
.deck-more {
  position: relative;
  width: 100%;
  margin-top: 12px;
}

.deck-more .deck-grid {
  filter: blur(6px) brightness(0.6);
}

.deck-more p {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--slab-text);
  font-size: 30px;
  text-align: center;
  text-shadow: 0 2px 8px #000;
}

/* Test my knowledge: one panel that fits the screen. Its three steps
   (ask / reveal / end) sit stacked in the same box and only the current one
   shows, so nothing ever moves or makes the page scroll; the bottom row
   keeps its height in every step, so its button never jumps. */
.test-panel {
  width: min(460px, 100%);
  height: max(540px, calc(100svh - 96px));
  display: grid;
  grid-template-rows: auto 1fr 72px;
  gap: 8px;
}

.test-progress {
  margin: 0;
  min-height: 1.2em;
  font-size: 24px;
  color: var(--muted);
  text-align: center;
}

.test-body {
  position: relative;
}

.test-ask,
.test-reveal,
.test-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  visibility: hidden;
}

.test-panel[data-state='ask'] .test-ask,
.test-panel[data-state='reveal'] .test-reveal,
.test-panel[data-state='end'] .test-end {
  visibility: visible;
}

.test-word {
  margin: 0;
  font-size: 56px;
  line-height: 1;
  color: var(--slab-text);
}

.test-question {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 18px;
}

.test-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.test-feedback {
  margin: 0;
  font-size: 30px;
  text-align: center;
}

.test-feedback.correct {
  color: #1989fe;
}

.test-feedback.wrong {
  color: #e5484d;
}

/* The reveal's missed pick, under the card: red with ✗ (same in the app). */
.test-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.test-answers .option {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.test-answers .option.wrong {
  background: #5a1f2a;
  border-top-color: #e5484d;
  color: #fff;
}

.test-answers .mark {
  font-family: system-ui, sans-serif;
  font-weight: 700;
}

/* The revealed card, as big as the panel allows under the word, the
   missed pick and the feedback line. */
.test-page .word-stage {
  --card-w: min(240px, 60vw, calc((100svh - 470px) * 70 / 120));
}

.test-reveal .test-word {
  font-size: 40px;
}

.test-reveal .test-feedback {
  font-size: 30px;
}



.test-end {
  text-align: center;
}

.test-score {
  margin: 0;
  font-size: 44px;
  color: var(--slab-text);
}

.test-verdict {
  margin: 0;
  font-size: 18px;
}

/* The end: the 5 cards asked, ✓ or ✗ under each. */
.test-review {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

.review-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.review-item .deck-tile {
  width: 100%;
}

.review-mark {
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.review-mark.right {
  color: #2fbf71;
}

.review-mark.wrong {
  color: #e5484d;
}

.test-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-bottom > * {
  position: absolute;
  visibility: hidden;
}

.test-panel[data-state='reveal'] .test-next,
.test-panel[data-state='end'] .test-again {
  visibility: visible;
}

/* Homepage deck boxes: the secondary action (underlined text) on the left,
   the primary one (a slab) on the right, in one row — equal space between
   the box's edges and the two actions. */
.track-actions {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 8px 0 12px;
}
