:root {
  --bg-deep: #0a0f1a;
  --bg-mid: #11182a;
  --bg-soft: #141927;
  --panel: #141927;
  --panel-light: #1e2638;
  --panel-muted: #202a3f;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-strong: rgba(255, 255, 255, 0.14);
  --ink: #f5f7fb;
  --muted: #9aa6bd;
  --muted-strong: #c9d3e3;
  --accent: #1f5eff;
  --accent-soft: rgba(31, 94, 255, 0.18);
  --rank-best: #1f5eff;
  --rank-strong: #4b72d3;
  --rank-average: #626f86;
  --rank-weak: #955f7a;
  --rank-worst: #ff5b73;
  --shadow: 0 24px 60px rgba(6, 10, 22, 0.6);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --header-control-width: 164px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "GT Pressura", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 100%),
    linear-gradient(160deg, #080b11 0%, #111722 48%, #080b11 100%);
  background-size: 100% 100%, 100% 100%;
}

body.is-modal-open {
  overflow: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: inherit;
  letter-spacing: -0.02em;
}

button,
select {
  font: inherit;
}

.page-shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 24px auto 40px;
}

.page-shell--dashboard {
  width: min(1860px, calc(100vw - 40px));
  margin-top: 20px;
}

.page-shell--pca {
  width: min(1680px, calc(100vw - 40px));
}

.topbar--pca .topbar-copy {
  flex: 1 1 520px;
  min-width: 0;
}

.topbar--pca .page-tabs--in-header {
  flex: 0 1 980px;
  min-width: 0;
  gap: 8px;
}

.page-shell--pca .page-tab-link {
  font-size: 11px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb3ff;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 26px;
  background: linear-gradient(135deg, #10192b 0%, #15507c 48%, #183244 100%);
  overflow: hidden;
  position: relative;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.topbar h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 2.8vw, 3rem);
}

.topbar-copy,
.topbar-controls {
  position: relative;
  z-index: 1;
}

.topbar--dashboard .topbar-copy {
  flex: 1 1 560px;
  max-width: 760px;
}

.topbar--dashboard .topbar-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.topbar--match-explorer .topbar-copy {
  flex: 1 1 620px;
  min-width: 0;
  max-width: 760px;
}

.topbar--match-explorer .page-tabs--in-header {
  flex: 0 1 760px;
  min-width: 0;
  gap: 8px;
}

.topbar--match-explorer .page-tab-link {
  min-width: 120px;
  padding-inline: 12px;
}

.topbar--match-explorer .headline-summary {
  display: none;
}

#match-explorer-context-banner {
  margin-bottom: 16px;
}

.page-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  margin-top: 16px;
  background: rgba(20, 25, 39, 0.96);
}

.page-tabs--in-header {
  flex-wrap: nowrap;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  margin-top: 0;
  background: transparent;
  justify-content: flex-end;
  align-self: center;
  flex: 0 1 760px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.page-tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 132px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.page-tab-link:hover,
.page-tab-link:focus-visible {
  border-color: rgba(143, 179, 255, 0.34);
  background: rgba(143, 179, 255, 0.12);
  color: #fff;
  outline: none;
}

.page-tab-link.is-active {
  border-color: rgba(143, 179, 255, 0.42);
  background: linear-gradient(180deg, rgba(31, 94, 255, 0.26), rgba(31, 94, 255, 0.12));
  color: #fff;
}

.workspace-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 12px 16px;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(21, 27, 38, 0.88), rgba(11, 15, 22, 0.78));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  overflow: visible;
  position: relative;
  z-index: 30;
  backdrop-filter: blur(18px);
}

.workspace-bar::after {
  display: none;
}

.workspace-brand,
.workspace-tools {
  position: relative;
  z-index: 1;
}

.workspace-brand {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: center;
}

.workspace-copy h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.workspace-tabs {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-tabs .page-tab-link {
  min-width: 104px;
  padding: 8px 12px;
  font-size: 0.76rem;
  background: transparent;
}

.workspace-tools {
  display: grid;
  gap: 0;
  width: min(100%, 1080px);
  max-width: 1080px;
  justify-self: end;
  justify-items: end;
  align-content: center;
}

.analysis-context-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(143, 179, 255, 0.18);
  background: linear-gradient(135deg, rgba(31, 94, 255, 0.12), rgba(17, 24, 42, 0.88));
  color: var(--muted-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.analysis-context-banner strong {
  color: #fff;
}

.analysis-context-banner__copy {
  display: grid;
  gap: 6px;
}

.analysis-link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.analysis-link-button,
.analysis-link-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(143, 179, 255, 0.22);
  color: #fff;
  text-decoration: none;
  background: rgba(31, 94, 255, 0.12);
  font-size: 0.84rem;
  font-weight: 700;
}

.analysis-link-button:hover,
.analysis-link-button:focus-visible {
  border-color: rgba(143, 179, 255, 0.4);
  background: rgba(31, 94, 255, 0.24);
  outline: none;
}

.game-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.game-hub-card {
  padding: 20px 22px;
}

.game-hub-card--timeline {
  margin-top: 18px;
}

.game-summary-ribbon {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.game-summary-pill {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.game-summary-pill__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.game-summary-pill__value {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.game-hub-list {
  display: grid;
  gap: 12px;
}

.game-hub-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.game-hub-item__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.game-hub-item__copy,
.game-hub-item__meta {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.5;
}

.match-review-row {
  cursor: pointer;
}

.match-review-row.is-active {
  background: rgba(31, 94, 255, 0.12);
  border-radius: 12px;
}

.inspector-cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
}

.inspector-cta-button,
.inspector-cta-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(143, 179, 255, 0.2);
  color: #fff;
  text-decoration: none;
  background: rgba(31, 94, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 700;
}

.inspector-cta-button:hover,
.inspector-cta-button:focus-visible {
  background: rgba(31, 94, 255, 0.22);
  outline: none;
}

.skillcorner-recommendation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.skillcorner-recommendation-action {
  border: 1px solid rgba(143, 179, 255, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .game-hub-grid {
    grid-template-columns: 1fr;
  }

  .game-summary-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .game-summary-ribbon {
    grid-template-columns: 1fr;
  }
}

.workspace-filter-pane {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 1080px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  justify-items: end;
}

.workspace-filter-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.workspace-filter-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.workspace-filter-head .workspace-tabs .page-tab-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
}

.filter-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 94px;
  padding: 7px 13px;
  border: 1px solid rgba(143, 179, 255, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(31, 94, 255, 0.26), rgba(31, 94, 255, 0.12));
  color: #fff;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.filter-menu-button:hover,
.filter-menu-button:focus-visible,
.filter-menu-button[aria-expanded="true"] {
  border-color: rgba(143, 179, 255, 0.52);
  background: linear-gradient(180deg, rgba(31, 94, 255, 0.34), rgba(31, 94, 255, 0.18));
  outline: none;
  transform: translateY(-1px);
}

.filter-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 80;
  isolation: isolate;
  width: min(980px, calc(100vw - 64px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 25, 35, 0.98), rgba(10, 14, 21, 0.98));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.filter-popover[hidden] {
  display: none;
}

.filter-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 34px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.11);
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(20, 25, 35, 0.98);
  transform: rotate(45deg);
}

.filter-popover__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.filter-popover__head .section-kicker {
  margin-bottom: 4px;
  color: rgba(143, 179, 255, 0.82);
}

.filter-popover__head h2 {
  font-size: 1.08rem;
  letter-spacing: 0;
}

.page-shell--dashboard .header-filter-bar {
  display: flex;
  justify-content: stretch;
}

.page-shell--dashboard .control-grid--header {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: stretch;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.page-shell--dashboard .control-grid--header .control {
  min-width: 0;
  max-width: none;
}

.page-shell--dashboard .control-grid--header .control--venue {
  grid-column: span 2;
  max-width: none;
}

.page-shell--dashboard .control-grid--header .control--date-range {
  grid-column: span 2;
  max-width: none;
}

.page-shell--dashboard .control--venue {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page-shell--dashboard .control--venue .segmented-toggle {
  width: 100%;
  gap: 4px;
  padding: 4px;
  min-width: 0;
}

.page-shell--dashboard .control--venue .segmented-toggle__button {
  flex: 1 1 33.333%;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.page-shell--dashboard .control span {
  color: rgba(245, 247, 251, 0.66);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  line-height: 1;
}

.page-shell--dashboard .control select {
  min-height: 34px;
  padding: 7px 10px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(16, 22, 35, 0.76);
  font-size: 0.84rem;
}

.page-shell--dashboard .control input {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(16, 22, 35, 0.76);
  color: var(--ink);
  font-size: 0.84rem;
}

.page-shell--dashboard .control input:focus {
  outline: none;
  border-color: #6b93ff;
  box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.15);
}

.page-shell--dashboard .control input:disabled {
  background: rgba(30, 38, 56, 0.72);
  color: #7f8ca4;
}

.date-range-control {
  display: grid;
  grid-template-columns: max-content minmax(148px, 1fr) max-content;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.date-range-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  max-width: 100%;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(16, 22, 35, 0.76);
  color: rgba(245, 247, 251, 0.88);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.date-range-slider {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 16px;
  top: -1px;
}

.date-range-slider__track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(92, 107, 137, 0.42) 0%,
      rgba(92, 107, 137, 0.42) var(--date-range-start, 0%),
      rgba(107, 147, 255, 0.96) var(--date-range-start, 0%),
      rgba(107, 147, 255, 0.96) var(--date-range-end, 100%),
      rgba(92, 107, 137, 0.42) var(--date-range-end, 100%),
      rgba(92, 107, 137, 0.42) 100%
    );
  transform: translateY(-50%);
}

.date-range-slider__input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  transform: translateY(-50%);
}

.page-shell--dashboard .control .date-range-slider__input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.date-range-slider__input::-webkit-slider-runnable-track {
  height: 16px;
  background: transparent;
  -webkit-appearance: none;
}

.date-range-slider__input::-moz-range-track {
  height: 16px;
  background: transparent;
}

.date-range-slider__input::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #6b93ff;
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.15);
  pointer-events: auto;
  cursor: pointer;
  -webkit-appearance: none;
}

.date-range-slider__input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #6b93ff;
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.15);
  pointer-events: auto;
  cursor: pointer;
}

.date-range-slider__input:focus {
  outline: none;
}

.workspace-filter-actions .ghost-button,
.workspace-filter-head .workspace-tabs .page-tab-link {
  min-width: auto;
}

.workspace-filter-actions .ghost-button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
}

.workspace-scale {
  gap: 8px 12px;
  justify-content: flex-end;
  border-top: 0;
  padding-top: 0;
  width: 100%;
  opacity: 0.76;
}

.workspace-scale .legend-item {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workspace-scale .legend-swatch {
  width: 8px;
  height: 8px;
}

.headline-summary,
.source-summary,
.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.page-shell--dashboard .headline-summary {
  margin-top: 4px;
  max-width: 640px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(245, 247, 251, 0.78);
}

.topbar .headline-summary {
  color: rgba(245, 247, 251, 0.82);
  max-width: 720px;
}

.legend {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: rgba(245, 247, 251, 0.82);
}

.header-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
}

.control-grid--header {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
}

.control-grid--header .control {
  flex: 0 0 var(--header-control-width);
}

.topbar--dashboard .control span {
  color: rgba(245, 247, 251, 0.84);
}

.topbar--dashboard .control select {
  background: rgba(20, 25, 39, 0.88);
}

.header-filter-bar .ghost-button {
  white-space: nowrap;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.legend-swatch.rank-best {
  background: var(--rank-best);
}

.legend-swatch.rank-strong {
  background: var(--rank-strong);
}

.legend-swatch.rank-average {
  background: var(--rank-average);
}

.legend-swatch.rank-weak {
  background: var(--rank-weak);
}

.legend-swatch.rank-worst {
  background: var(--rank-worst);
}

.filters {
  margin-top: 18px;
  padding: 22px 26px;
  background: rgba(20, 25, 39, 0.96);
}

.filters-head,
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.filters-head {
  margin-bottom: 16px;
}

.filters-head h2,
.section-head h2 {
  font-size: 1.45rem;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.control {
  display: grid;
  gap: 8px;
}

.control span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.control select {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--panel-border-strong);
  background: var(--panel-light);
  color: var(--ink);
}

.control select:focus {
  outline: none;
  border-color: #6b93ff;
  box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.15);
}

.control select:disabled {
  background: rgba(30, 38, 56, 0.72);
  color: #7f8ca4;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 11px 15px;
  border: 1px solid var(--panel-border-strong);
  border-radius: 999px;
  background: var(--panel-light);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.ghost-button:hover {
  background: #28324b;
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.ghost-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.ghost-button:disabled:hover {
  background: var(--panel-light);
  border-color: var(--panel-border-strong);
}

.ghost-button[aria-pressed="true"] {
  border-color: rgba(143, 179, 255, 0.42);
  background: rgba(50, 76, 132, 0.9);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ghost-button--compact {
  padding: 8px 12px;
  font-size: 0.78rem;
}

.ghost-button[aria-pressed="true"]:hover {
  background: rgba(58, 87, 150, 0.96);
  border-color: rgba(143, 179, 255, 0.56);
}

.source-summary {
  margin-top: 14px;
}

.status-banner {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
}

.status-banner.is-error {
  border-color: rgba(185, 63, 78, 0.5);
  background: rgba(185, 63, 78, 0.14);
  color: #ffd6db;
}

.status-banner.is-hidden {
  display: none;
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 30px;
  margin-top: 24px;
  align-items: start;
  --dashboard-metric-columns-current: 8;
}

.dashboard-main {
  display: grid;
  gap: 16px;
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 10, 20, 0.82);
  backdrop-filter: blur(14px);
}

.password-gate[hidden] {
  display: none;
}

.password-gate__dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(21, 33, 54, 0.98), rgba(14, 22, 38, 0.98));
}

