/* ============================================================
   interactive.css — lab panels, quadrant explorer, calculator,
   sorting game, quiz, flashcards
   ============================================================ */

/* ---------------- Lab panel (canvas + controls) ---------------- */

.lab {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
}

.lab__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.lab__title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lab__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.lab__canvas {
  display: block;
  width: 100%;
  background: var(--plane-bg);
  touch-action: none; /* dragging a vector must not scroll the page */
}

/* A plane with a fixed vertical span would be mostly empty grid on a wide
   screen — cap the width so the drawing stays the size of the panel. */
.lab__canvas--narrow {
  max-width: 640px;
  margin-inline: auto;
}

.lab__controls {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-4);
  border-top: 1px solid var(--line);
}

.lab__controls.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lab__controls.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .lab__controls.cols-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .lab__controls.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Slider control */
.ctl {
  display: grid;
  gap: 6px;
}

.ctl__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}

.ctl__name {
  font-size: var(--t-sm);
  font-weight: 620;
  color: var(--ink);
}

.ctl__val {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--accent-2);
  font-weight: 700;
}

.ctl__hint {
  font-size: var(--t-xs);
  color: var(--ink-3);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  outline-offset: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 120ms var(--ease);
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.15);
  cursor: grabbing;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  cursor: grab;
}

/* A slider group tinted with the colour of the vector it controls */
.ctl--v .ctl__name::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  background: var(--c, var(--accent));
}

.ctl--v input[type="range"]::-webkit-slider-thumb {
  border-color: var(--c, var(--accent));
}

.ctl--v input[type="range"]::-moz-range-thumb {
  border-color: var(--c, var(--accent));
}

/* Inactive control group. `pointer-events: none` is not optional here —
   dimming alone leaves a slider that still drags and still updates its
   readout while the canvas ignores it, which reads as a broken lab. */
.ctl--off {
  opacity: 0.42;
  pointer-events: none;
}

/* Readout strip under a canvas */
.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.readout {
  background: var(--surface);
  padding: var(--s-3) var(--s-4);
}

.readout__k {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-weight: 700;
}

.readout__v {
  font-family: var(--mono);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink);
}

/* Colour key for whatever is drawn on the canvas above it */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--ink-3);
  font-weight: 620;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  display: inline-block;
}

/* ---------------- Quadrant explorer ---------------- */

.quads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.quad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-2);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all var(--dur) var(--ease);
  overflow: hidden;
}

.quad::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: var(--c, var(--accent));
}

.quad:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.quad[aria-selected="true"] {
  background: var(--surface-2);
  border-color: var(--c, var(--accent));
  box-shadow: 0 0 0 1px var(--c, var(--accent)), 0 10px 26px rgba(0, 0, 0, 0.28);
}

.quad__ico {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--c, var(--accent));
}

.quad__name {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  line-height: 1.25;
}

.quad__sub {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
}

.quad-detail {
  border: 1px solid var(--line);
  border-left: 5px solid var(--c, var(--accent));
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s-5);
  animation: slideIn 300ms var(--ease);
}

.quad-detail__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}

.quad-detail__ico {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
}

.quad-detail h3 {
  margin: 0;
}

.quad-detail__sub {
  font-size: var(--t-xs);
  font-family: var(--mono);
  color: var(--ink-3);
}

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.kv__item {
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.kv__k {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-weight: 700;
}

.kv__v {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--ink);
  font-weight: 640;
}

.two-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

@media (max-width: 640px) {
  .two-lists {
    grid-template-columns: 1fr;
  }
  .quads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------- Calculator ---------------- */

.calc {
  display: grid;
  gap: var(--s-4);
}

.calc__modes {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.seg {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--t-sm);
  font-weight: 620;
  color: var(--ink-2);
  transition: all var(--dur) var(--ease);
}

.seg[aria-pressed="true"] {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}

.calc__inputs {
  display: grid;
  gap: var(--s-3);
}

/* One row per vector: name · magnitude · direction · remove */
.vrow {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) 38px;
  gap: var(--s-3);
  align-items: end;
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--accent));
  background: var(--surface-2);
}

.vrow__tag {
  font-family: var(--mono);
  font-size: var(--t-md);
  font-weight: 750;
  color: var(--c, var(--accent));
  padding-bottom: 10px;
}

@media (max-width: 640px) {
  .vrow {
    grid-template-columns: 34px minmax(0, 1fr) 38px;
  }
  .vrow .field:nth-of-type(2) {
    grid-column: 2 / 4;
  }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field input,
.field select {
  padding: 11px var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--t-sm);
  width: 100%;
}

