:root {
  --bg: #02060f;
  --panel: #0d1424;
  --panel2: #111a2e;
  --line: #1c2740;
  --line2: #2a3a5e;
  --fg: #e8eefb;
  --muted: #8595b4;
  --accent: #4d9bff;
  --accent2: #2f6fe0;
  --cyan: #12b8f0;
  --green: #3ddc84;
  --amber: #fcb900;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

.top { border-bottom: 1px solid var(--line); background: rgba(2, 6, 15, .92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo img { display: block; height: 28px; width: auto; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a.on, .nav a:hover { color: var(--fg); text-decoration: none; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0 0; font: 12px var(--mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line2); }
.crumbs a { color: var(--muted); }

.hero { padding: 28px 0 8px; }
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 12px; }
h2 { font-size: 20px; letter-spacing: -.01em; margin: 36px 0 14px; }
.lede { font-size: 18px; color: #c5d0e6; max-width: 760px; margin: 0 0 8px; }
.lede strong { color: var(--fg); }
.updated { font: 12px var(--mono); color: var(--muted); margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 4px; }
.chips a { border: 1px solid var(--line2); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--muted); }
.chips a span { font-family: var(--mono); color: var(--accent); margin-left: 4px; }
.chips a.on, .chips a:hover { color: var(--fg); border-color: var(--accent); text-decoration: none; }

.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .15s; }
.card:hover { border-color: var(--line2); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card-link:hover { text-decoration: none; }
.thumb { aspect-ratio: 16 / 9; background: var(--panel2); display: block; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.card-title { font-weight: 600; line-height: 1.3; }
.card-when { font-size: 13px; color: var(--muted); }
.card-when s { color: var(--muted); }
.badge, .plat { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .04em; border-radius: 4px; padding: 2px 6px; }
.plat { color: var(--muted); border: 1px solid var(--line2); }
.badge.live { background: rgba(61, 220, 132, .14); color: var(--green); }
.badge.soon { background: rgba(18, 184, 240, .14); color: var(--cyan); }
.badge.gone { background: rgba(133, 149, 180, .14); color: var(--muted); }
.empty { color: var(--muted); background: var(--panel); border: 1px dashed var(--line2); border-radius: 12px; padding: 18px; margin: 0; }
.more { margin: 12px 0 0; font-size: 14px; }

.btn { display: inline-block; background: var(--accent2); color: #fff; border-radius: 8px; padding: 10px 18px; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--accent); text-decoration: none; }
.cta { margin: 40px 0 8px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(120deg, #0d1a33, var(--panel)); border: 1px solid var(--line2); border-radius: 14px; padding: 20px 22px; }
.cta h2 { margin: 0 0 4px; font-size: 18px; }
.cta p { margin: 0; color: #c5d0e6; max-width: 640px; font-size: 15px; }

.game-head { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; padding-top: 24px; }
.game-head .key { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); }
.game-head h1 { font-size: clamp(26px, 4vw, 38px); margin-top: 10px; }
.countdown { font: 500 15px var(--mono); color: var(--amber); margin: 6px 0 12px; }
.countdown:empty { display: none; }
.facts dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 28px 0 0; }
.facts dl > div { background: var(--panel); padding: 12px 14px; }
.facts dt { font: 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facts dd { margin: 2px 0 0; }
blockquote.src { margin: 0; padding: 4px 18px; border-left: 3px solid var(--line2); color: #c5d0e6; }
blockquote.src p { white-space: pre-line; }
blockquote.src footer { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.hist, .months { padding-left: 20px; color: #c5d0e6; }
.months span { color: var(--muted); font-size: 13px; margin-left: 6px; }

.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: #c5d0e6; margin: 10px 0 2px; }
.prose { max-width: 760px; color: #c5d0e6; }

.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 22px 0 36px; font-size: 13px; color: var(--muted); }
.foot strong { color: var(--fg); }

/* --- stats strip --- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 14px 16px 12px; border-left: 1px solid var(--line); }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats dt { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats dd { margin: 4px 0 2px; font: 500 32px/1.1 var(--mono); color: var(--fg); }
.stats dd.warn { color: var(--amber); }
.stats dd.money { color: var(--green); }
.stats p { margin: 0; font-size: 12px; color: var(--muted); }

/* --- split: ledger + sidebar --- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.side section { margin-bottom: 26px; }
.side h2 { margin: 36px 0 10px; font-size: 18px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.side-list li a { color: var(--fg); font-weight: 500; }
.side-list li .sub { flex-basis: 100%; }
.side-list li.row { justify-content: space-between; flex-wrap: nowrap; }
.side-list li.row .sub { flex-basis: auto; white-space: nowrap; }
.sub { font-size: 12px; color: var(--muted); }
.src-box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 2px 16px 12px; }
.src-box h2 { margin-top: 14px; }
.src-box li:last-child { border-bottom: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot.ok { background: var(--green); }
.dot.bad { background: #ff5d5d; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- ledger tables --- */
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger thead th { text-align: left; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid var(--line2); }
.ledger td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ledger tbody tr:hover { background: var(--panel); }
.ledger .c-num { font-family: var(--mono); color: var(--muted); width: 36px; padding-left: 4px; }
.ledger .c-game a { color: var(--fg); font-weight: 600; font-size: 15px; }
.ledger .c-game .sub { display: block; margin-top: 3px; }
.ledger .c-type, .ledger .c-store { color: #c5d0e6; white-space: nowrap; }
.ledger .c-worth { font-family: var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.ledger th.c-worth { text-align: right; }
.ledger .c-ends, .ledger .c-from, .ledger .c-until { white-space: nowrap; color: #c5d0e6; }
.ends.urgent { color: #ff6b6b; font-weight: 600; }
.ledger .c-claim { text-align: right; width: 1%; }
.claim { display: inline-block; border: 1px solid var(--line2); border-radius: 8px; padding: 5px 12px; color: var(--fg); font-weight: 600; font-size: 13px; white-space: nowrap; }
.claim:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 760px) {
  .nav { gap: 14px; font-size: 13px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats dd { font-size: 26px; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .ledger td { border: 0; padding: 0; }
  .live-t tr { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "num game claim" "num ends worth"; gap: 4px 10px; }
  .live-t .c-num { grid-area: num; padding-top: 2px; }
  .live-t .c-game { grid-area: game; }
  .live-t .c-type { display: none; }
  .live-t .c-worth { grid-area: worth; }
  .live-t .c-ends { grid-area: ends; font-size: 13px; white-space: normal; }
  .live-t .c-claim { grid-area: claim; width: auto; }
  .arch-t tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "game worth" "store store" "dates dates"; gap: 2px 10px; }
  .arch-t .c-game { grid-area: game; }
  .arch-t .c-worth { grid-area: worth; }
  .arch-t .c-store { grid-area: store; font-size: 12px; color: var(--muted); }
  .arch-t .c-from, .arch-t .c-until { font-size: 12px; color: var(--muted); }
  .arch-t .c-from { grid-area: dates; }
  .arch-t .c-until { grid-area: dates; justify-self: end; }
  .arch-t .c-until::before { content: "→ "; color: var(--line2); }
  .game-head { grid-template-columns: 1fr; }
  .lede { font-size: 16px; }
  .cta .btn { width: 100%; text-align: center; }
}
