:root {
  color-scheme: dark;
  --bg: #090c11;
  --panel: #10151d;
  --panel2: #151c26;
  --text: #edf4ff;
  --muted: #8996a9;
  --line: #253041;
  --accent: #74b9ff;
  --good: #66d9a6;
  --warn: #ffc66d;
  --bad: #ff7b7b;
  --surface: #0c1118;
  --input-bg: #090d13;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top,#111827 0,#090c11 48%);
  color: var(--text);
  font: 15px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
}
.shell {
  width: min(1180px,100%);
  margin: auto;
  padding: 20px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 18px 0;
}
.page-head h1 {
  font-size: 34px;
  margin: 2px 0;
}
.page-head p {
  margin: 4px 0;
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  font-weight: 800;
}
.back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 14px;
}
.panel,.metric {
  background: linear-gradient(180deg,var(--panel2),var(--panel));
  border: 1px solid var(--line);
  border-radius: 14px;
}
.panel {
  padding: 16px;
}
.search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  outline: none;
}
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #74b9ff16;
}
.search button {
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 0 18px;
  background: #74b9ff18;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 4px 0 12px;
}
.section-head span {
  color: var(--muted);
  font-size: 13px;
}
.player-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
}
.player-card:hover {
  border-color: #74b9ff80;
  background: #101925;
}
.player-count {
  text-align: right;
}
.player-count strong {
  display: block;
  font-size: 18px;
}
.player-count span {
  font-size: 11px;
  color: var(--muted);
}
.mono {
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 11px;
  margin-top: 4px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 11px;
  margin: 18px 0;
}
.metric {
  padding: 15px;
}
.metric span,.metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric strong {
  display: block;
  font-size: 22px;
  margin: 4px 0;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: 12px;
  align-items: start;
}
.table-wrap {
  max-height: 620px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}
