:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.75rem, 1.2rem + 2vw, 3rem);
  --text-hero: clamp(4.5rem, 1rem + 13vw, 12rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --bg: #11130f;
  --surface: #181b15;
  --surface-2: #1f231b;
  --line: #2d3227;
  --line-strong: #434a3a;
  --text: #e9e5d8;
  --muted: #a7a596;
  --faint: #7d7c70;
  --accent: #c9a46c;        /* banner gold */
  --accent-ink: #1a1306;
  --ok: #8cc56a;
  --warn: #e8a33d;
  --down: #d9614c;

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius: 4px;
  --wrap: 1200px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(var(--space-5), 5vw, var(--space-12)); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-4); top: var(--space-4); z-index: 100; background: var(--accent); color: var(--accent-ink); padding: var(--space-2) var(--space-4); }

/* ---------- nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(17 19 15 / .82); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.nav.is-scrolled { border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.brand__icon { width: auto; height: 2.5rem; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .5)); }
.brand__mark { font-family: var(--font-display); font-size: 1.75rem; line-height: 1; color: var(--accent); letter-spacing: .02em; }
.brand__word { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .24em; color: var(--muted); font-weight: 700; }
.nav__links { display: flex; align-items: center; gap: var(--space-6); list-style: none; padding: 0; }
.nav__links a:not(.btn) { text-decoration: none; font-size: var(--text-sm); color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--space-1) var(--space-3); font-size: var(--text-sm); cursor: pointer; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--text-sm); text-decoration: none; padding: var(--space-3) var(--space-6); border-radius: var(--radius); border: 1px solid var(--accent); text-transform: uppercase; letter-spacing: .08em; transition: transform .2s var(--ease), background .2s; cursor: pointer; }
.btn:hover { background: #d9b885; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgb(233 229 216 / .06); border-color: var(--text); }
.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-size: var(--text-xs); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero */
.hero { position: relative; min-height: min(92vh, 900px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; z-index: -2; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(17 19 15 / .25) 0%, rgb(17 19 15 / .1) 35%, rgb(17 19 15 / .85) 78%, var(--bg) 100%), linear-gradient(90deg, rgb(17 19 15 / .7) 0%, transparent 60%); }
.hero__content { padding-block: var(--space-32) var(--space-16); width: 100%; }
.kicker { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .18em; color: var(--accent); margin-bottom: var(--space-3); }
.hero__title { font-family: var(--font-display); font-weight: 400; font-size: var(--text-hero); line-height: .82; letter-spacing: .01em; text-transform: uppercase; }
.hero__lede { max-width: 34ch; margin-top: var(--space-5); font-size: var(--text-lg); color: #d8d4c6; line-height: 1.45; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero__stats { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); gap: var(--space-10); margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.hero__stats dt { font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.hero__stats dd { font-size: var(--text-xl); font-weight: 600; line-height: 1.1; margin-top: var(--space-1); }

/* ---------- sections */
.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); position: relative; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-10); }
.section__title { font-family: var(--font-display); font-weight: 400; font-size: calc(var(--text-xl) * 1.15); line-height: 1; text-transform: uppercase; letter-spacing: .03em; color: #ecebe6; -webkit-mask-image: url(assets/grunge.png); mask-image: url(assets/grunge.png); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.section__meta { font-size: var(--text-xs); color: var(--muted); }
.sub { font-size: var(--text-lg); font-weight: 700; line-height: 1.25; }
.fine { font-size: var(--text-xs); color: var(--faint); }

/* ---------- servers */
.alltime { margin-top: var(--space-12); padding: var(--space-6) var(--space-8); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.alltime[hidden] { display: none; }
.alltime__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4); }
.alltime__head .kicker { margin-bottom: 0; }
.alltime__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.alltime__grid dt { font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.alltime__grid dd { font-size: clamp(var(--text-lg), 2.6vw, 2.25rem); font-weight: 600; line-height: 1.1; margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .alltime { padding: var(--space-5); } .alltime__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); } .alltime__grid dd { font-size: var(--text-lg); } }
.games { display: grid; gap: var(--space-12); }
.game__head { display: flex; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; padding-bottom: var(--space-3); border-bottom: 1px solid var(--line-strong); margin-bottom: var(--space-2); }
.game__name { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); text-transform: uppercase; letter-spacing: .03em; }
.game__blurb { color: var(--muted); font-size: var(--text-sm); flex: 1 1 20ch; }
.tag { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--line-strong); color: var(--muted); padding: 0 var(--space-2); border-radius: 2px; }
.tag--live { color: var(--ok); border-color: rgb(140 197 106 / .4); }
.tag--test { color: var(--accent); border-color: rgb(232 163 61 / .4); }

