@font-face {
  font-family: Barlow;
  src: url('/fonts/Barlow-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('/fonts/Barlow-SemiBold.ttf') format('truetype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/BarlowCondensed-Bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/BarlowCondensed-ExtraBoldItalic.ttf') format('truetype');
  font-style: italic;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a171c;
  --night: #102e38;
  --panel: #0f252c;
  --panel-raised: #15333e;
  --line: rgba(197, 164, 99, .32);
  --line-blue: #31505b;
  --text: #f1e9d3;
  --muted: #b1c0c0;
  --gold: #c5a463;
  --gold-bright: #e2c47f;
  --gold-soft: rgba(197, 164, 99, .12);
  --danger: #f2b2a8;
  font-family: Barlow, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
body::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 560px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 80% 6%, rgba(35, 82, 102, .48), transparent 55%),
    linear-gradient(180deg, var(--night), var(--bg));
}
.page-shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 36px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 78px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: .96;
  letter-spacing: .18em;
}
.brand strong { color: var(--gold-bright); font-size: 21px; letter-spacing: .12em; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(197, 164, 99, .06);
}
.brand-icon img { width: 36px; height: 27px; }
.header-tag, .eyebrow, .section-kicker,
.site-footer, th {
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .17em;
}
.header-tag { color: var(--muted); font-size: 13px; }
.header-tag span, .muted { color: var(--gold); padding: 0 6px; }
.header-right { display: flex; align-items: center; gap: 25px; }
.discord-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 12px;
  border: 1px solid #7e8cff;
  border-radius: 6px;
  background: linear-gradient(135deg, #4356bb, #5865f2);
  box-shadow: 0 5px 18px rgba(68, 82, 188, .2);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.discord-link:hover {
  background: linear-gradient(135deg, #5366ca, #6b78ff);
  box-shadow: 0 7px 22px rgba(88, 101, 242, .3);
  transform: translateY(-1px);
}
.discord-link:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.discord-mark { flex: 0 0 24px; width: 24px; height: 24px; }
.discord-copy { display: flex; flex-direction: column; gap: 1px; }
.discord-kicker {
  font: 700 10px/1 'Barlow Condensed', Barlow, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
  opacity: .8;
}
.discord-copy strong { font: 700 17px/1 'Barlow Condensed', Barlow, sans-serif; }
.discord-arrow { align-self: start; color: #e7d598; font-size: 16px; line-height: 1; }

.intro {
  padding: 52px 0 58px;
}
.intro-copy { width: 100%; }
.eyebrow { margin: 0 0 21px; color: var(--gold-bright); font-size: 15px; }
h1 {
  margin: 0;
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-size: clamp(52px, 6vw, 72px);
  font-weight: 700;
  line-height: .99;
  letter-spacing: -.008em;
}
.title-season {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-bright);
  font-size: .43em;
  line-height: 1.1;
  letter-spacing: .02em;
}
.title-main { display: block; white-space: nowrap; }
.lede {
  max-width: 640px;
  margin: 27px 0 0;
  color: #c5d1ce;
  font-size: 18px;
  line-height: 1.55;
}
.ladder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .25);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 25px 32px 23px;
}
.section-kicker { margin: 0 0 5px; color: var(--gold-bright); font-size: 13px; }
h2 {
  margin: 0;
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .015em;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 255px;
  padding: 0 12px;
  border: 1px solid var(--line-blue);
  border-radius: 5px;
  background: #0b1d24;
}
.search:focus-within { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.search-icon { color: var(--gold); font-size: 23px; line-height: 1; }
.search input {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 400 15px Barlow, sans-serif;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.data-note {
  padding: 13px 32px;
  border-top: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--panel-raised);
  color: #d4dfda;
  font-size: 14px;
  line-height: 1.5;
}
.data-note.incomplete, .data-note.demo {
  background: #2e2b20;
  color: #f0dca7;
}
.data-note.error { background: #382622; color: var(--danger); }

.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; text-align: left; }
thead { background: #153039; }
th {
  padding: 12px 20px;
  color: #b3c7c3;
  font-size: 12px;
  white-space: nowrap;
}
th:first-child, td:first-child { width: 68px; padding-left: 32px; }
th:nth-child(3), td:nth-child(3) { width: 142px; }
th:nth-child(4), td:nth-child(4) { width: 88px; }
th:nth-child(5), td:nth-child(5) { width: 82px; }
th:last-child, td:last-child { width: 154px; padding-right: 32px; }
td {
  padding: 17px 20px;
  border-top: 1px solid rgba(177, 192, 192, .16);
  color: #dce4dc;
  font-size: 15px;
  vertical-align: middle;
}
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(40, 78, 87, .4); }
.position {
  color: var(--gold-bright);
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-size: 29px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.player-name-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.player-identity { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 14px; }
.player-details { min-width: 0; }
.rank-emblem { display: block; width: 32px; height: 48px; object-fit: contain; justify-self: end; }
.player-link {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.player-link:hover { color: var(--gold-bright); }
.player-link:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.player-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.input-caveat {
  display: inline-grid;
  flex: 0 0 19px;
  place-items: center;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-bright);
  cursor: help;
  font: 700 13px/1 'Barlow Condensed', Barlow, sans-serif;
}
.input-caveat:hover { background: rgba(197, 164, 99, .24); }
.input-caveat:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.rating {
  color: var(--text);
  font-family: 'Barlow Condensed', Barlow, sans-serif;
  font-size: 24px;
  font-weight: 700;
}
.rating-change { margin-left: 6px; white-space: nowrap; font: 600 14px Barlow, sans-serif; }
.rating-change.positive { color: #a8d86b; }
.rating-change.negative { color: #f08ba0; }
.stat { color: #d5ded9; font-size: 15px; }
.last-game { color: var(--muted); white-space: nowrap; font-size: 14px; }
.empty { padding: 70px 24px; text-align: center; }
.empty strong { font: 700 28px 'Barlow Condensed', Barlow, sans-serif; text-transform: uppercase; }
.empty p { max-width: 420px; margin: 12px auto; color: var(--muted); line-height: 1.55; }
.table-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
#updated { text-align: right; }
.method-note { display: flex; gap: 15px; align-items: start; max-width: 850px; margin: 29px 0 80px; }
.method-mark {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-bright);
  font: 700 16px 'Barlow Condensed', Barlow, sans-serif;
}
.method-note p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.method-note strong { color: var(--text); }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.site-footer a { color: var(--gold-bright); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] { display: none !important; }

.scan-progress { padding: 27px 32px 31px; border-top: 1px solid var(--line); background: #102c36; }
.scan-top { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 15px; font-size: 16px; }
.scan-top span { color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.scan-progress progress { display: block; width: 100%; height: 10px; accent-color: var(--gold); }
.scan-progress p { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 840px) {
  .page-shell { padding: 0 22px; }
  h1 { font-size: clamp(50px, 7.8vw, 68px); }
  .title-main { white-space: normal; }
}
@media (max-width: 620px) {
  .page-shell { padding: 0 16px; }
  .site-header { height: 72px; gap: 12px; }
  .header-tag { max-width: 140px; text-align: right; font-size: 10px; line-height: 1.4; }
  .discord-link { min-height: 40px; gap: 6px; padding: 6px 9px; }
  .discord-mark { flex-basis: 20px; width: 20px; height: 20px; }
  .discord-kicker { display: none; }
  .discord-copy strong { font-size: 16px; }
  .discord-arrow { font-size: 13px; }
  .intro { padding: 48px 0 44px; }
  .eyebrow { font-size: 12px; margin-bottom: 16px; }
  h1 { font-size: clamp(42px, 10vw, 60px); }
  .lede { margin-top: 20px; font-size: 16px; }
  .section-head { align-items: stretch; flex-direction: column; gap: 19px; padding: 21px 18px; }
  h2 { font-size: 32px; }
  .search { width: 100%; }
  .data-note { padding: 12px 18px; }
  th, td { padding: 13px 10px; }
  th:first-child, td:first-child { width: 58px; padding-left: 18px; }
  th:last-child, td:last-child { padding-right: 18px; }
  .position { font-size: 23px; }
  .rating { font-size: 23px; }
  .player-link { font-size: 15px; }
  .player-sub { font-size: 11px; }
  .player-identity { gap: 8px; }
  .table-footer { flex-direction: column; gap: 5px; padding: 14px 18px; }
  #updated { text-align: left; }
  .method-note { margin-bottom: 52px; }
  .site-footer { flex-direction: column; gap: 7px; font-size: 11px; }
  .scan-progress { padding: 22px 18px; }
  .scan-top { flex-direction: column; gap: 4px; }
}
@media (max-width: 820px) {
  .table-wrap { overflow-x: visible; }
  table { display: block; min-width: 0; table-layout: auto; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  tbody { display: block; }
  tbody tr {
    display: grid;
    grid-template-columns: 26px repeat(3, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 9px;
    padding: 14px 14px 13px;
    border-top: 1px solid rgba(177, 192, 192, .16);
  }
  tbody tr:nth-child(even) { background: rgba(21, 51, 62, .28); }
  td, td:nth-child(n) {
    min-width: 0;
    width: auto;
    padding: 0;
    border: 0;
  }
  td:first-child { grid-column: 1; grid-row: 1 / 3; align-self: start; }
  td:nth-child(2) { grid-column: 2 / 4; grid-row: 1; align-self: center; }
  td:nth-child(3) { grid-column: 4; grid-row: 1; align-self: center; }
  td:nth-child(4) { grid-column: 2; grid-row: 2; }
  td:nth-child(5) { grid-column: 3; grid-row: 2; }
  td:nth-child(6) { grid-column: 4; grid-row: 2; }
  td:nth-child(n+4)::before {
    display: block;
    margin-bottom: 3px;
    color: #8fa9ab;
    font: 700 10px/1 'Barlow Condensed', Barlow, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  td:nth-child(4)::before { content: 'Win'; }
  td:nth-child(5)::before { content: 'Games'; }
  td:nth-child(6)::before { content: 'Last game'; }
  .position { font-size: 23px; line-height: 1.1; }
  .player-identity { grid-template-columns: minmax(0, 1fr) 28px; gap: 5px; }
  .rank-emblem { width: 28px; height: 40px; }
  .player-link { font-size: 15px; line-height: 1.15; }
  .player-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .rating { font-size: 23px; line-height: 1; }
  .rating-change { display: block; margin: 5px 0 0; font-size: 11px; }
  .stat, .last-game { font-size: 12px; line-height: 1.2; }
  .stat { text-align: left; }
  .last-game { white-space: normal; }
}
@media (max-width: 700px) {
  .header-tag { display: none; }
}
@media (max-width: 420px) {
  .site-header { gap: 8px; }
  .brand { gap: 8px; font-size: 12px; letter-spacing: .13em; }
  .brand strong { font-size: 18px; letter-spacing: .09em; }
  .brand-icon { flex: 0 0 42px; width: 42px; height: 40px; }
  .brand-icon img { width: 32px; }
  .discord-link { gap: 5px; padding-inline: 8px; }
  .discord-mark { flex-basis: 18px; width: 18px; height: 18px; }
  .discord-join { display: none; }
  .discord-copy strong { font-size: 15px; }
  .intro { padding: 31px 0 32px; }
  h1 { font-size: clamp(39px, 11vw, 46px); }
  .lede { margin-top: 15px; font-size: 14px; }
  .section-head { gap: 15px; padding: 18px 14px; }
  h2 { font-size: 29px; }
  .data-note { padding: 11px 14px; font-size: 12px; }
  tbody tr { grid-template-columns: 24px repeat(3, minmax(0, 1fr)); column-gap: 6px; padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  tbody tr { transition: none; }
  .discord-link { transition: none; }
  .discord-link:hover { transform: none; }
}