th {
  position: sticky;
  top: 0;
  background: #111823;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
td:not(:first-child),th:not(:first-child) {
  text-align: right;
}
td a {
  color: var(--accent);
  text-decoration: none;
}
.match-list {
  display: grid;
  gap: 8px;
}
.match-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: var(--surface);
}
.match-result {
  text-align: right;
  min-width: 105px;
}
.match-result strong,.match-result small {
  display: block;
}
.match-result.win strong {
  color: var(--good);
}
.match-result.loss strong {
  color: var(--bad);
}
.match-result.tie strong {
  color: var(--warn);
}
.links {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 5px;
}
.links a {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}
.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0 4px;
}
@media(max-width:850px) {
  .stats-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .player-grid {
    grid-template-columns: 1fr;
  }
}
@media(max-width:520px) {
  .shell {
    padding: 14px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .match-row {
    flex-direction: column;
  }
  .match-result {
    text-align: left;
  }
  .links {
    justify-content: flex-start;
  }
  .page-head h1 {
    font-size: 28px;
  }
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.pagination a,.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line,#2a3345);
  border-radius: 9px;
  text-decoration: none;
}
.pagination .page-numbers {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.pagination .current {
  font-weight: 800;
  border-color: currentColor;
}
.pagination .disabled,.pagination .ellipsis {
  opacity: .45;
  pointer-events: none;
}
.pagination .ellipsis {
  border-color: transparent;
  padding-inline: 4px;
}
@media(max-width:640px) {
  .pagination {
    justify-content: center;
  }
  .pagination>a,.pagination>span {
    order: 2;
  }
  .pagination .page-numbers {
    width: 100%;
    justify-content: center;
    order: 1;
  }
}
.profile-section {
  margin: 12px 0;
}
.advanced-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 9px;
}
.mini-stat,.mode-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.mini-stat {
  padding: 12px;
}
.mini-stat span,.mini-stat small,.mode-card small,.mode-core span,.mode-core small,.objective-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.mini-stat strong {
  display: block;
  font-size: 19px;
  margin-top: 3px;
}
.accuracy-stat {
  text-align: center;
}
.accuracy-stat>span {
  text-align: left;
}
.accuracy-stat>small {
  text-align: center;
  margin-top: 7px;
}
.stat-arc {
  --pct: 0;
  position: relative;
  width: 92px;
  aspect-ratio: 1;
  margin: 8px auto 2px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct)*1%),#1a2431 0);
  display: grid;
  place-items: center;
}
.stat-arc::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat-arc>div {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}
.arc-average-mark {
  position: absolute;
  inset: 0;
  z-index: 3;
  transform: rotate(calc(var(--avg)*3.6deg));
  pointer-events: none;
}
.arc-average-mark::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 3px;
  height: 15px;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 7px #ffc66d88;
  transform: translateX(-50%);
}
.percentile-rank {
  color: var(--good);
  font-weight: 800;
}
.stat-arc strong {
  font-size: 18px;
  margin: 0;
}
.stat-arc::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  box-shadow: 0 0 18px #74b9ff18;
  pointer-events: none;
}
.medal-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
.medal-chip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
}
.medal-chip strong,.medal-chip small {
  display: block;
}
.medal-chip small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.medal-chip>span {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.mode-card {
  padding: 13px;
  min-width: 0;
}
.mode-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.mode-card-head>div {
  min-width: 0;
}
.mode-card-head strong {
  display: block;
  overflow-wrap: anywhere;
}
.mode-card-head>span {
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}
.mode-core {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  margin-top: 10px;
}
.mode-core>div {
  min-width: 0;
}
.mode-core strong {
  display: block;
  margin: 2px 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.mode-combat {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.mode-combat span {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 7px;
}
.mode-combat b {
  color: var(--text);
}
.objective-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.objective-grid>div {
  background: var(--input-bg);
  border-radius: 8px;
  padding: 8px;
}
.objective-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}
@media(max-width:1000px) {
  .advanced-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .medal-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
@media(max-width:760px) {
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .objective-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px) {
  .advanced-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .medal-grid {
    grid-template-columns: 1fr;
  }
  .mode-core {
    grid-template-columns: 1fr 1fr;
  }
  .objective-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.mode-other {
  padding: 0;
  overflow: hidden;
}
.mode-other>summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  font-weight: 700;
}
.mode-other>summary::-webkit-details-marker {
  display: none;
}
.mode-other>summary::before {
  content: "▸";
  display: inline-block;
  color: var(--accent);
  margin-right: 8px;
  transition: transform .18s ease;
}
.mode-other[open]>summary::before {
  transform: rotate(90deg);
}
.mode-other>summary span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.mode-grid-collapsed {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.played-with-top {
  margin-top: 12px;
}
.played-with-table {
  max-height: 420px;
}
.played-with-table th:nth-child(6),.played-with-table td:nth-child(6) {
  border-left: 2px solid color-mix(in srgb,var(--accent) 60%,var(--line));
  padding-left: 16px;
}
.played-with-table th:nth-child(3),.played-with-table th:nth-child(4),.played-with-table th:nth-child(5) {
  background: color-mix(in srgb,var(--good) 7%,#111823);
}
.played-with-table th:nth-child(6),.played-with-table th:nth-child(7),.played-with-table th:nth-child(8) {
  background: color-mix(in srgb,var(--bad) 7%,#111823);
}
.percentile-rank.below-average {
  color: var(--warn);
}
.percentile-rank.unranked {
  color: var(--muted);
  font-weight: 700;
}
/* Player profile format tabs */
.profile-format-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
  padding: .35rem;
  border: 1px solid var(--line,#344254);
  border-radius: 12px;
}
.profile-format-tab {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: .75rem 1rem;
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
  color: inherit;
}
.profile-format-tab:hover {
  background: rgba(120,155,200,.14);
}
.profile-format-tab.is-active {
  background: #326db6;
  color: #fff;
}
/* Player profile stat scopes: keep 4v4 and other lobby sizes visually distinct. */
.profile-scope-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb,var(--panel) 92%,var(--accent) 8%);
}
.profile-scope-head h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.45rem,2.5vw,2rem);
}
.profile-scope-head p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.45;
}
.profile-scope-head .scope-count {
  white-space: nowrap;
  font-weight: 700;
  color: var(--accent);
}
.other-scope-head {
  margin-top: 34px;
  background: color-mix(in srgb,var(--panel) 94%,var(--line) 6%);
}
.format-section {
  scroll-margin-top: 100px;
}
.format-stats-grid {
  margin: 0 0 18px;
}
.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.subsection-head span {
  color: var(--muted);
  font-size: .9rem;
}
.compact-match-list .match-row {
  padding-block: 10px;
}
@media(max-width:720px) {
  .profile-scope-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .profile-scope-head .scope-count {
    white-space: normal;
  }
}
/* 4v4 career-vs-recent averages */
.averages-table-wrap {
  max-height: none;
}
.averages-table th:first-child,.averages-table td:first-child {
  text-align: left;
}
.averages-table td {
  font-variant-numeric: tabular-nums;
}
.averages-table .form-delta {
  font-weight: 800;
}
.averages-table .form-delta.improving {
  color: var(--good);
}
.averages-table .form-delta.declining {
  color: var(--bad);
}
.averages-table .form-delta.neutral {
  color: var(--muted);
}
.averages-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
}
@media(max-width:640px) {
  .averages-table th,.averages-table td {
    padding: 8px 7px;
    font-size: 12px;
  }
  .averages-table th {
    font-size: 10px;
  }
  .averages-panel .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
/* EU Halo player administration */
.admin-login-page {
  display: grid;
  place-items: start center;
  padding-top: 5vh;
}
.admin-login-card {
  width: min(460px,100%);
}
.admin-login-card h1 {
  margin: .35rem 0;
}
.admin-login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.admin-login-form label {
  display: grid;
  gap: 6px;
}
.admin-login-form input,.admin-player-search input,.admin-player-select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
.admin-login-form input:focus,.admin-player-search input:focus,.admin-player-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #74b9ff16;
}
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111823;
  color: var(--text);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.admin-btn:hover {
  border-color: var(--accent);
  background: #152031;
}
.admin-btn-primary {
  border-color: var(--accent);
  background: #74b9ff18;
}
.admin-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
}
.admin-page-head h1 {
  font-size: 34px;
  margin: 2px 0 6px;
}
.admin-alert {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.admin-alert-error {
  color: #ffd7dd;
  border-color: #ff7b7b66;
  background: #ff7b7b14;
}
.admin-alert-success {
  color: #d7ffe6;
  border-color: #66d9a64d;
  background: #66d9a612;
}
.admin-player-search {
  display: grid;
  grid-template-columns: minmax(220px,1fr) auto auto;
  gap: 9px;
}
.admin-player-results-meta {
  margin: 12px 2px 6px;
  color: var(--muted);
  font-size: .88rem;
}
.admin-player-table-card {
  padding: 0;
}
.admin-table-wrap {
  overflow: auto;
  max-height: 70vh;
}
.admin-player-table th,.admin-player-table td {
  text-align: left;
  vertical-align: middle;
}
.admin-player-table th:nth-child(3),.admin-player-table th:nth-child(4),.admin-player-table th:nth-child(5),.admin-player-table th:nth-child(6),.admin-player-table th:nth-child(7),.admin-player-table td:nth-child(3),.admin-player-table td:nth-child(4),.admin-player-table td:nth-child(5),.admin-player-table td:nth-child(6),.admin-player-table td:nth-child(7) {
  text-align: center;
}
.admin-player-table th:last-child,.admin-player-table td:last-child {
  width: 1%;
  white-space: nowrap;
}
.admin-player-xuid {
  display: block;
  max-width: 260px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font: 11px ui-monospace,SFMono-Regular,Menlo,monospace;
  text-overflow: ellipsis;
}
.admin-player-select {
  min-width: 190px;
}
.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
}
.admin-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.admin-evidence {
  display: inline-flex;
  min-width: 30px;
  justify-content: center;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.admin-linked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.admin-linked-list span {
  padding: 4px 7px;
  border: 1px solid #74b9ff2e;
  border-radius: 999px;
  background: #74b9ff12;
  font-size: .76rem;
}
.admin-save-button {
  min-width: 70px;
}
.admin-main-picker {
  position: relative;
  min-width: 210px;
}
.admin-main-picker .admin-player-select {
  padding-right: 34px;
}
.admin-main-clear {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 25px;
  height: 25px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.admin-main-clear:hover {
  color: var(--text);
  background: #ffffff12;
}
.admin-main-results {
  position: absolute;
  z-index: 100;
  top: calc(100% + 4px);
  left: 0;
  width: min(360px,80vw);
  max-height: 290px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b121b;
  box-shadow: 0 16px 40px #0000006b;
}
.admin-main-result {
  display: flex;
  width: 100%;
  padding: 8px 9px;
  flex-direction: column;
  gap: 2px;
  border: 0;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.admin-main-result:hover,.admin-main-result:focus-visible {
  background: #74b9ff1a;
}
.admin-main-result small {
  max-width: 310px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}
.admin-main-result-clear {
  color: var(--muted);
}
.admin-main-result-message {
  padding: 9px;
  color: var(--muted);
  font-size: .82rem;
}
.admin-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 0 4px;
}
.admin-pagination>:last-child {
  justify-self: end;
}
.admin-pagination>span:nth-child(2) {
  color: var(--muted);
  font-size: 1rem;
}
@media(max-width:700px) {
  .admin-page-head {
    align-items: stretch;
    flex-direction: column;
  }
  .admin-player-search {
    grid-template-columns: 1fr;
  }
  .admin-pagination {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .admin-pagination>:last-child {
    justify-self: stretch;
  }
  .admin-pagination .admin-btn {
    width: 100%;
  }
}
.admin-region-select {
  min-width: 205px;
  cursor: pointer;
}
.admin-player-table th:nth-child(3),.admin-player-table td:nth-child(3),.admin-player-table th:nth-child(4),.admin-player-table td:nth-child(4),.admin-player-table th:nth-child(5),.admin-player-table td:nth-child(5) {
  text-align: center;
}
/* Admin player table must never widen the surrounding panel/page. */
.admin-player-table-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.admin-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.admin-player-table {
  width: max-content;
  min-width: 1160px;
  max-width: none;
}
.admin-player-table th,.admin-player-table td {
  white-space: nowrap;
}
.admin-player-table td:first-child,.admin-player-table td:nth-child(7) {
  white-space: normal;
}
@media(max-width:700px) {
  .admin-player-table {
    min-width: 1080px;
  }
}
.linked-account-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.linked-account-row>span {
  color: var(--muted);
  font-size: 12px;
}
.linked-account-row>strong {
  padding: 3px 7px;
  border: 1px solid #74b9ff38;
  border-radius: 999px;
  background: #74b9ff10;
  font-size: 12px;
  font-weight: 700;
}
/* Skill rankings */
.rankings-controls-panel {
  margin-bottom: 16px;
}
.rankings-controls {
  display: grid;
  grid-template-columns: minmax(170px,1.25fr) minmax(90px,.55fr) repeat(3,minmax(145px,.85fr)) auto;
  gap: 10px;
  align-items: end;
}
.rankings-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.rankings-controls label>span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.rankings-controls input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  outline: none;
}
.rankings-controls input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #74b9ff16;
}
.rankings-submit {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: #74b9ff18;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.rankings-status {
  margin: 14px 0;
}
.rankings-status p {
  margin: 6px 0;
  color: var(--muted);
}
.rankings-status-building {
  border-color: #ffc66d66;
  background: #ffc66d0a;
}
.rankings-overview {
  margin: 16px 0;
}
.rankings-table-card {
  padding: 16px;
  min-width: 0;
}
.rankings-table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  overflow: auto;
}
.rankings-table {
  min-width: 1740px;
  font-variant-numeric: tabular-nums;
}
.rankings-table th:first-child,.rankings-table td:first-child,.rankings-table th:nth-child(2),.rankings-table td:nth-child(2) {
  text-align: left;
}
.rankings-table tr.ranking-selected td {
  background: #74b9ff16;
  border-bottom-color: #74b9ff55;
}
.rankings-table tr.ranking-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}
.ranking-positive {
  color: var(--good);
  font-weight: 750;
}
.ranking-negative {
  color: var(--bad);
  font-weight: 750;
}
@media(max-width:1050px) {
  .rankings-controls {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .rankings-submit {
    width: 100%;
  }
}
@media(max-width:650px) {
  .rankings-controls {
    grid-template-columns: 1fr 1fr;
  }
  .rankings-controls label:first-child {
    grid-column: 1/-1;
  }
  .rankings-submit {
    grid-column: 1/-1;
  }
  .rankings-table-card {
    padding: 12px;
  }
  .rankings-table {
    min-width: 1650px;
  }
}
/* Searchable historical match index */
.history-filters {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr)) repeat(2,minmax(145px,.7fr)) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 18px;
}
.history-filters label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.history-filters input,.history-filters select {
  width: 100%;
  min-width: 0;
  height: 41px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text);
  padding: 8px;
  font: inherit;
  color-scheme: dark;
}
.history-filters button,.history-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 41px;
  padding: 0 13px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: #74b9ff18;
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.history-clear {
  border-color: var(--line);
  background: transparent;
}
.history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.history-table {
  min-width: 810px;
}
.history-table th,.history-table td {
  text-align: left!important;
}
.history-links {
  white-space: nowrap;
}
.history-links a {
  margin-right: 12px;
}
@media(max-width:1100px) {
  .history-filters {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}
@media(max-width:650px) {
  .history-filters {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .history-filters label:first-child {
    grid-column: 1/-1;
  }
  .history-filters button,.history-clear {
    width: 100%;
  }
}
/* Compact participant footnote below each historical match. */
.history-table tr.history-participants-row td {
  padding-top: 4px;
  padding-bottom: 12px;
  background: #0c1119;
  border-bottom: 1px solid var(--line);
  white-space: normal!important;
}
.history-participants {
  display: flex;
  align-items: baseline;
  gap: 6px 9px;
  flex-wrap: wrap;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.history-participants-label {
  font-weight: 750;
  color: var(--text);
}
.history-team-label {
  font-weight: 700;
  color: var(--accent);
}
.history-team-divider {
  opacity: .65;
}
.history-roster-empty {
  font-style: italic;
}
/* Collapsed-by-default consecutive-roster match series */
.history-series-list {
  display: grid;
  gap: 10px;
}
.history-series {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0c1119;
}
.history-series-summary {
  cursor: pointer;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--text);
}
.history-series-summary::marker {
  color: var(--accent);
}
.history-series-hint {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.history-series-items {
  display: grid;
}
.history-match-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #0c1119;
  min-width: 0;
}
.history-series .history-match-item {
  background: var(--input-bg);
}
.history-match-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 9px;
  font-size: 13px;
}
.history-match-main .history-links {
  margin-left: auto;
}
@media(max-width:650px) {
  .history-series-summary {
    align-items: flex-start;
    flex-direction: column;
  }
  .history-match-main .history-links {
    margin-left: 0;
  }
}
/* Series headers show game order and shared players even while collapsed. */
.history-series-overview {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.history-series-heading {
  font-size: 14px;
}
.history-series-games {
  flex-wrap: wrap;
}
.history-series-game {
  flex-wrap: wrap;
  border: 1px solid var(--line);
  font-size: 12px;
}
.history-series-game-index,.history-series-game-map,.history-series-label {
  color: var(--muted);
}
.history-series-roster {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}
.history-series-hint {
  flex-shrink: 0;
  align-self: flex-start;
}
@media(max-width:650px) {
  .history-series-games {
    flex-direction: column;
    align-items: stretch;
  }
  .history-series-game {
    display: block;
  }
}
.history-series-score {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
}
.history-series-score small {
  font-weight: 400;
  color: var(--muted);
}
/* Match cards: scannable vertical match metadata on the left and two balanced team columns. */
.history-match-layout {
  display: grid;
  grid-template-columns: minmax(160px,205px) minmax(0,1fr);
  gap: 18px;
  align-items: stretch;
}
.history-match-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 3px;
  padding: 4px 16px 4px 2px;
  border-right: 1px solid var(--line);
}
.history-detail-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .075em;
  text-transform: uppercase;
  margin-top: 8px;
}
.history-detail-label:first-child {
  margin-top: 0;
}
.history-detail-value {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.history-match-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: auto;
  padding-top: 14px;
  font-size: 11px;
  white-space: normal;
}
.history-match-links a {
  margin: 0;
  white-space: nowrap;
}
.history-match-teams {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  min-width: 0;
  align-items: stretch;
}
.history-match-team {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px;
  background: rgba(255,255,255,.025);
}
.history-match-team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.history-match-team-name {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.history-match-team-score {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  color: var(--text);
}
.history-match-team-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.history-match-player {
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.history-match-no-teams {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 12px;
}
@media(max-width:750px) {
  .history-match-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .history-match-details {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 12px;
    row-gap: 3px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
  }
  .history-detail-label {
    margin-top: 5px;
  }
  .history-detail-value {
    grid-row: auto;
  }
  .history-match-links {
    grid-column: 1/-1;
    padding-top: 7px;
    margin: 0;
  }
}
@media(max-width:420px) {
  .history-match-teams {
    gap: 7px;
  }
  .history-match-team {
    padding: 9px;
  }
  .history-match-team-score {
    font-size: 22px;
  }
  .history-match-team-name {
    font-size: 12px;
  }
}
/* Series card refresh: match-style metadata rail and readable scoreboard. */
.history-series-summary {
  display: block;
  padding: 0;
  list-style: none;
}
.history-series-summary::-webkit-details-marker {
  display: none;
}
.history-series-layout {
  display: grid;
  grid-template-columns: minmax(160px,205px) minmax(0,1fr);
  gap: 18px;
  padding: 15px;
  min-width: 0;
}
.history-series-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 4px;
  padding: 4px 16px 4px 2px;
  border-right: 1px solid var(--line);
}
.history-series-kicker,.history-series-section-label {
  font-size: 10px;
  letter-spacing: .09em;
  font-weight: 800;
  color: var(--muted);
}
.history-series-kicker {
  color: var(--accent);
}
.history-series-count {
  font-size: 18px;
  line-height: 1.2;
  margin: 3px 0 9px;
}
.history-series-meta .history-detail-label {
  margin-top: 9px;
}
.history-series-expand {
  margin-top: auto;
  padding-top: 17px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.history-series-chevron {
  display: inline-block;
  transition: transform .2s ease;
}
.history-series[open] .history-series-chevron {
  transform: rotate(180deg);
}
.history-series-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.history-series-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.history-series-score-team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.history-series-score-name {
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.history-series-score-number {
  font-weight: 850;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.history-series-score-separator {
  color: var(--muted);
  font-size: 21px;
}
.history-series-undecided {
  flex-basis: 100%;
  text-align: center;
  color: var(--muted);
}
.history-series-score-unavailable {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
}
.history-series-games {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(185px,1fr));
  gap: 8px;
}
.history-series-game {
  display: grid;
  grid-template-columns: 23px minmax(0,1fr);
  align-items: center;
  gap: 3px 9px;
  padding: 10px;
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}
.history-series-game-index {
  grid-row: span 2;
  align-self: center;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 23px;
  height: 23px;
  color: var(--accent);
  font-weight: 800;
}
.history-series-game-mode {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.history-series-game-map {
  grid-column: 2;
  font-size: 11px;
}
.history-series-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.history-series-player {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  background: rgba(255,255,255,.02);
}
.history-series-items {
  border-top: 1px solid var(--line);
  padding: 12px;
  gap: 10px;
}
@media(max-width:750px) {
  .history-series-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .history-series-meta {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
  }
  .history-series-kicker,.history-series-count,.history-series-expand {
    grid-column: 1/-1;
  }
  .history-series-count {
    margin: 0;
  }
  .history-series-expand {
    padding-top: 5px;
  }
  .history-series-meta .history-detail-label {
    margin-top: 2px;
  }
}
@media(max-width:450px) {
  .history-series-scoreboard {
    gap: 7px;
    padding: 10px;
  }
  .history-series-score-team {
    gap: 6px;
  }
  .history-series-score-number {
    font-size: 24px;
  }
  .history-series-score-name {
    font-size: 12px;
  }
  .history-series-games {
    grid-template-columns: 1fr;
  }
}
/* Match player multi-select with accessible suggested gamertags. */
.history-player-filter {
  grid-column: span 2;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.history-player-filter>label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.history-player-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.history-player-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(116,185,255,.12);
  font-size: 12px;
}
.history-player-remove {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.history-player-help {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.history-player-suggestions {
  position: absolute;
  top: calc(100% - 17px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  background: #121a27;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 12px 25px rgba(0,0,0,.4);
}
.history-player-suggestions[hidden] {
  display: none;
}
.history-player-option {
  display: block;
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.history-player-option:hover,.history-player-option:focus {
  background: rgba(116,185,255,.18);
}
@media(max-width:650px) {
  .history-player-filter {
    grid-column: 1/-1;
  }
}
/* Community overview */
.community-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 12px;
  margin: 18px 0;
}
.community-double {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  margin: 14px 0;
  align-items: start;
}
.community-activity {
  margin-bottom: 14px;
}
.community-activity h2,.community-double h2 {
  font-size: 19px;
  margin: 0;
}
.community-activity .section-head {
  margin-bottom: 15px;
}
.community-activity .section-head p {
  margin: 2px 0 0;
  font-size: 12px;
}
.community-switch {
  display: flex;
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: 10px;
  gap: 3px;
}
.community-switch button {
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  background: none;
  color: var(--muted);
  font: 600 12px/1 system-ui;
  cursor: pointer;
}
.community-switch button.selected {
  color: var(--text);
  background: #253b57;
}
.community-graph-container {
  height: 310px;
  position: relative;
  min-width: 0;
}
.community-graph-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.community-chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.community-rank-list {
  display: grid;
  gap: 12px;
  max-height: 640px;
  overflow: auto;
}
.community-rank-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  overflow-wrap: anywhere;
}
.community-rank-head small {
  color: var(--muted);
  font-weight: 400;
  padding-right: 6px;
}
.community-rank-head strong {
  white-space: nowrap;
}
.community-rank>small {
  font-size: 11px;
  color: var(--muted);
}
.community-track {
  height: 6px;
  border-radius: 8px;
  background: #253041;
  margin: 5px 0;
  overflow: hidden;
}
.community-track>div {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg,#488cd8,var(--accent));
}
.community-table-scroll {
  max-height: 680px;
  overflow: auto;
}
.community-table-scroll td:nth-child(2),.community-table-scroll th:nth-child(2) {
  text-align: left;
}
.community-table-scroll td:first-child {
  color: var(--muted);
}
.community-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 17px 0;
}
@media(max-width:870px) {
  .community-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .community-double {
    grid-template-columns: 1fr;
  }
}
@media(max-width:510px) {
  .community-activity .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .community-kpis .metric strong {
    font-size: 19px;
  }
  .community-graph-container {
    height: 250px;
  }
  .community-chart-footer {
    flex-direction: column;
  }
}
/* Community team victory counters */
.community-win-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}
.community-win-team {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.15rem;
  border: 1px solid var(--border-color,rgba(140,155,185,.23));
  border-radius: 12px;
  background: rgba(125,145,180,.06);
}
.community-win-team span {
  font-weight: 650;
}
.community-win-team strong {
  font-size: clamp(1.8rem,4vw,2.7rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.community-win-team small {
  opacity: .7;
}
@media(max-width:420px) {
  .community-win-grid {
    gap: .5rem;
  }
  .community-win-team {
    padding: .8rem;
  }
}
/* Share of decided Team Eagle / Team Cobra matches */
.community-win-track {
  display: flex;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 32px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(125,145,180,.15);
  margin-top: 1rem;
}
.community-win-track>div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  transition: width .2s ease;
}
.community-win-track>div span {
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,.65);
  font-variant-numeric: tabular-nums;
}
.community-win-track::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,.55),0 0 6px rgba(0,0,0,.4);
  pointer-events: none;
}
.community-win-eagle {
  background: linear-gradient(90deg,#3188dc,#65b7ff);
}
.community-win-cobra {
  background: linear-gradient(90deg,#d95366,#f38b98);
}
/* Four-player team summary */
.community-rosters-table {
  min-width: 850px;
}
.community-roster-names {
  min-width: 260px;
  line-height: 1.75;
}
.community-roster-rate {
  min-width: 92px;
  font-variant-numeric: tabular-nums;
}
.community-roster-rate .community-track {
  margin: 3px 0 0;
}
/* Opposing four-player rosters */
.community-opponents summary {
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}
.community-opponent-list {
  min-width: 250px;
  max-width: 390px;
  padding: 8px 0;
}
.community-opponent-entry {
  padding: 8px 0;
  border-bottom: 1px solid rgba(140,160,190,.22);
  white-space: normal;
}
.community-opponent-entry:last-child {
  border-bottom: 0;
}
.community-opponent-entry .community-roster-names {
  line-height: 1.5;
}
/* Team-format page navigation */
.community-format-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.25rem;
}
.community-format-nav a {
  display: inline-flex;
  padding: .5rem 1rem;
  border: 1px solid var(--border,#596275);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
}
.community-format-nav a[aria-current="page"] {
  background: var(--accent,#2863a1);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
/* Sortable 1v1, 2v2 and 4v4 roster tables */
.community-sort-button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem 0;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.community-sort-button:hover {
  color: var(--accent,#74b9ff);
}
.community-sort-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 3px;
}
.community-sort-arrow {
  opacity: .7;
  font-size: .8em;
}
.community-rosters-table th[aria-sort]:not([aria-sort="none"]) .community-sort-arrow {
  opacity: 1;
}
/* Multi-gamertag lineup filtering */
.community-lineup-filter {
  position: relative;
  margin: 1rem 0 1.25rem;
  max-width: 720px;
}
.community-lineup-filter>label {
  display: block;
  font-weight: 700;
  margin-bottom: .4rem;
}
.community-filter-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.community-filter-controls input {
  flex: 1 1 220px;
  min-width: 160px;
  padding: .7rem;
  border: 1px solid var(--border, #667);
  border-radius: 8px;
  background: var(--surface, #202432);
  color: inherit;
}
.community-filter-controls>button,.community-filter-chip,.community-player-option {
  cursor: pointer;
  border: 1px solid var(--border, #667);
  border-radius: 7px;
  padding: .5rem .7rem;
  background: var(--surface, #202432);
  color: inherit;
}
.community-filter-chips {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}
.community-player-suggestions {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  width: min(100%,440px);
  background: var(--surface, #202432);
  border: 1px solid var(--border, #667);
  border-radius: 8px;
  max-height: 260px;
  overflow: auto;
  box-shadow: 0 12px 28px #0006;
}
.community-player-suggestions[hidden] {
  display: none;
}
.community-player-option {
  display: block;
  border: 0;
  border-radius: 0;
  width: 100%;
  text-align: left;
}
.community-player-option:hover,.community-player-option:focus-visible {
  background: rgba(76,143,240,.22);
}
#community-team-sort-table tbody tr[hidden] {
  display: none;
}
/* Keep autocomplete suggestions bounded instead of embedding every player. */
.community-filter-search {
  position: relative;
  min-width: 220px;
  flex: 1;
}
.community-filter-search input {
  width: 100%;
}
.community-autocomplete-options:not([hidden]) {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: min(100%, 420px);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  background: #151e2a;
  border: 1px solid #3b4b5f;
  border-radius: 8px;
  box-shadow: 0 12px 26px #0009;
}
.community-autocomplete-options button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
}
.community-autocomplete-options button:hover,
.community-autocomplete-options button:focus-visible {
  background: #31475c;
}
/* Date and minimum-match controls share the existing responsive filter panel. */
.community-date-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: .75rem 0;
}
.community-date-filters label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .9rem;
  min-width: 150px;
}
.community-date-filters input {
  width: 100%;
  max-width: 200px;
  min-width: 0;
  padding: .55rem .65rem;
  border: 1px solid var(--border,#7777);
  border-radius: .5rem;
  background: var(--surface,#171d2a);
  color: inherit;
}
/* Persistent lineup filter visibility */
.community-active-filters {
  border: 1px solid var(--accent,#568ddc);
  border-radius: .75rem;
  padding: .8rem 1rem;
  margin: 0 0 1.1rem;
  background: color-mix(in srgb,var(--accent,#568ddc) 8%,transparent);
}
.community-active-filter-heading {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .55rem;
}
.community-active-filter-chips {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.community-filter-chip {
  border: 1px solid var(--border,#7777);
  border-radius: 999px;
  padding: .3rem .65rem;
  background: var(--surface,#171d2a);
  font-size: .86rem;
}
.community-clear-filters {
  font-size: .9rem;
}
.community-filter-field-active {
  font-weight: 700;
  color: var(--accent,#79aaff);
}
.community-filter-field-active input {
  border-color: var(--accent,#79aaff);
}
/* Visually identify the selected match-history page. */
.pagination .page-numbers .current {
  background: var(--accent);
  color: #07111b;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #74b9ff33;
  font-weight: 900;
  opacity: 1;
}
/* Shared primary navigation: single source of truth for every page. */
.site-primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 18px;
  min-height: 40px;
}
.site-primary-nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid #344457;
  border-radius: 999px;
  background: #141e2a;
  color: #d0dbe9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  transition: background .15s,border-color .15s,color .15s;
}
.site-primary-nav > a:hover {
  color: #fff;
  border-color: #83c2ff;
  background: #20364c;
}
.site-primary-nav > a.active,.site-primary-nav > a[aria-current="page"] {
  color: #fff;
  border-color: #83c2ff;
  background: #1e3955;
  box-shadow: inset 0 -2px 0 #83c2ff;
}
.site-primary-nav > a[aria-current="page"]::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  margin-right: 7px;
  border-radius: 50%;
  background: #8ecaff;
}
.site-primary-nav > a:focus-visible {
  outline: 2px solid #b6dcff;
  outline-offset: 3px;
}
@media(max-width:520px) {
  .site-primary-nav {
    gap: 7px;
  }
  .site-primary-nav > a {
    padding: 8px 12px;
  }
}
/* Community entry points must read as links, not muted metadata. */
.community-lineups-panel {
  padding: 20px;
  border-color: #365d85;
  background: linear-gradient(120deg,#1a3048,#111c2b 67%,#111923);
}
.community-lineups-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.community-lineups-intro h2 {
  font-size: 22px;
  margin: 3px 0 4px;
  color: #f3f8ff;
}
.community-lineups-intro p {
  margin: 0;
  color: #c5d5e6;
}
.community-lineups-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #9ad0ff;
  border-radius: 10px;
  color: #07121e!important;
  background: #8ac9ff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 3px 13px #0004;
}
.community-lineups-primary:hover {
  background: #b4dfff;
  border-color: #d4ecff;
}
.community-lineups-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}
.community-lineups-formats a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid #4b759d;
  border-radius: 9px;
  background: #192d41;
  color: #eaf5ff!important;
  text-decoration: none;
  font-weight: 700;
}
.community-lineups-formats a:hover {
  border-color: #9bd1ff;
  background: #284662;
}
.community-lineups-primary:focus-visible,.community-lineups-formats a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.community-rank-head a {
  color: #9bd2ff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}
.community-rank-head a:hover {
  color: #fff;
}
@media(max-width:650px) {
  .community-lineups-intro {
    align-items: stretch;
    flex-direction: column;
  }
  .community-lineups-primary {
    width: 100%;
  }
  .community-lineups-formats a {
    flex: 1;
    justify-content: center;
  }
}
/* Shared accessibility and responsive safeguards. */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
:where(.panel,.metric,.match-row,.community-double,.community-lineups-intro,.page-head) {
  min-width: 0;
}
:where(.panel,.metric,.match-row) :where(h1,h2,h3,p) {
  overflow-wrap: break-word;
}
@media(prefers-reduced-motion:reduce) {
  .site-primary-nav > a {
    transition: none;
  }
}
/* Quiet match outcome metadata: legible without dominating match cards. */
.ranking-decision {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .5rem;
  padding: .15rem 0;
  margin-bottom: .5rem;
  border: 0;
  background: transparent;
  color: var(--muted, #a5b1be);
  font-size: .78rem;
}
.ranking-decision-badge {
  display: inline-flex;
  align-items: center;
  padding: .12rem .4rem;
  border: 1px solid rgba(160, 175, 190, .22);
  border-radius: .35rem;
  background: rgba(160, 175, 190, .06);
  color: var(--muted, #a5b1be);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.3;
}
.ranking-decision-rated {
  border-color: rgba(91, 171, 135, .24);
  background: rgba(91, 171, 135, .06);
  color: #99c7ae;
}
.ranking-decision-excluded {
  border-color: rgba(201, 132, 140, .23);
  background: rgba(201, 132, 140, .06);
  color: #c6a5a9;
}
.ranking-decision-needs-review {
  border-color: rgba(218, 171, 102, .25);
  background: rgba(218, 171, 102, .06);
  color: #c8aa83;
}
.ranking-decision-reason {
  flex: 1 1 13rem;
  min-width: 0;
  overflow-wrap: anywhere;
  opacity: .86;
}
.ranking-decision a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
/* Team prediction */
.predict-panel {
  display: grid;
  gap: 15px;
}
.predict-panel>input {
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  width: 100%;
}
.predict-teams {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}
.predict-teams section {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}
.predict-teams h2 {
  font-size: 18px;
  margin: 0 0 12px;
}
.predict-teams small {
  color: var(--muted);
}
.predict-members {
  display: grid;
  gap: 6px;
  min-height: 120px;
  align-content: start;
}
.predict-member,.predict-suggestions button {
  background: #192330;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.predict-member:hover,.predict-suggestions button:hover {
  border-color: var(--accent);
}
.predict-suggestions {
  display: grid;
  gap: 3px;
  max-height: 180px;
  overflow: auto;
}
.predict-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.predict-actions button {
  padding: 11px 14px;
  border: 1px solid var(--accent);
  background: #182c40;
  color: var(--text);
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
}
.predict-actions button:disabled {
  opacity: .5;
  cursor: wait;
}
.predict-results {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.predict-bar {
  height: 38px;
  position: relative;
  background: #d95366;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.predict-bar>div {
  position: absolute;
  inset: 0 auto 0 0;
  background: #3188dc;
}
.predict-bar span:not(.predict-center) {
  z-index: 1;
  padding: 0 12px;
  color: #fff;
  text-shadow: 0 1px 3px #000;
  font-weight: 800;
}
.predict-center {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff9;
}
@media(max-width:680px) {
  .predict-teams {
    grid-template-columns: 1fr;
  }
}
/* Predictor draggable members and touch-accessible movement controls */
.predict-member {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
  min-width: 0;
}
.predict-member:active {
  cursor: grabbing;
}
.predict-member span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.predict-member button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #27364b;
  color: var(--text);
  padding: 4px 9px;
  cursor: pointer;
  font: inherit;
}
.predict-member button:hover,.predict-member button:focus-visible {
  border-color: var(--accent);
}
.predict-members:empty::after {
  content: 'Drop players here';
  color: var(--muted);
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* Player-profile activity and win-rate comparison */
/* Shared by the canvas line and the legend so their colors cannot drift. */
.player-activity-panel { --player-activity-winrate-color: rgba(151, 173, 167, .72); }
.player-activity-chart { width:100%; min-width:0; }
.player-activity-chart canvas { width:100%; height:300px; display:block; touch-action:pan-y; }
.player-activity-legend { display:flex; flex-wrap:wrap; gap:1rem; margin:.5rem 0; color:#bac7d6; font-size:.8rem; }
.player-activity-legend span::before { content:""; display:inline-block; width:13px; height:3px; vertical-align:middle; margin-right:7px; border-radius:2px; }
.activity-legend-matches::before { background:#74b9ff; }
.activity-legend-winrate::before { background:var(--player-activity-winrate-color); }
.player-activity-detail { color:#aab7c7; font-size:.8rem; padding:.2rem 0 .6rem; }

/* Long-term player progression */
.player-progression-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1rem 0;}
.player-progression-graph {min-width:0;padding:.75rem;border:1px solid rgba(143,164,182,.16);border-radius:.65rem;color:#becbd7;font-size:.86rem;font-weight:600;}
/* Each yearly trend uses the same color for its line, markers and legend key. */
.player-progression-graph[data-metric="win_rate"] { --progression-series-color: #91afa8; }
.player-progression-graph[data-metric="kd"] { --progression-series-color: #8baace; }
.player-progression-graph[data-metric="skill_mu"] { --progression-series-color: #8baace; }
.player-progression-title { font-size:.86rem; font-weight:600; }
.player-progression-legend { display:flex;align-items:center;gap:.45rem;margin:.15rem 0 .1rem;color:#aab7c7;font-size:.76rem;font-weight:400; }
.player-progression-legend-swatch { display:inline-block;flex:0 0 16px;width:16px;height:3px;border-radius:2px;background:var(--progression-series-color); }
.player-progression-empty { color:#aab7c7;font-size:.76rem;font-weight:400;margin:.65rem 0; }
.player-progression-graph svg {width:100%;height:auto;display:block;}
.player-progression-table th,.player-progression-table td {white-space:nowrap;text-align:right;}
.player-progression-table th:first-child {text-align:left;}
.progression-small-sample {font-size:.7rem;font-weight:400;color:#b49e79;white-space:nowrap;}
@media(max-width:680px){.player-progression-metrics{grid-template-columns:1fr;}}

/* Year-over-year changes, intentionally quieter than the values. */
.yearly-diff { display: block; font-size: .72rem; font-weight: 550; margin-top: .15rem; white-space: nowrap; }
.yearly-diff.up { color: #8ccbb1; }
.yearly-diff.down { color: #d6a2a7; }
.yearly-diff.flat { color: #97a7b7; }

/* Compact /rankings algorithm explanation */
.rankings-explainer { margin-block: 1rem; }
.rankings-explainer > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; list-style-position: inside; }
.rankings-explainer > summary span { color: var(--muted, #929ba8); font-size: .86rem; font-weight: 400; }
.rankings-explainer-content { padding-top: .65rem; line-height: 1.6; }
.rankings-explainer-content p { margin: .55rem 0; }
.rankings-explainer-content code { white-space: normal; overflow-wrap: anywhere; }
