/* Collpad. The reference (art/ref/reference.jpg) is the spec: one dark rounded console on a grey
   ground, cream pixel display type at ~6.5x the body, a big picture panel with a card overlapping it,
   a cream strip, a tabbed section head, a gallery of one feature plus a grid. */

@font-face {
  font-family: "Pixelify";
  src: url("/font/pixelify.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "SplineMono";
  src: url("/font/splinemono.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ground: #474843;
  --card: #252525;
  --card-2: #2c2c2a;
  --ink: #e8e8c6;
  --ink-dim: #9d9d87;
  --line: rgba(232, 232, 198, 0.24);
  --line-soft: rgba(232, 232, 198, 0.12);
  --key-dark: #161e13;
  --hot: #e2853c;          /* forfeited, from the amber of the art */
  --cool: #79c2a6;         /* held the term, from the teal of the art */

  --r-lg: clamp(16px, 1.7vw, 34px);
  --r-md: clamp(11px, 1.25vw, 24px);
  --r-sm: clamp(8px, 0.8vw, 15px);

  --pad: clamp(20px, 3.34vw, 64px);       /* console inner padding, 40/1200 of the reference */
  --gap: clamp(10px, 1.05vw, 20px);

  --t-body: clamp(17px, 1.04vw, 20px);
  --t-small: clamp(16px, 0.94vw, 18px);
  --t-px: clamp(22px, 1.25vw, 24px);      /* pixel labels never under 22 */
  --t-h2: clamp(26px, 2.1vw, 40px);
  --t-num: clamp(40px, 4.2vw, 80px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 "SplineMono", ui-monospace, monospace;
  font-synthesis: none;
  overflow-x: hidden;
}
body::before {                       /* the ground is not flat: a generated grain tile over it */
  content: "";
  position: fixed;
  inset: 0;
  background: url("/img/grain.png") repeat;
  background-size: 160px 160px;
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 3;
}

img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- the console: the page's one object ---------- */

.console {
  position: relative;
  margin: clamp(14px, 2.6vw, 50px) 5.6vw clamp(28px, 4vw, 76px);
  padding: var(--pad);
  background: var(--card);
  border-radius: var(--r-lg);
  z-index: 1;
}

/* ---------- the control pill ---------- */

.pill {
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  gap: 8px;
  min-height: clamp(56px, 3.5vw, 68px);
  padding: 0 clamp(18px, 1.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.pill-item {
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-px);
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  padding: 14px 10px;
  border-radius: var(--r-sm);
  text-underline-offset: 6px;
}
.pill-item:hover { text-decoration: underline; }
.pill-item.is-on { text-decoration: underline; text-decoration-thickness: 2px; }
.pill-mark { display: flex; justify-content: center; padding: 0 clamp(8px, 1.4vw, 26px); }
.pill-mark img { width: clamp(22px, 1.5vw, 30px); height: auto; image-rendering: pixelated; }

/* ---------- display type: both lines fitted to the column width, as in the reference ---------- */

/* measured off the reference: both lines share one size, centred in the column, line height 1.5 of the
   cap, the longest line about 86% of the column width */
.display {
  font-family: "Pixelify", monospace;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.04em;
  text-align: center;
  margin: clamp(30px, 3.6vw, 70px) 0 clamp(26px, 2.8vw, 54px);
}
.display-line { display: block; white-space: nowrap; font-size: 80px; }

/* ---------- hero ---------- */

.hero { position: relative; }
.hero-plate {
  position: relative;
  width: 100%;
  aspect-ratio: 6 / 5;
  max-height: 132vh;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #101613;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
.hero-rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.premise {
  position: absolute;
  left: 0;
  top: clamp(-6px, -0.4vw, 0px);
  width: min(46%, 520px);
  padding: clamp(22px, 1.7vw, 32px);
  background: var(--card);
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
}
.premise p { font-size: var(--t-small); line-height: 1.6; }
.premise p + p { margin-top: 0.8em; color: var(--ink-dim); }

.hero-acts {
  position: absolute;
  right: clamp(14px, 1.4vw, 28px);
  top: clamp(14px, 1.4vw, 28px);
  display: flex;
  gap: var(--gap);
}

/* ---------- keys ---------- */

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 58px;
  padding: 14px clamp(24px, 1.5vw, 32px);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-px);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.key img { flex: none; width: 1.2em; height: 1.2em; }
.key span { min-width: 0; overflow-wrap: anywhere; }
.key img.mark-x { width: 0.92em; height: 0.92em; }
.key-cream { background: var(--ink); color: var(--key-dark); }
.key-dark { background: var(--key-dark); color: var(--ink); border-color: var(--line-soft); }
.key-dark img { filter: none; }
.key:hover { filter: brightness(1.08); }
.key:active { transform: translateY(2px); }
.key[disabled], .key[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- the cream strip ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: var(--gap);
  padding: 4px;
  background: var(--ink);
  border-radius: var(--r-md);
}
.strip-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: clamp(56px, 3.6vw, 72px);
  padding: 16px clamp(24px, 1.2vw, 28px);
  background: transparent;
  border: 0;
  border-radius: calc(var(--r-md) - 4px);
  color: var(--key-dark);
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-px);
  line-height: 1;
  cursor: pointer;
  text-align: center;
}
.strip-item img { width: 1.35em; height: 1.35em; image-rendering: pixelated; flex: none; }
.strip-item:hover { background: rgba(22, 30, 19, 0.09); }
.strip-item.is-on { background: var(--key-dark); color: var(--ink); }
.strip-item.is-on img { filter: invert(1) sepia(0.3) saturate(0.5) brightness(1.1); }

/* ---------- section head as its own tab, plus the honest state line ---------- */

.tabrow {
  display: flex;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
  margin: clamp(40px, 4vw, 78px) 0 var(--gap);
}
.tab {
  padding: clamp(20px, 1.2vw, 28px) clamp(26px, 2.6vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.1;
}
.tabnote { color: var(--ink-dim); font-size: var(--t-small); max-width: 62ch; }

/* ---------- the board: one feature plus a grid, the reference's gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.6fr);
  gap: var(--gap);
  align-items: stretch;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-content: start;
}

.coin {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card-2);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.coin:hover { transform: scale(1.012); box-shadow: 0 0 0 1px var(--line), 0 14px 34px rgba(0, 0, 0, 0.45); }
.coin img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.coin-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 10, 0.72) 0%, rgba(8, 12, 10, 0.05) 26%, rgba(8, 12, 10, 0.12) 40%, rgba(8, 12, 10, 0.9) 100%);
}
.coin-in {
  position: relative;
  text-shadow: 0 2px 10px rgba(6, 10, 8, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(20px, 2vw, 40px);
  padding: clamp(32px, 1.7vw, 36px);
  min-height: 100%;
}
.coin-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.coin-top > span:first-child { display: block; min-width: 0; }
.coin-meta { margin-top: 0.5em; }
.coin-name {
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-px);
  line-height: 1.15;
}
.coin-tick { display: block; margin-top: 0.25em; color: var(--ink-dim); font-size: var(--t-small); }
.coin-ratio {
  font-family: "Pixelify", monospace;
  font-weight: 700;
  line-height: 1;
}
.coin-ratio-lab { display: block; font-family: "SplineMono", monospace; font-weight: 400; font-size: var(--t-small); color: rgba(232, 232, 198, 0.74); margin-bottom: 0.35em; }
.coin-meta { display: flex; align-items: baseline; gap: 0.6em; flex-wrap: wrap; font-size: var(--t-small); color: var(--ink-dim); }
.coin.feature .coin-ratio { font-size: clamp(34px, 4.2vw, 80px); }
.coin.small .coin-ratio { font-size: clamp(30px, 2.3vw, 44px); }
.coin.feature { min-height: 100%; }
.coin.small { aspect-ratio: 0.95; min-height: 300px; }
/* a small card has no room for the name and the state badge on one line: stack them */
.coin.small .coin-top { flex-direction: column; align-items: flex-start; gap: 10px; }
.coin.small .coin-shade { background: linear-gradient(180deg, rgba(8, 12, 10, 0.78) 0%, rgba(8, 12, 10, 0.18) 30%, rgba(8, 12, 10, 0.5) 52%, rgba(8, 12, 10, 0.94) 100%); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(232, 232, 198, 0.14);
  border: 1px solid var(--line);
  font-size: var(--t-small);
  line-height: 1;
  white-space: nowrap;
}
.badge.hot { color: var(--hot); border-color: rgba(226, 133, 60, 0.55); background: rgba(226, 133, 60, 0.14); }
.badge.cool { color: var(--cool); border-color: rgba(121, 194, 166, 0.5); background: rgba(121, 194, 166, 0.13); }
.badge.example { background: var(--ink); color: var(--key-dark); border-color: var(--ink); }

.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: clamp(18px, 1.5vw, 28px);
  border: 1px solid var(--line-soft);
  background: rgba(232, 232, 198, 0.03);
  border-radius: var(--r-md);
  color: var(--ink-dim);
  text-align: center;
  text-decoration: none;
  font-size: var(--t-small);
  aspect-ratio: 0.95;
  min-height: 300px;
}
.slot:hover { background: rgba(232, 232, 198, 0.07); }
.slot img { width: 34px; height: 34px; opacity: 0.4; image-rendering: pixelated; }

/* ---------- the row that closes the board ---------- */

.leadrow {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.5vw, 30px);
  flex-wrap: wrap;
  margin-top: clamp(22px, 2vw, 40px);
  padding: clamp(18px, 1.4vw, 28px) clamp(24px, 1.8vw, 34px);
  border-top: 1px solid var(--line-soft);
}
.leadrow .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.leadrow .dot { width: 58px; height: 58px; border-radius: var(--r-sm); object-fit: cover; flex: none; }
.leadrow .who b { font-family: "Pixelify", monospace; font-weight: 600; font-size: var(--t-px); display: block; }
.leadrow .who span { color: var(--ink-dim); font-size: var(--t-small); overflow-wrap: anywhere; }
.leadrow .sp { flex: 1 1 40px; }
a.more {
  display: inline-block;
  color: var(--ink);
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-px);
  line-height: 1.2;
  text-decoration: none;
  text-underline-offset: 6px;
  padding: 12px 24px;
  margin: 0 -24px;
}
a.more:hover { text-decoration: underline; }

