/* ============================================================
   iGEM Bonn learning games — farm skin for the PotyGuard+ wiki
   Re-dresses the games in the wiki's pixel-farm look: wooden
   signboards, parchment panels, notched pixel outlines and the
   Press Start 2P font, in light and dark like the wiki itself.

   Load it LAST, after theme.css, game-shell.css and the game's
   own stylesheet. It only overrides looks — no layout or logic.
   Palette and tiles are copied from the wiki's pixel-headings.css.
   ============================================================ */

@font-face {
  font-family: "Press Start 2P";
  src: url("https://static.igem.wiki/teams/6455/wiki/press-start-2p/pressstart2p-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* wiki palette */
  --px-bark: #3a2218;
  --px-oak: #8f5332;
  --px-oak-dark: #6b3a22;
  --px-oak-lit: #b87a47;
  --px-honey: #e9a93f;
  --px-honey-lit: #fbe08a;
  --px-honey-deep: #c07f24;
  --px-parchment: #f4dba6;
  --px-parchment-edge: #d9b273;
  --px-moss-deep: #3f6424;
  --px-moss: #4a7a2c;
  --px-sprout: #6f9e3c;
  --px-sprout-lit: #a9d160;
  --px-cream-ink: #fff1d0;
  --px-petal: #e88a9a;
  --px-clay: #c46a3c;
  --px-font: "Press Start 2P", "Silkscreen", ui-monospace, "Courier New", monospace;
  --px-tile-wood: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 12' shape-rendering='crispEdges'><rect x='2' y='1' width='5' height='1' fill='%23a86a3f'/><rect x='21' y='1' width='4' height='1' fill='%23a86a3f'/><rect x='10' y='2' width='6' height='1' fill='%237c4527'/><rect x='26' y='2' width='3' height='1' fill='%237c4527'/><rect x='4' y='3' width='2' height='1' fill='%237c4527'/><rect x='19' y='3' width='3' height='1' fill='%237c4527'/><rect x='14' y='4' width='3' height='1' fill='%23a86a3f'/><rect x='0' y='5' width='4' height='1' fill='%237c4527'/><rect x='10' y='5' width='3' height='1' fill='%237c4527'/><rect x='22' y='5' width='4' height='1' fill='%237c4527'/><rect x='11' y='6' width='1' height='1' fill='%237c4527'/><rect x='13' y='6' width='1' height='1' fill='%237c4527'/><rect x='2' y='7' width='4' height='1' fill='%23a86a3f'/><rect x='11' y='7' width='3' height='1' fill='%237c4527'/><rect x='22' y='7' width='4' height='1' fill='%23a86a3f'/><rect x='21' y='8' width='3' height='1' fill='%237c4527'/><rect x='8' y='9' width='4' height='1' fill='%237c4527'/><rect x='26' y='9' width='3' height='1' fill='%237c4527'/><rect x='0' y='11' width='32' height='1' fill='%235b301b'/></svg>");
  --px-tile-grass: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 7' shape-rendering='crispEdges'><rect x='3' y='0' width='1' height='1' fill='%236f9e3c'/><rect x='14' y='0' width='1' height='1' fill='%236f9e3c'/><rect x='22' y='0' width='1' height='1' fill='%23a9d160'/><rect x='2' y='1' width='1' height='1' fill='%236f9e3c'/><rect x='3' y='1' width='1' height='1' fill='%23a9d160'/><rect x='8' y='1' width='1' height='1' fill='%236f9e3c'/><rect x='13' y='1' width='1' height='1' fill='%236f9e3c'/><rect x='14' y='1' width='1' height='1' fill='%23a9d160'/><rect x='17' y='1' width='1' height='1' fill='%236f9e3c'/><rect x='21' y='1' width='1' height='1' fill='%236f9e3c'/><rect x='22' y='1' width='1' height='1' fill='%23a9d160'/><rect x='27' y='1' width='1' height='1' fill='%236f9e3c'/><rect x='2' y='2' width='2' height='1' fill='%236f9e3c'/><rect x='7' y='2' width='1' height='1' fill='%236f9e3c'/><rect x='8' y='2' width='1' height='1' fill='%23a9d160'/><rect x='11' y='2' width='1' height='1' fill='%236f9e3c'/><rect x='13' y='2' width='2' height='1' fill='%236f9e3c'/><rect x='17' y='2' width='1' height='1' fill='%236f9e3c'/><rect x='18' y='2' width='1' height='1' fill='%23a9d160'/><rect x='21' y='2' width='2' height='1' fill='%236f9e3c'/><rect x='26' y='2' width='1' height='1' fill='%23a9d160'/><rect x='27' y='2' width='1' height='1' fill='%236f9e3c'/><rect x='30' y='2' width='1' height='1' fill='%236f9e3c'/><rect x='1' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='2' y='3' width='1' height='1' fill='%234a7a2c'/><rect x='3' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='5' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='7' y='3' width='2' height='1' fill='%236f9e3c'/><rect x='10' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='11' y='3' width='1' height='1' fill='%23a9d160'/><rect x='13' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='14' y='3' width='1' height='1' fill='%234a7a2c'/><rect x='15' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='17' y='3' width='2' height='1' fill='%236f9e3c'/><rect x='20' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='21' y='3' width='1' height='1' fill='%234a7a2c'/><rect x='22' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='24' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='26' y='3' width='2' height='1' fill='%236f9e3c'/><rect x='29' y='3' width='1' height='1' fill='%236f9e3c'/><rect x='30' y='3' width='1' height='1' fill='%23a9d160'/><rect x='0' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='1' y='4' width='2' height='1' fill='%234a7a2c'/><rect x='3' y='4' width='2' height='1' fill='%236f9e3c'/><rect x='5' y='4' width='1' height='1' fill='%234a7a2c'/><rect x='6' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='7' y='4' width='2' height='1' fill='%234a7a2c'/><rect x='9' y='4' width='2' height='1' fill='%236f9e3c'/><rect x='11' y='4' width='1' height='1' fill='%234a7a2c'/><rect x='12' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='13' y='4' width='3' height='1' fill='%234a7a2c'/><rect x='16' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='17' y='4' width='2' height='1' fill='%234a7a2c'/><rect x='19' y='4' width='2' height='1' fill='%236f9e3c'/><rect x='21' y='4' width='2' height='1' fill='%234a7a2c'/><rect x='23' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='24' y='4' width='1' height='1' fill='%234a7a2c'/><rect x='25' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='26' y='4' width='2' height='1' fill='%234a7a2c'/><rect x='28' y='4' width='2' height='1' fill='%236f9e3c'/><rect x='30' y='4' width='1' height='1' fill='%234a7a2c'/><rect x='31' y='4' width='1' height='1' fill='%236f9e3c'/><rect x='0' y='5' width='32' height='1' fill='%233f6424'/><rect x='0' y='6' width='2' height='1' fill='%237a4a2c'/><rect x='2' y='6' width='1' height='1' fill='%235e3620'/><rect x='3' y='6' width='6' height='1' fill='%237a4a2c'/><rect x='9' y='6' width='1' height='1' fill='%235e3620'/><rect x='10' y='6' width='9' height='1' fill='%237a4a2c'/><rect x='19' y='6' width='1' height='1' fill='%235e3620'/><rect x='20' y='6' width='6' height='1' fill='%237a4a2c'/><rect x='26' y='6' width='1' height='1' fill='%235e3620'/><rect x='27' y='6' width='5' height='1' fill='%237a4a2c'/></svg>");

  /* one "pixel" */
  --b: 3px;
  --px-outline:
    0 calc(var(--b) * -1) 0 0 var(--px-bark),
    0 var(--b) 0 0 var(--px-bark),
    calc(var(--b) * -1) 0 0 0 var(--px-bark),
    var(--b) 0 0 0 var(--px-bark);
  --px-drop: var(--b) var(--b) 0 var(--b) var(--px-cast);

  /* light theme (the wiki's parchment page) */
  --px-cast: rgb(58 34 24 / 0.3);
  --px-focus: var(--px-oak-dark);
  --panel: var(--px-parchment);
  --panel-2: #fbebc6;
  --panel-edge: var(--px-parchment-edge);

  /* hue tints: saturation / lightness for tinted surfaces and their ink */
  --t-s: 48%;
  --t-l: 80%;
  --t-ink: 28%;
  --t-mid: 42%;

  /* the games' own tokens, remapped */
  --bg: #f8efd9;
  --bg-2: #f1e3c4;
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --line: var(--px-bark);
  --line-soft: var(--panel-edge);
  --ink: var(--px-bark);
  --ink-2: var(--px-oak-dark);
  --ink-3: #8a6646;
  --accent: var(--px-moss);
  --accent-2: var(--px-moss-deep);
  --gold: var(--px-honey);
  --gold-soft: var(--px-honey-lit);
  --bad: #b5453a;
  --good: var(--px-moss);
  --radius: 0;
  --radius-lg: 0;
  --shadow: var(--px-drop);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --px-cast: rgb(0 0 0 / 0.45);
    --px-focus: var(--px-honey);
    --panel: #3a2c21;
    --panel-2: #46362a;
    --panel-edge: #5a4532;
    --t-s: 32%;
    --t-l: 25%;
    --t-ink: 80%;
    --t-mid: 62%;
    --bg: #2a2119;
    --bg-2: #2f251c;
    --ink: var(--px-parchment);
    --ink-2: var(--px-parchment-edge);
    --ink-3: #ab9474;
    --accent: var(--px-sprout-lit);
    --accent-2: var(--px-sprout);
    --bad: var(--px-petal);
    --good: var(--px-sprout-lit);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------ base */

/* Pixel art has square corners. */
*, *::before, *::after { border-radius: 0 !important; }

body { background: var(--bg); color: var(--ink); }
body::before { display: none; }

.btn:focus-visible, .iconbtn:focus-visible, .choice:focus-visible, .card:focus-visible,
.tile:focus-visible, .slot:focus-visible, .option:focus-visible {
  outline: var(--b) solid var(--px-focus);
  outline-offset: calc(var(--b) * 2);
}

/* ------------------------------------------------------------ buttons */

.btn {
  --btn-bg: var(--px-parchment);
  --btn-hi: var(--px-cream-ink);
  --btn-sh: var(--px-parchment-edge);
  margin: var(--b);
  padding: calc(var(--b) * 3) calc(var(--b) * 5) calc(var(--b) * 4);
  font: 400 12px/1.4 var(--px-font);
  -webkit-font-smoothing: none;
  color: var(--px-bark);
  border: 0;
  background: var(--btn-bg);
  box-shadow:
    inset 0 var(--b) 0 var(--btn-hi),
    inset 0 calc(var(--b) * -2) 0 var(--btn-sh),
    var(--px-outline),
    0 calc(var(--b) * 2) 0 0 var(--px-cast);
  transition: translate 120ms steps(2, end);
}
.btn:hover { translate: 0 calc(var(--b) * -1); filter: none; background: var(--btn-bg); color: var(--px-bark); }
.btn:active { translate: 0 var(--b); transform: none; }
.btn--primary { --btn-bg: var(--px-honey); --btn-hi: var(--px-honey-lit); --btn-sh: var(--px-honey-deep); }
.btn--lg { padding: calc(var(--b) * 4) calc(var(--b) * 7) calc(var(--b) * 5); font-size: 16px; }
.btn--link {
  margin: 0;
  font: 400 0.85rem/1.4 system-ui, sans-serif;
  color: var(--ink-2);
  background: none;
  box-shadow: none;
  text-decoration-style: dotted;
}
.btn--link:hover { color: var(--accent); background: none; translate: none; }

.iconbtn {
  width: 36px; height: 36px;
  margin: var(--b);
  border: 0;
  color: var(--px-bark);
  background: var(--px-parchment);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-parchment-edge), var(--px-outline);
}
.iconbtn:hover { color: var(--px-bark); background: var(--px-honey-lit); }
.iconbtn[aria-pressed="false"] { color: var(--px-oak-dark); }

/* ------------------------------------------------------------ topbar: a wooden signboard */

.topbar {
  position: relative;
  margin: var(--b) var(--b) calc(var(--b) * 8);
  border: 0;
  background-color: var(--px-oak);
  background-image: var(--px-tile-wood);
  background-size: calc(var(--b) * 32) calc(var(--b) * 12);
  backdrop-filter: none;
  box-shadow:
    inset 0 var(--b) 0 var(--px-oak-lit),
    inset 0 calc(var(--b) * -2) 0 var(--px-oak-dark),
    var(--px-outline),
    var(--px-drop);
}
/* A strip of grass growing under the sign, like the wiki's section titles. */
.topbar::after {
  content: "";
  position: absolute;
  left: calc(var(--b) * -1);
  right: calc(var(--b) * -1);
  bottom: calc(var(--b) * -9);
  height: calc(var(--b) * 7);
  background-image: var(--px-tile-grass);
  background-size: calc(var(--b) * 32) calc(var(--b) * 7);
  background-repeat: repeat-x;
  pointer-events: none;
}

.brand__text strong {
  font: 400 12px/1.5 var(--px-font);
  -webkit-font-smoothing: none;
  color: var(--px-cream-ink);
  text-shadow: var(--b) var(--b) 0 var(--px-bark);
}
.brand__text small { color: var(--px-honey-lit); font-size: 0.72rem; }
.brand:hover .brand__text strong { color: var(--px-honey-lit); }

.brand__mark {
  border-radius: 0;
  box-shadow: var(--px-outline);
}

.hud {
  border: 0;
  background: var(--px-oak-dark);
  box-shadow: inset 0 var(--b) 0 rgb(0 0 0 / 0.25), var(--px-outline);
}
.hud__val {
  font: 400 12px/1.6 var(--px-font);
  -webkit-font-smoothing: none;
  color: var(--px-cream-ink);
  letter-spacing: 0;
}
.hud__key { font-size: 0.6rem; color: var(--px-parchment-edge); }
.hud__item--score .hud__val { color: var(--px-honey-lit); }

/* ------------------------------------------------------------ overlays and panels */

.overlay { background: rgb(42 33 25 / 0.72); backdrop-filter: none; }

.panel {
  border: 0;
  margin: var(--b);
  color: var(--ink);
  background: var(--panel);
  box-shadow:
    inset 0 calc(var(--b) * -2) 0 var(--panel-edge),
    var(--px-outline),
    calc(var(--b) * 2) calc(var(--b) * 2) 0 var(--b) var(--px-cast);
}
.panel__glow { display: none; }

.panel__logo {
  background: #fff;
  box-shadow: var(--px-outline), var(--px-drop);
}

.panel__title {
  font: 400 24px/1.5 var(--px-font);
  -webkit-font-smoothing: none;
  letter-spacing: 0;
  color: var(--ink);
}
.panel__title em {
  background: none;
  color: var(--accent);
  -webkit-text-fill-color: currentColor;
}
.panel__kicker { font: 400 8px/1.6 var(--px-font); letter-spacing: 0.08em; color: var(--px-oak); }
.panel__lede { color: var(--ink-2); }

.setup__group legend { font: 400 8px/1.6 var(--px-font); letter-spacing: 0.06em; color: var(--ink-2); }

.choice {
  margin: var(--b);
  border: 0;
  background: var(--panel-2);
  box-shadow: inset 0 calc(var(--b) * -1) 0 var(--panel-edge), var(--px-outline);
}
.choice:hover { background: var(--panel-2); box-shadow: inset 0 calc(var(--b) * -1) 0 var(--panel-edge), var(--px-outline), 0 0 0 calc(var(--b) * 2) var(--px-honey-lit); }
.choice b { color: var(--ink); }
.choice span { color: var(--ink-3); }
.choice.is-selected {
  background: var(--px-honey-lit);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-honey), var(--px-outline);
}
.choice.is-selected b { color: var(--px-bark); }
.choice.is-selected span { color: var(--px-oak-dark); }

