/* =============================================================================
   CasesTrain — shared design layer
   -----------------------------------------------------------------------------
   Every game carries its own accent from the hub card into play. The accent is
   an RGB triplet in --ac (plus a lighter --ac-hi and deeper --ac-lo) so both the
   Tailwind brand-* utilities and hand-written CSS can use it with any opacity:
       color: rgb(var(--ac));            background: rgb(var(--ac) / 0.12);
   --ac-fg is the text colour that sits on a solid accent fill.
   main.js stamps body[data-game]; Habitat Builder also stamps body[data-terrain].
   ========================================================================== */

:root {
  color-scheme: dark;

  /* default (hub, legal, results fallback): CasesTrain blue */
  --ac: 58 166 255;
  --ac-hi: 93 208 255;
  --ac-lo: 31 127 224;
  --ac-fg: 255 255 255;

  --ink-950: #0b0f14;
  --ink-900: #0f1620;
  --ink-800: #152133;

  --good: 74 222 128;
  --warn: 246 197 96;
  --bad: 248 113 113;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pop: cubic-bezier(0.2, 0.9, 0.3, 1.25);
}

/* Field Study — gold: field notes, sun on the mesa */
[data-game="redrock"]   { --ac: 240 180 41;  --ac-hi: 250 204 92;  --ac-lo: 212 150 20;  --ac-fg: 11 15 20; }
/* Microbial Migration — violet: UV lamp over a petri dish */
[data-game="microbial"] { --ac: 167 139 250; --ac-hi: 196 181 253; --ac-lo: 139 92 246;  --ac-fg: 11 15 20; }
/* Sustainable Future Lab — sky: dawn over the province */
[data-game="sfl"]       { --ac: 116 184 247; --ac-hi: 147 204 255; --ac-lo: 66 149 230;  --ac-fg: 11 15 20; }
/* Maritime Operations — cyan: open water */
[data-game="seawolf"]   { --ac: 93 208 255;  --ac-hi: 140 224 255; --ac-lo: 58 166 255;  --ac-fg: 11 15 20; }
/* Habitat Builder — colour follows the terrain that was rolled */
[data-game="ecosystem"]                        { --ac: 110 231 160; --ac-hi: 150 240 190; --ac-lo: 52 199 122;  --ac-fg: 11 15 20; }
[data-game="ecosystem"][data-terrain="reef"]   { --ac: 255 138 101; --ac-hi: 255 171 143; --ac-lo: 235 105 64;  --ac-fg: 11 15 20; }
[data-game="ecosystem"][data-terrain="alpine"] { --ac: 159 211 255; --ac-hi: 197 229 255; --ac-lo: 110 180 240; --ac-fg: 11 15 20; }
[data-game="ecosystem"][data-terrain="jungle"] { --ac: 110 231 160; --ac-hi: 150 240 190; --ac-lo: 52 199 122;  --ac-fg: 11 15 20; }
[data-game="ecosystem"][data-terrain="savanna"] { --ac: 255 180 87; --ac-hi: 255 205 130; --ac-lo: 224 140 48;  --ac-fg: 11 15 20; }

html,
body {
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- ground: one dark lab, tinted by the active game ---------- */
body {
  background-color: var(--ink-950);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgb(var(--ac) / 0.09), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgb(var(--ac-lo) / 0.06), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.3s;
}

/* Subject tints — deliberately faint; the moving textures are in ambient.css. */
body[data-game="redrock"] {
  /* sun on the mesa; the drifting contours are in ambient.css */
  background-image:
    radial-gradient(1000px 500px at 85% 0%, rgb(var(--ac) / 0.07), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgb(var(--ac-lo) / 0.05), transparent 60%);
}
body[data-game="microbial"] {
  /* colonies under a violet lamp */
  background-image:
    radial-gradient(260px 260px at 12% 18%, rgb(var(--ac) / 0.10), transparent 70%),
    radial-gradient(180px 180px at 88% 30%, rgb(var(--ac-hi) / 0.07), transparent 70%),
    radial-gradient(340px 340px at 70% 95%, rgb(var(--ac-lo) / 0.08), transparent 70%);
}
body[data-game="sfl"] {
  /* dawn band */
  background-image:
    linear-gradient(180deg, rgb(var(--ac) / 0.10) 0%, transparent 320px),
    radial-gradient(900px 400px at 100% 100%, rgb(var(--ac-lo) / 0.06), transparent 60%);
}
body[data-game="seawolf"] {
  /* deep water below; the moving swell is in ambient.css */
  background-image:
    radial-gradient(1200px 500px at 50% 110%, rgb(var(--ac) / 0.10), transparent 60%);
}
body[data-game="ecosystem"] {
  background-image:
    radial-gradient(900px 500px at -5% 105%, rgb(var(--ac) / 0.12), transparent 60%),
    radial-gradient(800px 400px at 100% -5%, rgb(var(--ac-lo) / 0.07), transparent 60%);
}

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid rgb(var(--ac-hi));
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- header timer: the one number a player checks all run ---------- */
.timer-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 78px;
}
.timer-chip-time {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgb(241, 245, 249);
  letter-spacing: 0;
  line-height: 1;
  text-align: right;
  transition: color 0.3s;
}
.timer-chip-bar {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}
.timer-chip-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: rgb(var(--ac));
  transition: width 0.5s linear, background 0.3s;
}
.timer-chip.timer-warn .timer-chip-time { color: rgb(var(--warn)); }
.timer-chip.timer-warn .timer-chip-bar > i { background: rgb(var(--warn)); }
.timer-chip.timer-danger .timer-chip-time { color: rgb(var(--bad)); animation: pulse 1s ease-in-out infinite; }
.timer-chip.timer-danger .timer-chip-bar > i { background: rgb(var(--bad)); }

