@font-face {
  font-family: Archivo;
  src: url("/static/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --line: #d9dce1;
  --ink: #121212;
  --soft: #3d4046;
  --muted: #5c6068;
  --accent: #ffd60a;
  --space: #16122b;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Archivo, "Arial Narrow", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Header: the marquee */
.top { background: var(--accent); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 36px; padding-top: 12px; padding-bottom: 12px; }
.wordmark { font-size: 24px; font-weight: 900; font-stretch: 125%; letter-spacing: 0.03em; }
.wordmark, nav a, .foot a { min-height: 44px; display: inline-flex; align-items: center; }
nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-top: 28px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }
.foot span { flex-grow: 1; }
.foot a { color: var(--muted); }

/* Home hero: the screenshot runs edge to edge and the plate overlaps its lower edge */
.hero { display: block; background: #0b0a1a; }
.hero img { width: 100%; height: clamp(260px, 38vw, 520px); object-fit: cover; object-position: 50% 48%; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 48px; }
.plate { flex: 0 1 460px; min-width: 0; position: relative; margin-top: clamp(-200px, -14vw, -64px); background: var(--ink); color: #ffffff; border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.plate h1 { font-size: clamp(36px, 4vw, 48px); line-height: 1; font-weight: 900; font-stretch: 125%; letter-spacing: -0.01em; }
.plate .lede { color: #d9dce1; }
.plate .small, .plate .small a { color: #c3c7cd; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.plate .eyebrow { color: var(--accent); }
.lede { font-size: 17px; color: var(--soft); text-wrap: pretty; }
.small { font-size: 14px; color: var(--muted); }
.small a, .prose a { text-decoration: underline; }
.facts-row { flex: 1 1 320px; min-width: 0; margin: 0; padding: 24px 0 8px; list-style: none; display: flex; flex-wrap: wrap; gap: 12px 36px; font-weight: 600; }

.btn { height: 54px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 19px; font-weight: 900; font-stretch: 112%; letter-spacing: 0.02em; }
.btn.primary { background: var(--accent); color: var(--ink); }
.btn.primary:hover { background: #ffe14d; text-decoration: none; }

/* Game posters */
.games { padding-top: 48px; padding-bottom: 64px; }
h2 { font-size: 22px; font-weight: 800; font-stretch: 112%; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 28px; margin-top: 20px; }
.poster { display: flex; flex-direction: column; min-width: 0; border-radius: 6px; overflow: hidden; background: var(--space); color: #ffffff; }
.poster:hover { text-decoration: none; }
.poster img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.poster-bar { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.poster-text { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.poster-title { font-size: 22px; line-height: 1.15; font-weight: 800; font-stretch: 112%; }
.poster-sub { font-size: 14px; color: #c9c4e6; }
.pill { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; background: var(--accent); color: var(--ink); border-radius: 4px; font-size: 15px; font-weight: 800; }
.soon { display: flex; align-items: center; justify-content: center; min-height: 160px; border: 2px dashed #9aa0a8; border-radius: 6px; padding: 24px; color: var(--muted); font-weight: 600; text-align: center; }

/* House rules */
.rules { background: var(--ink); color: #ffffff; padding: 56px 0; }
.rules .eyebrow { color: #b9bdc4; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 32px 40px; margin-top: 28px; }
.rules-grid div { display: flex; flex-direction: column; gap: 8px; }
.rules-grid h3 { font-size: 26px; line-height: 1.15; font-weight: 900; font-stretch: 125%; color: var(--accent); }
.rules-grid p { font-size: 15px; color: #d9dce1; }

/* Game page */
.feature { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; padding-top: 32px; padding-bottom: 56px; }
.art { flex: 999 1 560px; min-width: 0; border-radius: 6px; overflow: hidden; background: #0b0a1a; }
.art img { width: 100%; }
.feature-text { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.feature-text h1 { font-size: clamp(36px, 4vw, 48px); line-height: 1; font-weight: 900; font-stretch: 125%; letter-spacing: -0.01em; }
.band { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 40px 56px; }
.two-col > div { display: flex; flex-direction: column; gap: 16px; }
.controls { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; }
.controls dt { font-weight: 700; }
.controls dd { margin: 0; color: var(--soft); }
.facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; color: var(--soft); }
.facts strong { color: var(--ink); }

/* Text pages */
.prose { max-width: 720px; padding-top: 48px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 16px; color: var(--soft); }
.prose h1 { font-size: 40px; line-height: 1.05; font-weight: 900; font-stretch: 125%; color: var(--ink); }

/* Play form, on the home plate and the game page */
.play { display: flex; flex-direction: column; gap: 10px; }
.play-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.play-buttons .btn { flex: 1 1 160px; width: auto; }
.plate .play label { color: #d9dce1; }
.plate .play .error { color: #ff8a80; }
.playing-as { font-size: 17px; }

/* Leaderboard */
.board { padding-top: 48px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 700; }
.tabs a:hover { text-decoration: none; background: var(--surface); }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.boards h3 { margin: 0; }
.leaders { width: 100%; max-width: 720px; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-variant-numeric: tabular-nums; }
.leaders th, .leaders td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
.leaders thead th { border-top: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.leaders td:nth-child(2) { font-weight: 700; overflow-wrap: anywhere; }

/* Header account links */
.top-row nav { flex-grow: 1; }
.signin { min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px; background: var(--ink); color: #ffffff; border-radius: 4px; font-weight: 700; font-size: 15px; }
.signin:hover { text-decoration: none; background: #2b2b2b; }
.me { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.me-dot { width: 30px; height: 30px; border-radius: 50%; background: #a855f7; border: 2px solid var(--ink); }

/* Account pages */
.narrow { max-width: 560px; padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }
.narrow.wide { max-width: 820px; }
.narrow h1 { font-size: 36px; line-height: 1.08; font-weight: 900; font-stretch: 125%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card .eyebrow { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.grow, .row input[type="text"], .row input[type="email"] { flex: 1 1 220px; min-width: 0; }
label { font-size: 14px; font-weight: 600; }
input[type="text"], input[type="email"] { height: 48px; padding: 0 14px; background: #ffffff; border: 1px solid #8a9099; border-radius: 4px; color: var(--ink); font: inherit; width: 100%; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
button.btn { border: 0; font-family: inherit; cursor: pointer; width: 100%; }
.btn.outline { background: var(--surface); color: var(--ink); border: 1px solid #8a9099; font-size: 16px; font-weight: 700; height: 48px; }
.btn.outline:hover { background: #eceef1; text-decoration: none; }
.btn.small-btn { height: 44px; padding: 0 16px; font-size: 15px; font-weight: 700; font-stretch: 100%; width: auto; display: inline-flex; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn.danger-btn { background: var(--surface); color: #a8201a; border: 1px solid #a8201a; }
.error { color: #a8201a; font-weight: 600; }
.notice { color: #1b6b3a; font-weight: 600; }
.warn { background: #fff4c2; border: 1px solid #d4a800; border-radius: 4px; padding: 12px 14px; font-size: 15px; }
.big { font-size: 20px; font-weight: 700; }
.keys { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.keys li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.key-meta { flex-basis: 100%; }
.danger, .divide { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* Profile */
.banner { background: #0b0a1a; }
.banner img { width: 100%; height: clamp(140px, 18vw, 220px); object-fit: cover; object-position: 20% 70%; }
.profile { display: flex; flex-direction: column; gap: 40px; padding-bottom: 72px; }
.who { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 24px; margin-top: -56px; position: relative; }
.avatar { width: 128px; height: 128px; border-radius: 50%; background: #a855f7; border: 6px solid var(--bg); flex-shrink: 0; }
.who-text { flex: 1 1 240px; min-width: 0; padding-bottom: 6px; }
.who-text h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.05; font-weight: 900; font-stretch: 125%; overflow-wrap: anywhere; }
.profile h2 { margin-bottom: 16px; }
.game-row { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.game-row-art { flex: 0 1 300px; min-width: 0; background: var(--space); }
.game-row-art img { width: 100%; height: 100%; min-height: 160px; object-fit: cover; }
.game-row-text { flex: 999 1 380px; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.game-row-text h3 { font-size: 22px; font-weight: 800; font-stretch: 112%; }
.game-row-text p { color: var(--soft); }