.win__badge {
  font: 400 8px/1.6 var(--px-font);
  letter-spacing: 0.06em;
  color: var(--px-cream-ink);
  background: var(--px-moss);
  box-shadow: inset 0 calc(var(--b) * -1) 0 var(--px-moss-deep), var(--px-outline);
  text-shadow: 2px 2px 0 var(--px-moss-deep);
}

.scoregrid__cell {
  margin: var(--b);
  border: 0;
  background: var(--panel-2);
  box-shadow: var(--px-outline);
}
.scoregrid__cell b { font: 400 16px/1.6 var(--px-font); letter-spacing: 0; color: var(--ink); }
.win__best { color: var(--ink-2); }

.recap summary { color: var(--ink-2); }
.recap__list li { background: var(--panel-2); border-left: var(--b) solid hsl(var(--hue, 200) 45% var(--t-mid)); }
.recap__list i { color: hsl(var(--hue, 200) 45% var(--t-ink)); }

.codex__group h3 { color: hsl(var(--hue, 200) 45% var(--t-ink)); }
.codex__group h3::before { box-shadow: none; }
.codex__group h3::after { background: var(--panel-edge); }
.codex__row { border: 0; background: var(--panel-2); box-shadow: var(--px-outline); margin: var(--b) var(--b) 9px; }
.codex__row dd { color: hsl(var(--hue, 200) 45% var(--t-ink)); }
.codex__note { color: var(--ink-3); }