/* legacy classes still used by Field Study's own header */
.timer-warn { color: rgb(var(--warn)); }
.timer-danger { color: rgb(var(--bad)); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------- motion: answers to an action, never decoration ---------- */
.fade-in { animation: fadeIn 0.25s ease-out backwards; } /* backwards, not both: nothing may stay applied after the fade */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  /* end on no transform at all: a leftover transform would turn the app into
     the containing block for position:fixed children (phone sheets, toolbars) */
  to { opacity: 1; transform: none; }
}

/* a thing that just arrived (a journal entry, a chosen species, a fleet pip) */
.pop { animation: popIn 0.28s var(--ease-pop) both; }
@keyframes popIn {
  0% { transform: scale(0.92); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* a drop that landed */
.drop-flash { animation: dropFlash 0.55s ease-out; }
@keyframes dropFlash {
  0% { box-shadow: 0 0 0 0 rgb(var(--good) / 0.75); }
  100% { box-shadow: 0 0 0 14px rgb(var(--good) / 0); }
}

/* a wrong move */
.shake { animation: shake 0.35s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* While something is being dragged, every place it can land shows itself. */
body.is-dragging [data-drop-zone] {
  outline: 2px dashed rgb(var(--ac) / 0.55);
  outline-offset: 3px;
  transition: outline-color 0.15s, background-color 0.15s;
}
body.is-dragging [data-drop-zone].drop-active {
  outline-style: solid;
  outline-color: rgb(var(--good));
  background-color: rgb(var(--good) / 0.10);
}
.dragging { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- small shared atoms ---------- */
.bar-fill-gradient { background: rgb(var(--ac) / 0.85); }

.investigated-check::after {
  content: "✓";
  color: rgb(var(--good));
  margin-left: 6px;
  font-weight: 700;
}

.hex-tile { cursor: pointer; transition: filter 0.15s ease, transform 0.15s ease; }
.hex-tile:hover { filter: brightness(1.2); transform: translateY(-1px); }

/* ---------- icons (Lucide, inlined in src/ui/icons.js) ---------- */
.icon { display: inline-block; vertical-align: -0.18em; flex-shrink: 0; }
.icon-tile {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: 10px;
  color: var(--tile);
  background: color-mix(in srgb, var(--tile) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile) 35%, transparent);
}
.icon-tile.icon-tile-round { border-radius: 50%; }

/* ---------- modal (plain CSS so it positions even if the Tailwind CDN lags) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 11, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  animation: modalFadeIn 0.18s ease-out;
}
.modal {
  background: rgb(15, 21, 29);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  max-width: 640px;
  width: 100%;
  padding: 24px;
  max-height: 88vh;
  overflow-y: auto;
  animation: modalSlideIn 0.22s var(--ease-out);
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Habitat Builder: the habitat strip ---------- */
.habitat-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.habitat-slot {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  border: 1.5px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(148, 163, 184, 0.35);
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  cursor: default;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.habitat-slot.filled {
  border-style: solid;
  border-color: var(--tier);
  background: color-mix(in srgb, var(--tier) 14%, transparent);
  cursor: pointer;
}
.habitat-slot.filled:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--tier) 24%, transparent); }
.habitat-slot.filled.has-error { box-shadow: 0 0 0 2px rgb(var(--bad) / 0.7); }
.habitat-slot.filled.has-warning { box-shadow: 0 0 0 2px rgb(var(--warn) / 0.6); }
.habitat-slot-idx {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
}
.habitat-arrow {
  color: rgba(148, 163, 184, 0.35);
  font-size: 14px;
  margin: 0 -2px;
}
.tier-stripe {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--tier);
  opacity: 0.85;
}