.password-gate__copy {
  margin: 10px 0 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.password-gate__form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.password-gate__field {
  display: grid;
  gap: 8px;
}

.password-gate__field span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.password-gate__input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(143, 179, 255, 0.22);
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.9);
  color: #fff;
}

.password-gate__input:focus {
  outline: none;
  border-color: rgba(143, 179, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.14);
}

.password-gate__error {
  min-height: 1.1em;
  margin: 0;
  color: #ff8fa2;
  font-size: 0.84rem;
}

.password-gate__submit {
  justify-self: start;
  min-width: 120px;
}

body.is-password-locked {
  overflow: hidden;
}

body.is-password-locked .workspace-bar,
body.is-password-locked .dashboard-workspace,
body.is-password-locked #app-status {
  pointer-events: none;
  user-select: none;
}

body.is-password-locked .password-gate,
body.is-password-locked .password-gate * {
  pointer-events: auto;
}

.glossary-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 10, 20, 0.7);
  backdrop-filter: blur(10px);
}

.glossary-modal[hidden] {
  display: none;
}

.glossary-modal__dialog {
  width: min(1280px, calc(100vw - 40px));
  max-height: min(86vh, 920px);
  padding: 24px;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(21, 33, 54, 0.98), rgba(14, 22, 38, 0.98)),
    var(--panel);
}

.glossary-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.glossary-modal__summary {
  margin: 10px 0 0;
  max-width: 880px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.glossary-modal__close {
  flex: 0 0 auto;
}

.glossary-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.glossary-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.glossary-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--panel-border-strong);
  border-radius: 999px;
  background: rgba(27, 36, 56, 0.92);
  color: var(--muted-strong);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.glossary-filter-button:hover,
.glossary-filter-button:focus-visible {
  border-color: rgba(143, 179, 255, 0.34);
  background: rgba(143, 179, 255, 0.12);
  color: #fff;
  outline: none;
}

.glossary-filter-button.is-active,
.glossary-filter-button[aria-pressed="true"] {
  border-color: rgba(143, 179, 255, 0.5);
  background: linear-gradient(180deg, rgba(31, 94, 255, 0.28), rgba(31, 94, 255, 0.12));
  color: #fff;
}

.glossary-search {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}

.glossary-search__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.glossary-search__input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--panel-border-strong);
  border-radius: 12px;
  background: rgba(17, 24, 42, 0.92);
  color: var(--ink);
}

.glossary-search__input::placeholder {
  color: var(--muted);
}

.glossary-search__input:focus {
  outline: none;
  border-color: #6b93ff;
  box-shadow: 0 0 0 4px rgba(31, 94, 255, 0.15);
}

.glossary-modal__table-wrap {
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  overflow: auto;
  max-height: calc(86vh - 150px);
  background: rgba(10, 16, 29, 0.72);
}

.glossary-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.glossary-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  background: rgba(17, 24, 42, 0.98);
  color: #dbe5f8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--panel-border-strong);
}

.glossary-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.glossary-sort-button::after {
  content: "↕";
  color: rgba(219, 229, 248, 0.55);
  font-size: 0.9em;
  line-height: 1;
}

.glossary-sort-button.is-active::after {
  color: #ffffff;
}

.glossary-sort-button[aria-sort="asc"]::after {
  content: "↑";
}

.glossary-sort-button[aria-sort="desc"]::after {
  content: "↓";
}

.glossary-sort-button:hover,
.glossary-sort-button:focus-visible {
  color: #ffffff;
  outline: none;
}

.glossary-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--ink);
  vertical-align: top;
}

.glossary-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.glossary-table tbody tr:hover td {
  background: rgba(31, 94, 255, 0.08);
}

.glossary-metric-cell {
  display: grid;
  gap: 4px;
}

.glossary-metric-definition {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
}

.glossary-metric-source {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .glossary-modal {
    padding: 16px;
  }

  .glossary-modal__dialog {
    width: min(100vw - 18px, 1280px);
    max-height: 90vh;
    padding: 18px;
    border-radius: 22px;
  }

  .glossary-modal__head {
    flex-direction: column;
    align-items: stretch;
  }

  .glossary-modal__close {
    width: 100%;
  }

  .glossary-modal__table-wrap {
    max-height: calc(90vh - 170px);
  }
}

.dashboard {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.pca-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
  gap: 20px;
  margin-top: 18px;
  align-items: start;
}

.pca-dashboard--stacked {
  grid-template-columns: 1fr;
}

.pca-panel {
  background: rgba(20, 25, 39, 0.96);
}

.pca-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.92fr);
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}

.pca-analysis-region {
  min-width: 0;
}

.pca-subhead {
  margin-bottom: 10px;
}

.pca-subhead h3 {
  font-size: 1rem;
}

.pca-summary-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.pca-summary-chip {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(33, 43, 64, 0.88), rgba(17, 24, 39, 0.92));
}

.pca-summary-chip-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pca-summary-chip-value {
  font-size: 0.98rem;
  line-height: 1.35;
}

.pca-chart-region {
  margin-top: 16px;
}

.pca-chart-shell {
  display: grid;
  gap: 12px;
  position: relative;
}

.pca-chart-shell--compact {
  gap: 10px;
}

.pca-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.pca-plot-frame {
  fill: rgba(12, 18, 30, 0.9);
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5;
}

.pca-plot-reference {
  stroke: rgba(143, 179, 255, 0.2);
  stroke-width: 1.2;
  stroke-dasharray: 4 8;
}

.pca-point {
  fill: var(--pca-point-fill, rgba(162, 177, 206, 0.62));
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, fill 0.16s ease;
}

.pca-point.is-context {
  opacity: 0.28;
}

.pca-point.is-highlighted {
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.3;
  opacity: 1;
}

.pca-point.is-hovered {
  fill: var(--pca-point-fill, rgba(162, 177, 206, 0.62));
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.5;
  filter: brightness(1.12) saturate(1.08);
}

.pca-point.is-team-level {
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 1.35;
}

.legend-swatch.rank-bipolar {
  background: linear-gradient(90deg, #ff2f4b 0%, #687392 50%, #1284ff 100%);
}

.pca-point-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  paint-order: stroke;
  stroke: rgba(10, 15, 26, 0.98);
  stroke-width: 3px;
  stroke-linejoin: round;
  cursor: pointer;
  pointer-events: auto;
}

.pca-point-label__season {
  font-size: 0.82em;
  font-weight: 600;
  opacity: 0.86;
}

.pca-point-label.is-context {
  opacity: 0.34;
}

.pca-point-label.is-highlighted,
.pca-point-label.is-hovered {
  stroke-width: 4px;
}

.pca-axis-label,
.pca-axis-tick {
  fill: var(--muted-strong);
  font-family: inherit;
}

.pca-axis-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-anchor: middle;
}

.pca-axis-tick {
  font-size: 0.76rem;
}

.pca-axis-tick.is-right {
  text-anchor: end;
}

.pca-axis-tick.is-top,
.pca-axis-tick.is-bottom {
  text-anchor: end;
}

.pca-chart-caption {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.5;
}

.pca-vector-boundary {
  fill: rgba(12, 18, 30, 0.88);
  stroke: rgba(143, 179, 255, 0.2);
  stroke-width: 1.4;
}

.pca-vector-group {
  color: var(--pca-vector-color, rgba(143, 179, 255, 0.56));
  cursor: pointer;
  transition: filter 0.16s ease, color 0.16s ease;
}

.pca-vector-group.is-labelled {
  opacity: 1;
}

.pca-vector-group.is-hovered {
  color: color-mix(in srgb, var(--pca-vector-color, rgba(143, 179, 255, 0.56)) 78%, white);
  filter:
    brightness(1.32)
    saturate(1.2)
    drop-shadow(0 0 10px color-mix(in srgb, var(--pca-vector-color, rgba(143, 179, 255, 0.56)) 72%, white))
    drop-shadow(0 0 18px color-mix(in srgb, var(--pca-vector-color, rgba(143, 179, 255, 0.56)) 46%, transparent));
}

.pca-vector-hitbox {
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}

.pca-vector-line {
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0.9;
  transition: stroke-width 0.16s ease, opacity 0.16s ease;
}

.pca-vector-group.is-labelled .pca-vector-line {
  stroke-width: 1.9;
}

.pca-vector-group.is-hovered .pca-vector-line {
  stroke-width: 3.2;
  opacity: 1;
}

.pca-vector-label {
  fill: currentColor;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  paint-order: stroke;
  stroke: rgba(10, 15, 26, 0.96);
  stroke-width: 2.6px;
  stroke-linejoin: round;
  transition: font-size 0.16s ease, stroke-width 0.16s ease;
}

.pca-vector-group.is-hovered .pca-vector-label {
  font-size: 0.63rem;
  stroke-width: 3.2px;
}

.pca-corner-note {
  pointer-events: none;
}

.pca-corner-note__bg {
  fill: rgba(10, 15, 26, 0.82);
  stroke: rgba(143, 179, 255, 0.18);
  stroke-width: 1;
}

.pca-corner-note__title {
  fill: rgba(245, 248, 255, 0.96);
  font-size: 9.6px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(10, 15, 26, 0.92);
  stroke-width: 2px;
  stroke-linejoin: round;
}

.pca-corner-note__copy {
  fill: rgba(191, 202, 224, 0.96);
  font-size: 8.6px;
  font-weight: 600;
  letter-spacing: 0.04em;
  stroke: none;
  paint-order: normal;
}

.pca-hover-card {
  position: absolute;
  z-index: 4;
  width: min(260px, calc(100% - 20px));
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 26, 0.96);
  box-shadow: 0 18px 40px rgba(4, 8, 18, 0.58);
  pointer-events: none;
}

.pca-hover-card[hidden] {
  display: none;
}

.pca-hover-eyebrow {
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fb3ff;
}

.pca-hover-title {
  font-size: 0.96rem;
  line-height: 1.3;
}

.pca-hover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  margin-top: 12px;
}

.pca-hover-grid span {
  color: var(--muted);
  font-size: 0.79rem;
}

.pca-hover-grid strong {
  color: var(--ink);
  font-size: 0.82rem;
  text-align: right;
}

.pca-loading-lists {
  margin-top: 16px;
}

.pca-loading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pca-loading-card {
  padding: 14px 14px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(28, 37, 56, 0.86), rgba(16, 21, 35, 0.94));
}

.pca-loading-card h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.pca-loading-list {
  display: grid;
  gap: 10px;
}

.pca-loading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.pca-loading-name {
  color: var(--muted-strong);
  font-size: 0.86rem;
  line-height: 1.4;
}

.pca-loading-value {
  color: #8fb3ff;
  font-size: 0.84rem;
}

.methodology-panel {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(20, 25, 39, 0.96);
}

.methodology-copy {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
  font-size: 0.92rem;
}

.section {
  padding: 22px 24px 24px;
}

.dashboard-workspace .section {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 14px;
  align-items: start;
  padding: 0 0 16px;
  border-bottom: 0;
}

.dashboard-workspace .section:first-child {
  border-top: 0;
}

.dashboard-workspace .section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-workspace .section-head {
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 0;
}

.dashboard-workspace .section-head > div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.dashboard-workspace .section-head h2 {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.86);
}

.dashboard-workspace .section-copy {
  max-width: 420px;
  font-size: 0.88rem;
}

.dashboard-workspace .metric-groups {
  grid-column: 2;
  margin-top: 0;
  --dashboard-metric-card-height: 204px;
}

.metric-groups {
  display: grid;
  --dashboard-metric-card-width: calc(
    (100% - ((var(--dashboard-metric-columns-current) - 1) * 10px)) /
      var(--dashboard-metric-columns-current)
  );
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width))
  );
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

#in-possession-grid,
#out-of-possession-grid,
#set-pieces-grid {
  --phase-pane-gap: 12px;
  --phase-pane-padding: 12px;
  --phase-pane-inner-gap: 10px;
  --metric-card-height: var(--dashboard-metric-card-height, 176px);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--phase-pane-gap);
}

.phase-pane {
  min-height: 100%;
  padding: var(--phase-pane-padding);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(35, 46, 68, 0.98) 0%, rgba(19, 26, 41, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.phase-pane-head {
  margin-bottom: 10px;
}

.phase-pane-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.phase-pane-title {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.phase-pane-grid {
  --dashboard-metric-card-width: calc(
    (100% - ((var(--dashboard-metric-columns-current) - 1) * var(--phase-pane-inner-gap))) /
      var(--dashboard-metric-columns-current)
  );
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width))
  );
  justify-content: center;
  grid-auto-rows: var(--metric-card-height, 1fr);
  gap: var(--phase-pane-inner-gap);
}

.phase-pane-section-groups {
  --metric-section-pane-padding: 12px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--phase-pane-inner-gap);
  width: 100%;
  overflow: visible;
  padding-top: 56px;
  padding-bottom: 2px;
}

.phase-pane-section-groups--buffered {
  --phase-pane-section-buffer-width: 44px;
  gap: var(--phase-pane-section-buffer-width);
}

.phase-pane-inline-groups {
  --metric-section-pane-padding: 12px;
  --phase-pane-inline-section-gap: var(--phase-pane-inner-gap);
  --metric-inline-group-extra-width: calc(
    (var(--phase-pane-inline-group-count, 0) * 2 * var(--metric-section-pane-padding)) +
      var(--phase-pane-inline-extra-width, 0px)
  );
  --metric-inline-row-card-width: calc(
    (
        100% -
        ((var(--dashboard-metric-columns-current) - 1) * var(--phase-pane-inner-gap)) -
        var(--metric-inline-group-extra-width)
      ) / var(--dashboard-metric-columns-current)
  );
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--phase-pane-inline-section-gap);
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: visible;
  padding-top: 56px;
  padding-bottom: 2px;
}