.toast {
  border: 0;
  font-weight: 600;
  color: var(--px-bark);
  background: var(--px-parchment);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-parchment-edge), var(--px-outline), var(--px-drop);
}
.toast--streak { color: var(--px-bark); background: var(--px-honey-lit); }

/* ------------------------------------------------------------ side panels (all games) */

.insight,
.tray,
.trackwrap,
.qcard {
  border: 0;
  margin: var(--b);
  background: var(--panel);
  backdrop-filter: none;
  box-shadow:
    inset 0 calc(var(--b) * -2) 0 var(--panel-edge),
    var(--px-outline),
    var(--px-drop);
}

.insight__tag,
.qcard__topic {
  font: 400 8px/1.6 var(--px-font);
  letter-spacing: 0.04em;
  border: 0;
  color: var(--px-cream-ink);
  background: hsl(var(--hue, 200) 42% 38%);
  box-shadow: var(--px-outline);
  margin-left: var(--b);
}
.insight__empty, .insight__empty strong, .insight__empty b { color: var(--ink-2); }
.insight__glyph { color: var(--ink-3); }

/* ============================================================
   Antibiotic Memory
   ============================================================ */

.card__face--back {
  border: 0;
  background-color: var(--px-oak);
  background-image: var(--px-tile-wood);
  background-size: calc(var(--b) * 32) calc(var(--b) * 12);
  box-shadow:
    inset 0 var(--b) 0 var(--px-oak-lit),
    inset 0 calc(var(--b) * -2) 0 var(--px-oak-dark),
    inset 0 0 0 var(--b) var(--px-bark);
}
.card__face--back::before { border: 2px dashed rgb(58 34 24 / 0.45); inset: 8%; }
/* Path is relative to this file (css/), not to the game folder — a url() in
   a custom property would resolve against this sheet, so spell it out here. */