/* ---------- Maritime: fleet strip ---------- */
.fleet-strip {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
}
.fleet-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}
.fleet-group-label {
  font-size: 12px;
  color: rgba(203, 213, 225, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}
.fleet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--zone); }
.fleet-pips { display: flex; gap: 4px; flex-wrap: wrap; min-height: 18px; }
.fleet-pip {
  width: 16px; height: 18px;
  border-radius: 3px 3px 8px 8px;
  background: var(--zone);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4) inset;
}
.fleet-pip.empty {
  background: transparent;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
}

/* ---------- scenes: SVG pictures drawn from game state (src/ui/scenes.js) ---------- */
.scene { display: block; width: 100%; height: auto; border-radius: 12px; }
.scene-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgb(var(--ac) / 0.25);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.8);
  background: #0b0f14;
}
.hab-slot { transition: transform 0.15s; transform-box: fill-box; transform-origin: center; }
.hab-slot:hover { transform: translateY(-3px); }
.hab-slot:focus-visible { outline: none; }
.hab-slot:focus-visible circle:first-of-type { stroke: rgb(var(--ac-hi)); stroke-width: 3; }
.hab-slot.pop { animation: popIn 0.32s var(--ease-pop) both; }

/* ---------- empty states: 404, no results ---------- */
.empty-state {
  min-height: calc(100vh - 40px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.empty-state-card {
  max-width: 460px; width: 100%;
  padding: 32px;
  text-align: center;
  background: rgba(15, 22, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}
.empty-state-mark { width: 44px; height: 44px; margin: 0 auto 16px; }
.empty-state-mark svg { display: block; }
.empty-state-title {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  color: rgb(248, 250, 252);
  margin: 0 0 8px;
}
.empty-state-text {
  font-size: 14px; line-height: 1.6;
  color: rgba(203, 213, 225, 0.85);
  margin: 0 0 20px;
}
.empty-state-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px; border-radius: 4px;
}
.empty-state-actions { display: flex; justify-content: center; gap: 10px; }

/* ---------- hub hero with the latest run ---------- */
.hub-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
@media (min-width: 1000px) {
  .hub-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; }
}
.hub-hero-scene { margin: 0; min-width: 0; }
.hub-hero-scene .scene-frame { border-color: rgba(255, 255, 255, 0.10); }
.hub-hero-scene figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.85);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.hub-hero-scene figcaption b { color: rgb(241, 245, 249); font-weight: 600; }

/* ---------- logo ---------- */
.logo-mark { display: inline-block; vertical-align: middle; flex-shrink: 0; filter: drop-shadow(0 6px 14px rgba(58, 166, 255, 0.25)); }
.logo-lockup { display: inline-flex; align-items: center; gap: 9px; }
.logo-word {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  color: rgb(241, 245, 249);
}

/* ---------- Microbial site scene ---------- */
.mm-site-progress { position: relative; overflow: hidden; }
.mm-site-progress .scene { border-radius: 8px; }

/* ---------- Field Study banner ---------- */

/* =============================================================================
   De-templating: no tracked all-caps labels anywhere. Small labels are plain
   sentence case in Schibsted Grotesk. Covers screens not yet on the workbench
   layer below (Microbial, the Terms page) and any stray Tailwind caps.
   ========================================================================== */
.mm-attr-section-title, .mm-card-attr-label, .mm-site-block-title, .mm-num-cell-label, .mm-choice-cell-label,
.mm-choice-foot, .mm-pill, .mm-tri-prompt,
.eula-section-title,
.uppercase.tracking-wider, .uppercase.tracking-wide, .uppercase.tracking-widest {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-family: 'Schibsted Grotesk', system-ui, sans-serif !important;
}
.mm-site-block-title, .mm-attr-section-title, .mm-card-attr-label,
.mm-num-cell-label, .mm-choice-cell-label {
  font-size: 12px !important; font-weight: 500 !important; color: rgba(148, 163, 184, 0.9) !important;
}
.eula-section-title { font-size: 14px !important; font-weight: 600 !important; color: rgb(226, 232, 240) !important; }
.mm-pill { font-size: 12px !important; font-weight: 500 !important; }
.uppercase.tracking-wider, .uppercase.tracking-wide { font-weight: 500; color: rgba(148, 163, 184, 0.9); }
.uppercase.tracking-wider.text-xs, .uppercase.tracking-wide.text-xs { font-size: 12px; }
.uppercase.tracking-wider.text-sm { font-size: 14px; font-weight: 600; color: rgb(226, 232, 240); }

/* Phones: the mark alone is enough; the exercise title needs the room. */
@media (max-width: 640px) {
  .app-header .logo-word { display: none; }
}

/* =============================================================================
   Game screens: the workbench layer
   -----------------------------------------------------------------------------
   Structure comes from type, whitespace and a hairline where a separation means
   something. Panels (.gw-panel) are kept for things that really are a separate
   tool. One type scale: title 26 / section 16 / body 15 / meta 13.
   ========================================================================== */
