*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0a1018;
  --bg-soft: rgba(11, 18, 28, 0.78);
  --panel: rgba(12, 20, 31, 0.84);
  --panel-strong: rgba(18, 28, 41, 0.94);
  --panel-line: rgba(143, 186, 223, 0.18);
  --text: #e7f1fb;
  --muted: #8fa7bc;
  --steel: #9cc8ec;
  --cyan: #6de8ff;
  --scrollbar-track: rgba(7, 12, 19, 0.94);
  --scrollbar-thumb: #58dfff;
  --scrollbar-thumb-hover: #92efff;
  --orange: #ff8a3d;
  --orange-soft: rgba(255, 138, 61, 0.18);
  --danger: #ff7262;
  --success: #8de98e;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.stats-table-wrap::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.stats-table-wrap::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.stats-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--scrollbar-thumb), #2d8ec9);
  border: 3px solid var(--scrollbar-track);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(181, 235, 255, 0.16),
    0 0 18px rgba(88, 223, 255, 0.2);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.stats-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover), var(--scrollbar-thumb));
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(71, 101, 137, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 120, 54, 0.16), transparent 24%),
    linear-gradient(180deg, #05080d 0%, #09111b 28%, #0d1824 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(109, 232, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(109, 232, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

code {
  font-family: "Consolas", "Courier New", monospace;
}

.page-shell {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 16px 40px;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 20%, #ffffff 0 1px, transparent 1px),
    radial-gradient(circle at 80% 35%, #ffffff 0 1px, transparent 1px),
    radial-gradient(circle at 60% 80%, #ffffff 0 1px, transparent 1px);
  background-size: 180px 180px;
}

.masthead-band {
  position: relative;
  margin: -10px -16px 18px;
  padding: 8px 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(8, 16, 24, 0.92), rgba(8, 14, 22, 0.98) 58%, rgba(35, 23, 17, 0.88));
  border-bottom: 1px solid rgba(124, 161, 198, 0.08);
}

.masthead-band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 1px;
  background: linear-gradient(90deg, rgba(177, 217, 255, 0.22), rgba(255, 172, 109, 0.16));
}

.masthead-band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 48%, rgba(109, 232, 255, 0.08), transparent 20%),
    radial-gradient(circle at 91% 48%, rgba(255, 138, 61, 0.12), transparent 18%);
}

.topbar {
  position: sticky;
  top: 8px;
  z-index: 30;
  overflow: hidden;
  display: grid;
  grid-template-columns: clamp(190px, 13vw, 238px) minmax(0, 1fr) max-content minmax(320px, 26vw);
  align-items: center;
  gap: 18px;
  margin-bottom: 0;
  width: 100%;
  padding: 18px 28px;
  min-height: 148px;
  border: 1px solid rgba(118, 148, 181, 0.16);
  border-radius: 38px;
  background:
    linear-gradient(90deg, rgba(19, 28, 39, 0.92), rgba(10, 15, 23, 0.98) 34%, rgba(10, 14, 22, 0.98) 70%, rgba(37, 25, 18, 0.9)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  backdrop-filter: blur(18px);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 28px;
  border: 1px solid rgba(149, 205, 255, 0.08);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 50%, rgba(109, 232, 255, 0.08), transparent 18%),
    radial-gradient(circle at 92% 50%, rgba(255, 138, 61, 0.12), transparent 16%);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.brand {
  flex: 0 0 auto;
  width: clamp(176px, 14vw, 250px);
  filter: drop-shadow(0 10px 24px rgba(7, 12, 18, 0.36));
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 1.8vw, 30px);
  justify-self: center;
  flex-wrap: nowrap;
}