.card__logo {
  background:
    url("../assets/project-emblem.png") center / 76% no-repeat,
    var(--px-parchment);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-parchment-edge), var(--px-outline);
}
.card:hover:not(.is-flipped):not(.is-matched) .card__logo {
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-parchment-edge), var(--px-outline), 0 0 0 calc(var(--b) * 2) var(--px-honey-lit);
}

.card__face--front {
  border: 0;
  background: hsl(var(--hue, 200) var(--t-s) var(--t-l));
  box-shadow:
    inset 0 calc(var(--b) * 2) 0 hsl(var(--hue, 200) 45% var(--t-mid)),
    inset 0 0 0 var(--b) var(--px-bark);
}
.card__kind { color: hsl(var(--hue, 200) 50% var(--t-ink)); }
.card__title { color: var(--ink); }
.card__sub { color: var(--ink-2); opacity: 1; }
.card__tag {
  border: 0;
  color: var(--px-cream-ink);
  background: hsl(var(--hue, 200) 42% 38%);
}

.board.no-hints .card__face--front {
  background: var(--panel-2);
  box-shadow: inset 0 calc(var(--b) * 2) 0 var(--panel-edge), inset 0 0 0 var(--b) var(--px-bark);
}
.board.no-hints .card__kind, .board.no-hints .card__sub { color: var(--ink-3); }