:root {
  --gw-ink: 236 240 238;
  --gw-text: 203 213 225;
  --gw-mute: 148 163 184;
  --gw-line: rgba(255, 255, 255, 0.08);
  --gw-line-2: rgba(255, 255, 255, 0.14);
  --gw-panel: rgba(12, 17, 24, 0.86);
  --gw-hover: rgba(255, 255, 255, 0.035);
}

/* game screens drop the decorative drop shadows */
body[data-game] .scene-frame { box-shadow: none; border-color: var(--gw-line-2); }
body[data-game] .logo-mark { filter: none; }


/* ---------- game header (HeaderBar) ---------- */
.game-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(9, 13, 18, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gw-line);
}
.gh-inner {
  max-width: 1280px; margin: 0 auto;
  min-height: 56px; padding: 8px 20px;
  display: flex; align-items: center; gap: 16px;
}
.gh-home { display: flex; align-items: center; flex-shrink: 0; border-radius: 8px; }
.gh-rule { width: 1px; height: 22px; background: var(--gw-line-2); flex-shrink: 0; }
.gh-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.gh-name { font-size: 14.5px; font-weight: 650; color: rgb(var(--gw-ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gh-sub { font-size: 13px; color: rgb(var(--gw-mute)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gh-exit {
  flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: rgb(var(--gw-text));
  padding: 6px 10px; margin-right: -10px; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.gh-exit:hover { background: var(--gw-hover); color: rgb(var(--gw-ink)); }
@media (max-width: 640px) {
  .gh-inner { padding: 8px 16px; gap: 12px; }
  .gh-title { flex-direction: column; gap: 1px; }
  .gh-name { font-size: 14px; }
  .gh-sub { font-size: 12.5px; max-width: 100%; }
  .game-header .gh-rule { display: none; }
  .timer-chip { min-width: 64px; }
  .timer-chip-time { font-size: 18px; }
}

/* ---------- page frame and type ---------- */
.gw { max-width: 1120px; margin: 0 auto; padding: 28px 24px 80px; }
.gw-read { max-width: 780px; }
@media (max-width: 640px) { .gw { padding: 20px 16px 64px; } }
.gw-title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.015em; color: rgb(var(--gw-ink)); }
.gw-title-lg { font-size: clamp(28px, 4.2vw, 36px); letter-spacing: -0.02em; }
.gw-h2 { font-size: 16px; line-height: 1.35; font-weight: 650; color: rgb(var(--gw-ink)); }
.gw-h3 { font-size: 14.5px; line-height: 1.4; font-weight: 600; color: rgb(var(--gw-ink)); }
.gw-body { font-size: 15px; line-height: 1.65; color: rgb(var(--gw-text)); }
.gw-body b, .gw-body strong { color: rgb(var(--gw-ink)); font-weight: 600; }
.gw-small { font-size: 14px; line-height: 1.6; color: rgb(var(--gw-text)); }
.gw-meta { font-size: 13px; line-height: 1.5; color: rgb(var(--gw-mute)); }
.gw-meta b { color: rgb(var(--gw-text)); font-weight: 600; }
.gw-num { font-variant-numeric: tabular-nums; }
/* inline metadata separated by middle dots, wrapping cleanly */
.gw-metaline { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px; }
.gw-metaline > * + *::before { content: "\00b7"; margin: 0 8px; color: rgb(var(--gw-mute) / 0.7); }

.gw-section { margin-top: 36px; }
.gw-section > .gw-h2:first-child { margin-bottom: 12px; }
.gw-ruled { border-top: 1px solid var(--gw-line); padding-top: 24px; }
.gw-stack > * + * { margin-top: 12px; }

.gw-link {
  font-size: 13px; font-weight: 500; color: rgb(var(--ac-hi));
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgb(var(--ac-hi) / 0.35); text-underline-offset: 3px;
}
.gw-link:hover { text-decoration-color: rgb(var(--ac-hi)); }

/* a separate tool gets a panel; nothing else does */
.gw-panel { background: var(--gw-panel); border: 1px solid var(--gw-line); border-radius: 10px; }

.gw-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--gw-line);
}
.gw-actions-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }

/* status: the only chip on a game screen */
.gw-status {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.5;
  color: rgb(var(--gw-text)); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--gw-line-2);
}
.gw-status-good { color: rgb(134, 239, 172); background: rgb(var(--good) / 0.10); border-color: rgb(var(--good) / 0.35); }
.gw-status-warn { color: rgb(252, 211, 77); background: rgb(var(--warn) / 0.10); border-color: rgb(var(--warn) / 0.35); }
.gw-status-bad  { color: rgb(252, 165, 165); background: rgb(var(--bad) / 0.10); border-color: rgb(var(--bad) / 0.35); }

.gw-good { color: rgb(134, 239, 172); }
.gw-warn { color: rgb(252, 211, 77); }
.gw-bad  { color: rgb(252, 165, 165); }

/* key figures: label over value, no boxes */
.gw-stats { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0; }
.gw-stat { min-width: 0; }
.gw-stat dt { font-size: 12.5px; color: rgb(var(--gw-mute)); line-height: 1.4; }
.gw-stat dd { margin: 2px 0 0; font-size: 17px; font-weight: 600; color: rgb(var(--gw-ink)); font-variant-numeric: tabular-nums; line-height: 1.3; }
.gw-stat dd small { font-size: 12.5px; font-weight: 400; color: rgb(var(--gw-mute)); margin-left: 3px; }

/* label / value rows (a spec sheet) */
.gw-spec { margin: 0; }
.gw-spec > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--gw-line); }
.gw-spec > div:last-child { border-bottom: 1px solid var(--gw-line); }
.gw-spec dt { font-size: 13px; color: rgb(var(--gw-mute)); }
.gw-spec dd { margin: 0; font-size: 14px; color: rgb(var(--gw-ink)); text-align: right; }