/* ---------- panels: the reference's own flat system ---------- */

.panel {
  margin-top: clamp(34px, 3.4vw, 68px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 1.4vw, 28px);
  flex-wrap: wrap;
  min-height: clamp(56px, 3.5vw, 70px);
  padding: 12px clamp(22px, 1.8vw, 32px);
  background: rgba(232, 232, 198, 0.07);
  border-bottom: 1px solid var(--line-soft);
}
.panel-bar h2 { font-family: "Pixelify", monospace; font-weight: 600; font-size: var(--t-px); line-height: 1.2; }
.panel-bar-note { color: var(--ink-dim); font-size: var(--t-small); }
.panel-body { padding: clamp(32px, 2vw, 42px); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.split .panel { margin-top: clamp(28px, 2.6vw, 52px); display: flex; flex-direction: column; }
.split .panel-body { flex: 1; }

/* ---------- the contract shelf ---------- */

.ca-lead { max-width: 74ch; margin-bottom: clamp(20px, 1.6vw, 30px); }
.nb { white-space: nowrap; }
.shelf {
  padding: clamp(22px, 1.9vw, 36px);
  background: var(--ink);
  color: var(--key-dark);
  border-radius: var(--r-md);
}
.ca-label { font-size: var(--t-small); opacity: 0.66; margin-bottom: 0.5em; }
.ca-value {
  font-family: "SplineMono", monospace;
  font-weight: 500;
  font-size: clamp(18px, 1.5vw, 30px);
  line-height: 1.35;
  overflow-wrap: anywhere;
  min-width: 0;
  -webkit-user-select: text;
  user-select: text;
}
.ca-value.empty { opacity: 0.5; }
.ca-keys { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(18px, 1.5vw, 28px); }
.ca-feedback { min-height: 1.6em; margin-top: 12px; font-size: var(--t-small); }

/* ---------- forms ---------- */

.form .field + .field { margin-top: clamp(26px, 2.2vw, 44px); }
.field label { display: block; font-family: "Pixelify", monospace; font-weight: 600; font-size: var(--t-px); line-height: 1.2; }
.hint { color: var(--ink-dim); font-size: var(--t-small); margin-top: 0.55em; max-width: 56ch; }

.numrow { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.numrow input, .form input, .form select {
  min-height: 56px;
  width: 100%;
  max-width: 320px;
  padding: 0 18px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: clamp(18px, 1.3vw, 26px);
}
.form input, .form select { max-width: 100%; margin-top: 14px; }
.numrow input { max-width: 320px; margin-top: 0; }
.unit { font-family: "Pixelify", monospace; font-weight: 600; font-size: var(--t-px); color: var(--ink-dim); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin-top: 18px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: rgba(232, 232, 198, 0.2); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px; margin-top: -10px;
  border-radius: 6px; background: var(--ink); border: 0;
}
.range::-moz-range-track { height: 10px; border-radius: 999px; background: rgba(232, 232, 198, 0.2); }
.range::-moz-range-thumb { width: 30px; height: 30px; border-radius: 6px; background: var(--ink); border: 0; }
.rangelabels { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: var(--t-small); color: var(--ink-dim); }

.choices { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.choice {
  min-height: 58px;
  padding: 14px clamp(24px, 1.5vw, 30px);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: "Pixelify", monospace;
  font-weight: 600;
  font-size: var(--t-px);
  line-height: 1;
  cursor: pointer;
}
.choice.is-on { background: var(--ink); color: var(--key-dark); border-color: var(--ink); }

/* ---------- readouts ---------- */

.bignum-label { font-size: var(--t-small); color: var(--ink-dim); }
.bignum { font-family: "Pixelify", monospace; font-weight: 700; font-size: var(--t-num); line-height: 1.05; margin-top: 0.12em; }
.bignum.waiting { font-size: clamp(28px, 2.4vw, 46px); color: var(--ink-dim); }
.notes { margin-top: clamp(26px, 2.2vw, 44px); display: grid; gap: 14px; }
.notes p { font-size: var(--t-small); color: var(--ink-dim); }
.notes b { color: var(--ink); font-weight: 500; }
.bignum-note { color: var(--ink-dim); font-size: var(--t-small); margin-top: 0.7em; max-width: 52ch; }

.rows { margin-top: clamp(22px, 2vw, 38px); border: 1px solid var(--line-soft); border-radius: var(--r-sm); }
.rows > div:first-child { border-top: 0; }
.rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: clamp(16px, 1.6vw, 30px);
  padding: clamp(15px, 1vw, 20px) clamp(20px, 1.3vw, 26px);
  border-top: 1px solid var(--line-soft);
}
.rows dt { flex: 0 0 auto; max-width: 46%; color: var(--ink-dim); font-size: var(--t-small); }
.rows dd { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.rows dd b { font-weight: 700; color: var(--ink); }

.warn { margin-top: clamp(20px, 1.7vw, 32px); color: var(--ink-dim); font-size: var(--t-small); max-width: 66ch; }
.plain { max-width: 74ch; }
.risk { margin-top: 1.3em; color: var(--ink-dim); font-size: var(--t-small); max-width: 74ch; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); margin-top: clamp(24px, 2vw, 38px); }
.acts-note { color: var(--ink-dim); font-size: var(--t-small); flex: 1 1 260px; min-width: 0; }

/* ---------- how it works ---------- */

.steps { list-style: none; padding: 0; margin-top: clamp(12px, 1.4vw, 26px); display: grid; gap: var(--gap); }
.step {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: var(--gap);
  align-items: stretch;
}
@media (min-width: 1101px) {
  .step:nth-child(even) { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .step:nth-child(even) img { order: 2; }
}
.step img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); aspect-ratio: 3 / 2; }
.step-text {
  padding: clamp(28px, 2.1vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7em;
}
.step-n { font-size: var(--t-small); color: var(--ink-dim); }
.step-text h2 { font-family: "Pixelify", monospace; font-weight: 700; font-size: var(--t-h2); line-height: 1.12; }
.step-text p { max-width: 58ch; }

.bars { display: grid; gap: clamp(16px, 1.4vw, 26px); }
.bar { display: grid; grid-template-columns: minmax(96px, 12%) 1fr; align-items: center; gap: clamp(16px, 1.5vw, 30px); }
.bar::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 2;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink) 0 calc(var(--pct) * 1%), rgba(232, 232, 198, 0.14) calc(var(--pct) * 1%) 100%);
}
.bar-n { font-family: "Pixelify", monospace; font-weight: 700; font-size: clamp(26px, 2.6vw, 50px); line-height: 1; }
.bar-l { font-size: var(--t-small); color: var(--ink-dim); max-width: 70ch; }

