@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url("fonts/FiraSans-Regular-Subset.ttf") format("truetype"); }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url("fonts/FiraSans-Medium-Subset.ttf") format("truetype"); }
@font-face { font-family: "Fira Sans"; font-weight: 600; font-display: swap; src: url("fonts/FiraSans-SemiBold-Subset.ttf") format("truetype"); }
@font-face { font-family: "Fira Code"; font-weight: 400; font-display: swap; src: url("fonts/FiraCode-Subset.ttf") format("truetype"); }

:root {
  --chrome: #1B1C1E;
  --panel: #242528;
  --panel-2: #2A2B2E;
  --raised: #33353A;
  --field: #17181A;
  --seam: #0F1011;
  --line: #34363B;
  --text: #E2E3E5;
  --text-2: #A7AAB0;
  --text-3: #72757B;
  --primary: #4A4D54;
  --primary-line: #62656D;
  --primary-hover: #55585F;
  --play: #62BF6A;
}
@media (prefers-color-scheme: light) {
  :root {
    --chrome: #F7F7F8;
    --panel: #ECECEE;
    --panel-2: #E4E4E7;
    --raised: #FFFFFF;
    --field: #FFFFFF;
    --seam: #C5C7CC;
    --line: #D3D5D9;
    --text: #17181A;
    --text-2: #4B4E54;
    --text-3: #6B6E75;
    --primary: #2A2B2E;
    --primary-line: #17181A;
    --primary-hover: #3A3C41;
  }
  .btn-primary { color: #F7F7F8; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--chrome);
  color: var(--text);
  font: 400 15px/1.55 "Fira Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--text); }
code, .num { font-family: "Fira Code", ui-monospace, monospace; font-size: 13px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.bar { position: sticky; top: 0; z-index: 2; background: var(--chrome); border-bottom: 1px solid var(--seam); }
.bar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 16px; }
.lockup img { display: block; width: 40px; height: auto; }
.links { display: flex; align-items: center; gap: 24px; }
.links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px; }
.links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px;
  background: var(--raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 3px;
  font: 500 14px "Fira Sans", system-ui, sans-serif; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); }
.btn-primary { background: var(--primary); border-color: var(--primary-line); color: #E2E3E5; height: 44px; padding: 0 24px; font-size: 15px; }
.btn-primary:hover { background: var(--primary-hover); }
.links a.btn-sm { height: 32px; padding: 0 12px; color: var(--text); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.hero h1 { font-size: 48px; line-height: 1.1; max-width: 13em; }
.lede { margin-top: 20px; max-width: 34em; color: var(--text-2); font-size: 18px; }
.cta { display: flex; align-items: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.cta-meta { color: var(--text-3); font-size: 13px; }
.hero-mark { display: flex; justify-content: center; }
.hero-mark img { width: 100%; max-width: 420px; height: auto; display: block; }

/* Bands */
.band { background: var(--panel); border-top: 1px solid var(--seam); border-bottom: 1px solid var(--seam); padding: 56px 0; }
h2 { font-size: 24px; }
h3 { font-size: 15px; margin-bottom: 12px; }
.head-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.count { color: var(--text-3); font-size: 13px; }

/* Game list */
.games { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.games li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.games .rank { color: var(--text-3); }
.games .title { font-weight: 600; font-size: 16px; }
.games .by { color: var(--text-2); font-size: 13px; margin-left: 8px; }
.games .desc { grid-column: 2; color: var(--text-2); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.games .stats { display: flex; gap: 16px; color: var(--text-2); font-size: 13px; }
.games .stats span { white-space: nowrap; }
.empty { color: var(--text-2); }

/* Play / Make */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
section.split { padding-top: 72px; padding-bottom: 72px; }
.split.tight { gap: 48px; margin-top: 32px; }
.facts { margin: 20px 0 0; display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px 20px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--text-2); }

/* Safety */
.note-text { margin-top: 12px; color: var(--text-2); max-width: 22em; }
.rules { list-style: none; margin: 0; padding: 0; }
.rules li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.rules li:first-child { padding-top: 0; }
.rules li:last-child { border-bottom: 0; }
.rules strong { color: var(--text); font-weight: 600; }

/* Download */
.download { padding-top: 72px; padding-bottom: 96px; }
.dl { margin-top: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; }
.dl-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dl-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 16px; margin: 0; padding: 20px 24px; }
.kv dt { color: var(--text-2); font-size: 14px; }
.kv dd { margin: 0; }
.hash { overflow-wrap: anywhere; color: var(--text-2); }
.plain { margin: 0; padding-left: 20px; color: var(--text-2); }
.plain li { padding: 2px 0; }
.hint { margin-top: 12px; color: var(--text-3); font-size: 13px; }
.hint code { color: var(--text-2); }

/* Footer */
.foot { border-top: 1px solid var(--seam); background: var(--chrome); }
.foot-in { display: flex; justify-content: space-between; gap: 16px; height: 48px; align-items: center; color: var(--text-3); font-size: 13px; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .links a:not(.btn) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .hero h1 { font-size: 34px; }
  .lede { font-size: 16px; }
  .hero-mark { order: -1; justify-content: flex-start; }
  .hero-mark img { max-width: 160px; }
  .split, .split.tight { grid-template-columns: 1fr; gap: 40px; }
  section.split { padding-top: 48px; padding-bottom: 48px; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 12px; }
  .games li { grid-template-columns: 24px minmax(0, 1fr); }
  .games .stats { grid-column: 2; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
