@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap");
:root {
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
  background: #10101c;
  color: #eeeef7;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 80% 0%, #30224a66, transparent 48%);
  min-height: 100vh;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 30px 28px;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font:
    800 28px "Barlow Condensed",
    sans-serif;
  letter-spacing: 1px;
}
.brand span {
  color: #c9ff66;
}
.api {
  font-size: 12px;
  color: #aaa9bf;
}
.intro {
  padding: 58px 0 30px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #c9ff66;
}
h1 {
  font:
    800 clamp(40px, 6vw, 64px) / 1 "Barlow Condensed",
    sans-serif;
  letter-spacing: -1px;
  margin: 16px 0;
}
.description {
  color: #aaa9bf;
  font-size: 15px;
}
.live {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
  color: #a7a6bc;
  font-size: 11px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9ff66;
}
.live.stale .dot {
  background: #ffbe66;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
#refresh {
  margin-left: 8px;
  border: 1px solid #ffffff20;
  background: transparent;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
}
#refresh:disabled {
  opacity: 0.5;
  cursor: wait;
}
.board {
  border: 1px solid #ffffff12;
  border-radius: 12px;
  /* Keep dropdowns visible even when the table has only a few rows. */
  overflow: visible;
  background: #171724;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid #ffffff12;
}
nav {
  display: flex;
  gap: 22px;
}
nav button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 21px 0 18px;
  font-weight: 600;
  font-size: 12px;
  color: #9695ad;
  white-space: nowrap;
}
nav button[aria-pressed="true"] {
  color: #eeeef7;
  border-bottom-color: #c9ff66;
}
input {
  width: 190px;
  padding: 8px 11px;
  border: 1px solid #ffffff16;
  background: #10101c;
  border-radius: 6px;
  color: #eeeef7;
  font-size: 12px;
}
.table-scroll {
  overflow: auto;
  max-height: 65vh;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
th {
  position: sticky;
  top: 0;
  background: #1c1c2c;
  z-index: 1;
  text-align: right;
  font-size: 10px;
  letter-spacing: 0.4px;
  color: #9392aa;
  padding: 14px 16px;
}
th button {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-weight: 600;
}
th[aria-sort] button {
  color: #c9ff66;
}
th:nth-child(5),
td:nth-child(5),
th:last-child,
td:last-child {
  text-align: left;
}
td {
  text-align: right;
  padding: 16px;
  border-bottom: 1px solid #ffffff08;
}
tbody tr:hover {
  background: #ffffff04;
}
.place {
  font-weight: 600;
  color: #9695ad;
}
.name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.region {
  font-size: 9px;
  border-radius: 4px;
  padding: 4px 6px;
  color: #00a2fe;
  background: #00a2fe15;
  width: 60px;
  flex: 0 0 60px;
  text-align: center;
}
.region[data-region="APAC"] {
  color: #e94555;
  background: #e9455518;
}
.region[data-region="Americas"] {
  color: #3ae8bd;
  background: #3ae8bd15;
}
.points {
  font-weight: 700;
  color: #c9ff66;
}
.muted {
  color: #77768f;
}
.positive {
  color: #89dfab;
}
.negative {
  color: #f48d99;
}
.tag {
  font-size: 10px;
  color: #a6a5bb;
}
.tag.eligible {
  color: #89dfab;
}
.board-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  font-size: 10px;
  color: #77768f;
}
details {
  margin-top: 22px;
  color: #9392aa;
  font-size: 12px;
  line-height: 1.8;
  max-width: 850px;
}
summary {
  cursor: pointer;
  color: #bab9cb;
}
footer {
  display: flex;
  justify-content: space-between;
  color: #65647d;
  font-size: 10px;
  padding: 32px 0;
}
#empty {
  padding: 25px;
  text-align: center;
  color: #9392aa;
}
.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;
}
:focus-visible {
  outline: 2px solid #c9ff66;
  outline-offset: 4px;
}
@media (max-width: 700px) {
  main {
    padding: 20px 14px;
  }
  .intro {
    padding-top: 38px;
  }
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 14px 12px;
  }
  nav {
    justify-content: space-between;
    gap: 12px;
  }
  input {
    width: 100%;
  }
  td,
  th {
    padding: 14px 11px;
  }
  .board-footer,
  footer {
    flex-wrap: wrap;
  }
  .table-scroll {
    max-height: 70vh;
  }
}

