:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --page: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --soft: #f1f5f9;
  --soft-2: #e8eef7;
  --line: #d7dee9;
  --line-strong: #b9c4d4;
  --link: #1d4ed8;
  --link-hover: #0f2f8f;
  --accent: #1f4f8f;
  --accent-2: #2f6fb8;
  --accent-soft: #e9f1fb;
  --success-soft: #e9f8ef;
  --warn-soft: #fff7db;
  --danger-soft: #fff0f0;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 12px 30px rgba(16, 24, 40, 0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-body: "Aptos", "Segoe UI", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", "Inter", Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(47, 111, 184, 0.14), transparent 34rem),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 36%, #eef3f8 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
}

.page {
  width: min(1120px, calc(100% - 28px));
  margin: 22px auto 44px;
  padding: 22px clamp(16px, 3vw, 30px) 34px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(215, 222, 233, 0.86);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.top-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.top-buttons a,
.button-link,
nav a,
.standings-switcher button,
.division-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, var(--soft) 100%);
  color: var(--ink);
  text-decoration: none;
  padding: 7px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.top-buttons a:hover,
.top-buttons a:focus-visible,
.button-link:hover,
.button-link:focus-visible,
nav a:hover,
nav a:focus-visible,
.standings-switcher button:hover,
.standings-switcher button:focus-visible,
.division-tabs a:hover,
.division-tabs a:focus-visible {
  border-color: var(--accent-2);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
  color: var(--accent);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(31, 79, 143, 0.14);
  transform: translateY(-1px);
}

.top-buttons a:active,
.button-link:active,
nav a:active,
.standings-switcher button:active,
.division-tabs a:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #101828;
}

h1 {
  margin: 8px 0 4px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 780;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 16px;
}

nav {
  margin: 16px 0 18px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

nav li {
  margin: 0;
  padding: 0;
}

nav a {
  min-height: 40px;
  padding-inline: 16px;
  border-color: rgba(31, 79, 143, 0.28);
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

h2 {
  margin: 24px 0 12px;
  font-size: clamp(22px, 3vw, 29px);
  font-weight: 760;
}

h3 {
  margin: 22px 0 10px;
  font-size: 19px;
  font-weight: 740;
}

.small,
.note {
  color: var(--muted);
  font-size: 13.5px;
}

.player-table {
  width: 100%;
  min-width: 520px;
  table-layout: fixed;
}

.player-table .col-no {
  width: 70px;
}

.player-table .col-name {
  width: auto;
}

.player-table .col-rating {
  width: 100px;
}

.player-table td:nth-child(2),
.player-table th:nth-child(2) {
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--page);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: linear-gradient(180deg, #f8fafc 0%, #edf3fa 100%);
  color: #334155;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.55);
}

tbody tr:hover {
  background: #eef6ff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}

td.center,
th.center {
  text-align: center;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  padding: 2px 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #344054;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card,
.callout {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-top: 0;
}

.callout {
  margin: 14px 0;
  border-left: 5px solid var(--accent-2);
}

.footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.division-tabs,
.standings-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 18px;
}

.division-tabs a,
.standings-switcher button {
  min-width: 74px;
}

.standings-switcher button.is-active {
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 79, 143, 0.25);
}

.js-standings-ready .standings-division {
  display: none;
}

.js-standings-ready .standings-division.is-active {
  display: block;
}

code,
pre {
  font-family: var(--font-mono);
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .page {
    width: min(100% - 16px, 1120px);
    margin-top: 8px;
    padding: 16px 12px 28px;
    border-radius: 14px;
  }

  .top-buttons a,
  .button-link,
  nav a,
  .standings-switcher button,
  .division-tabs a {
    width: 100%;
  }

  nav ul,
  .top-buttons,
  .division-tabs,
  .standings-switcher {
    gap: 7px;
  }

  th,
  td {
    padding: 7px 9px;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
  }

  .page {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .top-buttons,
  nav,
  .standings-switcher,
  .division-tabs {
    display: none !important;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  th {
    position: static;
    background: #eeeeee !important;
    color: #000000;
  }

  tbody tr:nth-child(even),
  tbody tr:hover {
    background: transparent;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  .js-standings-ready .standings-division {
    display: block;
  }
}