.srv { display: grid; grid-template-columns: 1.6fr .8fr 2fr 9.5rem; gap: var(--space-6); align-items: center; padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.srv__name { display: flex; align-items: center; gap: var(--space-3); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.dot--on { background: var(--ok); box-shadow: 0 0 0 4px rgb(140 197 106 / .15); }
.dot--seed { background: var(--warn); box-shadow: 0 0 0 4px rgb(232 163 61 / .15); }
.dot--off { background: var(--down); }
.srv__detail { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--muted); }
.srv__detail:empty { display: none; }
.srv__region { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.srv__load { display: grid; gap: var(--space-1); }
.srv__count { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--muted); }
.srv__count strong { color: var(--text); font-family: var(--font-mono); font-weight: 600; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 3px; transition: width .8s var(--ease); }
.bar--seed > span { background: var(--warn); }
.srv__act { display: flex; gap: var(--space-2); justify-content: flex-end; }
.srv__act .btn { white-space: nowrap; }
.empty { color: var(--faint); font-size: var(--text-sm); padding-block: var(--space-4); }
.skel { display: inline-block; height: .9em; width: 6ch; border-radius: 2px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; vertical-align: middle; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- seeding / ops */
.section--ops { overflow: hidden; isolation: isolate; border-block: 1px solid var(--line); }
.ops__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .35; }
.section--ops::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--bg) 0%, rgb(17 19 15 / .9) 45%, rgb(17 19 15 / .7) 100%); }
.ops { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(var(--space-10), 6vw, var(--space-20)); align-items: start; }
.ops__lede { margin-top: var(--space-5); color: #d3cfc1; max-width: 48ch; }
.steps { list-style: none; padding: 0; margin: var(--space-8) 0; counter-reset: s; display: grid; gap: var(--space-4); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.ops__events { background: rgb(24 27 21 / .85); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); backdrop-filter: blur(6px); }
.events { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; }
.ev { display: grid; grid-template-columns: 4.25rem 1fr; gap: var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev__date { text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--space-2) 0; line-height: 1.1; align-self: start; }
.ev__mon { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); text-transform: uppercase; }
.ev__day { font-family: var(--font-display); font-size: 1.75rem; }
.ev__title { font-weight: 700; }
.ev__meta { font-size: var(--text-xs); color: var(--muted); font-family: var(--font-mono); margin-top: var(--space-1); }
.ev__desc { font-size: var(--text-sm); color: var(--muted); margin-top: var(--space-2); }
.ev__type { margin-left: var(--space-2); }

/* ---------- about */
.about { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(var(--space-8), 6vw, var(--space-20)); }
.about__body { display: grid; gap: var(--space-5); color: #d3cfc1; max-width: 62ch; }
.ticks { list-style: none; padding: 0; display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.ticks li { padding-left: var(--space-6); position: relative; font-size: var(--text-sm); color: var(--muted); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 2px; background: var(--accent); }

/* ---------- staff */
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--space-8); }
.team { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-6); background: var(--bg); }
.team__game { font-family: var(--font-display); font-size: var(--text-lg); text-transform: uppercase; margin-bottom: var(--space-4); }
.rank { padding-block: var(--space-3); border-top: 1px solid var(--line); }
.rank__title { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: var(--space-2); }
.people { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }
.person { display: inline-flex; align-items: center; gap: var(--space-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px var(--space-3) 2px 2px; font-size: var(--text-sm); }
.person img, .person .av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--line-strong); display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.rank__empty { font-size: var(--text-sm); color: var(--faint); }

/* ---------- apply */
.apply { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-top: var(--space-10); }
.apply__card { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: var(--space-8); display: grid; gap: var(--space-4); align-content: start; background: var(--surface); }
.apply__card p { color: var(--muted); font-size: var(--text-sm); }
.apply__card .btn { justify-self: start; margin-top: var(--space-2); }

/* ---------- footer */
.footer { border-top: 1px solid var(--line); padding-block: var(--space-10); }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8); align-items: center; justify-content: space-between; }

.toast { position: fixed; left: 50%; bottom: var(--space-6); transform: translate(-50%, 200%); background: var(--text); color: var(--bg); padding: var(--space-3) var(--space-5); border-radius: var(--radius); font-size: var(--text-sm); font-weight: 600; transition: transform .35s var(--ease); z-index: 60; }
.toast.is-on { transform: translate(-50%, 0); }

