:root {
  color-scheme: dark;
  font-family: system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #eff6ff;
  background: #07101e;
  --muted: #aebed1;
  --panel: #101e30;
  --line: #273a53;
  --gold: #ffd17c;
  --blue: #88ddff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: #e1f8ff; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid #8ee9ff; outline-offset: 4px; }
header, footer { border-color: var(--line); border-style: solid; border-width: 0; }
header { border-bottom-width: 1px; }
footer { margin-top: auto; border-top-width: 1px; color: var(--muted); }
.nav, main { width: min(100% - 2rem, 58rem); margin-inline: auto; }
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { text-decoration: none; letter-spacing: -.045em; font-weight: 850; color: var(--gold); font-size: 1.4rem; }
nav { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
nav a { color: inherit; font-size: .87rem; }
nav [aria-current] { color: var(--gold); }
main { padding-block: clamp(2rem, 8vw, 5rem); }
h1, h2 { letter-spacing: -.055em; line-height: 1.1; margin: 0 0 .8rem; }
h1 { font-size: clamp(2.2rem, 8vw, 4.8rem); }
h2 { font-size: 1.35rem; }
p { color: var(--muted); line-height: 1.65; margin: 0 0 1.1rem; }
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #2c4660;
  border-radius: 24px;
  padding: clamp(1.4rem, 6vw, 4.5rem);
  min-height: 360px;
  display: grid;
  align-content: center;
  background: radial-gradient(ellipse at 92% 18%, #1b4d75 0%, transparent 59%), linear-gradient(145deg, #142942, #0a1628);
}
.hero p { max-width: 36rem; }
.hero strong { color: var(--gold); }
.primary {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  justify-self: start;
  padding-inline: 1rem;
  border: 1px solid #ffdf9d;
  border-radius: .7rem;
  color: #251c11;
  background: linear-gradient(#ffe1a8, #e9a33e);
  font-weight: 800;
  text-decoration: none;
}
.primary:hover { color: #251c11; background: #ffe4a8; }
.copy { max-width: 43rem; }
.copy section { margin-block: 1.75rem; }
.rank-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.rank-header p { margin-bottom: .3rem; }
.refresh {
  color: var(--blue);
  background: var(--panel);
  border: 1px solid #405773;
  border-radius: .65rem;
  min-height: 46px;
  padding-inline: .9rem;
  cursor: pointer;
  white-space: nowrap;
}
.refresh:disabled { opacity: .65; cursor: default; }
.rank-card { min-height: 9rem; margin-top: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
#ranking-status { min-height: 1.6em; margin: .8rem 1rem; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .75rem clamp(.45rem, 2vw, 1rem); border-top: 1px solid var(--line); }
thead { color: var(--muted); }
td:nth-child(2) { overflow-wrap: anywhere; }
td:first-child, td:last-child { color: var(--gold); font-weight: 750; }
th:last-child, td:last-child { text-align: right; white-space: nowrap; }
@media (max-width: 440px) {
  .nav { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: .8rem; }
  .rank-header { align-items: start; }
  td, th { font-size: .9rem; }
}