.field input:focus {
  border-color: var(--accent-2);
  outline: none;
}

.calc__out {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
}

.calc__result {
  font-family: var(--mono);
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--ok);
  word-break: break-word;
}

.calc__steps {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--ink-3);
  white-space: pre-wrap;
  margin: var(--s-3) 0 0;
  max-width: none;
  overflow-x: auto;
}

/* ---------------- Missing-vector solver ---------------- */

.solver {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-4);
}

/* The equation itself is the control: tap the term you are solving for. */
.eqn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.eqn__op {
  font-family: var(--mono);
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--ink-3);
}

.eqn__v {
  display: grid;
  gap: 3px;
  place-items: center;
  min-width: 96px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 2px solid var(--c, var(--accent));
  background: var(--surface-2);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.eqn__v b {
  font-family: var(--mono);
  font-size: var(--t-xl);
  font-weight: 750;
  line-height: 1;
  color: var(--c, var(--accent));
}

.eqn__v i {
  font-style: normal;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eqn__v:hover {
  transform: translateY(-2px);
}

/* The unknown is styled the way it is drawn on the plane: dashed, unfilled. */
.eqn__v[aria-pressed="true"] {
  border-style: dashed;
  border-color: var(--ink-3);
  background: transparent;
}

.eqn__v[aria-pressed="true"] b {
  color: var(--ink-2);
}

.eqn__v[aria-pressed="true"] i {
  color: var(--warn);
}

.eqn__hint {
  margin: 0;
  max-width: none;
  text-align: center;
  font-size: var(--t-sm);
  color: var(--ink-2);
}

.solver__scenario {
  margin: 0;
}

/* The "type your answer" placeholder must not shout in the answer's own type
   size — it is an instruction, not a result. */
.calc__result--muted {
  font-family: var(--font);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink-3);
}

.solver__scenario p {
  max-width: none;
  margin: var(--s-2) 0 0;
}

/* Solver rows carry a status word instead of a delete button. */
#solvInputs .vrow {
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) auto;
}

.vrow__note {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: 12px;
  white-space: nowrap;
}

.vrow__found {
  grid-column: 2 / 4;
  font-family: var(--mono);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ok);
  padding-bottom: 8px;
  word-break: break-word;
}

#solvCheck {
  padding: 10px 18px;
}

@media (max-width: 640px) {
  #solvInputs .vrow {
    grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
  }
  #solvInputs .vrow .field:nth-of-type(2) {
    grid-column: auto;
  }
  .vrow__note {
    display: none;
  }
  .vrow__found {
    grid-column: 2 / -1;
  }
  #solvCheck {
    grid-column: 1 / -1;
  }
}

/* ---------------- Missing-part finder (one vector) ---------------- */

/* Same idea as .eqn__v, but four of them and two stay pressed at once. */
.picks {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.pick {
  display: grid;
  gap: 2px;
  place-items: center;
  min-width: 104px;
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 2px dashed var(--line-strong);
  background: transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.pick b {
  font-family: var(--mono);
  font-size: var(--t-lg);
  font-weight: 750;
  line-height: 1.1;
  color: var(--ink-3);
}

.pick i {
  font-style: normal;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pick:hover {
  transform: translateY(-2px);
}

/* Pressed means "the problem gave me this" — solid, in its own colour. */
.pick[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--c, var(--accent));
  background: var(--surface-2);
}

.pick[aria-pressed="true"] b {
  color: var(--c, var(--accent));
}

.pick[aria-pressed="true"] i {
  color: var(--ink-2);
}

.parts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-3);
}

.part {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--accent));
  background: var(--surface-2);
}

.part--found {
  border-style: dashed;
  background: transparent;
}

/* No uppercase transform here: it would turn θ into Θ, which is a
   different symbol. Sentence case with the real symbols instead. */
.part label {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.part label sub {
  font-size: 0.78em;
}

.part input {
  padding: 10px var(--s-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--t-sm);
  width: 100%;
}

.part input:focus {
  border-color: var(--accent-2);
  outline: none;
}

.part__val {
  font-family: var(--mono);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--c, var(--accent));
  word-break: break-word;
}

.part__how {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-3);
  min-height: 1em;
}

/* An impossible combination is a result too — it just is not a number. */
.calc__result--bad {
  font-family: var(--font);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--bad);
}

/* ---------------- Words-to-symbols drill ---------------- */

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s-3);
}