/* ---------- the coin page ---------- */

.coinhead { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: var(--gap); align-items: stretch; }
.coinhead .shot { position: relative; min-height: 100%; border-radius: var(--r-md); overflow: hidden; background: var(--card-2); }
.coinhead .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.fact {
  padding: clamp(26px, 2.5vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4em;
  min-height: clamp(120px, 9vw, 180px);
}
.fact p:first-child { font-size: var(--t-small); color: var(--ink-dim); }
.fact .v { font-family: "Pixelify", monospace; font-weight: 700; font-size: clamp(26px, 2.4vw, 46px); line-height: 1.05; }
.fact .sub { font-size: var(--t-small); color: var(--ink-dim); }

.meter { height: 14px; border-radius: 999px; background: rgba(232, 232, 198, 0.16); overflow: hidden; margin-top: 14px; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

.wallets { display: grid; gap: 10px; margin-top: clamp(18px, 1.5vw, 28px); }
.wallets li {
  list-style: none;
  padding: 14px clamp(18px, 1.4vw, 26px);
  background: var(--card-2);
  border-radius: var(--r-sm);
  font-size: var(--t-small);
  overflow-wrap: anywhere;
}

.backrow { margin-top: clamp(26px, 2.4vw, 46px); justify-content: space-between; }

/* ---------- widths ---------- */

/* every track is minmax(0, ...): an auto minimum lets a nowrap badge push the grid wider than the
   viewport, which is what put a sideways scroll on the phone the first time round */
.gallery > *, .grid > *, .split > *, .coinhead > *, .facts > *, .step > * { min-width: 0; }

@media (max-width: 1100px) {
  .split, .gallery, .coinhead, .step { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin.feature { min-height: 0; aspect-ratio: 1.3; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .console { margin-left: 3.4vw; margin-right: 3.4vw; }
  .pill { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 4px; padding: 10px clamp(12px, 3vw, 22px); }
  .pill-item { display: flex; align-items: center; justify-content: center; min-height: 66px; }
  .pill-mark { display: none; }
  .premise { position: static; width: 100%; margin-top: var(--gap); }
  .hero-acts { position: static; margin-top: var(--gap); flex-wrap: wrap; }
  .hero-acts .key { flex: 1 1 200px; }
  .hero-plate { aspect-ratio: 4 / 5; max-height: none; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip-item:last-child { grid-column: 1 / -1; }
  .strip-item { justify-content: flex-start; }
  .bar { grid-template-columns: minmax(0, 1fr); }
  .tabrow { gap: 14px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .coin.small { aspect-ratio: auto; min-height: 310px; }
  /* one column: the empty slots exist to complete a row, and there are no rows here */
  .slot { display: none; }
  .coin.feature { aspect-ratio: auto; min-height: 360px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .ca-keys { gap: 10px; }
  .ca-keys .key { flex: 1 1 100%; justify-content: flex-start; font-size: 18px; padding: 14px 27px; }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip-item:last-child { grid-column: auto; }
  .leadrow .key, .leadrow .more { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