/* progress through a game's stages: plain words on a baseline, no pills */
.gw-steps {
  list-style: none; margin: 0 0 28px; padding: 0;
  display: flex; gap: 28px;
  border-bottom: 1px solid var(--gw-line);
  font-size: 13.5px; color: rgb(var(--gw-mute));
  overflow-x: auto; scrollbar-width: none;
}
.gw-steps::-webkit-scrollbar { display: none; }
.gw-steps li { display: flex; align-items: center; gap: 7px; padding: 0 0 11px; margin-bottom: -1px; border-bottom: 2px solid transparent; white-space: nowrap; }
.gw-steps .gw-step-n { font-variant-numeric: tabular-nums; color: rgb(var(--gw-mute) / 0.8); }
.gw-steps li.done { color: rgb(var(--gw-text)); }
.gw-steps li.done .gw-step-n { color: rgb(var(--good)); }
.gw-steps li[aria-current] { color: rgb(var(--gw-ink)); font-weight: 600; border-bottom-color: rgb(var(--ac)); }
.gw-steps li[aria-current] .gw-step-n { color: rgb(var(--ac-hi)); }
@media (max-width: 640px) { .gw-steps { gap: 20px; margin-bottom: 22px; } }

/* numbered question with a hanging number */
.gw-q { display: grid; grid-template-columns: 36px minmax(0, 1fr); padding: 24px 0 20px; border-top: 1px solid var(--gw-line); }
.gw-q:first-of-type { border-top: 0; padding-top: 4px; }
.gw-q-num { font-size: 15px; font-weight: 650; line-height: 1.5; color: rgb(var(--ac-hi)); font-variant-numeric: tabular-nums; }
.gw-q-text { font-size: 16px; line-height: 1.5; font-weight: 500; color: rgb(var(--gw-ink)); }
@media (max-width: 640px) { .gw-q { grid-template-columns: 28px minmax(0, 1fr); } .gw-q-text { font-size: 15.5px; } }

/* radio rows */
.gw-options { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 0 -10px; }
.gw-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 10px; border-radius: 7px; cursor: pointer;
  font-size: 14.5px; line-height: 1.55; color: rgb(var(--gw-text));
  transition: background 0.15s, color 0.15s;
}
.gw-option:hover { background: var(--gw-hover); }
.gw-option input[type="radio"] {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin: 3px 0 0; flex-shrink: 0; cursor: pointer;
  border-radius: 50%; border: 1.5px solid rgb(var(--gw-mute) / 0.75); background: transparent;
  display: grid; place-content: center; transition: border-color 0.15s;
}
.gw-option input[type="radio"]::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: rgb(var(--ac-hi)); transform: scale(0); transition: transform 0.12s var(--ease-out);
}
.gw-option:hover input[type="radio"] { border-color: rgb(var(--ac-hi) / 0.8); }
.gw-option input[type="radio"]:checked { border-color: rgb(var(--ac-hi)); }
.gw-option input[type="radio"]:checked::before { transform: scale(1); }
.gw-option:has(input:checked) { background: rgb(var(--ac) / 0.09); color: rgb(var(--gw-ink)); }
.gw-option input:focus-visible { outline-offset: 3px; }

/* a numeric stepper (Maritime allocation) */
.gw-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--gw-line-2); border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.25); }
.gw-stepper button {
  width: 36px; font-size: 16px; line-height: 1; color: rgb(var(--gw-ink)); background: transparent; cursor: pointer;
  transition: background 0.15s;
}
.gw-stepper button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.07); }
.gw-stepper button:disabled { color: rgb(var(--gw-mute) / 0.45); cursor: not-allowed; }
.gw-stepper input {
  width: 52px; padding: 7px 0; text-align: center; background: transparent; border: 0;
  border-left: 1px solid var(--gw-line); border-right: 1px solid var(--gw-line);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 15px; font-weight: 600; color: rgb(var(--gw-ink));
  -moz-appearance: textfield;
}
.gw-stepper input::-webkit-outer-spin-button, .gw-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gw-stepper input:focus { outline: none; background: rgb(var(--ac) / 0.08); }
.gw-stepper:focus-within { border-color: rgb(var(--ac) / 0.7); }