.card.is-matched .card__face--front {
  box-shadow:
    inset 0 calc(var(--b) * 2) 0 hsl(var(--hue, 200) 45% var(--t-mid)),
    inset 0 0 0 var(--b) hsl(var(--hue, 200) 50% 32%),
    inset 0 0 0 calc(var(--b) * 2) var(--px-honey-lit);
}
.card.is-wrong .card__face--front {
  box-shadow: inset 0 0 0 var(--b) var(--bad), inset 0 0 0 calc(var(--b) * 2) rgb(181 69 58 / 0.35);
}

.insight__drug { color: var(--ink); }
.insight__target { color: hsl(var(--hue, 200) 45% var(--t-ink)); }
.insight__arrow { color: hsl(var(--hue, 200) 45% var(--t-mid)); }
.insight__effect { color: var(--ink-3); }
.insight__fact { color: var(--ink-2); border-top: 2px dashed var(--panel-edge); }
.insight__preview p { color: var(--ink-2); }
.insight__preview strong { color: var(--ink); }
.insight__preview .insight__glyph { color: var(--px-honey-deep); }
.insight__preview .btn { animation: none; }

/* ============================================================
   Pathway Puzzle
   ============================================================ */

.trackhead__kicker { font: 400 8px/1.6 var(--px-font); letter-spacing: 0.04em; color: hsl(var(--hue) 45% var(--t-ink)); }
.trackhead__title { font: 400 16px/1.6 var(--px-font); letter-spacing: 0; color: var(--ink); }
.trackhead__mode { color: var(--ink-3); }

