/* ratnot. One two player arcade cabinet, and the paper it prints.
   Two materials with fixed roles: the MACHINE carries everything live and pressable, the PAPER
   carries everything recorded. Every surface is a generated plate, nine sliced; nothing here is a
   bordered CSS rectangle standing in for an object. */

@font-face { font-family: Tanker; src: url("../fonts/tanker.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: Excon; src: url("../fonts/excon-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: Supreme; src: url("../fonts/supreme-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Supreme; src: url("../fonts/supreme-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: RX; src: url("../fonts/rx100.woff2") format("woff2"); font-display: swap; }

:root {
  --cab-deep: #14180f;
  --cab: #24281b;
  --cab-lit: #2f3a1f;
  --glow: #4e8c1f;
  --acid: #b6fb3e;
  --acid-hi: #d2fd77;
  --acid-low: #8fd520;
  --ink: #2c4a18;
  --ink-2: #456b2c;
  --violet: #9d7fd1;
  --violet-deep: #6f54a0;
  --cream: #efe7d4;
  --cream-2: #e2d7bd;
  --paper-ink: #1d1b16;
  --paper-ink-2: #5d5848;

  --display: clamp(36px, 7.9vw, 142px);
  --wordmark: clamp(38px, 3.9vw, 72px);
  --title: clamp(30px, 2.5vw, 46px);
  --body: 18px;
  --label: 16px;
  --mono: 17px;

  --b1: clamp(14px, 2.1vw, 40px);   /* the nine slice border of the flat plates */
  --bz: clamp(16px, 2.6vw, 48px);   /* the moulded bezel around the glass */
  --gut: 28px;
  --pad: 32px;
  --cab-w: min(1760px, 94vw);
  font-synthesis: none;

  /* the generated plates. Each is a photographed moulding of the cabinet, nine sliced; when one is
     missing the flat fill under it keeps the page readable. */
  --plate-marquee: url("/img/plate-marquee-dark.webp");
  --plate-bezel: url("/img/plate-bezel.webp");
  --plate-deck: url("/img/plate-deck.webp");
  --plate-paper: url("/img/plate-paper.webp");
  --plate-recess: url("/img/plate-recess-plain.webp");
  --plate-bar: url("/img/plate-bar.webp");
  --plate-key: url("/img/key-off.webp");
  --plate-key-on: url("/img/key-on.webp");
  --plate-stick: url("/img/stick.webp");
  --grain: url("/img/grain.png");
  --hall: url("/img/hall.jpg");
}

* { box-sizing: border-box; }
html { background: var(--cab-deep); scrollbar-gutter: stable; }
body {
  margin: 0;
  color: var(--cream);
  background: var(--cab-deep);
  font: 500 var(--body)/1.55 Supreme, system-ui, sans-serif;
  overflow-x: hidden;
}

/* The hall: more of the world behind the machine, blurred and on its own clock. */
.hall-bg {
  position: fixed; inset: -6%; z-index: 0; pointer-events: none;
  background: var(--cab-deep) center/cover no-repeat;
  filter: blur(30px) saturate(0.78) brightness(0.34);
  animation: drift 64s ease-in-out infinite alternate;
}
.hall-bg { background-image: var(--hall); }
.hall-vig { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(118% 82% at 50% 36%, transparent 36%, #0b0e08 100%); }
.grain { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .26;
  background: var(--grain) repeat 0 0 / 240px 240px; mix-blend-mode: overlay; }
@keyframes drift { from { transform: scale(1.02) translate3d(-1.2%, -0.8%, 0); } to { transform: scale(1.08) translate3d(1.2%, 0.8%, 0); } }

/* ---------------------------------------------------------------- the cabinet */
.cab { position: relative; z-index: 2; width: var(--cab-w); margin: 0 auto; padding: 26px 0 92px; }

/* marquee: the lit plastic fascia over the glass */
.marquee {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gut);
  min-height: 112px; padding: calc(var(--b1) + 6px) calc(var(--b1) + 22px);
  border-image: var(--plate-marquee) 70 16 70 16 fill / 34px 16px / 0 stretch;
  background: linear-gradient(180deg, #3b4a24, #222a16);
  box-shadow: 0 18px 40px #05070333, inset 0 1px 0 #ffffff14;
}
.wordmark {
  margin: 0; font: 900 var(--wordmark)/0.9 Excon, system-ui, sans-serif; letter-spacing: -0.015em;
  color: var(--acid); text-shadow: 0 0 26px #b6fb3e55, 0 2px 0 #1a2410;
  padding: 0 10px;
}
.marq-cols { display: flex; gap: 40px; min-width: 0; }
.marq-cols.right { justify-content: flex-end; }
.statcol { min-width: 0; margin: 0; } /* a dl carries the browser's own 1 em margins */
.statcol dt { margin: 0 0 2px; font: 700 var(--label)/1.2 Supreme, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: #d8e8b4a8; }
.statcol dd { margin: 0; font: 400 26px/1.1 Tanker, sans-serif; color: var(--acid-hi); letter-spacing: .01em; }

/* screen: moulded bezel plus the acid glass */
.screen {
  margin-top: 18px; padding: var(--bz);
  border-image: var(--plate-bezel) 62 fill / var(--bz) / 0 stretch;
  background: linear-gradient(180deg, #2b3a1c, #1b2412);
  box-shadow: 0 30px 70px #04060233;
}
.glass {
  position: relative; container-type: inline-size;
  min-height: min(470px, 50vh);
  padding: clamp(32px, 2.6vw, 48px) clamp(38px, 3.3vw, 64px) clamp(42px, 3.4vw, 62px);
  border-radius: 34px / 44px;
  background:
    radial-gradient(130% 110% at 24% 0%, var(--acid-hi) 0%, var(--acid) 44%, var(--acid-low) 100%);
  color: var(--ink);
  box-shadow: 0 0 0 10px #2c4a1826, 0 0 70px 14px #9ff03a55, inset 0 0 90px #ffffff40;
  animation: bloom 7.5s ease-in-out infinite alternate;
}
@keyframes bloom { from { box-shadow: 0 0 0 10px #2c4a1826, 0 0 54px 8px #9ff03a40, inset 0 0 90px #ffffff33; }
                   to   { box-shadow: 0 0 0 10px #2c4a1826, 0 0 86px 18px #9ff03a66, inset 0 0 110px #ffffff4d; } }
.glass::after { /* the sheen the reference's glass carries */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(107deg, #ffffff30 0 32%, #ffffff00 56%);
}

/* the display line: the reference's own scale, 12% of the glass width */
.headrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px 56px; align-items: start; }
.headcol { min-width: 0; }
.readout { display: grid; gap: 22px; margin: 0; justify-items: end; text-align: right; }
.readout dt { font: 700 var(--label)/1.2 Supreme, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #2c4a18f2; }
.readout dd { margin: 4px 0 0; font: 400 clamp(38px, 3.4vw, 66px)/0.9 Tanker, sans-serif; text-transform: uppercase; }
@media (max-width: 900px) {
  .headrow { grid-template-columns: 1fr; }
  .readout { justify-items: start; text-align: left; grid-template-columns: 1fr 1fr; gap: 18px 26px; }
}
.state { margin: 0; font: 400 min(var(--display), 20cqw)/0.82 Tanker, sans-serif; letter-spacing: -0.005em;
  text-transform: uppercase; color: var(--ink); text-wrap: balance; }
.state .dim { color: #2c4a18d9; }
.state-sub { margin: 14px 0 0; max-width: 46ch; font-size: var(--body); color: #2c4a18f2; }

.glass .labels { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0 0 26px; }
.glass .labels div { font: 700 var(--label)/1.2 Supreme, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: #2c4a18f2; }
.glass .labels b { color: var(--ink); font-weight: 700; }

.live { display: inline-flex; align-items: center; gap: 9px; }
.live::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #c8372d;
  box-shadow: 0 0 0 0 #c8372d80; animation: beat 2.2s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 #c8372daa; } 70% { box-shadow: 0 0 0 12px #c8372d00; } 100% { box-shadow: 0 0 0 0 #c8372d00; } }

/* ---------------------------------------------------------------- the deck */
.deck {
  margin-top: 18px; padding: calc(var(--b1) + 10px) calc(var(--b1) + 22px) calc(var(--b1) + 14px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--gut);
  border-image: var(--plate-deck) 12 12 34 12 fill / 12px 12px 30px 12px / 0 stretch;
  background: linear-gradient(180deg, #313d20, #1e2614 72%, #171e0f);
  box-shadow: 0 24px 50px #04060244, inset 0 1px 0 #ffffff12;
}
.keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gut); }
.sticks { display: flex; gap: 46px; padding: 0 18px; }
.stick { width: 86px; height: 110px; background: var(--plate-stick) center/contain no-repeat;
  filter: drop-shadow(0 8px 10px #0006); transform-origin: 50% 88%; animation: sway 9s ease-in-out infinite; }
.stick:nth-child(2) { animation-delay: -4.5s; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.key {
  display: grid; justify-items: center; gap: 12px; padding: 6px 4px 2px;
  background: none; border: 0; cursor: pointer; color: inherit; text-decoration: none;
}
.key .cap {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--plate-key) center/contain no-repeat;
  box-shadow: 0 10px 0 -2px #11170b, 0 14px 18px #0007;
  transition: transform .09s ease, box-shadow .09s ease, filter .2s ease;
}
.key .cap[data-on] { background-image: var(--plate-key-on); filter: drop-shadow(0 0 16px #c6a6ff88); }
.key:hover .cap { transform: translateY(2px) scale(1.03); box-shadow: 0 8px 0 -2px #11170b, 0 12px 16px #0007; }
.key:active .cap, .key[aria-current="page"] .cap { transform: translateY(6px); box-shadow: 0 4px 0 -2px #11170b, 0 6px 10px #0007; }
.key .lab { font: 700 var(--label)/1.15 Supreme, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: #dcecb8; text-align: center; text-wrap: balance; }
.key[aria-current="page"] .lab { color: var(--acid); }
.key:focus-visible { outline: 3px solid var(--acid); outline-offset: 6px; border-radius: 12px; }

/* ---------------------------------------------------------------- the paper */
.paper {
  margin-top: 46px; padding: calc(var(--b1) + 26px) calc(var(--b1) + 28px) calc(var(--b1) + 30px);
  border-image: var(--plate-paper) 60 fill / var(--b1) / 0 stretch;
  background: var(--cream);
  color: var(--paper-ink);
  box-shadow: 0 26px 60px #0006;
}
.paper h2 { margin: 0 0 6px; font: 400 var(--title)/1 Tanker, sans-serif; text-transform: uppercase;
  letter-spacing: .005em; color: var(--paper-ink); }
.paper .lede { margin: 0 0 34px; max-width: 72ch; color: var(--paper-ink-2); }
.paper + .paper { margin-top: 30px; }
.rule { height: 2px; margin: 34px 0; background: #1d1b1622; border: 0; }

/* ---------------------------------------------------------------- the service recess */
.recess {
  margin-top: 46px; padding: var(--b1);
  border-image: var(--plate-recess) 58 45 72 43 fill / var(--b1) / 0 stretch;
  background: linear-gradient(180deg, #2a331c, #191f11);
  box-shadow: 0 24px 54px #04060255;
}
.recess .bar {
  border-image: var(--plate-bar) 26 fill / 26px / 0 stretch;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 28px; background: linear-gradient(180deg, #4d6a26, #37501b);
  font: 700 var(--label)/1 Supreme, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: #e6f6c4;
}
.recess .body { padding: 30px 28px 32px; }

.mint {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 26px; margin-bottom: 26px; border-radius: 14px;
  background: #10150c; box-shadow: inset 0 2px 10px #000a, inset 0 0 0 1px #ffffff0f;
}
.mint code { min-width: 0; overflow-wrap: anywhere; font: 400 var(--mono)/1.45 RX, ui-monospace, monospace;
  color: var(--acid); letter-spacing: .01em; }
.mint .not-yet { color: #c9d9a8aa; font-family: Supreme, sans-serif; }

.links { display: flex; flex-wrap: wrap; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 26px; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 var(--label)/1 Supreme, sans-serif; letter-spacing: .08em; text-transform: uppercase;
  color: #16200c; background: linear-gradient(180deg, var(--acid-hi), var(--acid-low));
  box-shadow: 0 5px 0 #4d7b14, 0 10px 18px #0005; text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #4d7b14, 0 4px 8px #0005; }
.btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.btn.ghost { color: #dff0bd; background: #2a3a18; box-shadow: 0 5px 0 #18230e, 0 10px 18px #0005; }
.btn[aria-disabled="true"] { color: #9fb183; background: #232c16; box-shadow: 0 5px 0 #161d0d; cursor: not-allowed; }
.btn .mark { width: 20px; height: 20px; flex: none; }
.btn .mark img { display: block; width: 100%; height: 100%; }

/* ------------------------------------------------- what is printed on the glass
   The reference's screen is a flat graphic: ink type and ink rules ARE its objects, so the blocks
   here are set with rules and space, never with boxes drawn around them. */
.matches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 36px; }
.match { position: relative; min-width: 0; padding: 0 34px; }
.match::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: #2c4a1833; }
.match:first-child { padding-left: 0; }
.match:first-child::before { display: none; }
.match:last-child { padding-right: 0; }
.vs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 0 0 16px;
  font: 400 clamp(22px, 1.6vw, 30px)/1.05 Tanker, sans-serif; text-transform: uppercase; }
.vs em { font: 700 16px/1 Supreme, sans-serif; letter-spacing: .16em; font-style: normal; color: #2c4a18d9; }
.said p { margin: 0 0 10px; min-height: 1.55em; font-size: var(--body); color: #2c4a18d9; }
.said p.quiet { color: #2c4a18d9; }
.moves { display: flex; gap: 14px; margin: 18px 0 10px; }
.mv { flex: 1 1 0; min-width: 0; padding: 12px 10px; text-align: center;
  font: 400 clamp(20px, 1.5vw, 28px)/1 Tanker, sans-serif; text-transform: uppercase;
  color: var(--acid-hi); background: var(--ink); border-radius: 8px; }
.mv[data-m="STEAL"] { background: #a52f22; }
.mv[data-m="HIDDEN"] { color: #2c4a18e6; background: #2c4a1826; font-family: RX, monospace; font-size: 16px; }
.pay { margin: 0; font: 700 var(--label)/1.4 Supreme, sans-serif; letter-spacing: .06em;
  text-transform: uppercase; color: #2c4a18e6; }
.pay a { color: #2c4a18; }

.matches.waiting { display: block; }
.roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 0; }
.roster article { position: relative; min-width: 0; padding: 14px 32px; }
/* the divider belongs to its own row, so it stops short of the next one instead of drawing one
   long line down the whole grid */
.roster article::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: #2c4a1833; }
.roster article::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #2c4a1833; }
.roster article:nth-child(3n + 1) { padding-left: 0; }
.roster article:nth-child(3n + 1)::before { display: none; }
.roster article:nth-child(3n) { padding-right: 0; }
.roster article:nth-child(-n + 3)::after { display: none; }
.roster h3 { margin: 0; font: 400 clamp(20px, 1.5vw, 28px)/1.05 Tanker, sans-serif; text-transform: uppercase; }
.roster h3 span { color: var(--ink); }
.roster p { margin: 4px 0 0; font: 400 var(--label)/1.35 RX, monospace; color: var(--ink); overflow-wrap: anywhere; }
.matches .table { position: relative; margin: 26px 0 0; padding-top: 24px;
  font-size: var(--body); color: #2c4a18f2; }
.matches .table span { display: block; max-width: 70ch; }
.matches .table::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #2c4a1833; }
@media (max-width: 760px) {
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster article:nth-child(3n + 1) { padding-left: 32px; }
  .roster article:nth-child(3n + 1)::before { display: block; }
  .roster article:nth-child(odd) { padding-left: 0; }
  .roster article:nth-child(odd)::before { display: none; }
  .roster article:nth-child(-n + 2)::after { display: none; }
  .roster article:nth-child(3)::after { display: block; }
}
@media (max-width: 520px) {
  .roster { grid-template-columns: 1fr; row-gap: 22px; }
  .roster article { padding: 0 !important; }
  .roster article:nth-child(n)::before, .roster article:nth-child(n)::after { display: none; }
  .glass .labels { display: flex; flex-direction: column; gap: 8px; }
}

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 46px 0 0; padding: 0; list-style: none; }
.steps li { position: relative; min-width: 0; padding: 0 36px; }
.steps li::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: #2c4a1833; }
.steps li:first-child { padding-left: 0; }
.steps li:first-child::before { display: none; }
.steps li:last-child { padding-right: 0; }
.steps b { display: block; margin-bottom: 10px; font: 400 72px/0.8 Tanker, sans-serif; color: #2c4a18d9; }
.steps span { display: block; font-size: var(--body); color: #2c4a18f2; }

.selector { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 40px; }
.selector label { font: 700 var(--label)/1 Supreme, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: #2c4a18f2; }
.selector select { min-height: 52px; padding: 0 20px; border: 0; border-radius: 10px;
  font: 700 17px/1 Supreme, sans-serif; color: var(--acid-hi); background: var(--ink); cursor: pointer; }

.figurerow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 40px; }
.figurerow div { position: relative; min-width: 0; padding: 0 34px; }
.figurerow div::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; background: #2c4a1833; }
.figurerow div:first-child { padding-left: 0; }
.figurerow div:first-child::before { display: none; }
.figurerow div:last-child { padding-right: 0; }
.figurerow dt { font: 700 var(--label)/1.2 Supreme, sans-serif; letter-spacing: .12em;
  text-transform: uppercase; color: #2c4a18f2; }
.figurerow dd { margin: 6px 0 0; font: 400 40px/1 Tanker, sans-serif; }

.sidepick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 40px; }
.sidepick button { min-height: 72px; padding: 12px 18px; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 var(--label)/1.2 Supreme, sans-serif; color: #2c4a18; background: #2c4a1822; }
.sidepick button[aria-pressed="true"] { color: var(--acid-hi); background: var(--ink); }
.sideact { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.sideact .hint { flex: 1 1 320px; margin: 0; font-size: var(--label); color: #2c4a18e6; }
.glass .btn { color: var(--acid-hi); background: linear-gradient(180deg, #3a6321, #274314);
  box-shadow: 0 5px 0 #1b3010, 0 10px 18px #2c4a1833; }
.glass .btn[aria-disabled="true"] { color: #2c4a18d9; background: #2c4a1833; box-shadow: 0 5px 0 #2c4a1826; }

/* ---------------------------------------------------------------- printed on the paper */
.cellgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; gap: 20px; }
.cellcard { display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 18px; min-width: 0;
  padding: 22px 34px 28px; border-top: 3px solid var(--ink-card, #1d1b16); }
.cellcard .print { display: block; aspect-ratio: 1; background: var(--cream-2); border-radius: 6px; overflow: hidden; }
.cellcard .print img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cellcard h3 { margin: 0; font: 400 34px/1 Tanker, sans-serif; text-transform: uppercase; }
.cellcard h3 a { text-decoration: none; }
.cellcard .lab { margin: 4px 0 0; font: 700 20px/1.2 Supreme, sans-serif; color: var(--ink-card, var(--ink)); }
.cellcard .model { margin: 2px 0 0; font: 400 var(--label)/1.3 RX, monospace; color: var(--paper-ink-2);
  overflow-wrap: anywhere; }
.cellcard .figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; margin: 0; }
.cellcard .figures dt { font: 700 16px/1.2 Supreme, sans-serif; letter-spacing: .1em;
  text-transform: uppercase; color: var(--paper-ink-2); }
.cellcard .figures dd { margin: 2px 0 0; font: 400 28px/1 Tanker, sans-serif; }

.paper.withprint { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.bigprint { display: block; width: 100%; height: auto; max-width: 300px; border-radius: 6px; background: var(--cream-2); }
@media (max-width: 760px) {
  .paper.withprint { grid-template-columns: 1fr; gap: 26px; }
  .bigprint { max-width: 220px; }
}

.tape-rows { display: grid; gap: 0; }
.players { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 20px; margin-top: 30px; }
.players figure { margin: 0; min-width: 0; display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 10px; }
.players img { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--cream-2); }
.players figcaption { margin: 0; font: 500 16px/1.35 Supreme, sans-serif; color: var(--paper-ink-2); }
.players figcaption b { display: block; font: 400 22px/1 Tanker, sans-serif; color: var(--paper-ink); text-transform: uppercase; }
@media (max-width: 900px) { .players { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .players { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { padding: 22px 24px; border-top: 2px solid #1d1b1622; }
.row:first-child { border-top: 0; }
.row .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
.row .head h3 { margin: 0; font: 400 28px/1 Tanker, sans-serif; text-transform: uppercase; }
.row .when { font: 400 var(--label)/1 RX, monospace; color: var(--paper-ink-2); }
.row .lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; margin-top: 14px; }
.row .lines p { margin: 0; }
.row .said-by { font: 700 16px/1.4 Supreme, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-ink-2); }
.row .verdict { font: 700 16px/1 Supreme, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.row .verdict[data-v="LIE"] { color: #a52f22; }
.row .result { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 14px;
  font: 700 var(--label)/1.4 Supreme, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.row details { margin-top: 14px; }
.row summary { cursor: pointer; font: 700 var(--label)/1 Supreme, sans-serif; letter-spacing: .08em;
  text-transform: uppercase; color: var(--paper-ink-2); }
.row pre.raw { overflow-x: auto; margin: 12px 0 0; padding: 18px 20px; border-radius: 8px;
  background: #e2d7bd; font: 400 15px/1.5 RX, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { margin: 0; color: var(--paper-ink-2); }
.more { margin: 28px 0 0; font: 700 var(--label)/1 Supreme, sans-serif; letter-spacing: .08em; text-transform: uppercase; }

.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { padding: 16px 18px; text-align: left; border-bottom: 2px solid #1d1b1622;
  font-size: var(--body); }
table.grid th { font: 700 var(--label)/1.2 Supreme, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-ink-2); white-space: nowrap; }
table.grid td.num, table.grid th.num { text-align: right; font-family: RX, monospace; }
table.matrix td { text-align: center; font-family: RX, monospace; }
table.grid th.group { text-align: center; color: var(--paper-ink); border-bottom-width: 3px; }
table.matrix td.self { color: #1d1b1644; }
.pairfacts dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; }
.pairfacts div { min-width: 0; }
.pairfacts dd, .pairfacts dt { margin-left: 0; }
.pairfacts dt { font: 700 var(--label)/1.2 Supreme, sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-ink-2); }
.pairfacts dd { margin: 6px 0 0; font: 400 30px/1.05 Tanker, sans-serif; text-transform: uppercase; }

pre.plain { overflow-x: auto; margin: 0; padding: 28px 30px; border-radius: 10px; background: var(--cream-2);
  font: 400 16px/1.65 RX, monospace; white-space: pre-wrap; }
blockquote.note { margin: 0; padding: 28px 30px; border-radius: 10px; background: var(--cream-2); }
blockquote.note p { margin: 0; font-size: var(--body); }
.plainlist { margin: 0; padding-left: 1.2em; }
.plainlist li { margin-bottom: 12px; }

/* ---------------------------------------------------------------- bits */
.tag { display: inline-block; padding: 7px 14px; border-radius: 999px;
  font: 700 16px/1 Supreme, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; }
a { color: inherit; }
.paper a { color: #7a3a1e; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }

/* ---------------------------------------------------------------- narrower windows
   The cabinet is drawn again at every width, never squeezed: the deck keeps all six keys, the
   screen keeps the display line, and nothing turns into a list of links. */
@media (max-width: 1300px) {
  .matches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .match { padding: 0 20px; }
  .steps li { padding: 0 20px; }
}
@media (max-width: 1100px) {
  :root { --pad: 26px; --gut: 20px; }
  .matches { grid-template-columns: 1fr; }
  .match { padding: 26px 0 0; }
  .match::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 2px; }
  .match:first-child { padding-top: 0; }
  .match:first-child::before { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .steps li:nth-child(odd) { padding-left: 0; }
  .steps li:nth-child(odd)::before { display: none; }
  .cellgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pairfacts dl { grid-template-columns: 1fr; gap: 22px; }
}
/* the deck is what runs out of room first: six keys in a row need about 1080 px */
@media (max-width: 1180px) {
  .deck { grid-template-columns: 1fr; justify-items: center; gap: 22px; padding: 26px 30px 30px; }
  .keys { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .sticks { order: 3; }
}
@media (max-width: 900px) {
  .marquee { grid-template-columns: 1fr 1fr; justify-items: center; text-align: center; gap: 14px 20px;
    padding: 20px 26px; min-height: 0; }
  .wordmark { grid-column: 1 / -1; order: -1; }
  .marq-cols, .marq-cols.right { justify-content: space-evenly; gap: 24px; width: 100%; }
  .figurerow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; }
  .figurerow div:nth-child(odd) { padding-left: 0; }
  .figurerow div:nth-child(odd)::before { display: none; }
  .sidepick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .glass { padding: 30px 38px 40px; }
  .screen { padding: 26px; }
  .paper { padding: 42px 34px 46px; }
}
@media (max-width: 640px) {
  :root { --body: 17px; --label: 16px; }
  .cab { width: 100%; padding: 14px 14px 64px; }
  .marquee { padding: 20px 22px; min-height: 0; }
  .marq-cols, .marq-cols.right { gap: 24px; }
  .glass { padding: 26px 34px 34px; min-height: 0; border-radius: 22px / 28px; }
  .screen { padding: 16px; }
  .paper { padding: 32px 22px 36px; }
  .recess .body { padding: 24px 22px 26px; }
  .mint { padding: 18px 20px; }
  .cellgrid { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 20px 0 0; }
  .steps li::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 2px; }
  .steps li:first-child { padding-top: 0; }
  .steps li:first-child::before { display: none; }
  .row .lines { grid-template-columns: 1fr; }
  .figurerow { grid-template-columns: 1fr; row-gap: 20px; }
  .figurerow div { padding-left: 0; padding-right: 0; }
  .figurerow div::before { display: none; }
  .sidepick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticks { gap: 26px; }
  .stick { width: 64px; height: 84px; }
  .key .cap { width: 72px; height: 72px; }
  .keys { gap: 14px; }
  .btn { width: 100%; }
  .links { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .key .cap { width: 62px; height: 62px; }
  .key .lab { letter-spacing: .04em; white-space: normal; text-wrap: balance; }
  .sidepick { grid-template-columns: 1fr; }
  .marq-cols, .marq-cols.right { display: grid; grid-template-columns: 1fr; gap: 12px; justify-items: center; align-content: start; }
}

@media (prefers-reduced-motion: reduce) {
  .hall-bg, .glass, .stick, .live::before { animation: none !important; }
  * { transition: none !important; }
}