/* an intro's opening block */
.gw-intro-scene { margin-bottom: 28px; }
.gw-intro-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.gw-steps-list { list-style: none; margin: 0; padding: 0; counter-reset: gwstep; }
.gw-steps-list li { position: relative; padding: 9px 0 9px 32px; border-top: 1px solid var(--gw-line); font-size: 14.5px; line-height: 1.55; color: rgb(var(--gw-text)); counter-increment: gwstep; }
.gw-steps-list li:last-child { border-bottom: 1px solid var(--gw-line); }
.gw-steps-list li::before { content: counter(gwstep); position: absolute; left: 2px; top: 9px; font-weight: 650; color: rgb(var(--ac-hi)); font-variant-numeric: tabular-nums; }
.gw-steps-list li b { color: rgb(var(--gw-ink)); font-weight: 600; }
.gw-rules { list-style: none; margin: 0; padding: 0; }
.gw-rules li { position: relative; padding: 5px 0 5px 18px; font-size: 14.5px; line-height: 1.55; color: rgb(var(--gw-text)); }
.gw-rules li::before { content: ""; position: absolute; left: 3px; top: 14px; width: 5px; height: 5px; border-radius: 1px; background: rgb(var(--ac) / 0.8); }
.gw-rules li b { color: rgb(var(--gw-ink)); font-weight: 600; }
/* a note set off by a rule on its left: used for the one thing a player must not miss */
.gw-note { border-left: 2px solid rgb(var(--ac) / 0.7); padding: 2px 0 2px 14px; }
.gw-note-warn { border-left-color: rgb(var(--warn) / 0.8); }

/* ---------- Maritime Operations ---------- */
.sw-lead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.sw-zone-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 12px; }
.sw-zone-cols-play { margin-top: 28px; }
.sw-zone-col { min-width: 0; border-top: 2px solid var(--zone, rgb(var(--ac))); padding-top: 12px; }
.sw-zone-summary { margin: 4px 0 14px; }
.sw-spec-total dt, .sw-spec-total dd { color: rgb(var(--gw-ink)); font-weight: 600; }
.sw-spec-total dd { font-size: 15px; }
.sw-formula { font-size: 12.5px; font-weight: 400; color: rgb(var(--gw-mute)); }
.sw-zone-toggle { margin-top: 12px; }
.sw-zone-facts { margin-top: 8px; }
.sw-zone-facts li { font-size: 13.5px; }
.sw-alloc-row { display: flex; align-items: center; gap: 10px; }
.sw-alloc-totals { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--gw-line); gap: 10px 48px; }
.sw-alloc-totals dd { font-size: 20px; }
@media (max-width: 760px) { .sw-zone-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ---------- Habitat Builder ---------- */
.eco-board { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 20px; }
.eco-counts { gap: 8px 28px; }
.eco-actions { display: flex; gap: 10px; }
.eco-status { display: flex; align-items: baseline; gap: 8px 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--gw-line); }
.eco-chooser { margin-top: 28px; padding: 20px 20px 2px; }
.eco-chooser-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.eco-tier { margin-bottom: 22px; }
.eco-tier-head { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; margin-bottom: 10px; }
.eco-tier-head .gw-meta { font-weight: 400; }
.eco-tier-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--tier); align-self: center; flex-shrink: 0; }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.eco-tile-top { display: flex; align-items: center; gap: 10px; }
.eco-tile-name { flex: 1; min-width: 0; }
.eco-tile-title { font-size: 14px; font-weight: 600; color: rgb(var(--gw-ink)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-tile-meta { font-size: 12.5px; color: rgb(var(--gw-mute)); }
.eco-info { align-self: flex-start; padding: 4px; margin: -2px -2px 0 0; border-radius: 6px; color: rgb(var(--gw-mute)); transition: color 0.15s, background 0.15s; }
.eco-info:hover { color: rgb(var(--gw-ink)); background: rgba(255, 255, 255, 0.06); }
.eco-tile-cal { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: rgb(var(--gw-text)); }
.eco-picked { color: rgb(var(--ac-hi)); font-weight: 600; }
.eco-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.eco-flag { font-size: 12px; padding: 0 7px; }
@media (max-width: 640px) {
  .eco-chooser { padding: 16px 12px 2px; margin-left: -4px; margin-right: -4px; }
  .eco-grid { grid-template-columns: minmax(0, 1fr); }
  .eco-counts { gap: 8px 20px; }
  .eco-actions { width: 100%; }
  .eco-actions > * { flex: 1; }
}
.eco-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.eco-modal-title { display: flex; align-items: center; gap: 12px; }
.eco-modal-status { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; margin-top: 8px; }
.eco-modal-tiers { padding: 12px 0; border-top: 1px solid var(--gw-line); border-bottom: 1px solid var(--gw-line); }
.eco-issues { margin-top: 18px; }
.eco-issues .gw-meta { margin-top: 2px; }
.eco-issues ul { list-style: none; margin: 8px 0 0; padding: 0; }
.eco-issue { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--gw-line); font-size: 14px; line-height: 1.5; color: rgb(var(--gw-text)); }
.eco-issue-mark { width: 14px; flex-shrink: 0; text-align: center; font-weight: 700; font-size: 12.5px; line-height: 1.7; color: rgb(var(--gw-mute)); }
.modal .gw-spec dd { max-width: 65%; }

/* ---------- results page ---------- */
.results-page { max-width: 1080px; }
.results-page .scorebar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); }
.results-page .scorebar > span { border-radius: 2px; }
.results-page b:not([class]) { color: rgb(var(--gw-ink)); font-weight: 600; }