/* Compact table-only layout. */
.board-footer .live {
  margin-top: 0;
}
.table-scroll {
  max-height: calc(100dvh - 180px);
}
@media (max-width: 700px) {
  .table-scroll {
    max-height: calc(100dvh - 220px);
  }
}

[hidden] {
  display: none !important;
}
.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.columns-menu {
  position: relative;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}
.columns-menu summary {
  list-style: none;
  padding: 8px 11px;
  border: 1px solid #ffffff20;
  border-radius: 6px;
  white-space: nowrap;
}
.columns-menu summary::-webkit-details-marker {
  display: none;
}
.columns-menu[open] summary {
  color: #c9ff66;
  border-color: #c9ff6660;
}
.columns-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  width: 205px;
  max-height: calc(100dvh - 180px);
  overflow-y: auto;
  padding: 10px;
  background: #222233;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  box-shadow: 0 12px 35px #0008;
}
.columns-panel label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 5px;
  cursor: pointer;
  color: #ddddeb;
}
.columns-panel input {
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #c9ff66;
}
.columns-panel button {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  border: 1px solid #ffffff20;
  background: transparent;
  border-radius: 5px;
  font-size: 11px;
}
@media (max-width: 700px) {
  .table-tools > label {
    flex: 1;
  }
  .columns-panel {
    left: 0;
    right: auto;
  }
}

/* Projected qualification colours remain visible for every sort order. */
tbody tr[data-qualification="direct"] {
  background: #e6bc4b12;
}
tbody tr[data-qualification="knockout"] {
  background: #67dba40c;
}
tbody tr[data-qualification="direct"]:hover {
  background: #e6bc4b20;
}
tbody tr[data-qualification="knockout"]:hover {
  background: #67dba418;
}
tr[data-qualification="direct"] td:first-child {
  box-shadow: inset 3px 0 #e6bc4b;
}
tr[data-qualification="knockout"] td:first-child {
  box-shadow: inset 3px 0 #67dba4;
}
.qualification-label {
  font-size: 9px;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 4px;
}
.qualification-label.direct {
  color: #e6bc4b;
  background: #e6bc4b15;
}
.qualification-label.knockout {
  color: #67dba4;
  background: #67dba415;
}
.qualification-label.country-cap {
  color: #aaa9bf;
  background: #ffffff08;
}
.qualification-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 12px 20px 0;
  font-size: 10px;
}
.qualification-legend .direct {
  color: #e6bc4b;
}
.qualification-legend .knockout {
  color: #67dba4;
}
.qualification-legend .direct::before,
.qualification-legend .knockout::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
.legend-note {
  color: #77768f;
}

.player-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 2px;
}

.flag-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 15px;
  flex: 0 0 20px;
}

.mode-start {
  border-left: 1px solid #ffffff12;
}
.mode-count {
  font-size: 11px;
}
.streak-pill {
  display: inline-block;
  min-width: 34px;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: #77768f;
}
.streak-pill.active {
  color: #89dfab;
  background: #89dfab12;
  font-weight: 600;
}

.assumption-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 11px;
  color: #bab9cb;
  cursor: pointer;
}
.assumption-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #c9ff66;
}
.preview-note {
  margin: 0;
  padding: 12px 20px 0;
  color: #c9ff66;
  font-size: 11px;
}
@media (max-width: 700px) {
  .table-tools {
    flex-wrap: wrap;
  }
  .assumption-toggle {
    flex-basis: 100%;
    padding-top: 8px;
  }
}
