/* The pages beside the game (how to play, about, privacy, terms, leaderboard, profiles): same tokens as index.html */
:root {
  --bg: #0e0f12; --surface: rgba(22, 23, 28, 0.72); --raised: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09); --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ece7dc; --muted: #9b958a; --gold: #d4af6a; --gold-soft: rgba(212, 175, 106, 0.16); --gold-ink: #1a1408;
  --danger: #e0716a; --ok: #7fc28a; --radius: 14px; --radius-sm: 10px;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 16px/1.65 var(--sans); color: var(--text); -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse at 50% -10%, #1c1d22 0%, var(--bg) 55%, #050506 100%) fixed;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #e0bf7f; }

.top { display: flex; align-items: center; gap: 16px; max-width: 1040px; width: 100%; margin: 0 auto; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-soft);
  border: 1px solid rgba(212, 175, 106, .4); color: var(--gold); font-size: 20px; }
.brand-name { font: 600 24px/1 var(--serif); letter-spacing: .02em; }
.top nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: var(--raised); }
.top nav a.play { background: var(--gold); color: var(--gold-ink); font-weight: 600; padding: 8px 16px; margin-left: 6px; }
.top nav a.play:hover { background: #e0bf7f; }

main { flex: 1; max-width: 760px; width: 100%; margin: 0 auto; padding: 24px 16px 56px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; line-height: 1.15; }
h1 { font-size: clamp(38px, 7vw, 54px); margin: 8px 0 6px; }
h2 { font-size: 30px; margin: 40px 0 8px; color: var(--gold); }
h3 { font-size: 22px; margin: 24px 0 4px; }
.eyebrow { margin: 0; color: var(--gold); letter-spacing: .22em; text-transform: uppercase; font-size: 12px; font-weight: 500; }
.lede { color: var(--muted); font-size: 18px; margin: 0 0 8px; }
.muted { color: var(--muted); }
p, li { max-width: 68ch; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
kbd, code { font: 14px var(--mono); background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

.cta { display: inline-block; margin-top: 18px; background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none;
  padding: 12px 22px; border-radius: var(--radius-sm); }
.cta:hover { background: #e0bf7f; color: var(--gold-ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; margin: 16px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 16px 0; }
.grid .card { margin: 0; padding: 14px 18px; }
.grid .card h3 { margin: 0 0 4px; font-size: 20px; color: var(--gold); }
.grid .card p { margin: 0; color: var(--muted); font-size: 15px; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; min-width: 120px; }
.stat b { display: block; font: 600 26px/1.2 var(--sans); }
.stat span { color: var(--muted); font-size: 13px; }

.table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; border-bottom: 1px solid var(--line-strong); padding: 8px 10px; }
.table td { border-bottom: 1px solid var(--line); padding: 10px; }
.table tr:hover td { background: var(--raised); }
.table .num { text-align: right; }
.table .rank { color: var(--muted); width: 3em; }
.table a { color: var(--text); text-decoration: none; font-weight: 500; }
.table a:hover { color: var(--gold); }
.win { color: var(--ok); } .loss { color: var(--danger); } .draw { color: var(--muted); }
.scroll { overflow-x: auto; }

footer { border-top: 1px solid var(--line); }
footer div { max-width: 1040px; margin: 0 auto; padding: 20px 16px 28px; display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
footer span { margin-left: auto; }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; }
  .top nav { width: 100%; justify-content: flex-start; }
  .top nav a.play { margin-left: auto; }
  .table .hide-sm { display: none; }
  footer span { margin-left: 0; width: 100%; }
}

/* ad slots (AdSense): labelled, with room reserved so the page doesn't jump; hidden when no ad is served */
.ad { margin: 32px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.ad ins { display: block; min-height: 100px; }
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
