:root {
  color-scheme: dark;
  --ink: #eef1f7;
  --muted: #a3acbf;
  --paper: #07090f;
  --surface: #111724;
  --line: #262f42;
  --accent: #f0b429;
  --link: #7cc4ff;
  --measure: 66rem;
  --display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--display);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased; background: var(--paper); }
.shell { max-width: var(--measure); margin-inline: auto; padding-inline: clamp(1rem, 5vw, 3rem); }
a { color: var(--link); text-underline-offset: .22em; text-decoration-thickness: .08em; }
a:hover { color: #fff; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

.masthead { position: sticky; top: 0; z-index: 5; background: rgba(7, 9, 15, .94); border-bottom: 1px solid var(--line); }
.masthead .shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.masthead a { color: #d6dbe6; text-decoration: none; }
.masthead a:hover { color: var(--link); }
.brand { font: 800 1.2rem/1 var(--display); color: var(--ink) !important; white-space: nowrap; }
.masthead nav { display: flex; flex-wrap: wrap; gap: clamp(.8rem, 2.5vw, 1.6rem); font: 700 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; }

main { padding-block: clamp(2rem, 6vw, 4.5rem) 4rem; }
main.shell { width: 100%; }
.hero { margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
h1, h2, h3, p, dl { margin-top: 0; }
h1, h2, h3 { line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin-bottom: .6rem; color: #fff; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 1rem; color: #fff; }
.kicker, .eyebrow { color: var(--accent); font: 700 .78rem/1.2 var(--display); text-transform: uppercase; letter-spacing: .14em; margin-bottom: .6rem; }
.muted, small { color: var(--muted); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 1.5rem; overflow: hidden; }
.panel > h2, .panel > p { margin: 0; padding: 1.1rem clamp(.9rem, 3vw, 1.6rem); }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; line-height: 1.35; }
th, td { padding: .8rem clamp(.65rem, 1.9vw, 1.4rem); text-align: left; vertical-align: middle; }
thead { color: var(--muted); background: #ffffff08; }
thead th { font: 700 .74rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; }
tbody :is(th, td) { border-top: 1px solid var(--line); }
tbody tr:nth-child(even) { background-color: #ffffff05; }
tbody tr:focus-within, tbody tr:hover { background-color: #7cc4ff12; }
td a, tbody th a { font-weight: 700; overflow-wrap: anywhere; color: #fff; text-decoration: none; }
td a:hover, tbody th a:hover { color: var(--link); }
.number, .record, .score { font-variant-numeric: tabular-nums; }
.number, .record { white-space: nowrap; }
.standings tbody td:first-child { color: var(--accent); font-weight: 800; }
.pager, .actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-block: 1rem 1.5rem; }
.pager a, .button { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .5rem 1.1rem; border-radius: 6px; font: 700 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.pager a { border: 1px solid var(--line); background: #ffffff08; color: var(--ink); }
.pager a:hover { border-color: var(--link); color: #fff; }
.button { color: #1b1200; background: var(--accent); }
.button:hover { color: #1b1200; filter: brightness(1.08); }
.stats, .scoreboard { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); border-radius: 10px; overflow: hidden; margin-block: 1.5rem 2.25rem; }
.stats { grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); }
.stat, .fighter { min-width: 0; padding: clamp(.85rem, 2.5vw, 1.5rem); background: var(--surface); }
.stat .muted, .fighter > .muted { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.stat > strong, .stat > time { display: block; margin: .28rem 0 0; font-variant-numeric: tabular-nums; }
.stat > :is(.number, .record) { font: 800 1.6rem/1.1 var(--display); color: #fff; }
.scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fighter { overflow-wrap: anywhere; }
.fighter > a { display: inline-block; margin-block: .4rem .7rem; font: 800 1.25rem/1.2 var(--display); color: #fff; text-decoration: none; }
.panel > .scoreboard { border: 0; border-radius: 0; margin: 0; }
.panel > .stats { border-width: 1px 0 0; border-radius: 0; margin: 0; }
.panel > .actions, .panel > .pager { padding-inline: clamp(.9rem, 3vw, 1.6rem); }
caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
abbr[title] { text-decoration: none; }
footer { margin-top: 2.75rem; border-top: 1px solid var(--line); padding: 1.2rem 0; font-size: .86rem; color: var(--muted); }
.score { display: block; font: 800 clamp(2rem, 6vw, 3.4rem)/1.15 var(--display); color: #fff; }

.tag { display: inline-block; font: 700 .72rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; padding: .22rem .55rem; border-radius: 4px;
  background: #ffffff12; color: #e6eaf2; border: 1px solid #ffffff22; }
.tag.rank-rookie { color: #d5dbe6; }
.tag.rank-bronze { color: #f2b98a; border-color: #cd7f3280; }
.tag.rank-silver { color: #e4ecf7; border-color: #c8d4e673; }
.tag.rank-gold { color: #ffe27a; border-color: #ffd21a8c; }
.tag.rank-platinum { color: #a9f3ff; border-color: #38e4ff80; }
.tag.rank-diamond { color: #b9d0ff; border-color: #508cff8c; }
.tag.rank-master { color: #dcbcff; border-color: #aa5aff8c; }
.tag.rank-grandmaster { color: #ffb3a8; border-color: #ff3c3c8c; }
.tag.tournament-registration { color: #a6f7c8; }
.tag.tournament-scheduled { color: #b9d0ff; }
.tag.tournament-running { color: #ffe27a; }
.tag.tournament-completed { color: #d5dbe6; }
.tag.tournament-cancelled { color: #ffb3a8; }
.tournament-bracket { display: grid; gap: 1.25rem; }
.tournament-bracket > .panel { min-width: 0; }
.tournament-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .85rem; list-style: none; margin: 0; padding: 1rem; }
.tournament-match { min-width: 0; height: 100%; padding: .9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.match-heading { display: flex; justify-content: space-between; gap: .75rem; align-items: center; margin-bottom: .75rem; overflow-wrap: anywhere; }
.tournament-pair { list-style: none; margin: 0; padding: 0; }
.tournament-pair li { display: flex; justify-content: space-between; gap: .75rem; align-items: center; border-top: 1px solid var(--line); padding: .6rem .35rem; }
.tournament-pair li.winner { background: #f0b42914; font-weight: 700; color: #ffe27a; }
.tournament-entrants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .55rem 1.25rem; margin: 0; padding: 1rem 2.5rem; }
.tournament-entrants li { padding: .25rem 0; }
.panel > .tournament-entrants { padding-inline: clamp(1.5rem, 4vw, 3rem); }
.empty { color: var(--muted); padding: 1.5rem; }

/* the ladders' tabs (overall and one per character), and a player's title */
.ladder-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.ladder-tabs a { padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: #dce2ee; font: 700 .78rem/1 var(--display); text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }
.ladder-tabs a:hover { border-color: var(--link); color: var(--link); }
.ladder-tabs a[aria-current=page] { background: var(--accent); color: #1b1200; border-color: transparent; }
.title-tag { display: inline-block; margin-left: .4rem; padding: .12rem .45rem; border-radius: 4px; background: #f0b4291a;
  border: 1px solid #f0b42966; color: #ffe27a; font: 700 .68rem/1.2 var(--display); letter-spacing: .08em; vertical-align: middle; }

@media (max-width: 38rem) {
  .shell { padding-inline: 1rem; }
  .masthead .shell { min-height: 3.5rem; }
  th, td { padding: .7rem .46rem; font-size: .88rem; }
  thead th { font-size: .68rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: no-preference) { a { transition: color .12s, background-color .12s; } }