.res-lead { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px 48px; align-items: stretch; padding: 8px 0 4px; }
.res-scores { display: grid; grid-template-columns: 1.25fr 1fr 1fr; }
.res-score { padding: 0 24px; border-left: 1px solid var(--gw-line); min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.res-score:first-child { padding-left: 0; border-left: 0; }
.res-score-label { font-size: 14px; font-weight: 600; color: rgb(var(--gw-text)); }
.res-score-row { display: flex; align-items: baseline; gap: 12px; }
.res-score-num { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: rgb(var(--gw-ink)); font-variant-numeric: tabular-nums; }
.res-score-main .res-score-num { font-size: 60px; color: rgb(var(--ac-hi)); }
.res-grade { font-size: 13px; color: rgb(var(--gw-mute)); }
.res-grade b { font-size: 20px; margin-right: 4px; }
.res-score-meta { font-size: 12.5px; line-height: 1.45; color: rgb(var(--gw-mute)); }
.res-lever { border-left: 2px solid rgb(var(--ac)); padding: 2px 0 2px 20px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.res-lever-text { font-size: 16.5px; line-height: 1.5; font-weight: 500; color: rgb(var(--gw-ink)); }
.res-timeout { margin-top: 24px; }

.res-context { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px 48px; align-items: center; margin-top: 40px; }
.res-context > :only-child { grid-column: 1 / -1; }
.results-snapshot { margin: 0; min-width: 0; }
.results-snapshot-compact { padding: 10px 0; }
.res-history { display: flex; flex-direction: column; gap: 6px; }

.res-section { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--gw-line); }
.res-section-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.res-h2 { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: rgb(var(--gw-ink)); }
.res-h3 { font-size: 15.5px; font-weight: 650; color: rgb(var(--gw-ink)); margin: 28px 0 12px; }
.res-label { font-size: 13px; font-weight: 600; color: rgb(var(--gw-text)); margin: 12px 0 6px; }

.res-parts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 24px; }
.res-part { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.res-part-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: rgb(var(--gw-text)); }
.res-part-head b { font-size: 20px; font-variant-numeric: tabular-nums; }
.res-raw { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--gw-line); }

.res-narrative { max-width: 68ch; }
.res-formula { margin-top: 12px; font-size: 13.5px; color: rgb(var(--gw-mute)); }
.res-formula-total { color: rgb(var(--ac-hi)) !important; }
.res-explain { font-size: 14px; line-height: 1.6; color: rgb(var(--gw-text)); max-width: 72ch; }
.res-explain .text-sm { font-size: 14px; }
.res-explain-stats { margin: 4px 0 16px; }

.res-diags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.res-diag { padding: 16px 0 18px; border-top: 1px solid var(--gw-line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.res-diag-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.res-diag-score { font-size: 24px; line-height: 1.1; font-weight: 700; color: rgb(var(--gw-ink)); font-variant-numeric: tabular-nums; }
.res-diag-why { font-size: 13.5px; line-height: 1.55; color: rgb(var(--gw-ink)); }
.res-diag-extra { font-size: 13px; line-height: 1.55; color: rgb(var(--gw-mute)); }
.res-diag-extra > * + * { margin-top: 4px; }

.res-timeline { margin-top: 20px; }
.res-timeline summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: rgb(var(--ac-hi)); width: fit-content; border-radius: 4px; }
.res-timeline summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.res-timeline-list { margin-top: 12px; max-height: 380px; overflow: auto; border-top: 1px solid var(--gw-line); }
.res-tl-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 13.5px; min-width: 0; }
.res-tl-time { width: 44px; flex-shrink: 0; font-size: 12.5px; color: rgb(var(--gw-mute)); font-variant-numeric: tabular-nums; }
.res-tl-mark { width: 16px; flex-shrink: 0; text-align: center; }