.node {
  border: 0;
  margin: var(--b);
  color: var(--ink);
  background: hsl(var(--hue) var(--t-s) var(--t-l));
  box-shadow: inset 0 calc(var(--b) * -2) 0 hsl(var(--hue) 40% var(--t-mid) / 0.6), var(--px-outline);
}
.node__dot { background: hsl(var(--hue) 45% 38%); box-shadow: none; }
.node__tag { font: 400 8px/1.6 var(--px-font); letter-spacing: 0; color: hsl(var(--hue) 45% var(--t-ink)); }

.arrow__line { background: hsl(var(--hue) 40% var(--t-mid)); width: var(--b); }
.arrow__line::after {
  border-right-color: hsl(var(--hue) 40% var(--t-mid));
  border-bottom-color: hsl(var(--hue) 40% var(--t-mid));
  border-width: 0 var(--b) var(--b) 0;
}

.enzyme {
  border: 0;
  margin: var(--b);
  color: var(--ink);
  background: var(--panel-2);
  box-shadow: var(--px-outline);
}
.enzyme small { color: var(--ink-3); }
.cofactor { color: hsl(var(--hue) 45% var(--t-ink)); opacity: 1; }

.slot {
  margin: var(--b);
  width: calc(100% - var(--b) * 2);
  border: var(--b) dashed var(--ink-3);
  background: transparent;
}
.slot--enzyme { width: auto; }
.slot:hover { border-color: var(--px-oak); background: rgb(233 169 63 / 0.12); }
.slot__num {
  font: 400 8px/1 var(--px-font);
  border: 0;
  color: var(--ink-2);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 2px var(--panel-edge);
}
.slot__empty { color: var(--ink-3); }