.phase-pane-inline-groups > .kpi-card {
  flex: 0 0 var(--metric-inline-row-card-width);
  width: var(--metric-inline-row-card-width);
}

.metric-section-pane {
  flex: 0 0
    calc(
      (
          (
              100% - ((var(--dashboard-metric-columns-current) - 1) * var(--phase-pane-inner-gap))
            ) / var(--dashboard-metric-columns-current)
        ) * var(--metric-section-column-count, 1) +
        ((var(--metric-section-column-count, 1) - 1) * var(--phase-pane-inner-gap)) +
        (2 * var(--metric-section-pane-padding))
    );
  box-sizing: border-box;
  display: grid;
  gap: 10px;
  padding: var(--metric-section-pane-padding);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: none;
}

.metric-section-pane--inline {
  flex-basis: calc(
    (var(--metric-inline-row-card-width) * var(--metric-section-column-count, 1)) +
      ((var(--metric-section-column-count, 1) - 1) * var(--phase-pane-inner-gap)) +
      (2 * var(--metric-section-pane-padding))
  );
}

.metric-section-pane-grid {
  display: grid;
  grid-template-columns: repeat(var(--metric-section-column-count, 1), minmax(0, 1fr));
  grid-auto-rows: var(--metric-card-height, 1fr);
  gap: var(--phase-pane-inner-gap);
}

.metric-section-pane--inline .metric-section-pane-grid {
  grid-template-columns: repeat(
    var(--metric-section-column-count, 1),
    minmax(
      calc(
        (100% - ((var(--metric-section-column-count, 1) - 1) * var(--phase-pane-inner-gap))) /
          var(--metric-section-column-count, 1)
      ),
      calc(
        (100% - ((var(--metric-section-column-count, 1) - 1) * var(--phase-pane-inner-gap))) /
          var(--metric-section-column-count, 1)
      )
    )
  );
}

.phase-pane-section-head {
  grid-column: span var(--phase-pane-section-columns, 1);
  margin-bottom: 4px;
  text-align: center;
}

.phase-pane-section-head--pane {
  grid-column: auto;
  margin-bottom: 0;
}

.phase-pane-section-title {
  margin: 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted-strong);
  letter-spacing: -0.01em;
}

.phase-pane-grid--sectioned {
  grid-template-columns: repeat(
    6,
    minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width))
  );
  grid-auto-rows: auto;
  align-items: start;
}

.phase-pane-grid--sectioned-buffered {
  --phase-pane-section-buffer-width: 44px;
  grid-template-columns:
    repeat(3, minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width)))
    minmax(var(--phase-pane-section-buffer-width), var(--phase-pane-section-buffer-width))
    repeat(3, minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width)));
}

.phase-pane-grid--sectioned-buffered > .phase-pane-section-head:first-child {
  grid-column: 1 / span 3;
}

.phase-pane-grid--sectioned-buffered > .phase-pane-section-head:nth-child(2) {
  grid-column: 5 / span 3;
}

.phase-pane-grid--sectioned-buffered > .kpi-card:nth-child(3) {
  grid-column: 1;
}

.phase-pane-grid--sectioned-buffered > .kpi-card:nth-child(4) {
  grid-column: 2;
}

.phase-pane-grid--sectioned-buffered > .kpi-card:nth-child(5) {
  grid-column: 3;
}

.phase-pane-grid--sectioned-buffered > .kpi-card:nth-child(6) {
  grid-column: 5;
}

.phase-pane-grid--sectioned-buffered > .kpi-card:nth-child(7) {
  grid-column: 6;
}

.phase-pane-grid--sectioned-buffered > .kpi-card:nth-child(8) {
  grid-column: 7;
}

#in-possession-grid .phase-pane-grid--sectioned,
#out-of-possession-grid .phase-pane-grid--sectioned,
#set-pieces-grid .phase-pane-grid--sectioned {
  grid-template-columns: repeat(
    6,
    minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width))
  );
}

#in-possession-grid .phase-pane-grid--sectioned-buffered,
#out-of-possession-grid .phase-pane-grid--sectioned-buffered,
#set-pieces-grid .phase-pane-grid--sectioned-buffered {
  grid-template-columns:
    repeat(3, minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width)))
    minmax(var(--phase-pane-section-buffer-width), var(--phase-pane-section-buffer-width))
    repeat(3, minmax(var(--dashboard-metric-card-width), var(--dashboard-metric-card-width)));
}

.dashboard-workspace #in-possession-grid,
.dashboard-workspace #out-of-possession-grid,
.dashboard-workspace #set-pieces-grid {
  --phase-pane-gap: 30px;
  --phase-pane-inner-gap: 12px;
  --metric-card-height: var(--dashboard-metric-card-height, 176px);
}

.dashboard-workspace .phase-pane {
  min-height: 100%;
  padding: 0;
  border: 0;
  border-left: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.dashboard-workspace .phase-pane-head {
  margin-bottom: 10px;
  text-align: center;
}

.dashboard-workspace .phase-pane-title {
  font-size: 0.95rem;
  color: var(--muted-strong);
}

.dashboard-workspace .phase-pane-grid {
  grid-auto-rows: var(--metric-card-height, 244px);
  gap: var(--phase-pane-inner-gap);
}

.dashboard-workspace #in-possession-grid,
.dashboard-workspace #out-of-possession-grid,
.dashboard-workspace #set-pieces-grid {
  --phase-pane-gap: 34px;
}

.dashboard-workspace #in-possession-grid .phase-pane,
.dashboard-workspace #out-of-possession-grid .phase-pane,
.dashboard-workspace #set-pieces-grid .phase-pane {
  padding: 0;
  border: 0;
  border-left: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.dashboard-workspace #in-possession-grid .phase-pane-title,
.dashboard-workspace #out-of-possession-grid .phase-pane-title,
.dashboard-workspace #set-pieces-grid .phase-pane-title {
  color: #fff;
}

.dashboard-workspace .phase-pane-section-groups {
  --metric-section-pane-padding: 12px;
}

.dashboard-workspace .phase-pane-inline-groups {
  --metric-section-pane-padding: 12px;
}

.dashboard-workspace .metric-section-pane {
  gap: 12px;
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(28, 36, 54, 0.76) 0%, rgba(16, 23, 36, 0.88) 100%);
  position: relative;
  z-index: 1;
}

.metric-connection-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.metric-connection-path {
  fill: none;
  stroke: var(--metric-connection-color, rgba(255, 255, 255, 0.96));
  stroke-width: var(--metric-connection-width, 2.5px);
  opacity: var(--metric-connection-opacity, 1);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--metric-connection-glow, #ffffff) 40%, transparent));
}

.metric-connection-label {
  fill: var(--metric-connection-color, rgba(255, 255, 255, 0.96));
  opacity: var(--metric-connection-opacity, 1);
  font-size: 14px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: auto;
  paint-order: stroke;
  stroke: rgba(12, 18, 29, 0.72);
  stroke-width: 3px;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--metric-connection-glow, #ffffff) 28%, transparent));
}

#set-pieces-grid .phase-pane-inline-groups {
  --phase-pane-inline-extra-width: calc(2 * var(--metric-section-pane-padding));
  --phase-pane-inline-section-gap: calc(
    var(--phase-pane-inner-gap) + var(--phase-pane-inline-extra-width)
  );
}

#set-pieces-grid .phase-pane-section-groups--buffered {
  --phase-pane-section-buffer-width: var(--phase-pane-inner-gap);
  --metric-section-pane-padding: 0px;
}

#set-pieces-grid .phase-pane-section-groups .metric-section-pane {
  padding: 6px 0 0;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(28, 36, 54, 0.76) 0%, rgba(16, 23, 36, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.09);
}

.dashboard-workspace .kpi-card {
  height: var(--dashboard-metric-card-height, 176px);
  min-height: var(--dashboard-metric-card-height, 176px);
  padding: 12px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(24, 31, 47, 0.84) 0%, rgba(15, 20, 31, 0.94) 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  gap: 5px;
  box-shadow: none;
  overflow: hidden;
}

.dashboard-workspace .kpi-card[draggable="true"] {
  cursor: grab;
}

.dashboard-workspace .phase-pane-inline-groups > .kpi-card {
  position: relative;
  z-index: 2;
}

.dashboard-workspace #in-possession-grid .kpi-card-compact,
.dashboard-workspace #out-of-possession-grid .kpi-card-compact,
.dashboard-workspace #set-pieces-grid .kpi-card-compact {
  height: var(--dashboard-metric-card-height, 176px);
  min-height: var(--dashboard-metric-card-height, 176px);
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 28, 44, 0.9) 0%, rgba(13, 20, 33, 0.96) 100%);
}

.dashboard-workspace .kpi-card:hover,
.dashboard-workspace .kpi-card:focus-visible,
.dashboard-workspace .kpi-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(143, 179, 255, 0.34);
  background: linear-gradient(180deg, rgba(29, 40, 61, 0.98) 0%, rgba(16, 23, 36, 1) 100%);
  box-shadow:
    0 18px 34px rgba(6, 10, 22, 0.2),
    0 0 8px rgba(255, 255, 255, 0.18),
    0 0 22px rgba(255, 255, 255, 0.12);
  outline: none;
}

.dashboard-workspace .kpi-card.is-related {
  border-color: rgba(232, 191, 95, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 201, 0.08),
    0 0 0 1px rgba(232, 191, 95, 0.24);
}