.res-basis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 18px 0 0; }
.res-basis > div { padding: 10px 0; border-top: 1px solid var(--gw-line); }
.res-basis dt { font-size: 12.5px; color: rgb(var(--gw-mute)); }
.res-basis dd { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: rgb(var(--gw-text)); }

.res-answers { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--gw-line); }
.res-answer { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--gw-line); }
.res-answer-mark { font-size: 15px; font-weight: 700; line-height: 1.5; color: rgb(var(--gw-mute)); }
.res-answer-right .res-answer-mark { color: rgb(134, 239, 172); }
.res-answer-part .res-answer-mark { color: rgb(252, 211, 77); }
.res-answer-wrong .res-answer-mark { color: rgb(252, 165, 165); }
.res-answer-n { font-size: 14px; font-weight: 650; color: rgb(var(--ac-hi)); font-variant-numeric: tabular-nums; }
.res-answer-q { font-size: 14.5px; line-height: 1.5; font-weight: 500; color: rgb(var(--gw-ink)); }
.res-answer-detail { margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: rgb(var(--gw-text)); }
.res-answer-detail b { font-weight: 600; }
.res-answer-sub { margin-top: 4px; color: rgb(var(--gw-mute)); }
.res-answer-why { margin-top: 6px; font-size: 13px; line-height: 1.55; color: rgb(var(--gw-mute)); max-width: 72ch; }
.res-answer-weight { font-size: 12.5px; color: rgb(var(--gw-mute)); white-space: nowrap; line-height: 1.8; }
.res-mix { margin-bottom: 20px; }

.res-traits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 24px; margin: 8px 0 20px; }
.res-trait { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--gw-line); }
.res-trait-num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

.res-eco { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.res-eco-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.res-eco-list li { padding: 5px 0; border-top: 1px solid var(--gw-line); font-size: 14px; color: rgb(var(--gw-ink)); break-inside: avoid; }
.res-issues { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.res-issues li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--gw-line); font-size: 13.5px; line-height: 1.5; color: rgb(var(--gw-text)); }
.res-issue-mark { width: 14px; flex-shrink: 0; text-align: center; font-weight: 700; color: rgb(var(--gw-mute)); }
.res-inline-score { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.res-inline-score small { font-size: 12.5px; font-weight: 400; color: rgb(var(--gw-mute)); }

/* screens still built from the older kit (Microbial detail) lose the box-in-box look here */
.results-page .card { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--gw-line); }

@media (max-width: 1000px) {
  .res-parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .res-traits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .res-lead, .res-context { grid-template-columns: minmax(0, 1fr); }
  .res-lever { padding-left: 16px; }
}
@media (max-width: 640px) {
  .game-header .btn-primary.text-xs { padding: 6px 10px; }
  .res-scores { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 0; }
  .res-score-main { grid-column: 1 / -1; padding: 0 !important; border: 0 !important; }
  .res-score:nth-child(2) { padding-left: 0; border-left: 0; }
  .res-score-main .res-score-num { font-size: 52px; }
  .res-score-num { font-size: 36px; }
  .res-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
  .res-diags, .res-basis, .res-eco { grid-template-columns: minmax(0, 1fr); }
  .res-traits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-answer { grid-template-columns: 22px minmax(0, 1fr); }
  .res-answer-weight { grid-column: 2; line-height: 1.4; }
  .res-section { margin-top: 36px; }
  .res-eco-list { columns: 1; }
}

/* =============================================================================
   Phone ergonomics: every control at least ~44px to tap, and the things a
   player checks constantly stay in reach while the long lists scroll.
   ========================================================================== */
@media (max-width: 760px) {
  body .gh-exit { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  body .sfl-rank-btn { width: 44px; height: 44px; }
  body .sw-zone-toggle { display: inline-flex; align-items: center; min-height: 44px; }
  body .eco-info { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  body .mm-pick-toggle { transform: scale(1.35); transform-origin: right center; margin: 6px 0 6px 12px; }

  /* Habitat Builder: the tally and Submit stay pinned under the header while the species list scrolls */
  body .eco-board {
    position: sticky; top: var(--game-header-h, 57px); z-index: 30;
    background: rgb(9 13 18); margin-left: -16px; margin-right: -16px; padding: 10px 16px;
    border-bottom: 1px solid var(--gw-line);
  }

  /* Microbial Migration: the site's targets sit above the microbe being judged */
  body .mm-tri-layout > .mm-tri-side { order: -1; }
  body .mm-tri-side .mm-site-desc { display: none; }
}
