/* ============================================================
   interactive.css — lab panels, canvases, sliders, drills, verdicts,
   then the shared sorting game / quiz / flashcards / toast.

   Load order is tokens → base → layout → components → interactive,
   so a rule here beats an equal-specificity rule in components.css.
   ============================================================ */

/* ---------------- Lab panel ---------------- */

.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;
}

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

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

.lab__canvas {
  display: block;
  width: 100%;
  background: var(--plane-bg);
  border-radius: var(--r-md);
  touch-action: none;
}

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

.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;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

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

/* ---------------- Sliders ---------------- */

.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(--c, var(--accent-2));
  font-weight: 700;
}

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(--c, 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(--c, var(--accent));
  cursor: grab;
}

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

/* ---------------- Readouts and legend ---------------- */

.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

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

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

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

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: var(--t-xs);
  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;
}

/* ---------------- Segmented control ---------------- */

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

.seg__btn {
  flex: 1 1 auto;
  text-align: center;
  padding: 10px var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 620;
  transition: all var(--dur) var(--ease);
}

.seg__btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.seg__btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  color: var(--ink);
}

/* ---------------- Drill chrome ---------------- */

.drill__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: var(--s-3);
}

.drill__facts {
  font-size: var(--t-md);
  line-height: 1.7;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  background: var(--surface-2);
  border-left: 4px solid var(--accent);
  margin-bottom: var(--s-4);
  color: var(--ink);
}

.drill__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-4);
}

/* The force whose partner the student must name. */
.action-box {
  display: grid;
  gap: 4px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px dashed var(--f-applied);
  background: color-mix(in srgb, var(--f-applied) 8%, transparent);
  margin-bottom: var(--s-4);
  font-size: var(--t-sm);
}

.action-box__k {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--f-applied);
}

/* ---------------- Answer pickers ---------------- */

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

.picks--wide {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pick {
  display: grid;
  align-content: start;
  gap: 4px;
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.pick:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.pick:disabled {
  cursor: default;
}

.pick__label {
  font-weight: 640;
  font-size: var(--t-sm);
  line-height: 1.5;
}

.pick.is-right {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, var(--surface));
}

.pick.is-wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 14%, var(--surface));
}

/* ---------------- Verdicts ---------------- */

.verdict {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink-3);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: var(--s-4) var(--s-5);
}

.verdict--ok {
  border-left-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 7%, var(--surface));
}

.verdict--bad {
  border-left-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 7%, var(--surface));
}

.verdict--warn {
  border-left-color: var(--warn);
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.verdict__head {
  font-weight: 800;
  font-size: var(--t-md);
  margin-bottom: var(--s-2);
  color: var(--ink);
}

.verdict__rule {
  font-size: var(--t-sm);
  color: var(--accent-2);
  font-weight: 620;
  margin-bottom: var(--s-2);
}

.verdict__why {
  font-size: var(--t-sm);
  margin-bottom: var(--s-2);
}

/* The named misconception. Set apart so the eye finds it. */
.verdict__trap {
  font-size: var(--t-sm);
  margin: var(--s-3) 0 0;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-2);
}

.verdict > :last-child {
  margin-bottom: 0;
}

/* ---------------- Worked steps ---------------- */

.steps {
  display: grid;
  gap: var(--s-2);
}

.step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: var(--s-3);
  align-items: start;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--t-sm);
  line-height: 1.7;
}

.step__n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: var(--t-xs);
  font-weight: 800;
}

/* ---------------- Inputs ---------------- */

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

.field {
  display: grid;
  gap: 6px;
}

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

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

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

[data-theme="dark"] .field input[type="number"]::-webkit-inner-spin-button {
  filter: invert(1) opacity(0.7);
}

.calc__note {
  font-size: var(--t-sm);
  color: var(--ink-3);
  margin: 0;
}

.check {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 8px var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  cursor: pointer;
}

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

