:root {
  --bg-top: #f0f2f8;
  --bg-bottom: #ece6ff;
  --card: #ffffff;
  --text: #1f1f2e;
  --muted: #7a7a90;
  --line: #dadada;
  --accent: #a956ff;
  --accent-strong: #8f37eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #ffffff 0%, var(--bg-top) 40%, var(--bg-bottom) 100%);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.hero {
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  font-weight: 600;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(48, 16, 87, 0.08);
  overflow: hidden;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #faf7ff 0%, #ffffff 90%);
}

.pill-group {
  display: inline-flex;
  gap: 8px;
  background: #f2edf9;
  border-radius: 999px;
  padding: 4px;
}

.pill {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #5d4d74;
  background: transparent;
}

.pill.active {
  background: #ffffff;
  color: #2e1d47;
  box-shadow: 0 2px 10px rgba(75, 20, 132, 0.14);
}

.search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search input {
  width: min(320px, 62vw);
  padding: 10px 12px;
  border: 1px solid #d8cfe8;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
}

.search input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid #d9bbff;
  outline-offset: 1px;
}

.table-wrap {
  overflow: auto;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.rating-table th,
.rating-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #ece8f4;
  font-size: 14px;
}

.rating-table th {
  color: #5f5073;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rating-table tbody tr:hover {
  background: #f9f6ff;
}

.team-name {
  font-weight: 700;
}

.sort-btn {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.state {
  padding: 24px 18px;
  font-weight: 700;
  color: #494460;
}

.state.error {
  color: #b22f2f;
}

@media (max-width: 900px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search input {
    width: 100%;
  }
}