.dashboard-workspace .kpi-card.is-focus-related {
  border-color: rgba(132, 190, 255, 0.72);
  background: linear-gradient(180deg, rgba(30, 42, 65, 0.98) 0%, rgba(16, 23, 36, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(214, 235, 255, 0.08),
    0 0 0 1px rgba(132, 190, 255, 0.32),
    0 12px 24px rgba(8, 17, 36, 0.22),
    0 0 8px rgba(255, 255, 255, 0.18),
    0 0 22px rgba(255, 255, 255, 0.12);
}

.dashboard-workspace .kpi-card.is-focus-dimmed {
  opacity: 0.2;
  filter: saturate(0.4);
  transform: none;
  box-shadow: none;
}

.dashboard-workspace .kpi-card.is-dragging {
  cursor: grabbing;
  opacity: 0.46;
  transform: scale(0.985);
  box-shadow: 0 10px 24px rgba(6, 10, 22, 0.16);
}

.dashboard-workspace .kpi-card.is-drop-target {
  border-color: rgba(122, 173, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(122, 173, 255, 0.5),
    0 14px 26px rgba(12, 24, 50, 0.24);
}

.dashboard-workspace .kpi-label {
  margin: 0;
  min-height: 2.35em;
  font-size: 0.82rem;
  line-height: 1.22;
  color: var(--muted-strong);
  text-align: center;
}

.dashboard-workspace .kpi-card-compact .kpi-label {
  min-height: 2.45em;
  max-height: 2.45em;
  font-size: 0.76rem;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dashboard-workspace .kpi-rank {
  margin-top: 0;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  justify-content: center;
  font-size: clamp(3.24rem, 3.6vw, 4.02rem);
  line-height: 0.86;
  color: var(--kpi-rank-display-color, var(--kpi-rank-color, #fff));
  transition: color 140ms ease;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
  text-align: center;
}

.dashboard-workspace .kpi-rank-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  width: 100%;
}

.dashboard-workspace .kpi-rank-suffix {
  padding-top: 0.18em;
  color: rgba(245, 247, 251, 0.76);
}

.dashboard-workspace .kpi-rank-change {
  padding-top: 0.9em;
  font-size: 1.23rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--muted-strong);
  font-variant-numeric: tabular-nums;
}

.dashboard-workspace .kpi-rank-change.is-positive {
  color: var(--rank-best);
}

.dashboard-workspace .kpi-rank-change.is-negative {
  color: var(--rank-worst);
}

.dashboard-workspace .kpi-card-compact .kpi-rank-change,
.dashboard-workspace .kpi-rank-change--compact {
  padding-top: 0.84em;
  font-size: 1.14rem;
}

.dashboard-workspace .kpi-metric-value {
  margin-top: -6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  text-align: center;
  letter-spacing: -0.01em;
}

.dashboard-workspace .kpi-card-compact .kpi-metric-value {
  font-size: 0.76rem;
}

.dashboard-workspace .kpi-value-stack {
  display: grid;
  gap: 5px;
}

.dashboard-workspace .kpi-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  text-align: center;
  flex-wrap: nowrap;
}

.dashboard-workspace .kpi-value-label {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-workspace .kpi-value {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.dashboard-workspace .kpi-value--muted {
  color: var(--muted-strong);
}

.dashboard-workspace .kpi-sparkline-wrap,
.dashboard-workspace .kpi-card-compact .kpi-sparkline-wrap {
  width: 65%;
  margin-top: 0;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-workspace .kpi-card-compact .kpi-sparkline-wrap {
  width: 72%;
}

.dashboard-workspace .kpi-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 18px;
  width: 100%;
  text-align: center;
  margin-top: auto;
}

.dashboard-workspace .kpi-top-team-wrap {
  justify-content: center;
  gap: 6px;
}

.dashboard-workspace .kpi-top-crest {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.dashboard-workspace .kpi-top-team,
.dashboard-workspace .kpi-card-compact .kpi-top-team {
  font-size: 0.76rem;
  color: #fff;
}

.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-value-stack,
.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-sparkline-wrap,
.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-footer {
  display: none;
}

.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-card {
  min-height: 112px;
  justify-content: center;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-label,
.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-card-compact .kpi-label {
  min-height: 0;
}

.page-shell--dashboard.is-clean-mode .dashboard-workspace .kpi-rank {
  margin-top: 0;
}

.page-shell--dashboard.is-clean-mode #in-possession-grid .kpi-card-compact,
.page-shell--dashboard.is-clean-mode #out-of-possession-grid .kpi-card-compact,
.page-shell--dashboard.is-clean-mode #set-pieces-grid .kpi-card-compact {
  height: auto;
  min-height: 112px;
}

.kpi-card {
  min-height: 154px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(28, 34, 47, 0.82) 0%, rgba(14, 19, 29, 0.9) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

#in-possession-grid .kpi-card-compact,
#out-of-possession-grid .kpi-card-compact,
#set-pieces-grid .kpi-card-compact {
  width: 100%;
  height: var(--metric-card-height);
  min-height: var(--metric-card-height);
  padding: 12px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(24, 31, 43, 0.78) 0%, rgba(11, 17, 27, 0.88) 100%);
}

.kpi-card:hover,
.kpi-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.26);
  border-color: rgba(143, 179, 255, 0.25);
  outline: none;
}

.kpi-card.rank-very-strong {
  --kpi-rank-color: var(--rank-best);
  --kpi-rank-display-color: var(--rank-best);
}

.kpi-card.rank-strong {
  --kpi-rank-color: var(--rank-strong);
  --kpi-rank-display-color: var(--rank-strong);
}

.kpi-card.rank-average {
  --kpi-rank-color: var(--rank-average);
  --kpi-rank-display-color: var(--rank-average);
}

.kpi-card.rank-weak {
  --kpi-rank-color: var(--rank-weak);
  --kpi-rank-display-color: var(--rank-weak);
}

.kpi-card.rank-very-weak {
  --kpi-rank-color: var(--rank-worst);
  --kpi-rank-display-color: var(--rank-worst);
}

.dashboard-workspace .kpi-card--benchmark {
  border-color: rgba(232, 191, 95, 0.52);
  background:
    linear-gradient(180deg, rgba(56, 42, 17, 0.96) 0%, rgba(24, 20, 13, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 201, 0.12),
    0 16px 32px rgba(12, 9, 4, 0.22);
}

.dashboard-workspace .kpi-card--benchmark:hover,
.dashboard-workspace .kpi-card--benchmark:focus-visible,
.dashboard-workspace .kpi-card--benchmark.is-active {
  border-color: rgba(245, 205, 114, 0.76);
  background:
    linear-gradient(180deg, rgba(69, 51, 20, 0.98) 0%, rgba(30, 23, 13, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 210, 0.18),
    0 22px 38px rgba(12, 9, 4, 0.28);
}

.dashboard-workspace .kpi-card--benchmark .kpi-label {
  color: #f6e5b5;
}

.dashboard-workspace .kpi-card--benchmark .kpi-rank {
  color: var(--kpi-rank-display-color, var(--kpi-rank-color, #fff));
}

.dashboard-workspace .kpi-card--benchmark .kpi-value-label {
  color: rgba(246, 229, 181, 0.72);
}

.dashboard-workspace .kpi-card--benchmark .kpi-value,
.dashboard-workspace .kpi-card--benchmark .kpi-top-team {
  color: #fff6dc;
}

.kpi-label {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.22;
}

.kpi-card-compact .kpi-label {
  font-size: 0.8rem;
}

.kpi-rank {
  margin-top: 8px;
  font-size: clamp(3.6rem, 4.2vw, 4.8rem);
  font-weight: 800;
  font-family: "Rupert", "Avenir Next", "Segoe UI", sans-serif;
  color: #fff;
  background: var(--kpi-rank-color, #fff);
  padding: 5px 10px 6px;
  border-radius: 12px;
  min-width: 78px;
  box-shadow: 0 10px 18px rgba(6, 10, 22, 0.18);
  line-height: 0.92;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.05em;
}

#in-possession-grid .kpi-card-compact .kpi-rank,
#out-of-possession-grid .kpi-card-compact .kpi-rank,
#set-pieces-grid .kpi-card-compact .kpi-rank {
  min-width: 82px;
  padding: 8px 14px 9px;
  font-size: clamp(3.36rem, 3.6vw, 4.14rem);
  border-radius: 14px;
}

.kpi-rank-value {
  display: inline-flex;
  gap: 0.04em;
}

.kpi-rank-delta {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 1.5em;
  font-variant-numeric: tabular-nums;
  transition: color 140ms ease;
}

.kpi-rank-delta.is-positive {
  color: var(--rank-best);
}

.kpi-rank-delta.is-negative {
  color: var(--rank-worst);
}

.kpi-rank-delta.is-neutral,
.kpi-rank-delta--empty {
  color: rgba(245, 247, 251, 0.82);
}

.kpi-rank-digit {
  display: inline-block;
}

.kpi-rank-suffix {
  font-size: 0.34em;
  line-height: 1;
  padding-top: 0.14em;
  text-transform: lowercase;
}

.kpi-top {
  margin-top: 6px;
}

.kpi-card-compact .kpi-top {
  margin-top: 4px;
}

.kpi-top-team {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-card-compact .kpi-top-team {
  font-size: 0.76rem;
}

.kpi-top-team-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
}

.kpi-top-crest {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
}

.kpi-top-team-wrap .kpi-top-team {
  margin-top: 0;
}

.kpi-sparkline-wrap {
  width: 44%;
  margin-top: 5px;
}

.kpi-card-compact .kpi-sparkline-wrap {
  width: 56%;
}

.kpi-sparkline {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 28;
  overflow: visible;
  margin: 0 auto;
}

.kpi-sparkline-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
}

.kpi-sparkline-line.is-recent {
  stroke-width: 2.9;
  opacity: 1;
}

.kpi-sparkline-trendline {
  stroke-width: 1.9;
  opacity: 0.56;
  stroke-linecap: round;
}

.kpi-sparkline-line.trend-up {
  stroke: rgba(31, 94, 255, 0.82);
}

.kpi-sparkline-line.trend-down {
  stroke: rgba(255, 91, 115, 0.82);
}

.kpi-sparkline-trendline.trend-up {
  stroke: rgba(31, 94, 255, 0.78);
}

.kpi-sparkline-trendline.trend-down {
  stroke: rgba(255, 91, 115, 0.78);
}

.kpi-sparkline-dot {
  fill: currentColor;
  opacity: 0.95;
}

.kpi-sparkline-point {
  fill: currentColor;
  opacity: 0.52;
}

.kpi-sparkline-point.is-recent {
  opacity: 0.92;
}

.kpi-sparkline-dot.trend-up {
  fill: rgba(31, 94, 255, 0.84);
}

.kpi-sparkline-dot.trend-down {
  fill: rgba(255, 91, 115, 0.84);
}

.kpi-sparkline-point.trend-up {
  fill: rgba(31, 94, 255, 0.74);
}

.kpi-sparkline-point.trend-down {
  fill: rgba(255, 91, 115, 0.74);
}

.metric-tooltip {
  position: fixed;
  z-index: 40;
  width: min(1040px, calc(100vw - 24px));
  max-height: min(85vh, 720px);
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 18px;
  border: 1px solid var(--panel-border-strong);
  background: rgba(20, 25, 39, 0.98);
  box-shadow: 0 24px 44px rgba(6, 10, 22, 0.42);
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 179, 255, 0.45) rgba(255, 255, 255, 0.05);
}

.metric-tooltip.is-hidden {
  display: none;
}

.metric-tooltip::-webkit-scrollbar {
  width: 9px;
}

.metric-tooltip::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.metric-tooltip::-webkit-scrollbar-thumb {
  background: rgba(143, 179, 255, 0.38);
  border-radius: 999px;
}

.tooltip-head {
  margin-bottom: 12px;
}

.tooltip-title {
  font-size: 1.05rem;
  color: #fff;
}

.tooltip-description {
  margin: 8px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted-strong);
  line-height: 1.45;
}

.tooltip-copy {
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.tooltip-chart {
  display: grid;
  gap: 6px;
}

.tooltip-section + .tooltip-section {
  margin-top: 14px;
}

.tooltip-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tooltip-section-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.tooltip-section-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tooltip-row {
  display: grid;
  grid-template-columns: 28px minmax(110px, 1fr) minmax(120px, 2fr) 64px;
  gap: 8px;
  align-items: center;
  font-size: 0.74rem;
}

.tooltip-row-match {
  grid-template-columns: minmax(128px, 1.15fr) auto minmax(110px, 1.65fr) 52px;
}

.tooltip-row-match.is-latest {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.tooltip-row.is-selected {
  border-radius: 10px;
  background: rgba(31, 94, 255, 0.08);
}

.tooltip-rank {
  font-weight: 700;
  color: var(--muted);
}

.tooltip-team {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tooltip-crest {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  object-fit: contain;
}

.tooltip-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: #fff;
}

.tooltip-match-label {
  display: flex;
  align-items: center;
  min-width: 0;
}

.tooltip-match-meta {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.tooltip-match-date {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.tooltip-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #0f1524;
  overflow: hidden;
}

.tooltip-track--signed::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tooltip-zero-position);
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.tooltip-row.is-selected .tooltip-track {
  box-shadow: 0 0 0 1px rgba(143, 179, 255, 0.45);
}

.tooltip-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ea8dd, #1f5eff);
}

.tooltip-fill--signed {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
}

.tooltip-fill--signed.is-negative {
  transform: scaleX(-1);
}

.tooltip-fill.rank-very-strong {
  background: linear-gradient(90deg, #6da5ff, #1f5eff);
}

.tooltip-fill.rank-strong {
  background: linear-gradient(90deg, #7da0f1, #4b72d3);
}

.tooltip-fill.rank-average {
  background: linear-gradient(90deg, #8792a8, #626f86);
}

.tooltip-fill.rank-weak {
  background: linear-gradient(90deg, #c78da9, #955f7a);
}

.tooltip-fill.rank-very-weak {
  background: linear-gradient(90deg, #ff93a6, #ff5b73);
}

.tooltip-row.is-selected .tooltip-fill.rank-very-strong {
  background: linear-gradient(90deg, #8cb4ff, #3e74ff);
}

.tooltip-row.is-selected .tooltip-fill.rank-strong {
  background: linear-gradient(90deg, #93b0f4, #6487de);
}

.tooltip-row.is-selected .tooltip-fill.rank-average {
  background: linear-gradient(90deg, #99a3b7, #737f96);
}

.tooltip-row.is-selected .tooltip-fill.rank-weak {
  background: linear-gradient(90deg, #d69bb6, #ab728d);
}

.tooltip-row.is-selected .tooltip-fill.rank-very-weak {
  background: linear-gradient(90deg, #ffb0bf, #ff7489);
}

.tooltip-value {
  text-align: right;
  font-weight: 700;
  color: var(--muted-strong);
  font-variant-numeric: tabular-nums;
}

.tooltip-fill-match {
  background: linear-gradient(90deg, rgba(143, 179, 255, 0.7), #8fb3ff);
}

.tooltip-fill-match.is-high {
  background: linear-gradient(90deg, #8cb4ff, #1f5eff);
  box-shadow: 0 0 0 1px rgba(31, 94, 255, 0.18);
}

.tooltip-fill-match.is-low {
  background: linear-gradient(90deg, #ff8fa2, #ff5b73);
  box-shadow: 0 0 0 1px rgba(255, 91, 115, 0.18);
}

.tooltip-empty {
  font-size: 0.78rem;
  color: var(--muted);
}

.metric-hover-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(var(--metric-section-column-count, 1), minmax(0, 1fr));
  grid-auto-rows: minmax(154px, auto);
  gap: 10px;
}

.metric-hover-tooltip-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.metric-hover-tooltip-groups .tooltip-section {
  margin-top: 0;
}

.metric-hover-tooltip-card {
  cursor: default;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metric-hover-tooltip-card:hover,
.metric-hover-tooltip-card:focus-visible {
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
}

.metric-inspector {
  position: relative;
  align-self: start;
  padding: 18px 20px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 23, 32, 0.72), rgba(9, 13, 20, 0.78));
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.metric-inspector-shell,
.metric-inspector-content {
  display: grid;
  gap: 16px;
}

.metric-inspector-shell {
  align-content: start;
}

.metric-inspector-content {
  align-content: start;
  padding-bottom: 18px;
}

.metric-inspector-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-inspector-topbar .section-kicker {
  margin: 0;
}

.metric-inspector-source-logo-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.2rem;
}

.metric-inspector-empty {
  display: grid;
  gap: 8px;
  min-height: 120px;
  align-content: center;
}

.inspector-head {
  margin-bottom: 0;
}

.inspector-source-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.inspector-source-logo svg {
  display: block;
  width: auto;
  height: 1.2rem;
  max-width: 100%;
}

.inspector-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inspector-title {
  margin: 0;
  font-size: 1.5rem;
  color: #fff;
}

.inspector-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inspector-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.inspector-stat--correlation.rank-very-strong {
  border-color: rgba(31, 94, 255, 0.34);
  background: linear-gradient(135deg, rgba(109, 165, 255, 0.22), rgba(31, 94, 255, 0.12));
}

.inspector-stat--correlation.rank-strong {
  border-color: rgba(75, 114, 211, 0.32);
  background: linear-gradient(135deg, rgba(125, 160, 241, 0.2), rgba(75, 114, 211, 0.11));
}

.inspector-stat--correlation.rank-average {
  border-color: rgba(98, 111, 134, 0.28);
  background: linear-gradient(135deg, rgba(135, 146, 168, 0.18), rgba(98, 111, 134, 0.1));
}

.inspector-stat--correlation.rank-weak {
  border-color: rgba(149, 95, 122, 0.3);
  background: linear-gradient(135deg, rgba(199, 141, 169, 0.19), rgba(149, 95, 122, 0.1));
}

.inspector-stat--correlation.rank-very-weak {
  border-color: rgba(255, 91, 115, 0.34);
  background: linear-gradient(135deg, rgba(255, 147, 166, 0.2), rgba(255, 91, 115, 0.11));
}

.inspector-stat-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspector-stat--correlation .inspector-stat-label {
  color: rgba(245, 247, 251, 0.82);
}

.inspector-stat--correlation .inspector-stat-copy {
  color: rgba(245, 247, 251, 0.74);
}

.inspector-stat-value {
  min-width: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.inspector-stat-context {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.inspector-stat-value--team {
  font-size: 0.82rem;
  font-weight: 700;
}

.inspector-stat-copy {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.metric-inspector .tooltip-section {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-inspector .tooltip-section + .tooltip-section {
  margin-top: 18px;
}

.inspector-detail-stack {
  display: grid;
  gap: 14px;
}

.inspector-detail-group {
  display: grid;
  gap: 10px;
}

.inspector-detail-group-head {
  margin-bottom: 0;
}

.inspector-detail-group-title {
  font-size: 0.72rem;
}

.inspector-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inspector-detail-card {
  display: grid;
  gap: 6px;
  padding: 11px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.inspector-detail-card.rank-very-strong {
  border-color: rgba(31, 94, 255, 0.28);
  background: linear-gradient(180deg, rgba(109, 165, 255, 0.16), rgba(255, 255, 255, 0.03));
}

.inspector-detail-card.rank-strong {
  border-color: rgba(75, 114, 211, 0.26);
  background: linear-gradient(180deg, rgba(125, 160, 241, 0.13), rgba(255, 255, 255, 0.03));
}

.inspector-detail-card.rank-average {
  border-color: rgba(135, 146, 168, 0.22);
}

.inspector-detail-card.rank-weak {
  border-color: rgba(149, 95, 122, 0.24);
  background: linear-gradient(180deg, rgba(199, 141, 169, 0.11), rgba(255, 255, 255, 0.03));
}

.inspector-detail-card.rank-very-weak {
  border-color: rgba(255, 91, 115, 0.28);
  background: linear-gradient(180deg, rgba(255, 147, 166, 0.14), rgba(255, 255, 255, 0.03));
}

.inspector-detail-label {
  color: var(--muted-strong);
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.3;
}

.inspector-detail-value {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.inspector-detail-meta {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.skillcorner-recommendation-list {
  display: grid;
  gap: 10px;
}

.skillcorner-recommendation-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 12px 13px;
  border: 1px solid rgba(143, 179, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(123, 165, 255, 0.08), rgba(79, 112, 196, 0.03)),
    rgba(255, 255, 255, 0.02);
}

.skillcorner-recommendation-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skillcorner-recommendation-summary-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f4f8ff;
}

.skillcorner-recommendation-summary-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eef4ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.skillcorner-recommendation-summary-badge--reinforcing {
  background: linear-gradient(135deg, rgba(69, 214, 96, 0.22), rgba(33, 125, 56, 0.22));
  border-color: rgba(92, 255, 122, 0.24);
}

.skillcorner-recommendation-summary-badge--mostly_additive {
  background: linear-gradient(135deg, rgba(109, 165, 255, 0.18), rgba(31, 94, 255, 0.12));
  border-color: rgba(109, 165, 255, 0.24);
}

.skillcorner-recommendation-summary-badge--overlapping,
.skillcorner-recommendation-summary-badge--mixed {
  background: linear-gradient(135deg, rgba(255, 143, 162, 0.16), rgba(255, 91, 115, 0.1));
  border-color: rgba(255, 143, 162, 0.22);
}

.skillcorner-recommendation-summary-copy,
.skillcorner-recommendation-summary-meta {
  margin: 0;
}

.skillcorner-recommendation-summary-copy {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.5;
}

.skillcorner-recommendation-summary-meta {
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.skillcorner-recommendation-card {
  display: grid;
  gap: 8px;
  padding: 12px 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.02);
}

.skillcorner-recommendation-signal {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skillcorner-recommendation-signal {
  margin-left: auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.skillcorner-recommendation-signal--increase {
  color: #8ab7ff;
  background: linear-gradient(135deg, rgba(109, 165, 255, 0.22), rgba(31, 94, 255, 0.1));
  border-color: rgba(31, 94, 255, 0.28);
}

.skillcorner-recommendation-signal--decrease {
  color: #ff9ab0;
  background: linear-gradient(135deg, rgba(255, 147, 166, 0.22), rgba(255, 91, 115, 0.1));
  border-color: rgba(255, 91, 115, 0.28);
}

.skillcorner-recommendation-title {
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.96rem;
  line-height: 1.2;
  color: #fff;
}

.skillcorner-recommendation-title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.skillcorner-recommendation-verb {
  font-weight: 800;
}

.skillcorner-recommendation-verb--increase {
  color: #76acff;
}

.skillcorner-recommendation-verb--decrease {
  color: #ff8ea7;
}

.skillcorner-recommendation-title .skillcorner-recommendation-signal {
  flex: 0 0 auto;
}

.skillcorner-recommendation-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skillcorner-recommendation-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #f4f7fb;
}

.skillcorner-recommendation-chip-label {
  color: rgba(245, 247, 251, 0.78);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skillcorner-recommendation-chip-value {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.skillcorner-recommendation-chip.rank-very-strong {
  border-color: rgba(31, 94, 255, 0.34);
  background: linear-gradient(135deg, rgba(109, 165, 255, 0.22), rgba(31, 94, 255, 0.12));
}

.skillcorner-recommendation-chip.rank-strong {
  border-color: rgba(75, 114, 211, 0.32);
  background: linear-gradient(135deg, rgba(125, 160, 241, 0.2), rgba(75, 114, 211, 0.11));
}

.skillcorner-recommendation-chip.rank-average {
  border-color: rgba(98, 111, 134, 0.28);
  background: linear-gradient(135deg, rgba(135, 146, 168, 0.18), rgba(98, 111, 134, 0.1));
}

.skillcorner-recommendation-chip.rank-weak {
  border-color: rgba(149, 95, 122, 0.3);
  background: linear-gradient(135deg, rgba(199, 141, 169, 0.19), rgba(149, 95, 122, 0.1));
}

.skillcorner-recommendation-chip.rank-very-weak {
  border-color: rgba(255, 91, 115, 0.34);
  background: linear-gradient(135deg, rgba(255, 147, 166, 0.2), rgba(255, 91, 115, 0.11));
}

.skillcorner-recommendation-copy,
.skillcorner-recommendation-underlying,
.skillcorner-recommendation-definition,
.skillcorner-recommendation-meta {
  margin: 0;
}

.skillcorner-recommendation-underlying {
  color: rgba(214, 230, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.skillcorner-recommendation-definition {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.skillcorner-recommendation-copy {
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 1.45;
}

.skillcorner-recommendation-copy--lead {
  color: #dfeaff;
}

.skillcorner-recommendation-value {
  color: #fff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.skillcorner-recommendation-context {
  color: var(--muted);
  font-weight: 700;
}

.skillcorner-recommendation-meta {
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.inspector-scatter-chart {
  gap: 10px;
}

.inspector-scatter-shell {
  width: 100%;
  aspect-ratio: 1;
}

.inspector-scatter-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.inspector-scatter-frame {
  fill: rgba(12, 18, 30, 0.86);
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}

.inspector-scatter-reference {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.inspector-scatter-trendline {
  stroke: rgba(255, 210, 112, 0.95);
  stroke-width: 1.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.inspector-scatter-point {
  fill: rgba(143, 179, 255, 0.42);
  stroke: rgba(199, 220, 255, 0.44);
  stroke-width: 0.9;
}

.inspector-scatter-point.is-selected {
  fill: #7fd6ff;
  stroke: #ffffff;
  stroke-width: 2;
}

.inspector-scatter-axis {
  fill: var(--muted-strong);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-anchor: middle;
}

.inspector-scatter-tick {
  fill: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.inspector-scatter-tick.is-left {
  dominant-baseline: hanging;
  text-anchor: start;
}

.inspector-scatter-tick.is-right {
  dominant-baseline: hanging;
  text-anchor: end;
}

.inspector-scatter-tick.is-bottom,
.inspector-scatter-tick.is-top {
  dominant-baseline: middle;
  text-anchor: end;
}

.inspector-scatter-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.empty-state {
  padding: 20px;
  border: 1px dashed var(--panel-border-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.match-review-dashboard {
  gap: 18px;
}

.review-legend {
  justify-content: flex-end;
}

.match-review-table {
  display: grid;
  width: min(50%, 760px);
  gap: 0;
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
}

.match-review-head,
.match-review-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(220px, 2fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
}

.match-review-head {
  padding: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--panel-border);
}

.match-review-row {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.match-review-row.is-no-data {
  opacity: 0.68;
}

.match-review-label {
  min-width: 0;
}

.match-review-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.match-review-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #0f1524;
  overflow: hidden;
}

.match-review-track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-50%);
}

.match-review-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.match-review-bar.is-positive {
  background: linear-gradient(90deg, #7aa5ff, #1f5eff);
}

.match-review-bar.is-negative {
  background: linear-gradient(90deg, #ff93a6, #ff5b73);
}

.match-review-bar.is-neutral {
  background: linear-gradient(90deg, #8590a7, #626f86);
}

.match-review-rank {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.match-review-row.is-no-data .match-review-rank {
  color: var(--muted);
}

@media (max-width: 1320px) {
  .topbar,
  .filters-head,
  .section-head {
    flex-direction: column;
  }

  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legend {
    justify-content: flex-start;
  }

  .topbar--dashboard .topbar-controls {
    width: 100%;
    align-items: flex-start;
  }

  .topbar--dashboard .header-filter-bar {
    width: 100%;
    justify-content: space-between;
  }

  .workspace-tabs,
  .page-shell--dashboard .header-filter-bar {
    justify-content: flex-start;
  }

  .page-shell--dashboard .control-grid--header {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-shell--dashboard .control-grid--header .control,
  .page-shell--dashboard .control-grid--header .control--venue,
  .page-shell--dashboard .control-grid--header .control--date-range {
    max-width: none;
  }

  .page-tabs {
    flex-wrap: wrap;
  }

  .pca-dashboard {
    grid-template-columns: 1fr;
  }

  .pca-analysis-grid {
    grid-template-columns: 1fr;
  }

  .pca-summary-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .workspace-bar {
    grid-template-columns: 1fr;
  }

  .workspace-tools {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    justify-items: stretch;
  }

  .workspace-filter-pane {
    max-width: none;
  }

  .filter-popover {
    left: 0;
    right: auto;
    width: min(720px, calc(100vw - 32px));
  }

  .dashboard-workspace {
    --dashboard-metric-columns-current: 4;
  }

  .page-shell--dashboard .control-grid--header {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-shell--dashboard .control-grid--header .control {
    flex: 1 1 calc(50% - 10px);
    min-width: 190px;
    max-width: none;
  }

  .page-shell--dashboard .control-grid--header .control--venue,
  .page-shell--dashboard .control-grid--header .control--date-range {
    flex-basis: 100%;
    min-width: 0;
  }

  #in-possession-grid,
  #out-of-possession-grid,
  #set-pieces-grid {
    grid-template-columns: 1fr;
  }

  .phase-pane-inline-groups,
  .phase-pane-section-groups {
    justify-content: flex-start;
  }

  .match-review-table {
    width: 100%;
  }

  .pca-loading-grid {
    grid-template-columns: 1fr;
  }

  .match-review-head,
  .match-review-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .match-review-head {
    display: none;
  }

  .match-review-row {
    gap: 10px;
  }

  .match-review-rank {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .dashboard-workspace {
    --dashboard-metric-columns-current: 2;
  }

  .workspace-filter-head {
    align-items: stretch;
  }

  .workspace-tabs,
  .workspace-filter-actions {
    justify-content: flex-start;
  }

  .page-shell--dashboard .control-grid--header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .filter-popover {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .filter-popover::before {
    display: none;
  }

  .page-shell--dashboard .control-grid--header .control,
  .page-shell--dashboard .control-grid--header .control--venue,
  .page-shell--dashboard .control-grid--header .control--date-range {
    grid-column: auto;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .page-shell {
    width: min(100vw - 20px, 100%);
    margin-top: 10px;
  }

  .topbar,
  .filters,
  .section {
    padding: 18px;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .pca-summary-chips {
    grid-template-columns: 1fr;
  }

  .page-shell--dashboard .header-filter-bar {
    align-items: stretch;
  }

  .date-range-control {
    grid-template-columns: 1fr;
  }

  .date-range-chip {
    justify-self: start;
  }

  #in-possession-grid,
  #out-of-possession-grid,
  #set-pieces-grid {
    grid-template-columns: 1fr;
  }

  .phase-pane-inline-groups,
  .phase-pane-section-groups {
    justify-content: flex-start;
  }

  .page-tabs {
    padding: 12px;
  }

  .page-tab-link {
    flex: 1 1 0;
    min-width: 0;
  }

  .tooltip-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .tooltip-row-match {
    grid-template-columns: minmax(0, 1fr);
  }

  .tooltip-track,
  .tooltip-value {
    grid-column: 2;
  }

  .tooltip-row-match .tooltip-track,
  .tooltip-row-match .tooltip-value {
    grid-column: 1;
  }

  .tooltip-value {
    text-align: left;
  }

  .metric-hover-tooltip-grid {
    grid-template-columns: 1fr;
  }

  .metric-hover-tooltip-groups {
    grid-template-columns: 1fr;
  }

  .inspector-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .metric-groups {
    grid-template-columns: 1fr;
  }

  .phase-pane-grid {
    grid-template-columns: 1fr;
  }

  #in-possession-grid .phase-pane-grid,
  #out-of-possession-grid .phase-pane-grid,
  #set-pieces-grid .phase-pane-grid {
    grid-template-columns: repeat(var(--phase-pane-columns-narrow, 1), minmax(0, 1fr));
  }

}

.page-shell--shap {
  width: min(1760px, calc(100vw - 40px));
}

.page-shell--shap .panel,
.page-shell--shap .shap-waterfall-row,
.page-shell--shap .shap-readout,
.page-shell--shap .shap-action,
.page-shell--shap .shap-context-item,
.page-shell--shap .shap-method-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.shap-ready .page-shell--shap .panel,
body.shap-ready .page-shell--shap .shap-waterfall-row,
body.shap-ready .page-shell--shap .shap-readout,
body.shap-ready .page-shell--shap .shap-action,
body.shap-ready .page-shell--shap .shap-context-item,
body.shap-ready .page-shell--shap .shap-method-card {
  opacity: 1;
  transform: translateY(0);
}

.shap-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: 26px;
  padding: 24px 28px;
  background:
    radial-gradient(circle at 88% 16%, rgba(111, 223, 255, 0.24), transparent 34%),
    radial-gradient(circle at 14% 22%, rgba(31, 94, 255, 0.22), transparent 36%),
    linear-gradient(135deg, #0c1525 0%, #10263c 44%, #0f1928 100%);
  overflow: hidden;
  position: relative;
}

.shap-hero::after {
  content: "";
  position: absolute;
  inset: auto -96px -108px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
  pointer-events: none;
}

.shap-hero-copy,
.shap-hero-readout {
  position: relative;
  z-index: 1;
}

.shap-hero-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.shap-hero-copy h1 {
  font-size: clamp(2.3rem, 3.6vw, 4.2rem);
  letter-spacing: -0.04em;
}

.shap-hero-copy .headline-summary {
  max-width: 760px;
  font-size: 1rem;
  color: rgba(245, 247, 251, 0.84);
}

.shap-hero-readout {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.shap-team-chip,
.shap-readout {
  min-height: 116px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 14, 24, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.shap-team-chip {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shap-team-chip__crest {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.shap-team-chip__copy {
  display: grid;
  gap: 4px;
}

.shap-team-chip__label {
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
}

.shap-team-chip__season {
  color: rgba(245, 247, 251, 0.64);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.shap-readout {
  display: grid;
  gap: 8px;
  align-content: start;
}

.shap-readout__label {
  color: rgba(245, 247, 251, 0.58);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shap-readout__value {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
  letter-spacing: -0.04em;
}

.shap-readout__caption {
  color: rgba(245, 247, 251, 0.68);
  line-height: 1.45;
}

.shap-controls {
  margin-top: 16px;
  padding: 22px 24px;
}

.control-grid--shap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 14px;
  align-items: end;
}

.control--target-toggle {
  display: grid;
  gap: 8px;
}

.segmented-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(9, 13, 22, 0.74);
}

.segmented-toggle__button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 247, 251, 0.68);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.segmented-toggle__button:hover,
.segmented-toggle__button:focus-visible {
  color: #fff;
  outline: none;
}

.segmented-toggle__button.is-active {
  background: linear-gradient(180deg, rgba(111, 223, 255, 0.22), rgba(31, 94, 255, 0.2));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.shap-stack {
  display: grid;
  gap: 24px;
  margin-top: 18px;
}

.shap-target-block {
  display: grid;
  gap: 18px;
}

.shap-target-head,
.shap-target-readout {
  padding: 22px 24px;
}

.shap-target-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.shap-target-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  letter-spacing: -0.03em;
}

.shap-target-summary {
  max-width: 58ch;
  margin: 0;
  color: rgba(245, 247, 251, 0.72);
  line-height: 1.6;
  text-align: right;
}

.shap-target-readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.shap-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(390px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.shap-target-block .shap-layout,
.shap-target-block .shap-method {
  margin-top: 0;
}

.shap-side {
  display: grid;
  gap: 18px;
}

.shap-waterfall,
.shap-summary,
.shap-actions,
.shap-context,
.shap-method {
  padding: 22px 24px 24px;
}

.shap-waterfall {
  min-height: 760px;
}

.shap-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.shap-section-head h2 {
  font-size: 1.4rem;
}

.shap-panel-note {
  max-width: 320px;
  margin: 0;
  color: rgba(245, 247, 251, 0.62);
  line-height: 1.45;
  text-align: right;
}

.shap-waterfall-chart {
  display: grid;
  gap: 16px;
}

.shap-waterfall-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  color: rgba(245, 247, 251, 0.46);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shap-waterfall-scale__tick {
  text-align: center;
}

.shap-waterfall-rows {
  display: grid;
  gap: 12px;
}

.shap-waterfall-row {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) 96px;
  gap: 16px;
  align-items: center;
  transition-delay: calc(var(--index, 0) * 22ms);
}

.shap-waterfall-row__label-wrap {
  display: grid;
  gap: 5px;
}

.shap-waterfall-row__label {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.shap-waterfall-row__meta {
  margin: 0;
  color: rgba(245, 247, 251, 0.54);
  font-size: 0.76rem;
  line-height: 1.45;
}

.shap-waterfall-row__track {
  position: relative;
  min-height: 42px;
  border-radius: 14px;
  background: rgba(9, 13, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.shap-waterfall-row__grid {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.02) 0,
    rgba(255, 255, 255, 0.02) calc(20% - 1px),
    rgba(255, 255, 255, 0.08) calc(20% - 1px),
    rgba(255, 255, 255, 0.08) 20%
  );
}

.shap-waterfall-row__bar {
  position: absolute;
  top: 8px;
  bottom: 8px;
  box-shadow: 0 8px 20px rgba(5, 10, 20, 0.4);
}

.shap-waterfall-row__bar.is-positive {
  background: linear-gradient(90deg, rgba(99, 209, 255, 0.84), rgba(31, 94, 255, 0.88));
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.shap-waterfall-row__bar.is-negative {
  background: linear-gradient(90deg, rgba(255, 116, 145, 0.86), rgba(255, 91, 115, 0.78));
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
}

.shap-waterfall-row__marker {
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(111, 223, 255, 0.9), rgba(31, 94, 255, 0.9));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.shap-waterfall-row__value {
  justify-self: end;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(245, 247, 251, 0.82);
}

.shap-waterfall-row__value.is-positive {
  color: #9fddff;
}

.shap-waterfall-row__value.is-negative {
  color: #ff9cad;
}

.shap-waterfall-row--baseline .shap-waterfall-row__value,
.shap-waterfall-row--prediction .shap-waterfall-row__value {
  font-size: 0.94rem;
  color: #fff;
}

.shap-combined-summary {
  margin: 0;
  color: rgba(245, 247, 251, 0.82);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 58ch;
}

.shap-theme-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.shap-theme {
  padding: 16px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 25, 40, 0.96), rgba(11, 16, 28, 0.96));
  display: grid;
  gap: 10px;
}

.shap-theme__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.shap-theme__eyebrow {
  margin: 0 0 4px;
  color: rgba(245, 247, 251, 0.52);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shap-theme__head h3 {
  font-size: 1.02rem;
  line-height: 1.25;
}

.shap-theme__impact-wrap {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.shap-theme__impact-label {
  color: rgba(245, 247, 251, 0.48);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shap-theme__impact {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.shap-theme__impact.is-positive {
  color: #9fddff;
}

.shap-theme__impact.is-negative {
  color: #ff9cad;
}

.shap-theme__summary,
.shap-theme__relationship,
.shap-theme__meta,
.shap-theme__lever {
  margin: 0;
  line-height: 1.6;
}

.shap-theme__summary {
  color: #fff;
}

.shap-theme__relationship {
  color: rgba(245, 247, 251, 0.72);
}

.shap-theme__meta {
  color: rgba(245, 247, 251, 0.56);
  font-size: 0.78rem;
}

.shap-theme__lever-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.shap-theme__lever {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(8, 12, 21, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.shap-theme__lever-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shap-theme__lever-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(116, 160, 255, 0.14);
  border: 1px solid rgba(116, 160, 255, 0.26);
  color: rgba(226, 234, 255, 0.88);
  font-size: 0.7rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.shap-theme__lever-name {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.shap-theme__lever-copy {
  color: rgba(245, 247, 251, 0.66);
  font-size: 0.76rem;
}

.shap-actions-list,
.shap-context-list {
  display: grid;
  gap: 14px;
}

.shap-action,
.shap-context-item {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shap-actions-list > *:first-child,
.shap-context-list > *:first-child {
  padding-top: 0;
  border-top: 0;
}

.shap-action__head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.shap-action__head h3,
.shap-context-item__head h3 {
  font-size: 1.04rem;
  line-height: 1.3;
}

.shap-action__eyebrow {
  margin: 0;
  color: #9fddff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shap-action__underlying,
.shap-action__theme,
.shap-action__definition,
.shap-action__copy,
.shap-action__meta,
.shap-context-item p {
  margin: 0;
  line-height: 1.55;
}

.shap-action__underlying {
  color: rgba(245, 247, 251, 0.72);
}

.shap-action__theme {
  color: #9fddff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shap-action__definition,
.shap-context-item p {
  color: rgba(245, 247, 251, 0.82);
}

.shap-action__copy {
  color: #fff;
}

.shap-action__meta,
.shap-context-item__meta {
  color: rgba(245, 247, 251, 0.56);
  font-size: 0.78rem;
}

.shap-action {
  display: grid;
  gap: 10px;
}

.shap-context-item {
  display: grid;
  gap: 8px;
}

.shap-context-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.shap-context-item__impact {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.shap-context-item__impact.is-positive {
  color: #9fddff;
}

.shap-context-item__impact.is-negative {
  color: #ff9cad;
}

.shap-method {
  margin-top: 18px;
}

.shap-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.shap-method-card {
  min-height: 152px;
  padding: 18px 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(22, 30, 47, 0.96), rgba(14, 20, 31, 0.96));
}

.shap-method-card h3 {
  margin-bottom: 10px;
  font-size: 0.94rem;
}

.shap-method-card p {
  margin: 0;
  color: rgba(245, 247, 251, 0.74);
  line-height: 1.6;
}

.page-shell--bestxi {
  width: min(1720px, calc(100vw - 40px));
}

.control-grid--bestxi {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.bestxi-model-control {
  position: relative;
}

.control--range {
  gap: 10px;
}

.bestxi-range-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bestxi-range-label-row strong {
  color: #ffffff;
  font-size: 0.96rem;
  font-variant-numeric: tabular-nums;
}

.bestxi-min-matches-control input[type="range"] {
  width: 100%;
  accent-color: #63c6ff;
}

.bestxi-model-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.bestxi-help-trigger {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(143, 179, 255, 0.55);
  background: rgba(31, 94, 255, 0.16);
  color: #eef4ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: help;
  flex: 0 0 auto;
}

.bestxi-help-trigger:hover,
.bestxi-help-trigger:focus-visible {
  border-color: rgba(143, 179, 255, 0.8);
  background: rgba(31, 94, 255, 0.26);
  outline: none;
}

.bestxi-help-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 60vw);
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 14, 24, 0.98);
  color: rgba(245, 247, 251, 0.92);
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 18px 38px rgba(4, 9, 18, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 20;
  pointer-events: none;
}

.bestxi-help-popover strong {
  color: #ffffff;
}

.bestxi-model-control:hover .bestxi-help-popover,
.bestxi-model-control:focus-within .bestxi-help-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bestxi-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 1fr);
  gap: 16px;
  align-items: start;
}

.bestxi-pitch-panel,
.bestxi-side-panel {
  padding: 20px 22px 24px;
  background: rgba(20, 25, 39, 0.96);
}

.bestxi-pitch {
  margin-top: 14px;
}

.bestxi-pitch-surface {
  position: relative;
  width: 100%;
  height: 850px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(8, 90, 52, 0.92) 0%, rgba(6, 70, 40, 0.95) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.04) 6%,
      rgba(0, 0, 0, 0.08) 6%,
      rgba(0, 0, 0, 0.08) 12%
    );
  box-shadow:
    inset 0 0 0 2px rgba(4, 20, 12, 0.48),
    inset 0 14px 34px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.bestxi-pitch-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.03) 0%,
      rgba(255, 255, 255, 0.03) 7.5%,
      rgba(255, 255, 255, 0) 7.5%,
      rgba(255, 255, 255, 0) 15%
    );
  pointer-events: none;
}

.bestxi-pitch-lines {
  position: absolute;
  inset: 12% 6% 12% 6%;
  pointer-events: none;
  z-index: 1;
}

.bestxi-pitch-lines span {
  position: absolute;
  box-sizing: border-box;
}

.bestxi-pitch-outline {
  inset: 0;
  border: 1px solid rgba(236, 245, 255, 0.4);
  border-radius: 18px;
}

.bestxi-half-line {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(236, 245, 255, 0.4);
}

.bestxi-center-circle {
  top: 50%;
  left: 50%;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(236, 245, 255, 0.4);
  transform: translate(-50%, -50%);
}

.bestxi-center-spot {
  width: 6px;
  height: 6px;
  background: rgba(236, 245, 255, 0.4);
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.bestxi-penalty-box {
  width: 59.3%;
  height: 15.7%;
  border: 1px solid rgba(236, 245, 255, 0.4);
  left: 50%;
  transform: translateX(-50%);
}

.bestxi-penalty-box.top {
  top: 0;
  border-top: none;
}

.bestxi-penalty-box.bottom {
  bottom: 0;
  border-bottom: none;
}

.bestxi-six-box {
  width: 26.9%;
  height: 5.3%;
  border: 1px solid rgba(236, 245, 255, 0.4);
  left: 50%;
  transform: translateX(-50%);
}

.bestxi-six-box.top {
  top: 0;
  border-top: none;
}

.bestxi-six-box.bottom {
  bottom: 0;
  border-bottom: none;
}

.bestxi-penalty-spot {
  width: 6px;
  height: 6px;
  background: rgba(236, 245, 255, 0.4);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
}

.bestxi-penalty-spot.top {
  top: 18%;
}

.bestxi-penalty-spot.bottom {
  bottom: 18%;
}

.bestxi-slot-stack {
  position: absolute;
  top: var(--slot-top, 50%);
  left: var(--slot-left, 50%);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 6px;
  justify-items: center;
  width: min(182px, 21%);
  min-width: 126px;
  z-index: 2;
}

.bestxi-slot-card {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 9px 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(10, 19, 33, 0.92), rgba(14, 24, 40, 0.88));
  box-shadow: 0 8px 18px rgba(6, 12, 21, 0.44);
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
  z-index: 2;
}

.bestxi-slot-secondary-card {
  width: 88%;
  padding: 6px 8px 7px;
  border-radius: 12px;
  border: 1px solid rgba(143, 179, 255, 0.24);
  background: rgba(10, 19, 33, 0.78);
  box-shadow: 0 6px 14px rgba(6, 12, 21, 0.26);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  color: rgba(245, 247, 251, 0.9);
  font-size: 0.7rem;
  line-height: 1.2;
}

.bestxi-slot-secondary-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.bestxi-slot-secondary-value {
  white-space: nowrap;
  font-weight: 800;
  color: #bfe7ff;
}

.bestxi-slot-card.is-forced {
  border-color: rgba(113, 201, 255, 0.72);
  box-shadow: 0 8px 18px rgba(113, 201, 255, 0.18);
}

.bestxi-slot-card.is-fallback {
  border-color: rgba(255, 168, 105, 0.6);
  box-shadow: 0 8px 18px rgba(255, 168, 105, 0.2);
}

.bestxi-slot-badge {
  min-width: 68px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(113, 201, 255, 0.55);
  background: rgba(31, 94, 255, 0.18);
  color: #eaf4ff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bestxi-slot-tag {
  min-width: 42px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(143, 179, 255, 0.5);
  color: #dce9ff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bestxi-slot-player {
  color: #f6f9ff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.24;
}

.bestxi-slot-meta {
  color: rgba(214, 228, 255, 0.72);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.bestxi-slot-score {
  color: #9fddff;
  font-size: 0.68rem;
  font-weight: 700;
}

.bestxi-slot-sample {
  color: rgba(245, 247, 251, 0.56);
  font-size: 0.62rem;
}

.bestxi-summary,
.bestxi-diagnostics {
  margin-top: 14px;
}

.bestxi-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bestxi-summary-stat {
  min-height: 92px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 24, 38, 0.76);
  display: grid;
  gap: 6px;
}

.bestxi-summary-label {
  color: rgba(214, 228, 255, 0.66);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bestxi-summary-value {
  color: #f8fbff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.bestxi-diagnostics {
  display: grid;
  gap: 12px;
}

.bestxi-diagnostics-section {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 24, 38, 0.74);
}

.bestxi-diagnostics-section h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.bestxi-diagnostics-copy {
  margin: 0;
  color: rgba(245, 247, 251, 0.74);
  font-size: 0.84rem;
  line-height: 1.55;
}

.bestxi-diagnostics-inline {
  margin: 6px 0 0;
  color: rgba(245, 247, 251, 0.9);
  font-size: 0.8rem;
  line-height: 1.45;
}

.bestxi-diagnostics-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(245, 247, 251, 0.86);
  display: grid;
  gap: 6px;
}

@media (max-width: 1320px) {
  .control-grid--bestxi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bestxi-layout {
    grid-template-columns: 1fr;
  }

  .bestxi-pitch-surface {
    min-height: 470px;
  }

  .shap-hero {
    grid-template-columns: 1fr;
  }

  .shap-layout {
    grid-template-columns: 1fr;
  }

  .shap-target-readout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shap-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shap-summary {
    grid-column: 1 / -1;
  }

  .shap-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .control-grid--bestxi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bestxi-summary-grid {
    grid-template-columns: 1fr;
  }

  .bestxi-pitch-surface {
    min-height: 430px;
  }

  .bestxi-slot-stack {
    width: min(200px, 25%);
    min-width: 116px;
  }

  .page-shell--shap {
    width: min(100vw - 24px, 100%);
    margin: 16px auto 28px;
  }

  .control-grid--shap,
  .shap-hero-readout,
  .shap-target-readout,
  .shap-side,
  .shap-method-grid {
    grid-template-columns: 1fr;
  }

  .shap-waterfall-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shap-panel-note {
    text-align: left;
    max-width: none;
  }

  .shap-target-head,
  .shap-section-head {
    flex-direction: column;
  }

  .shap-target-summary {
    text-align: left;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .page-shell--bestxi {
    width: min(100vw - 24px, 100%);
    margin: 16px auto 28px;
  }

  .control-grid--bestxi {
    grid-template-columns: 1fr;
  }

  .bestxi-pitch-panel,
  .bestxi-side-panel {
    padding: 16px;
  }

  .bestxi-pitch-surface {
    min-height: 390px;
  }

  .bestxi-slot-stack {
    width: min(232px, 34%);
    min-width: 98px;
  }

  .bestxi-slot-card {
    padding: 7px 8px 8px;
  }

  .bestxi-slot-player {
    font-size: 0.74rem;
  }

  .bestxi-slot-meta,
  .bestxi-slot-score,
  .bestxi-slot-sample {
    font-size: 0.58rem;
  }

  .shap-hero,
  .shap-controls,
  .shap-target-head,
  .shap-target-readout,
  .shap-waterfall,
  .shap-summary,
  .shap-actions,
  .shap-context,
  .shap-method {
    padding: 18px;
  }

  .segmented-toggle {
    width: 100%;
    flex-direction: column;
    border-radius: 18px;
  }

  .segmented-toggle__button {
    width: 100%;
  }

  .shap-waterfall-scale {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shap-team-chip,
  .shap-readout,
  .shap-method-card {
    min-height: initial;
  }
}

.page-shell--match-explorer {
  width: min(1880px, calc(100vw - 40px));
}

.match-explorer-hero-readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  min-width: 380px;
}

.match-explorer-hero-card {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 18, 31, 0.38);
  display: grid;
  gap: 4px;
}

.match-explorer-hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 247, 251, 0.64);
}

.match-explorer-hero-value {
  font-size: 1rem;
  line-height: 1.3;
}

.control-grid--match-explorer {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.control-grid--match-explorer .control {
  position: relative;
  gap: 0;
  justify-items: center;
}

.control-grid--match-explorer .control span {
  position: absolute;
  top: 9px;
  left: 50%;
  z-index: 1;
  max-width: calc(100% - 24px);
  overflow: hidden;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(201, 211, 227, 0.7);
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%);
}

.control-grid--match-explorer .control select {
  min-height: 48px;
  padding: 19px 22px 8px;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
  text-align-last: center;
}

.control-grid--match-explorer .control.is-active-filter select {
  border-color: rgba(143, 179, 255, 0.84);
  box-shadow:
    0 0 0 1px rgba(143, 179, 255, 0.72),
    0 10px 18px rgba(10, 15, 26, 0.26);
}

.control-grid--match-explorer .control.is-active-filter span {
  color: #cfe0ff;
}

.match-explorer-filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.match-explorer-upload-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.match-explorer-upload {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px dashed rgba(143, 179, 255, 0.36);
  background:
    linear-gradient(180deg, rgba(17, 24, 40, 0.82), rgba(12, 18, 30, 0.88)),
    rgba(8, 12, 20, 0.72);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.match-explorer-upload:hover,
.match-explorer-upload.is-dragover {
  border-color: rgba(143, 179, 255, 0.66);
  background:
    linear-gradient(180deg, rgba(22, 31, 52, 0.9), rgba(12, 18, 30, 0.92)),
    rgba(8, 12, 20, 0.78);
  transform: translateY(-1px);
}

.match-explorer-upload-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb3ff;
}

.match-explorer-upload-title {
  font-size: 1.02rem;
  line-height: 1.25;
}

.match-explorer-upload-copy {
  color: var(--muted-strong);
  line-height: 1.5;
}

.match-explorer-upload.is-condensed {
  gap: 10px;
}

.match-explorer-upload.is-condensed .match-explorer-upload-title,
.match-explorer-upload.is-condensed .match-explorer-upload-copy {
  display: none;
}

.match-explorer-upload-meta {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 250px;
}

.match-explorer-query {
  margin-top: 18px;
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(143, 179, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(31, 94, 255, 0.12), rgba(17, 24, 39, 0.12)),
    rgba(12, 18, 31, 0.8);
}

.match-explorer-query__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.match-explorer-query__head h2 {
  margin: 0;
  font-size: 1rem;
}

.match-explorer-query__composer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.match-explorer-query__input-wrap {
  flex: 1 1 420px;
}

.match-explorer-query__input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(143, 179, 255, 0.22);
  background: rgba(9, 14, 25, 0.88);
  color: #eef4ff;
  font: inherit;
}

.match-explorer-query__input::placeholder {
  color: rgba(221, 230, 249, 0.42);
}

.match-explorer-query__input:focus {
  outline: none;
  border-color: rgba(143, 179, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.16);
}

.match-explorer-query-proposal {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(143, 179, 255, 0.12);
  background: rgba(11, 16, 28, 0.78);
}

.match-explorer-query-summary {
  margin: 0;
  color: #eef4ff;
  line-height: 1.5;
}

.match-explorer-query-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.match-explorer-query-meta__chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 700;
}

.match-explorer-query-meta__chip.is-warning {
  border-color: rgba(247, 185, 85, 0.26);
  background: rgba(247, 185, 85, 0.12);
  color: #ffd98c;
}

.match-explorer-query-control {
  display: grid;
  gap: 6px;
}

.match-explorer-query-control span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-explorer-query-control select,
.match-explorer-query-extra-filter__values {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.92);
  color: #eef4ff;
  font: inherit;
}

.match-explorer-query-extra-filters {
  display: grid;
  gap: 10px;
}

.match-explorer-query-extra-filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-explorer-query-extra-filters__head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.match-explorer-query-extra-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 24, 39, 0.66);
}

.match-explorer-query-extra-filter__note {
  margin: 6px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.match-explorer-query-remove {
  min-height: 40px;
}

.match-explorer-query-proposal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-explorer-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.match-explorer-loaded-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.match-explorer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.92);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.match-explorer-loaded-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 34px;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(143, 179, 255, 0.18);
  background: rgba(12, 18, 31, 0.88);
  color: #eef4ff;
}

.match-explorer-loaded-file__kind {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(31, 94, 255, 0.18);
  color: #9fc0ff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-explorer-loaded-file__name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.match-explorer-loaded-file__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #eef4ff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.match-explorer-loaded-file__remove:hover,
.match-explorer-loaded-file__remove:focus-visible {
  background: rgba(255, 91, 115, 0.22);
  color: #fff;
  outline: none;
}

.match-explorer-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.match-explorer-summary-panel,
.match-explorer-pitch-panel {
  padding: 20px 22px 24px;
  background: rgba(20, 25, 39, 0.96);
}

.match-explorer-pitch-panel {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
}

.match-explorer-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.match-explorer-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(33, 43, 64, 0.88), rgba(17, 24, 39, 0.92));
}

.match-explorer-summary-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-explorer-summary-value {
  font-size: 1rem;
  line-height: 1.3;
}

.match-explorer-table-wrap {
  margin-top: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  overflow: auto;
  max-height: 860px;
  background: rgba(10, 16, 29, 0.72);
}

.match-explorer-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.match-explorer-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 14px 16px;
  background: rgba(17, 24, 42, 0.98);
  color: #dbe5f8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--panel-border-strong);
}

.match-explorer-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--ink);
  vertical-align: top;
}

.match-explorer-row {
  cursor: pointer;
}

.match-explorer-row:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.match-explorer-row:hover td {
  background: rgba(31, 94, 255, 0.08);
}

.match-explorer-row.is-selected td {
  background: rgba(31, 94, 255, 0.16);
}

.match-explorer-row-label {
  display: grid;
  gap: 4px;
}

.match-explorer-row-label strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.match-explorer-row-label span {
  font-size: 0.76rem;
  color: var(--muted-strong);
}

.match-explorer-media-layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

.match-explorer-pitch {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.match-explorer-pitch-surface {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 2 / 3;
  height: auto;
  justify-self: center;
}

.match-explorer-pitch-surface .bestxi-pitch-lines {
  inset: auto;
  top: 11.5%;
  left: 50%;
  height: 77%;
  width: auto;
  aspect-ratio: 68 / 105;
  transform: translateX(-50%);
}

.match-explorer-pitch-surface .bestxi-pitch-outline,
.match-explorer-pitch-surface .bestxi-center-circle,
.match-explorer-pitch-surface .bestxi-penalty-box,
.match-explorer-pitch-surface .bestxi-six-box {
  border-color: rgba(244, 249, 255, 0.74);
  border-width: 1.5px;
}

.match-explorer-pitch-surface .bestxi-half-line {
  height: 1.5px;
  background: rgba(244, 249, 255, 0.74);
}

.match-explorer-pitch-surface .bestxi-center-spot,
.match-explorer-pitch-surface .bestxi-penalty-spot {
  width: 7px;
  height: 7px;
  background: rgba(248, 251, 255, 0.82);
}

.match-explorer-pitch-overlay-wrap {
  position: absolute;
  top: 11.5%;
  left: 50%;
  height: 77%;
  width: auto;
  aspect-ratio: 68 / 105;
  transform: translateX(-50%);
  z-index: 2;
}

.match-explorer-pitch-overlay {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  touch-action: none;
  cursor: crosshair;
}

.match-explorer-event {
  cursor: pointer;
}

.match-explorer-event-line {
  stroke: var(--event-color, #1f5eff);
  stroke-width: 0.55;
  stroke-linecap: butt;
  opacity: 1;
}

.match-explorer-event-arrow {
  fill: var(--event-color, #1f5eff);
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 0.08;
  opacity: 1;
}

.match-explorer-event-node {
  fill: var(--event-color, #1f5eff);
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.14;
  opacity: 1;
}

.match-explorer-event-node.is-start {
  opacity: 1;
}

.match-explorer-event-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 0.42;
}

.match-explorer-event-active-ring {
  fill: none;
  stroke: rgba(246, 214, 102, 0.98);
  stroke-width: 0.52;
  filter: drop-shadow(0 0 5px rgba(246, 214, 102, 0.6));
}

.match-explorer-event.is-selected .match-explorer-event-line,
.match-explorer-event.is-selected .match-explorer-event-node {
  opacity: 1;
}

.match-explorer-event.is-playback-active .match-explorer-event-line {
  stroke-width: 0.82;
  filter: drop-shadow(0 0 4px rgba(246, 214, 102, 0.46));
}

.match-explorer-event.is-playback-active .match-explorer-event-node,
.match-explorer-event.is-playback-active .match-explorer-event-arrow {
  filter: drop-shadow(0 0 4px rgba(246, 214, 102, 0.5));
}

.match-explorer-selection-brush {
  fill: rgba(143, 179, 255, 0.18);
  stroke: rgba(143, 179, 255, 0.92);
  stroke-width: 0.34;
  stroke-dasharray: 1.2 0.85;
  pointer-events: none;
}

.match-explorer-direction-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 16, 27, 0.72);
  color: rgba(245, 247, 251, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.match-explorer-pitch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: min(100%, 640px);
  justify-self: center;
}

.match-explorer-legend-scale {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 340px);
}

.match-explorer-legend-gradient {
  flex: 1 1 auto;
  min-width: 140px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rank-worst) 0%, var(--rank-best) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.match-explorer-legend-scale-label,
.match-explorer-legend-note {
  font-size: 0.78rem;
  color: var(--muted-strong);
}

.match-explorer-pitch-tooltip {
  position: absolute;
  z-index: 5;
  width: min(320px, calc(100% - 20px));
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 15, 26, 0.96);
  box-shadow: 0 18px 40px rgba(4, 8, 18, 0.58);
  pointer-events: none;
}

.match-explorer-pitch-tooltip[hidden] {
  display: none;
}

.match-explorer-pitch-tooltip-eyebrow {
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fb3ff;
}

.match-explorer-pitch-tooltip-title {
  font-size: 0.94rem;
  line-height: 1.3;
}

.match-explorer-pitch-tooltip-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 6px 10px;
  align-items: start;
}

.match-explorer-pitch-tooltip-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-explorer-pitch-tooltip-value {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #eef4ff;
}

.match-explorer-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 19, 31, 0.54);
  color: var(--muted-strong);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.match-explorer-legend-item:hover {
  border-color: rgba(143, 179, 255, 0.38);
  background: rgba(24, 36, 61, 0.78);
  transform: translateY(-1px);
}

.match-explorer-legend-item.is-active {
  border-color: rgba(143, 179, 255, 0.6);
  background: rgba(44, 66, 113, 0.88);
  color: #f5f8ff;
}

.match-explorer-legend-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(143, 179, 255, 0.22);
}

.match-explorer-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--legend-color, #1f5eff);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.match-explorer-selection {
  margin-top: 12px;
}

.match-explorer-selection-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.match-explorer-selection-card {
  display: grid;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 18, 31, 0.56);
}

.match-explorer-selection-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.match-explorer-selection-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fb3ff;
}

.match-explorer-selection-copy {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.match-explorer-selection-gridlist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.match-explorer-selection-item {
  display: grid;
  gap: 3px;
}

.match-explorer-selection-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-explorer-selection-value {
  font-size: 0.9rem;
  line-height: 1.35;
}

.match-explorer-video-panel {
  display: grid;
  gap: 12px;
  padding: 14px 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 18, 31, 0.56);
}

.match-explorer-video-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.match-explorer-video-head h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.match-explorer-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 8, 15, 0.96);
}

.match-explorer-video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #04080f;
}

.match-explorer-video-queue {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(31, 40, 58, 0.68) 0%, rgba(14, 20, 32, 0.86) 100%);
  color: var(--ink);
  align-self: start;
}

.match-explorer-video-queue__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(214, 230, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.match-explorer-video-queue__list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  overflow-y: auto;
  overflow-x: hidden;
}

.match-explorer-video-queue__item {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 58px;
  flex: 0 0 auto;
}

.match-explorer-video-queue__item:last-child {
  border-bottom: 0;
}

.match-explorer-video-queue__item:hover,
.match-explorer-video-queue__item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.match-explorer-video-queue__item.is-active {
  background: linear-gradient(180deg, rgba(28, 52, 96, 0.58), rgba(18, 34, 62, 0.44));
  box-shadow: inset 3px 0 0 rgba(107, 147, 255, 0.95);
}

.match-explorer-video-queue__number {
  width: 28px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(49, 120, 255, 0.9), rgba(31, 94, 255, 0.72));
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
}

.match-explorer-video-queue__body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.match-explorer-video-queue__title,
.match-explorer-video-queue__meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-explorer-video-queue__title {
  font-size: 0.9rem;
  font-weight: 800;
}

.match-explorer-video-queue__meta {
  color: rgba(201, 211, 227, 0.72);
  font-size: 0.78rem;
}

.match-explorer-video-queue__empty {
  padding: 12px;
  color: rgba(201, 211, 227, 0.72);
  font-size: 0.86rem;
  font-weight: 700;
}

.match-explorer-video-utility-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.control-grid--match-explorer-video {
  margin-top: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.match-explorer-video-toggle input {
  justify-self: start;
  width: 18px;
  height: 18px;
  accent-color: #1f5eff;
}

.match-explorer-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-explorer-video-actions .ghost-button {
  min-height: 38px;
}

.match-explorer-video-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.match-explorer-video-details .empty-state {
  grid-column: 1 / -1;
}

.match-explorer-video-detail {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 24, 0.74);
}

.match-explorer-video-detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.match-explorer-video-detail-value {
  font-size: 0.9rem;
  line-height: 1.35;
}

.match-explorer-video-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 10, 20, 0.76);
  backdrop-filter: blur(12px);
}

.match-explorer-video-modal[hidden] {
  display: none;
}

.match-explorer-video-modal__dialog {
  width: min(98vw, 1760px);
  height: min(94vh, 1080px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(19, 27, 43, 0.99), rgba(11, 16, 29, 0.99)),
    var(--panel);
}

.match-explorer-video-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
}

.match-explorer-video-modal__head h2 {
  margin-top: 2px;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.match-explorer-video-summary {
  margin: 10px 0 0;
  max-width: 920px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.match-explorer-video-modal__head-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.match-explorer-video-modal__close {
  flex: 0 0 auto;
}

.match-explorer-video-config-toggle {
  flex: 0 0 auto;
}

.match-explorer-video-workspace {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  gap: 18px;
  align-items: stretch;
  justify-content: space-between;
  overflow: hidden;
}

.match-explorer-video-sidebar {
  position: relative;
  z-index: 2;
  flex: 0 0 420px;
  width: 420px;
  max-width: 420px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  overflow: hidden;
}

.match-explorer-video-sidebar-pane {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.match-explorer-video-modal .match-explorer-video-frame {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: calc(100% - 438px);
  max-width: calc(100% - 438px);
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  contain: layout paint;
  isolation: isolate;
}

.match-explorer-video-modal .match-explorer-video-frame video {
  background: #02050b;
}

.match-explorer-video-modal .match-explorer-video-queue {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.match-explorer-video-pitch {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(143, 179, 255, 0.16);
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.92), rgba(8, 13, 24, 0.92));
  overflow: hidden;
}

.match-explorer-video-pitch__head {
  min-width: 0;
}

.match-explorer-pitch--video {
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 0;
}

.match-explorer-pitch-surface--video {
  width: min(100%, 360px);
}

.match-explorer-video-api {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(143, 179, 255, 0.16);
  background: linear-gradient(180deg, #11192a 0%, #090f18 100%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  overflow-y: auto;
}

.match-explorer-video-api[hidden] {
  display: none !important;
}

.match-explorer-video-api__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.match-explorer-video-api__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.match-explorer-video-api__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-explorer-video-api__hint {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.45;
}

.match-explorer-video-api__helper {
  display: grid;
  gap: 10px;
}

.match-explorer-video-modal .control-grid--match-explorer-video {
  flex: 0 0 auto;
}

.match-explorer-video-modal .match-explorer-video-actions {
  flex: 0 0 auto;
}

.control-grid--match-explorer-video-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.match-explorer-video-actions--panel {
  gap: 8px;
}

.match-explorer-video-actions--panel .ghost-button {
  min-height: 34px;
}

@media (max-width: 1480px) {
  .match-explorer-pitch-surface {
    width: min(100%, 620px);
  }
}

@media (max-width: 1180px) {
  .match-explorer-upload-shell {
    grid-template-columns: 1fr;
  }

  .match-explorer-layout {
    grid-template-columns: 1fr;
  }

  .match-explorer-hero-readout,
  .match-explorer-summary-cards,
  .control-grid--match-explorer-video {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-explorer-video-modal {
    padding: 16px;
  }

  .match-explorer-video-modal__dialog {
    width: min(100vw - 18px, 1760px);
    height: min(90vh, 1080px);
    padding: 18px;
    border-radius: 22px;
  }

  .match-explorer-video-api__grid {
    grid-template-columns: 1fr;
  }

  .match-explorer-video-workspace {
    display: grid;
    grid-template-columns: 1fr;
  }

  .match-explorer-video-sidebar {
    width: 100%;
    max-width: none;
    flex: none;
    grid-template-rows: auto auto;
  }

  .match-explorer-video-modal .match-explorer-video-frame {
    width: 100%;
    max-width: none;
    flex: none;
  }

  .control-grid--match-explorer-video-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-shell--match-explorer {
    width: min(100vw - 24px, 100%);
    margin: 16px auto 28px;
  }

  .match-explorer-hero-readout,
  .match-explorer-selection-gridlist {
    grid-template-columns: 1fr;
  }

  .page-tabs--in-header {
    width: 100%;
    justify-content: flex-start;
  }

  .control-grid--match-explorer,
  .match-explorer-summary-cards,
  .control-grid--match-explorer-video,
  .control-grid--match-explorer-video-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-main {
    gap: 22px;
  }

  .dashboard-workspace .section {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding: 0 0 20px;
  }

  .dashboard-workspace .section-head {
    grid-column: 1;
    justify-content: flex-start;
    min-height: auto;
    padding: 0 2px 2px;
  }

  .dashboard-workspace .section-head > div {
    justify-content: flex-start;
  }

  .dashboard-workspace .section-head h2 {
    writing-mode: initial;
    transform: none;
    font-size: 1rem;
    letter-spacing: 0.04em;
  }

  .dashboard-workspace .metric-groups {
    grid-column: 1;
  }

  .match-explorer-pitch-surface {
    width: min(100%, 540px);
  }

  .match-explorer-video-modal__head {
    flex-direction: column;
    align-items: stretch;
  }

  .match-explorer-video-modal__head-actions {
    justify-content: flex-start;
  }

  .match-explorer-video-modal .match-explorer-video-frame {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .match-explorer-summary-panel,
  .match-explorer-pitch-panel {
    padding: 16px;
  }

  .match-explorer-upload {
    padding: 16px;
  }

  .match-explorer-video-head {
    flex-direction: column;
  }

  .match-explorer-pitch-surface {
    width: min(100%, 430px);
  }

  .match-explorer-video-modal__dialog {
    width: min(100vw - 14px, 1600px);
    height: min(92vh, 1080px);
    padding: 14px;
    border-radius: 18px;
  }

  .match-explorer-video-modal .match-explorer-video-frame {
    min-height: 240px;
  }
}

.dashboard-fixed-width {
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
}

.dashboard-fixed-width .page-shell--dashboard {
  --dashboard-fit-scale: 1;
  width: 2200px;
  min-width: 2200px;
  margin: 6px auto 0;
  zoom: var(--dashboard-fit-scale);
}

.dashboard-fixed-width .workspace-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dashboard-fixed-width .workspace-tools {
  width: 1080px;
  max-width: 1080px;
  justify-self: end;
  justify-items: end;
}

.dashboard-fixed-width .page-shell--dashboard .header-filter-bar,
.dashboard-fixed-width .page-shell--dashboard .control-grid--header {
  justify-content: flex-end;
}

.dashboard-fixed-width .page-shell--dashboard .control-grid--header {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: flex-end;
}

.dashboard-fixed-width .page-shell--dashboard .control-grid--header .control {
  min-width: 0;
  max-width: none;
}

.dashboard-fixed-width .page-shell--dashboard .control-grid--header .control--venue {
  grid-column: span 2;
  min-width: 0;
  max-width: none;
}

.dashboard-fixed-width .page-shell--dashboard .control-grid--header .control--date-range {
  grid-column: span 2;
  min-width: 0;
  max-width: none;
}

.dashboard-fixed-width .dashboard-workspace {
  grid-template-columns: minmax(0, 1fr) 430px;
  --dashboard-metric-columns-current: 8;
}