.check input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Answer-entry row for the check-my-answer solver. */
.check-panel {
  display: flex;
  gap: var(--s-3);
  align-items: flex-end;
  flex-wrap: wrap;
}

.check-panel .field {
  flex: 1 1 220px;
}

/* ---------------- Live formula block ---------------- */

.formula--live .formula__eq {
  font-size: var(--t-xl);
}

/* ---------------- Force-type explorer ---------------- */

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-2);
}

.type {
  display: grid;
  gap: 3px;
  justify-items: start;
  align-content: start;
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  border-left: 3px solid var(--f-applied);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.type--field {
  border-left-color: var(--f-weight);
}

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

.type[aria-current="true"] {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

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

.type__name {
  font-weight: 700;
  font-size: var(--t-sm);
  line-height: 1.35;
}

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

/* ---------------- Detail panel ---------------- */

.detail {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: var(--s-4) var(--s-5);
}

.detail--field {
  border-left-color: var(--f-weight);
}

.detail__head {
  font-weight: 800;
  margin-bottom: var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.detail__body {
  font-size: var(--t-sm);
  margin-bottom: var(--s-2);
}

.detail__foot {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 0;
  padding-top: var(--s-2);
  border-top: 1px dashed var(--line-strong);
}

/* ---------------- Mass vs weight ---------------- */

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

.world {
  display: grid;
  gap: 6px;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  align-content: start;
}

.world.is-home {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.world__head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
}

.world__icon {
  font-size: 20px;
}

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

.world__bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin: 4px 0;
}

.world__bar > span {
  display: block;
  height: 100%;
  background: var(--accent-grad);
}

.world__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.world__row b {
  font-family: var(--mono);
  color: var(--ink);
}

.world__row--w b {
  color: var(--f-weight);
}

/* ---------------- Everyday scenes ---------------- */

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

/* A <button> stretched by a grid row vertically centres its own content,
   unlike a <div> — so revealing one card would leave its neighbours' text
   floating mid-box. align-content pins everything to the top. */
.scene {
  display: grid;
  align-content: start;
  gap: var(--s-2);
  justify-items: start;
  text-align: left;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

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

.scene__icon {
  font-size: 26px;
}

.scene__title {
  font-weight: 700;
  font-size: var(--t-base);
}

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

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

.chip--first {
  color: var(--f-applied);
  border-color: color-mix(in srgb, var(--f-applied) 45%, transparent);
  background: color-mix(in srgb, var(--f-applied) 12%, transparent);
}

.chip--second {
  color: var(--f-net);
  border-color: color-mix(in srgb, var(--f-net) 45%, transparent);
  background: color-mix(in srgb, var(--f-net) 12%, transparent);
}

.chip--third {
  color: var(--f-normal);
  border-color: color-mix(in srgb, var(--f-normal) 45%, transparent);
  background: color-mix(in srgb, var(--f-normal) 12%, transparent);
}

/* A chip that is actually a button — used for preset and problem pickers. */
.chip--btn {
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.chip--btn:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* ---------------- Sorting board additions ---------------- */

.bin__sub {
  font-size: var(--t-xs);
  color: var(--ink-3);
  line-height: 1.5;
  margin-bottom: var(--s-2);
}

/* A class, not an inline style, so clearing the selection cannot leave a
   stray outline behind. */
.token.is-picked {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
/* ---------------- 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);
}

/* A revealed scene card grows and stretches its whole grid row. The cards
   are <button>s, and a stretched button centres its own content — leaving
   the un-revealed neighbours floating in the middle of a tall box. Pin
   their content to the top instead. */
#sceneGrid .tile {
  display: grid;
  align-content: start;
  text-align: left;
  width: 100%;
}

/* ---------------- Overrides for this lesson ----------------
   The shared block above assumes a two-bin sorting game. The three laws
   need three bins, and they must collapse on a phone. */

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

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

.bin {
  align-content: start;
}