/* Placed pieces stay wooden until they are checked. */
.slot.is-filled,
.tile {
  border: 0;
  color: var(--px-cream-ink);
  background-color: var(--px-oak);
  background-image: var(--px-tile-wood);
  background-size: calc(var(--b) * 32) calc(var(--b) * 12);
  box-shadow:
    inset 0 var(--b) 0 var(--px-oak-lit),
    inset 0 calc(var(--b) * -2) 0 var(--px-oak-dark),
    var(--px-outline),
    var(--px-drop);
}
.slot.is-filled .slot__fill b,
.slot.is-filled .slot__product,
.tile b,
.tile .tile__product { color: var(--px-cream-ink); text-shadow: 2px 2px 0 var(--px-bark); }
.slot.is-filled .slot__fill small,
.tile small { color: var(--px-honey-lit); }
.slot.is-filled .slot__product::before,
.tile .tile__product::before { color: var(--px-honey-lit); }
.slot.is-filled .slot__num { color: var(--px-bark); background: var(--px-parchment); box-shadow: none; }
.tile:hover { transform: none; translate: 0 calc(var(--b) * -1); }

.slot.is-armed {
  border: var(--b) solid var(--px-honey);
  background: rgb(251 224 138 / 0.35);
  box-shadow: none;
}
.slot.is-armed .slot__num { color: var(--px-bark); background: var(--px-honey); box-shadow: none; }

.slot.is-dragover { border: var(--b) solid var(--px-moss); background: rgb(111 158 60 / 0.18); }

.slot.is-locked {
  border: 0;
  color: var(--ink);
  background: hsl(var(--hue) var(--t-s) var(--t-l));
  box-shadow: inset 0 calc(var(--b) * -2) 0 hsl(var(--hue) 40% var(--t-mid) / 0.6), var(--px-outline);
}
.slot.is-locked .slot__fill b,
.slot.is-locked .slot__product { color: var(--ink); text-shadow: none; }
.slot.is-locked .slot__fill small { color: var(--ink-3); }
.slot.is-locked .slot__product::before { color: hsl(var(--hue) 45% var(--t-mid)); }
.slot.is-locked .slot__num { color: var(--px-cream-ink); background: var(--px-moss); box-shadow: none; }
.slot.is-hinted .slot__num { background: var(--ink-3); }

.slot.is-wrong {
  border: 0;
  background: rgb(181 69 58 / 0.2);
  box-shadow: inset 0 0 0 var(--b) var(--bad), var(--px-outline);
}

.tray.is-dragover { box-shadow: inset 0 0 0 var(--b) var(--px-moss), var(--px-outline), var(--px-drop); }
.tray__title { font: 400 8px/1.6 var(--px-font); letter-spacing: 0.04em; color: var(--ink-2); }
.tray__count { color: var(--ink-3); }
.tray__done { color: var(--px-moss); }
.tray__actions .btn { padding-left: calc(var(--b) * 3); padding-right: calc(var(--b) * 3); white-space: nowrap; }


.insight__enzyme { color: var(--ink); }
.insight__product { color: hsl(var(--hue) 45% var(--t-ink)); }
.insight__note { color: var(--ink-2); border-top: 2px dashed var(--panel-edge); }
.insight__cofactor { color: var(--ink-3); }

.recap__summary { color: var(--ink-2); }
.codex__lede, .codex__start { color: var(--ink-3); }
.codex__start b { color: hsl(var(--hue) 45% var(--t-ink)); }
#choicePathway .choice b,
#choicePathway .choice.is-selected b { color: var(--ink); }
#choicePathway .choice { box-shadow: inset var(--b) 0 0 hsl(var(--hue) 45% var(--t-mid)), inset 0 calc(var(--b) * -1) 0 var(--panel-edge), var(--px-outline); }
#choicePathway .choice.is-selected { box-shadow: inset var(--b) 0 0 hsl(var(--hue) 45% var(--t-mid)), inset 0 calc(var(--b) * -2) 0 var(--px-honey), var(--px-outline); }
#choicePathway .choice.is-selected b { color: var(--px-bark); }