.topnav a,
.discord-link {
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.topnav a:hover,
.discord-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.topnav a[aria-current="page"] {
  color: var(--text);
}

.frame-shell-main {
  display: block;
}

.content-frame {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: transparent;
}

.embedded-page {
  min-height: auto;
  background: transparent;
  overflow-x: hidden;
}

.embedded-page::before {
  display: none;
}

.embedded-page .page-shell {
  padding: 0 0 12px;
}

.embedded-page .page-noise,
.embedded-page .masthead-band,
.embedded-page .site-footer {
  display: none;
}

.embedded-page main {
  gap: 24px;
}

.discord-link {
  justify-self: start;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 61, 0.3);
  background:
    linear-gradient(180deg, rgba(78, 50, 32, 0.9), rgba(39, 25, 18, 0.72)),
    linear-gradient(180deg, rgba(255, 138, 61, 0.14), rgba(255, 138, 61, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 198, 147, 0.1);
}

.topbar-radio {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: stretch;
  justify-self: stretch;
  overflow: hidden;
  min-width: 0;
  padding: 8px;
  border-radius: 26px;
  border: 1px solid rgba(149, 205, 255, 0.08);
  background: rgba(6, 12, 20, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.topbar-radio iframe {
  width: 100%;
  height: 150px;
  min-height: 150px;
  border: 0;
  border-radius: 20px;
  background: rgba(5, 10, 16, 0.74);
}

main {
  display: grid;
  gap: 38px;
}

.section-frame,
.resource-card,
.mode-card,
.archive-card,
.story-card,
.config-card,
.timeline-card,
.data-card,
.community-card {
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
    linear-gradient(135deg, rgba(255, 138, 61, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(16, 28, 43, 0.9), rgba(8, 14, 22, 0.94));
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 24px;
  padding: clamp(28px, 5vw, 52px);
  min-height: 520px;
  align-items: end;
  background:
    linear-gradient(180deg, rgba(4, 10, 16, 0.12), rgba(4, 10, 16, 0.9)),
    linear-gradient(90deg, rgba(7, 12, 18, 0.8), rgba(7, 12, 18, 0.2)),
    url("assets/warzone2100-backdrop4.webp") center center / cover,
    url("assets/warzone2100-backdrop0.webp") center top / cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(109, 232, 255, 0.28), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(255, 138, 61, 0.34), transparent 22%),
    linear-gradient(90deg, rgba(6, 10, 14, 0.22), transparent 45%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: calc(var(--radius-lg) - 8px);
  border: 1px solid rgba(173, 222, 255, 0.14);
  pointer-events: none;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.eyebrow,
.panel-kicker,
.resource-label,
.mode-tag,
.timeline-date,
.config-label {
  color: var(--cyan);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.hero-panel h2,
.story-card h3,
.config-card h3,
.timeline-card h3,
.data-card h3 {
  margin: 0;
  font-family: "Oxanium", sans-serif;
  line-height: 0.96;
}

.hero h1 {
  max-width: 12ch;
  margin-top: 12px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-lead,
.section-head p,
.feature-list,
.story-card p,
.config-card p,
.timeline-card p,
.data-card li,
.archive-card p,
.community-card p,
.resource-card p,
.mode-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-lead {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #091018;
  background: linear-gradient(180deg, #a2f5ff, #55d9f2);
}

.button-secondary {
  border-color: rgba(149, 205, 255, 0.28);
  background: rgba(14, 23, 35, 0.72);
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(157, 195, 229, 0.16);
  background: rgba(6, 12, 20, 0.56);
  backdrop-filter: blur(8px);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.stat-value {
  display: block;
  margin-top: 10px;
  font-family: "Oxanium", sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.panel-cutout {
  align-self: stretch;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%),
    linear-gradient(180deg, rgba(16, 24, 36, 0.86), rgba(10, 16, 24, 0.96));
}

.hero-panel h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 3vw, 2.75rem);
}

.feature-list {
  margin: 18px 0 0;
  padding-left: 1.1rem;
}

.feature-list li + li {
  margin-top: 10px;
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--text);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 18px rgba(255, 138, 61, 0.45);
}

.section-grid {
  display: grid;
  gap: 24px;
}

.landing-stats {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.4vw, 30px);
  background:
    linear-gradient(90deg, rgba(42, 33, 30, 0.76), rgba(11, 18, 28, 0.92) 18%, rgba(12, 22, 35, 0.98) 68%, rgba(11, 18, 29, 0.95)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.landing-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 11% 14%, rgba(255, 160, 79, 0.13), transparent 26%),
    radial-gradient(circle at 78% 8%, rgba(84, 143, 215, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 22%);
  pointer-events: none;
}

.landing-stats::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: calc(var(--radius-lg) - 10px);
  border: 1px solid rgba(149, 205, 255, 0.08);
  pointer-events: none;
}

.landing-stats > * {
  position: relative;
  z-index: 1;
}

.landing-stats .stats-shell-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 32vw);
  gap: 18px;
  align-items: start;
}

.landing-stats .stats-shell-head h3 {
  font-size: clamp(2.2rem, 3.5vw, 3.3rem);
  line-height: 0.98;
}

.landing-stats .stats-status {
  max-width: none;
}

.landing-stats + .hero {
  margin-top: -6px;
}

.leaderboard-overview .section-head {
  max-width: 920px;
}

.section-head {
  max-width: 760px;
}

.section-head h2 {
  margin-top: 12px;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  text-wrap: balance;
}

.section-head p {
  margin: 12px 0 0;
}

#opendata .section-head {
  max-width: 980px;
}

.resource-grid,
.leaderboard-grid,
.archive-grid,
.open-data-grid,
.community-grid {
  display: grid;
  gap: 18px;
}

.resource-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leaderboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-grid,
.open-data-grid,
.community-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card,
.mode-card,
.archive-card,
.data-card,
.community-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.resource-card:hover,
.mode-card:hover,
.archive-card:hover,
.community-card:hover {
  transform: translateY(-4px);
  border-color: rgba(157, 214, 255, 0.34);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
}

.resource-card strong,
.mode-card h3,
.archive-card strong,
.community-card strong {
  font-family: "Oxanium", sans-serif;
  font-size: 1.35rem;
}

.split-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.story-card,
.config-card {
  padding: 24px;
}

.story-card h3,
.config-card h3 {
  margin-top: 12px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.config-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(157, 195, 229, 0.15);
  background: rgba(4, 10, 16, 0.5);
}

.config-block code {
  overflow-wrap: anywhere;
}

.copy-button {
  align-self: start;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #091018;
  background: linear-gradient(180deg, #ffc08d, #ff8a3d);
  cursor: pointer;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.timeline-card {
  padding: 22px;
}

.timeline-card h3 {
  margin-top: 12px;
  font-size: 1.5rem;
}

.evidence-card {
  overflow: hidden;
  padding: 22px;
}

.evidence-card img {
  width: 100%;
  border-radius: calc(var(--radius-lg) - 10px);
  border: 1px solid rgba(157, 195, 229, 0.12);
}

.evidence-card figcaption {
  margin-top: 12px;
  color: var(--muted);
}

.stack-list {
  margin: 0;
  padding-left: 1.1rem;
}

.stack-list li + li {
  margin-top: 10px;
}

.link-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.link-stack a {
  color: var(--steel);
}

.link-stack a:hover {
  color: var(--cyan);
}

.stats-shell {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.stats-shell-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.stats-shell-head-status-only {
  justify-content: flex-end;
}

.stats-shell-head h3,
.stats-panel-head h4 {
  margin: 8px 0 0;
  font-family: "Oxanium", sans-serif;
}

.stats-shell-head h3 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.stats-status {
  margin: 0;
  max-width: 40ch;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
}

.stats-status-time,
.stats-status-relative {
  display: block;
}

.stats-status-relative {
  margin-top: 2px;
  color: var(--text);
  font-size: 0.9rem;
}

.stats-status.is-stale {
  color: #ffb4aa;
}

.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-toolbar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stats-toolbar-row .stats-toolbar {
  flex: 1 1 540px;
}

.stats-toolbar-row .stats-status {
  flex: 0 0 auto;
  margin-left: auto;
}

.stats-filter-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(149, 205, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 14, 22, 0.55);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
}

.stats-filter-button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.stats-filter-button.is-active {
  color: #091018;
  border-color: transparent;
  background: linear-gradient(180deg, #a2f5ff, #55d9f2);
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(149, 205, 255, 0.14);
  background: rgba(6, 11, 18, 0.5);
}

.stats-card-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-card-value {
  display: block;
  margin-top: 12px;
  font-family: "Oxanium", sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.15;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.stats-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(149, 205, 255, 0.12);
  background: rgba(5, 10, 16, 0.48);
}

.stats-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-panel-head,
.stats-table-wrap {
  flex: 0 0 auto;
}

.stats-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-panel-copy {
  min-width: 0;
}

.stats-panel-title-main {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0.2em;
}

.stats-panel-head-ranks {
  align-items: center;
}

.stats-panel-head-ranks .stats-panel-copy {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.stats-search-field {
  flex: 1 1 280px;
  width: min(100%, 420px);
  margin-left: auto;
}

.stats-panel-head-ranks .stats-search-field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  width: min(100%, 420px);
  margin-inline: auto 0;
}

.stats-search-label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stats-search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(149, 205, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 14, 22, 0.66);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.stats-search-input::placeholder {
  color: rgba(143, 167, 188, 0.92);
}

.stats-search-input:focus {
  outline: none;
  border-color: rgba(109, 232, 255, 0.42);
  background: rgba(10, 19, 30, 0.9);
  box-shadow: 0 0 0 4px rgba(109, 232, 255, 0.08);
}

.stats-table-wrap {
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(149, 205, 255, 0.12);
  background: rgba(4, 9, 14, 0.72);
}

.stats-table-wrap-ranks {
  position: relative;
  padding-top: 52px;
}

.stats-table-wrap-ranks > .stats-table {
  margin-top: -52px;
}

.stats-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.stats-table-ranks {
  table-layout: fixed;
}

.stats-table-ranks tbody td {
  vertical-align: top;
}

.stats-table th,
.stats-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(149, 205, 255, 0.09);
  text-align: left;
  vertical-align: middle;
}

.stats-table th {
  color: var(--steel);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(8, 14, 22, 0.95);
}

.stats-table th[data-sort-table] {
  user-select: none;
}

.stats-sort-button {
  display: inline-flex;
  align-items: center;
  position: relative;
  gap: 8px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 180ms ease;
}

.stats-sort-button-compact {
  gap: 4px;
}

.stats-sort-button::after {
  content: "↕";
  color: rgba(143, 167, 188, 0.5);
  font-size: 0.8em;
  line-height: 1;
}

.stats-sort-button[data-direction="asc"]::after {
  content: "↑";
  color: var(--cyan);
}

.stats-sort-button[data-direction="desc"]::after {
  content: "↓";
  color: var(--cyan);
}

[data-sort-table][aria-sort="ascending"] .stats-sort-button::after {
  content: "↑";
  color: var(--cyan);
}

[data-sort-table][aria-sort="descending"] .stats-sort-button::after {
  content: "↓";
  color: var(--cyan);
}

.stats-sort-button:hover,
.stats-sort-button.is-active {
  color: var(--text);
}

.stats-record-sort-head {
  position: relative;
  z-index: 4;
  white-space: nowrap;
  text-align: center;
}

.stats-record-sort-group {
  display: inline-grid;
  width: 100%;
}

.stats-record-grid {
  display: inline-grid;
  grid-template-columns: 8.2ch 0.8ch 8.2ch 0.8ch 8.2ch 0.8ch 8.2ch;
  align-items: center;
  justify-content: center;
  justify-items: center;
  width: 100%;
}

.stats-record-metric {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-self: center;
}

.stats-record-sort-divider {
  color: transparent;
  visibility: hidden;
  line-height: 1;
  justify-self: center;
}

.stats-sort-button-percent {
  min-width: 0;
  font-size: 0.74em;
}

.stats-sort-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 8;
  padding: 6px 9px;
  border: 1px solid rgba(149, 205, 255, 0.22);
  border-radius: 10px;
  color: #e7f1fb;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  background: rgba(8, 14, 22, 0.98);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  transform: translateX(-50%) translateY(4px);
}

.stats-table-wrap-ranks .stats-sort-hint {
  right: 0;
  left: auto;
  bottom: calc(100% + 12px);
  transform: translateY(4px);
}

.stats-table-wrap-ranks .stats-sort-hint::before {
  left: auto;
  right: 12px;
  transform: rotate(45deg);
}

.stats-sort-hint::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(149, 205, 255, 0.22);
  border-bottom: 1px solid rgba(149, 205, 255, 0.22);
  background: rgba(8, 14, 22, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.stats-sort-button:hover .stats-sort-hint,
.stats-sort-button:focus-visible .stats-sort-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stats-table-wrap-ranks .stats-sort-button:hover .stats-sort-hint,
.stats-table-wrap-ranks .stats-sort-button:focus-visible .stats-sort-hint {
  transform: translateY(0);
}

.stats-table tbody tr:hover {
  background: rgba(109, 232, 255, 0.04);
}

.stats-skeleton-row:hover {
  background: transparent;
}

.stats-table-ranks th:first-child,
.stats-table-ranks td:first-child {
  width: 64px;
  padding-right: 8px;
}

.stats-table-ranks th:nth-child(2),
.stats-table-ranks td:nth-child(2) {
  width: 24ch;
  max-width: 24ch;
  padding-left: 6px;
}

.stats-table-ranks th:nth-child(3),
.stats-table-ranks td:nth-child(3) {
  width: 134px;
}

.stats-table-ranks th:nth-child(4),
.stats-table-ranks td:nth-child(4) {
  width: 106px;
}

.stats-table-ranks th:nth-child(5),
.stats-table-ranks td:nth-child(5) {
  width: 36ch;
  max-width: 36ch;
}

.stats-rank {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.stats-player-name,
.stats-elo,
.stats-record,
.stats-date,
.stats-duration {
  font-variant-numeric: tabular-nums;
}

.stats-record {
  white-space: nowrap;
  text-align: center;
}

.stats-record-value {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
  line-height: 1;
}

.stats-record-count {
  color: var(--text);
}

.stats-record-value-divider {
  display: none;
}

.stats-record-percent {
  color: var(--muted);
  font-size: 0.78em;
}

.stats-date-time {
  display: block;
  margin-top: 2px;
  white-space: nowrap;
}

.stats-player-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.stats-rank-row.is-expanded td {
  border-bottom-color: transparent;
}

.stats-rank-row.is-clickable {
  cursor: pointer;
}

.stats-rank-row.is-clickable:hover td,
.stats-rank-row.is-clickable:focus-within td {
  background: rgba(109, 232, 255, 0.04);
}

.stats-panel-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.stats-load-more {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(149, 205, 255, 0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(11, 22, 34, 0.84);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.stats-load-more:hover {
  color: var(--cyan);
  border-color: rgba(109, 232, 255, 0.4);
  transform: translateY(-1px);
  background: rgba(13, 30, 45, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stats-player-label {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stats-player-note,
.stats-note {
  display: inline-block;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.stats-key-details {
  display: block;
  margin-top: 0;
}

.stats-key-summary {
  cursor: pointer;
  user-select: none;
}

.stats-key-summary::marker,
.stats-key-summary::-webkit-details-marker {
  display: none;
  content: "";
}

.stats-key-toggle {
  display: inline-flex;
  align-items: center;
  color: var(--cyan);
  font-weight: 700;
  line-height: 1;
}

.stats-key-toggle::after {
  content: "+";
}

.stats-key-details[open] .stats-key-toggle::after {
  content: "-";
}

.stats-key-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  width: 100%;
}

.stats-detail-row td {
  padding: 0 14px 16px;
  border-top: 0;
}

.stats-detail-panel {
  width: 100%;
  padding-left: 64px;
}

.stats-expand-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 0;
  border: 0;
  color: var(--cyan);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.stats-detail-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.stats-detail-label {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  width: 100%;
  max-width: 100%;
}

.stats-name-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(149, 205, 255, 0.12);
  background: rgba(109, 232, 255, 0.06);
  line-height: 1.3;
}

.stats-copy-chip {
  appearance: none;
  position: relative;
  overflow: visible;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #eef6ff;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.stats-copy-chip:hover {
  border-color: rgba(109, 232, 255, 0.28);
  background: rgba(109, 232, 255, 0.1);
  transform: translateY(-1px);
}

.stats-copy-chip.is-copied {
  border-color: rgba(141, 233, 142, 0.34);
  background: rgba(141, 233, 142, 0.14);
}

.stats-copy-chip.is-failed {
  border-color: rgba(255, 114, 98, 0.34);
  background: rgba(255, 114, 98, 0.14);
}

.stats-name-chip.is-primary {
  border-color: rgba(109, 232, 255, 0.26);
  background: rgba(109, 232, 255, 0.1);
}

.stats-name-text {
  color: #f4fbff;
  overflow-wrap: anywhere;
}

.stats-name-copy {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}

.stats-copy-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 8;
  padding: 6px 9px;
  border: 1px solid rgba(149, 205, 255, 0.22);
  border-radius: 10px;
  color: #e7f1fb;
  font-size: 0.72rem;
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  background: rgba(8, 14, 22, 0.98);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  transform: translateX(-50%) translateY(4px);
}

.stats-copy-hint::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(149, 205, 255, 0.22);
  border-bottom: 1px solid rgba(149, 205, 255, 0.22);
  background: rgba(8, 14, 22, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.stats-copy-chip:hover .stats-copy-hint,
.stats-copy-chip.is-feedback-visible .stats-copy-hint {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stats-name-count {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1;
}

.stats-key-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: auto;
  max-width: 100%;
}

.stats-key-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
}

.stats-key-value {
  display: inline-flex;
  flex: 0 1 auto;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  color: #cce6ff;
  font-size: 0.77rem;
  line-height: 1.45;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(109, 232, 255, 0.06);
  border: 1px solid rgba(149, 205, 255, 0.12);
}

.stats-skeleton {
  display: inline-flex;
  width: 100%;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(109, 232, 255, 0.06) 0%,
      rgba(149, 205, 255, 0.16) 50%,
      rgba(109, 232, 255, 0.06) 100%
    );
  background-size: 220% 100%;
  animation: stats-skeleton-shimmer 1.5s ease-in-out infinite;
}

.stats-skeleton-line {
  height: 14px;
}

.stats-skeleton-short {
  max-width: 72px;
}

.stats-skeleton-medium {
  max-width: 112px;
}

@keyframes stats-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (min-width: 900px) {
  #opendata .section-head h2 {
    white-space: nowrap;
  }
}

.stats-matchup {
  min-width: 320px;
}

.stats-matchup-list {
  display: grid;
  gap: 6px;
  align-items: start;
  justify-items: start;
}

.stats-team {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  row-gap: 4px;
  column-gap: 0;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.stats-team-player {
  display: inline;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stats-team-player:not(:first-child)::before {
  content: " • ";
  opacity: 0.52;
}

.stats-team-winner {
  color: #dffae0;
  border-color: rgba(141, 233, 142, 0.24);
  background: rgba(141, 233, 142, 0.12);
}

.stats-team-loser {
  color: #ffd3ce;
  border-color: rgba(255, 114, 98, 0.24);
  background: rgba(255, 114, 98, 0.12);
}

.stats-team-contender {
  color: #fff0c2;
  border-color: rgba(255, 198, 96, 0.24);
  background: rgba(255, 198, 96, 0.12);
}

.stats-team-neutral {
  color: var(--steel);
  border-color: rgba(149, 205, 255, 0.16);
  background: rgba(109, 232, 255, 0.08);
}

.stats-versus {
  display: inline-flex;
  align-items: center;
  padding-left: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stats-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--steel);
  background: rgba(109, 232, 255, 0.08);
  font-size: 0.82rem;
}

.stats-player-games-panel .stats-panel-head {
  align-items: start;
}

.stats-player-games-panel .stats-date {
  white-space: nowrap;
}

.stats-player-games-panel .stats-date-time {
  display: inline;
  margin-top: 0;
  margin-left: 6px;
}

.stats-player-game-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-map-mod {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(109, 232, 255, 0.16);
  background: rgba(109, 232, 255, 0.08);
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats-player-games-panel .stats-team-grid {
  gap: 6px;
}

.stats-player-games-panel .stats-team-tile {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.stats-player-games-panel .stats-team-strength {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 0.74rem;
}

.stats-player-game-row {
  cursor: pointer;
}

.stats-player-game-row td {
  transition: background 160ms ease, color 160ms ease;
}

.stats-player-game-row:hover td,
.stats-player-game-row.is-expanded td {
  background: rgba(109, 232, 255, 0.05);
}

.stats-player-game-detail-row td {
  padding-top: 12px;
}

.stats-player-game-detail-panel {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.stats-player-game-detail-panel .stats-matchup {
  min-width: 0;
}

.stats-player-game-detail-panel .stats-matchup-list {
  gap: 8px;
}

.stats-matchup-list-tiles {
  width: 100%;
}

.stats-team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.stats-team-strength {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(149, 205, 255, 0.24);
  color: var(--steel);
  background: rgba(109, 232, 255, 0.06);
  font-size: 0.78rem;
  line-height: 1.2;
  opacity: 0.9;
  margin-left: auto;
}

.stats-team-strength-stronger {
  color: #e7ffe7;
  border-color: rgba(141, 233, 142, 0.4);
  background: rgba(141, 233, 142, 0.18);
}

.stats-team-strength-lower {
  color: #ffd6d0;
  border-color: rgba(255, 114, 98, 0.38);
  background: rgba(255, 114, 98, 0.16);
}

.stats-team-strength-middle {
  color: #fff0c2;
  border-color: rgba(255, 198, 96, 0.34);
  background: rgba(255, 198, 96, 0.14);
}

.stats-team-strength-neutral {
  color: var(--steel);
  border-color: rgba(149, 205, 255, 0.24);
  background: rgba(109, 232, 255, 0.06);
}

.stats-team-tile {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}

.stats-team-tile.is-clickable-player {
  cursor: pointer;
}

.stats-team-tile.is-clickable-player:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.stats-team-tile.is-current-player {
  font-weight: 800;
  color: #f7feff;
  background: linear-gradient(135deg, rgba(109, 232, 255, 0.34), rgba(109, 232, 255, 0.18));
  border-color: rgba(109, 232, 255, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(109, 232, 255, 0.14);
}

.stats-player-game-result.is-win {
  color: #dffae0;
  background: rgba(141, 233, 142, 0.12);
}

.stats-player-game-result.is-loss {
  color: #ffd3ce;
  background: rgba(255, 114, 98, 0.12);
}

.stats-player-game-result.is-draw {
  color: #fff0c2;
  background: rgba(255, 198, 96, 0.12);
}

.stats-player-game-result.is-crash {
  color: #d4f2ff;
  background: rgba(109, 232, 255, 0.12);
}

.stats-replay-link {
  color: var(--cyan);
}

.stats-replay-link:hover {
  color: #b7f7ff;
}

.stats-empty-row td {
  color: var(--muted);
}

.site-footer {
  margin-top: 36px;
  padding: 20px 0 0;
  color: var(--muted);
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 600ms ease,
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: clamp(200px, 18vw, 240px) minmax(0, 1fr) max-content;
  }

  .topbar-radio {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .resource-grid,
  .leaderboard-grid,
  .archive-grid,
  .open-data-grid,
  .community-grid,
  .stats-summary,
  .split-panel,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: 100%;
    padding-top: 16px;
    padding-inline: 10px;
  }

  .masthead-band {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
    min-height: 0;
    padding: 18px;
    border-radius: 28px;
  }

  .topnav {
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar-radio {
    display: flex;
    width: 100%;
  }

  .discord-link {
    justify-self: start;
  }

  .hero,
  .story-card,
  .config-card,
  .timeline-card,
  .resource-card,
  .mode-card,
  .archive-card,
  .data-card,
  .community-card {
    border-radius: 22px;
  }

  .hero-stats,
  .resource-grid,
  .leaderboard-grid,
  .archive-grid,
  .open-data-grid,
  .community-grid,
  .stats-summary,
  .stats-grid,
  .split-panel,
  .timeline {
    grid-template-columns: 1fr;
  }

  .stats-shell-head {
    flex-direction: column;
  }

  .stats-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-toolbar-row .stats-status {
    margin-left: 0;
  }

  .stats-status {
    text-align: left;
  }

  .stats-panel-head-ranks .stats-search-field {
    width: 100%;
    justify-content: flex-start;
  }

  .stats-detail-panel {
    padding-left: 0;
  }

  .landing-stats .stats-shell-head {
    grid-template-columns: 1fr;
  }

  .content-frame {
    min-height: 640px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 22px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.4rem, 16vw, 3.5rem);
  }

  .section-head h2,
  .hero-panel h2,
  .story-card h3,
  .config-card h3 {
    font-size: 1.9rem;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .config-block {
    grid-template-columns: 1fr;
  }
}