/* ---------- responsive */
@media (max-width: 900px) {
  .ops, .about, .apply { grid-template-columns: 1fr; }
  .srv { grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); }
  .srv__region { grid-column: 2; grid-row: 1; text-align: right; }
  .srv__load { grid-column: 1 / -1; }
  .srv__act { grid-column: 1 / -1; justify-content: flex-start; }
  .srv__act:empty { display: none; }
}
@media (max-width: 760px) {
  .nav__toggle { display: inline-block; }
  .nav__links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--space-2) var(--space-5) var(--space-5); }
  .nav__links.is-open { display: flex; }
  .nav__links li a:not(.btn) { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: var(--space-4); width: 100%; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-5) var(--space-4); }
  .hero__stats dd { font-size: var(--text-lg); }
  .hero__content { padding-block: var(--space-24) var(--space-10); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 600px) { .game__blurb { flex-basis: 100%; } }

/* ---------- hero title effect */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgb(47 110 31 / .55); } 100% { box-shadow: 0 0 0 .5em rgb(47 110 31 / 0); } }
.tfx { position: relative; display: block; width: clamp(260px, 44vw, 560px); user-select: none; filter: drop-shadow(0 10px 22px rgb(0 0 0 / .5)); }
.tfx__fallback { display: block; font-family: var(--font-display); font-size: clamp(5rem, 14vw, 11rem); line-height: .85; color: #ecebe6; }
.tfx__word { position: relative; display: block; aspect-ratio: var(--tfx-ratio, 2.6); }
.tfx__rim, .tfx__inner { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.tfx__rim { background: #e9e6dd; }
.tfx__inner { overflow: hidden; background: #9a978f center 70% / cover no-repeat; }
.tfx__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 72%; filter: grayscale(1) contrast(1.1); }
.tfx__gaming { display: block; width: 100%; height: auto; margin-top: .9rem; overflow: visible; fill: #ecebe6; }
.rule { display: flex; align-items: center; gap: var(--space-4); width: clamp(260px, 44vw, 560px); margin-top: var(--space-2); font-family: var(--font-display); font-size: var(--text-lg); letter-spacing: .32em; color: var(--accent); }
.rule::before, .rule::after { content: ""; flex: 1; height: 2px; background: var(--accent); opacity: .85; }
.rule span { padding-left: .32em; white-space: nowrap; }
.hero { border-bottom: 3px solid var(--accent); }
.nav { border-top: 3px solid var(--accent); }
.tfx__film.is-hidden { opacity: 0; }
.tfx__film { transition: opacity .9s ease; }

.ev__link { display: inline-block; margin-top: .35rem; font-size: .8rem; color: #c9a46c; text-decoration: underline; text-underline-offset: 3px; }
.ev__link:hover { color: #e6c48f; }

.mode { display: grid; grid-template-columns: minmax(12rem, 1.6fr) 8rem 2.8fr; gap: var(--space-4); align-items: baseline; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.mode__name { font-weight: 700; }
.mode__sub { display: block; font-weight: 400; font-size: var(--text-sm); color: var(--muted); margin-top: 2px; }
.mode__blurb { color: var(--muted); font-size: var(--text-sm); }
@media (max-width: 700px) { .mode { grid-template-columns: 1fr auto; } .mode__blurb { grid-column: 1 / -1; } }

/* live seeding calls from the bot */
.tag--soon { color: var(--muted); border-color: var(--line-strong); }
.seedlive { margin-bottom: var(--space-6); }
.seedlive .sub { display: flex; align-items: center; gap: var(--space-2); }
.seedlive__dot { animation: seedpulse 1.6s ease-in-out infinite; }
@keyframes seedpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .seedlive__dot { animation: none; } }
.seedcalls, .seedhist { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: var(--space-3); }
.seedcall { border: 1px solid rgb(232 163 61 / .35); border-radius: var(--radius); padding: var(--space-3) var(--space-4); background: rgb(232 163 61 / .05); display: grid; gap: var(--space-2); }
.seedcall__top { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; }
.seedcall__name { font-weight: 700; }
.seedcall__count { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--warn); white-space: nowrap; }
.seedcall__acts { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.seedcall__acts .ev__link { margin-top: 0; }
.seedcall__copy { font: inherit; font-size: .8rem; color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .2rem .6rem; cursor: pointer; }
.seedcall__copy:hover { color: var(--text, #fff); }
.seedrecent { margin-top: var(--space-6); }
.seedhist { gap: 0; }
.seedhist__row { display: grid; grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); padding-block: var(--space-2); border-top: 1px solid var(--line); font-size: var(--text-sm); }
.seedhist__row:first-child { border-top: 0; }
.seedhist__when { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--faint); }
.apply__status { font-weight: 600; color: var(--accent); margin-top: var(--space-2); }
.apply__btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.apply__join { margin-top: var(--space-2); }
.apply__join a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Management spans the full row above the game teams */
.team--mgmt { grid-column: 1 / -1; border-color: rgb(201 164 108 / .45); background: linear-gradient(180deg, rgb(201 164 108 / .06), transparent 70%), var(--bg); }
.team--mgmt .team__game { color: var(--accent); }
.team__note { font-size: var(--text-sm); color: var(--muted); margin: calc(var(--space-2) * -1) 0 var(--space-4); }
@media (min-width: 760px) { .teams { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Discord members milestone stat */
.mstat { position: relative; }
.mstat__row { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.mstat dd { position: relative; }
.mstat__num { display: inline-block; }
.mstat__badge { font-family: var(--font-mono); font-size: .62rem; font-weight: 500; letter-spacing: .08em; line-height: 1; padding: .25em .5em; border: 1px solid currentColor; border-radius: 2px; color: #b98b55; }
.mstat__badge[hidden] { display: none; }
.mstat__bar { display: block; width: 100%; min-width: 7.5rem; height: 3px; margin-top: var(--space-2); background: rgb(255 255 255 / .1); border-radius: 2px; overflow: hidden; }
.mstat__bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1.4s var(--ease); }
.mstat__next { display: block; margin-top: var(--space-1); font-size: .7rem; font-weight: 400; color: var(--muted); letter-spacing: .04em; font-family: var(--font-mono); }

/* tiers: 500+, 1,000+, 1,500+, 2,000+ */
.mstat[data-tier="1"] .mstat__num { color: #e2c9a0; }
.mstat[data-tier="2"] .mstat__badge, .mstat[data-tier="3"] .mstat__badge, .mstat[data-tier="4"] .mstat__badge { color: var(--accent); }
.mstat[data-tier="2"] .mstat__num, .mstat[data-tier="3"] .mstat__num, .mstat[data-tier="4"] .mstat__num {
  background: linear-gradient(100deg, #c9a46c 0%, #c9a46c 40%, #fff3d6 50%, #c9a46c 60%, #c9a46c 100%);
  background-size: 300% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: mshine 6s var(--ease) infinite;
}
.mstat[data-tier="3"] .mstat__num, .mstat[data-tier="4"] .mstat__num { filter: drop-shadow(0 0 10px rgb(201 164 108 / .35)); }
.mstat[data-tier="4"] .mstat__bar i { background: linear-gradient(90deg, #8a6a3a, #fff3d6, #c9a46c); }
.mstat[data-tier="4"] .mstat__badge { box-shadow: 0 0 0 1px rgb(201 164 108 / .25), 0 0 12px rgb(201 164 108 / .35); }
@keyframes mshine { 0%, 55% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }

/* the week after a new milestone */
.mstat.is-new .mstat__badge { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); animation: mbadge 2.4s ease-in-out infinite; }
.mstat.is-new { cursor: pointer; }
@keyframes mbadge { 0%, 100% { box-shadow: 0 0 0 0 rgb(201 164 108 / .5); } 50% { box-shadow: 0 0 0 6px rgb(201 164 108 / 0); } }
.mstat.is-pop .mstat__num { animation: mpop .7s var(--ease), mshine 6s var(--ease) infinite; }
@keyframes mpop { 0% { transform: scale(1); } 35% { transform: scale(1.18); } 100% { transform: scale(1); } }
.mstat__burst { position: absolute; left: 2.2em; top: .6em; width: 0; height: 0; pointer-events: none; }
.mstat__burst i { position: absolute; width: 5px; height: 5px; border-radius: 1px; background: var(--accent); opacity: 0; transform: translate(0, 0) rotate(0); animation: mspark 1.1s cubic-bezier(.15,.7,.3,1) var(--d) forwards; }
.mstat__burst i:nth-child(3n) { background: #fff3d6; width: 3px; height: 3px; }
.mstat__burst i:nth-child(4n) { width: 8px; height: 2px; }
@keyframes mspark { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(200deg); } }

/* ---------- leaderboard page */
.lbpage .nav { background: rgb(17 19 15 / .92); }
.lb__top { padding-top: calc(var(--space-32) + var(--space-4)); min-height: 80vh; }
.lb__title { font-size: clamp(2.6rem, 6vw, 4.5rem); }
.lb__range { margin-top: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.lb .section__head { margin-bottom: var(--space-8); }
.lb__controls { display: flex; justify-content: space-between; align-items: end; gap: var(--space-4) var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-8); }
.lb__tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lb__tab { font: 500 var(--text-xs)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .7em 1em; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.lb__tab:hover { color: var(--text); border-color: var(--text); }
.lb__tab.is-on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.lb__pickers { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.lb__pick { display: grid; gap: var(--space-1); }
.lb__pick span { font: var(--text-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.lb__pick select { appearance: none; -webkit-appearance: none; min-width: 12rem; max-width: 100%; font: 500 var(--text-sm)/1.2 inherit; font-family: inherit; color: var(--text); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a7a596'/%3E%3C/svg%3E") no-repeat right .9em center; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: .7em 2.4em .7em .9em; cursor: pointer; }
.lb__pick select:focus-visible, .lb__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lb__podium { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: end; margin: 0 0 var(--space-8); padding: 0; }
.lb__podium[hidden], .lb__winners[hidden] { display: none; }
.lb__p { position: relative; display: grid; gap: var(--space-1); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line-strong)); border-radius: var(--radius); overflow: hidden; }
.lb__p.p1 { --c: #c9a46c; padding-block: var(--space-10) var(--space-8); background: linear-gradient(180deg, rgb(201 164 108 / .12), var(--surface) 70%); }
.lb__p.p2 { --c: #b9bdb6; }
.lb__p.p3 { --c: #a86f43; }
.lb__prank { position: absolute; right: var(--space-5); top: var(--space-3); font-size: 2.6rem; font-weight: 600; line-height: 1; color: var(--c); opacity: .35; }
.lb__pname { font-weight: 700; font-size: var(--text-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 2.5rem; }
.lb__pval { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 600; line-height: 1.05; color: var(--c); margin-top: var(--space-2); }
.lb__p.p1 .lb__pval { font-size: clamp(2rem, 3.8vw, 3rem); }
.lb__plabel { font: var(--text-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.lb__psub { font-size: .72rem; color: var(--faint); margin-top: var(--space-3); }

.lb__winners { margin-bottom: var(--space-8); padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lb__wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.lb__wcat h3 { font-size: var(--text-sm); font-weight: 700; margin-bottom: var(--space-2); }
.lb__wcat ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.lb__wcat li { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); color: var(--muted); }
.lb__wcat li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__wcat li.m1 span { color: #e2c9a0; }
.lb__wcat li b { font-weight: 600; color: var(--text); }

.lb__tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: rgb(24 27 21 / .6); }
.lb__table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.lb__table th { font: 500 var(--text-xs)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); text-align: left; padding: var(--space-4); border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.lb__table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.lb__table tbody tr:last-child td { border-bottom: 0; }
.lb__table tbody tr:hover td { background: rgb(233 229 216 / .03); }
.lb__table .num { text-align: right; font-variant-numeric: tabular-nums; }
.lb__table .r { width: 3.5rem; color: var(--faint); text-align: right; padding-right: var(--space-2); }
.lb__table td.nm { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.lb__table .is-sorted { color: var(--text); }
.lb__table th.is-sorted { color: var(--accent); }
.lb__table td.is-sorted { font-weight: 600; }
.lb__table tr.m1 .r, .lb__table tr.m1 .nm { color: #d8b375; }
.lb__table tr.m2 .r, .lb__table tr.m2 .nm { color: #c3c8bf; }
.lb__table tr.m3 .r, .lb__table tr.m3 .nm { color: #c99068; }
.lb__empty { text-align: center; color: var(--muted); padding: var(--space-12) var(--space-4) !important; white-space: normal !important; }
.is-loading .lb__tablewrap, .is-loading .lb__podium { opacity: .55; transition: opacity .2s; }

.lb__pager { display: flex; justify-content: center; align-items: center; gap: var(--space-5); margin-top: var(--space-8); }
.lb__pager button:disabled { opacity: .35; pointer-events: none; }
.lb__pager .mono { font-size: var(--text-xs); color: var(--muted); }

@media (max-width: 900px) { .lb__wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .lb__top { padding-top: calc(var(--space-24, 6rem) + var(--space-2)); }
  .lb__podium { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .lb__podium .p1 { order: -1; grid-column: 1 / -1; }
  .lb__p, .lb__p.p1 { padding: var(--space-4); }
  .lb__p.p1 { padding-block: var(--space-6); }
  .lb__pname { font-size: var(--text-base, 1rem); }
  .lb__prank { font-size: 1.8rem; right: var(--space-3); }
  .lb__p:not(.p1) .lb__psub { display: none; }
  .lb__pickers, .lb__pick, .lb__pick select { width: 100%; }
  .lb__pick select { min-width: 0; }
  .lb__table .hide-s { display: none; }
  .lb__table td, .lb__table th { padding-inline: var(--space-2); }
  .lb__table td.nm { max-width: 9.5rem; }
}
