:root {
  color-scheme: dark;
  --night: #121933;
  --paper: #fff5de;
  --muted: #c8cce3;
  --gold: #ffcf79;
  --line: #434b72;
  font: 17px/1.65 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--paper); background: var(--night); }
a { color: var(--gold); text-underline-offset: .22em; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.shell { max-width: 68rem; padding-inline: clamp(1.1rem, 5vw, 3rem); margin-inline: auto; }
header, footer { border-color: var(--line); border-style: solid; border-width: 0 0 1px; }
header .shell, footer .shell { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem 1.5rem; padding-block: .9rem; }
.brand { color: var(--paper); font-size: .94rem; font-weight: 900; text-decoration: none; letter-spacing: .13em; }
nav { display: flex; gap: .75rem 1.2rem; flex-wrap: wrap; font-size: .88rem; }
nav a { color: var(--muted); }
nav a[aria-current="page"] { color: var(--gold); }
.hero {
  padding-block: clamp(3rem, 9vw, 7rem);
  background-color: #151c39;
  background-image: radial-gradient(circle, #ffd688 1px, transparent 2px), radial-gradient(circle, #9fa9dc 1px, transparent 2px), linear-gradient(142deg, #192445, #29214e);
  background-position: 11px 13px, 47px 31px, 0 0;
  background-size: 113px 113px, 83px 83px, auto;
}
.hero .shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(9rem, 17rem); align-items: center; gap: clamp(1.6rem, 7vw, 6rem); }
.eyebrow { color: var(--gold); font: 800 .78rem/1.4 ui-monospace, monospace; letter-spacing: .15em; text-transform: uppercase; }
h1, h2 { line-height: 1.13; margin-block: 0 .5em; }
h1 { font-size: clamp(2.25rem, 7vw, 4.8rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
p { margin-block: 0 1em; }
.deck { max-width: 31rem; color: var(--muted); font-size: 1.12rem; }
.hero img { width: 100%; height: auto; border-radius: 24%; box-shadow: 0 .9rem 2.5rem #080e26a0; }
.button { display: inline-block; background: var(--gold); color: #1e1925; padding: .45rem .85rem; border-radius: .36rem; font-weight: 750; text-decoration: none; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; padding-block: 2.5rem; }
.features p, .muted { color: var(--muted); }
article { max-width: 43rem; padding-block: clamp(2rem, 5vw, 4rem); }
article section { padding-block: 1.1rem; border-top: 1px solid var(--line); }
article section p:last-child { margin-bottom: 0; }
footer { border-width: 1px 0 0; color: var(--muted); font-size: .86rem; }
@media (max-width: 650px) {
  .hero .shell, .features { grid-template-columns: 1fr; }
  .hero img { max-width: 9rem; grid-row: 1; }
}
.rankings { padding-block: clamp(2rem, 5vw, 4rem); }
.ranking-tabs, .ranking-controls { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.rankings button, .ranking-controls input {
  font: inherit; padding: .4rem .75rem; color: var(--paper); border: 1px solid var(--line);
  border-radius: .4rem; background: #263057;
}
.rankings button:not(:disabled) { cursor: pointer; }
.rankings button:disabled { opacity: .48; }
.ranking-tabs [aria-pressed="true"] { background: var(--gold); color: #231e32; border-color: var(--gold); }
.ranking-table { width: 100%; border-collapse: separate; border-spacing: 0 .35rem; font-variant-numeric: tabular-nums; }
.ranking-table th, .ranking-table td { padding: .5rem clamp(.25rem, 2vw, 1rem); text-align: left; }
.ranking-table th { font-size: .84rem; color: var(--muted); }
.ranking-table td { background: #222b4e; }
.ranking-table td:last-child, .ranking-table th:last-child { text-align: right; }
.ranking-table .medal td { height: 3.55rem; color: var(--medal); background-color: var(--tint); }
.ranking-table .medal td:first-child { font-size: 1.18em; font-weight: 850; border-left: 3px solid var(--medal); }
.medal-1 { --medal: #ffcf78; --tint: #423323; }
.medal-2 { --medal: #d7ecff; --tint: #2e394a; }
.medal-3 { --medal: #ffc0a0; --tint: #49312e; }
.ranking-controls { margin-top: 1rem; }
.ranking-controls input { width: 5rem; }
.ranking-table .glint { display: inline-block; margin-left: .2em; animation: sparkle 3.7s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { opacity: .42; } 50% { opacity: 1; } }
@media (max-width: 480px) { .ranking-table { font-size: .78rem; } .ranking-table th { font-size: .7rem; } }
@media (prefers-reduced-motion: reduce) { .ranking-table .glint { animation: none; } }
