:root {
  color-scheme: dark;
  --ink: #ece8dc;
  --muted: #a7aaa1;
  --paper: #191d1a;
  --panel: #20251f;
  --line: #3b4439;
  --gold: #d2a947;
  --rust: #b95f45;
  --green: #91ad72;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #101310;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 5px; }
.site-header { border-bottom: 1px solid var(--line); background: #151915; }
.topbar, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.topbar { display: flex; justify-content: space-between; gap: 28px; align-items: center; min-height: 78px; font-size: .78rem; letter-spacing: .12em; }
.topbar__actions { display: flex; gap: 24px; align-items: center; }
.brand { color: var(--gold); font-weight: 800; }
.eyebrow { margin: 0 0 14px; color: var(--gold); font-size: .72rem; font-weight: 850; letter-spacing: .22em; }
h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.server-strip { display: inline-flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); background: #101310; font-size: .72rem; letter-spacing: .04em; }
.server-strip span:last-child { color: var(--muted); }
.pulse { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(167,170,161,.1); }
.server-strip--online .pulse { background: var(--green); box-shadow: 0 0 0 5px rgba(145,173,114,.12); }
.server-strip--offline .pulse { background: var(--rust); box-shadow: 0 0 0 5px rgba(185,95,69,.12); }
main { padding: 58px 0 120px; }
.season { display: flex; justify-content: space-between; gap: 30px; align-items: end; padding-bottom: 55px; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.03em; }
.season__counts { display: flex; gap: 24px; color: var(--muted); }
.season__counts strong { display: block; color: var(--ink); font: 500 2.2rem Georgia, serif; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 50px; align-items: end; margin: 70px 0 30px; }
.section-heading > p { margin: 0; color: var(--muted); line-height: 1.6; }
.leaderboard { border-top: 1px solid var(--line); }
.survivor-row { display: grid; grid-template-columns: 62px 82px minmax(160px, 1fr) repeat(4, minmax(85px, 120px)); align-items: center; gap: 16px; padding: 20px 12px; border-bottom: 1px solid var(--line); transition: background .2s, transform .2s; }
.survivor-row:hover { background: #181d18; transform: translateX(4px); }
.rank { color: var(--gold); font: italic 2rem Georgia, serif; text-align: center; }
.portrait { width: 68px; height: 80px; object-fit: cover; border: 1px solid #596251; background: #151815; filter: saturate(.8); }
.identity strong { display: block; font: 500 1.35rem Georgia, serif; }
.identity span, .metric span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; }
.identity .mobile-survival { display: none; }
.metric strong { display: block; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.score strong { color: var(--gold); font-size: 1.25rem; }
.fallen-section { margin-top: 100px; }
.memorials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.memorial { position: relative; min-height: 320px; padding: 24px; overflow: hidden; border: 1px solid #4e4639; background: linear-gradient(145deg, #211f1a, #171916); }
.memorial::after { content: "IN MEMORIAM"; position: absolute; right: -18px; top: 26px; transform: rotate(45deg); color: rgba(210,169,71,.13); font: 700 1.6rem Georgia, serif; }
.memorial__top { display: flex; gap: 18px; align-items: start; }
.memorial h3 { margin: 8px 0 2px; font: 500 1.5rem Georgia, serif; }
.steam-name { margin: 0 0 8px; color: #c5bfae; font-size: .72rem; letter-spacing: .08em; }
.memorial .dates { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.obituary { margin: 28px 0; color: #d4cbbc; font: italic 1.15rem/1.55 Georgia, serif; }
.final-score { position: absolute; bottom: 22px; left: 24px; right: 24px; display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid #4e4639; color: var(--muted); font-size: .8rem; }
.final-score strong { color: var(--gold); }
.empty { padding: 50px 10px; color: var(--muted); font-style: italic; }
footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

@media (max-width: 850px) {
  .topbar { align-items: flex-start; flex-direction: column; padding-block: 18px; }
  .topbar__actions { width: 100%; justify-content: space-between; }
  .season, .section-heading { grid-template-columns: 1fr; display: grid; align-items: start; }
  .survivor-row { grid-template-columns: 46px 64px 1fr 90px; gap: 10px; }
  .survivor-row .metric:not(.score) { display: none; }
  .identity .mobile-survival { display: block; margin-top: 5px; color: #c9c6b9; font-size: .68rem; }
  .portrait { width: 56px; height: 68px; }
  .memorials { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar a { display: none; }
  .topbar, main, footer { width: min(100% - 26px, 1180px); }
  .server-strip { align-items: start; flex-wrap: wrap; }
  .server-strip span:last-child { width: 100%; margin-left: 18px; }
  .season__counts { width: 100%; justify-content: space-between; }
  .survivor-row { padding-inline: 0; grid-template-columns: 38px 52px 1fr 72px; }
  .portrait { width: 46px; height: 58px; }
  .identity strong { font-size: 1.05rem; }
  .score { text-align: right; }
  footer { flex-direction: column; }
}