@media (max-width: 900px) {
  .tray { background: var(--panel); }
}

/* ============================================================
   Lab Rapid-Fire
   ============================================================ */

.qcard { background: var(--panel); }
.qcard__mult {
  font: 400 8px/1.6 var(--px-font);
  color: var(--px-bark);
  background: var(--px-honey);
  box-shadow: var(--px-outline);
}
.qcard__clock { font: 400 12px/1.6 var(--px-font); color: var(--ink-2); }
.qcard__clock.is-low { color: var(--bad); }
.qcard__q { color: var(--ink); }

.timer {
  height: calc(var(--b) * 3);
  margin-left: var(--b);
  margin-right: var(--b);
  background: var(--panel-2);
  box-shadow: var(--px-outline);
}
.timer__bar { background: var(--px-sprout); }
.timer.is-low .timer__bar { background: var(--px-clay); }

.option {
  margin: var(--b);
  border: 0;
  color: var(--ink);
  background: var(--panel-2);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--panel-edge), var(--px-outline);
}
.option:hover:not(:disabled) {
  transform: none;
  translate: 0 calc(var(--b) * -1);
  background: var(--px-honey-lit);
  color: var(--px-bark);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-honey), var(--px-outline), 0 calc(var(--b) * 2) 0 var(--px-cast);
}
.option__key {
  font: 400 8px/1 var(--px-font);
  border: 0;
  color: var(--px-bark);
  background: var(--px-parchment);
  box-shadow: inset 0 0 0 2px var(--px-parchment-edge);
}
.option.is-correct {
  color: var(--px-bark);
  background: var(--px-sprout-lit);
  box-shadow: inset 0 calc(var(--b) * -2) 0 var(--px-sprout), var(--px-outline);
}
.option.is-correct .option__key { color: var(--px-cream-ink); background: var(--px-moss); box-shadow: none; }
.option.is-wrong {
  color: var(--px-bark);
  background: #f2b3a6;
  box-shadow: inset 0 calc(var(--b) * -2) 0 #d9826f, var(--px-outline);
}
.option.is-wrong .option__key { color: var(--px-cream-ink); background: #b5453a; box-shadow: none; }

.feedback { border-top: 2px dashed var(--panel-edge); }
.feedback__verdict { font: 400 12px/1.6 var(--px-font); }
.feedback__verdict.is-good { color: var(--good); }
.feedback__verdict.is-bad { color: var(--bad); }
.feedback__verdict small { font-family: system-ui, sans-serif; color: var(--px-honey-deep); }
.feedback__why { color: var(--ink-2); }
.feedback__key, .panel__hint { color: var(--ink-3); }

kbd {
  font-family: var(--px-font);
  font-size: 8px;
  border: 0;
  color: var(--px-bark);
  background: var(--px-parchment);
  box-shadow: inset 0 -2px 0 var(--px-parchment-edge), 0 0 0 2px var(--px-bark);
}

.hud__lives { color: var(--px-petal); font-family: system-ui, sans-serif; }

.review li { background: var(--panel-2); border-left: var(--b) solid hsl(var(--hue, 200) 45% var(--t-mid)); }
.review__q { color: var(--ink); }
.review__a { color: var(--good); }
.review__why { color: var(--ink-3); }

/* ------------------------------------------------------------ small screens */

@media (max-width: 720px) {
  .brand__text strong { font-size: 8px; }
  .panel__title { font-size: 16px; }
  .btn--lg { font-size: 12px; }
  /* Leave the game's name room next to the buttons on a phone. */
  .topbar__actions { gap: 2px; }
  .topbar__actions .btn { font-size: 8px; padding: calc(var(--b) * 3) calc(var(--b) * 3); }
  .iconbtn { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .tile, .option { transition: none; }
}