.slot {
  display: grid;
  gap: 6px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.slot:hover {
  border-color: var(--accent-2);
}

.slot__k {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.slot__v {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.slot__v.is-filled {
  color: var(--ink);
  font-weight: 700;
}

/* The pool reuses .token from the sorting game, plus two states of its own. */
.token.is-picked {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px var(--accent-2) inset;
}

.token.is-used {
  opacity: 0.32;
  cursor: default;
}

/* Marking panel */
.verdict[hidden] {
  display: none; /* display:grid below would otherwise beat the [hidden] default */
}

.verdict {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.verdict--ok {
  border-color: var(--ok);
  background: rgba(52, 199, 89, 0.09);
}

.verdict--bad {
  border-color: var(--bad);
  background: rgba(255, 93, 115, 0.09);
}

.verdict h4 {
  margin: 0;
  font-size: var(--t-md);
}

.verdict__line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
}

.verdict__line .chip {
  align-self: start;
  white-space: nowrap;
}

.verdict__line p,
.verdict > p {
  margin: 0;
  max-width: none;
  font-size: var(--t-sm);
  color: var(--ink-2);
}

.verdict__foot {
  margin: 0;
  max-width: none;
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.btn--sm {
  padding: 5px 12px;
  font-size: var(--t-xs);
}

@media (max-width: 640px) {
  .verdict__line {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
}

/* ---------------- Sorting game ---------------- */

.sort-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-4);
}

.bin {
  min-height: 150px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  background: var(--surface);
  transition: all var(--dur) var(--ease);
}

.bin.is-over {
  border-color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 10%, var(--surface));
}

.bin__title {
  font-size: var(--t-sm);
  font-weight: 700;
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.pool {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  min-height: 60px;
}

.token {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: var(--t-sm);
  font-weight: 600;
  cursor: grab;
  user-select: none;
  transition: all 180ms var(--ease);
}

.token:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.token.is-dragging {
  opacity: 0.4;
}

.token.is-right {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok);
  cursor: default;
}

.token.is-wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 16%, transparent);
  color: var(--bad);
  animation: shake 340ms var(--ease);
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@media (max-width: 640px) {
  .sort-board {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Quiz ---------------- */

.quiz {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  padding: var(--s-5);
}

.quiz__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  font-size: var(--t-sm);
  color: var(--ink-3);
  font-weight: 620;
}

.quiz__bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  overflow: hidden;
  margin-bottom: var(--s-5);
}

.quiz__bar span {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--accent-grad);
  transition: width var(--dur) var(--ease);
}

.quiz__q {
  font-size: var(--t-lg);
  font-weight: 660;
  line-height: 1.4;
  margin-bottom: var(--s-4);
  max-width: none;
  color: var(--ink);
}

.choices {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  width: 100%;
  padding: 13px var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
  text-align: left;
  font-size: var(--t-sm);
  color: var(--ink-2);
  transition: all 180ms var(--ease);
}

.choice:hover:not(:disabled) {
  border-color: var(--accent-2);
  color: var(--ink);
  transform: translateX(3px);
}

.choice__key {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.choice.is-correct {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ink);
}

.choice.is-correct .choice__key {
  background: var(--ok);
  border-color: var(--ok);
  color: #04220d;
}

.choice.is-wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}

.choice:disabled {
  cursor: default;
}

.feedback {
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--t-sm);
  margin-bottom: var(--s-4);
  animation: slideIn 240ms var(--ease);
}

.feedback b {
  display: block;
  margin-bottom: 4px;
}

.feedback--ok b {
  color: var(--ok);
}
.feedback--bad b {
  color: var(--bad);
}

.quiz__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
}

.score-hero {
  text-align: center;
  padding: var(--s-6) var(--s-4);
}

.score-hero__num {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* ---------------- Flashcards ---------------- */

.flash-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-3);
}

.flash {
  perspective: 1100px;
  height: 178px;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.flash__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 520ms var(--ease);
  transform-style: preserve-3d;
}

.flash.is-flipped .flash__inner {
  transform: rotateY(180deg);
}

.flash__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: var(--s-4);
  display: grid;
  place-content: center;
  text-align: center;
  gap: var(--s-2);
}

.flash__front {
  background: var(--surface-2);
}

.flash__back {
  transform: rotateY(180deg);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-solid));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.flash__term {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink);
}

.flash__def {
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.5;
}

.flash__hint {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}

/* ---------------- Toast ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 20px);
  z-index: 60;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: var(--t-sm);
  font-weight: 620;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur) var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
