:root {
  color-scheme: dark;
  --rank-col-width: 56px;
  --player-col-width: 248px;
  --fit-col-width: 136px;
  --bg: #091117;
  --bg-alt: #0d171f;
  --band: #0f1b24;
  --band-strong: #142330;
  --line: rgba(168, 184, 195, 0.13);
  --line-strong: rgba(168, 184, 195, 0.22);
  --text: #f3f7fa;
  --muted: #9dafbb;
  --green: #59d8a7;
  --cyan: #67bde8;
  --violet: #c691f2;
  --amber: #e5bb5d;
  --red: #df7688;
  --panel-soft: rgba(255, 255, 255, 0.03);
  --panel-quiet: rgba(255, 255, 255, 0.025);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(55, 211, 154, 0.08), transparent 20%),
    linear-gradient(120deg, rgba(70, 186, 242, 0.06), transparent 28%),
    linear-gradient(180deg, var(--bg), #060c11 58%, #071016);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 24px 28px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.band {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 31, 41, 0.96), rgba(10, 18, 25, 0.94));
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.sticky-app-bar {
  position: sticky;
  top: 12px;
  z-index: 30;
  padding: 11px 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(18px);
  background:
    linear-gradient(180deg, rgba(15, 28, 38, 0.94), rgba(10, 18, 25, 0.96));
}

.sticky-app-main,
.sticky-app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-app-nav {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.sticky-app-brand,
.sticky-app-actions,
.anchor-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.anchor-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe7ee;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.anchor-btn:hover {
  background: rgba(255, 255, 255, 0.055);
}

.anchor-btn:disabled,
.btn:disabled,
.search-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 26px 20px;
  background:
    linear-gradient(135deg, rgba(26, 49, 63, 0.96), rgba(12, 22, 30, 0.95)),
    linear-gradient(180deg, rgba(89, 216, 167, 0.05), transparent 56%);
}

.brand-block {
  max-width: 860px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: #c2d0da;
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  font-weight: 800;
}

.pill-accent {
  color: #d7fff0;
  border-color: rgba(55, 211, 154, 0.35);
  background: rgba(55, 211, 154, 0.12);
}

.sticky-app-bar .btn {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 13px;
}

.sticky-app-bar .btn-tertiary {
  opacity: 0.9;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 3.4vw, 40px);
  line-height: 1.02;
  letter-spacing: 0;
  max-width: 720px;
}

h2 {
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.1;
}

.lede {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 620;
}

.hero-process {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.hero-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 760;
  color: #dce7ef;
}

.hero-step strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(89, 216, 167, 0.18);
  color: #dffbf0;
  font-size: 11px;
}

.hero-arrow {
  color: #6f8594;
  font-size: 13px;
  font-weight: 900;
}

.btn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  padding: 11px 14px;
  font-weight: 800;
  min-height: 44px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.btn-primary {
  border-color: rgba(55, 211, 154, 0.32);
  background: linear-gradient(180deg, rgba(55, 211, 154, 0.92), rgba(29, 178, 129, 0.92));
  color: #042117;
}

.btn-secondary {
  border-color: rgba(103, 189, 232, 0.2);
  background: rgba(103, 189, 232, 0.08);
  color: #dff5ff;
}

.btn-tertiary {
  background: rgba(255, 255, 255, 0.035);
  color: #dfe8ef;
}

.btn-file {
  position: relative;
  overflow: hidden;
}

.btn-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.control-bar {
  margin-top: 14px;
  padding: 16px 18px;
}

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

.section-head p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.62;
  font-weight: 650;
}

.section-head-tight {
  margin-bottom: 18px;
}

.meta-note,
.legend-block,
.legend-small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.legend-block {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.directory-toolbar .legend-block {
  flex: 1 1 420px;
  justify-content: flex-start;
}

.directory-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  min-width: min(100%, 420px);
}

.directory-search {
  width: min(100%, 360px);
  min-width: 260px;
}

.legend-small {
  text-align: right;
}

.hidden-view {
  display: none !important;
}

.control-inline {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.control-copy {
  max-width: 760px;
}

.control-copy h2 {
  font-size: 20px;
}

.control-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 650;
}

.search-input {
  min-width: 320px;
  flex: 0 1 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px 14px;
  font-weight: 700;
  outline: none;
}

.search-input:focus {
  border-color: rgba(103, 189, 232, 0.35);
  box-shadow: 0 0 0 3px rgba(103, 189, 232, 0.08);
}

.search-input::placeholder {
  color: #7890a0;
}

.status-pill {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid var(--line);
}

.status-good {
  color: #d4fff0;
  background: rgba(55, 211, 154, 0.13);
  border-color: rgba(55, 211, 154, 0.32);
}

.status-bad {
  color: #ffd8df;
  background: rgba(240, 108, 127, 0.13);
  border-color: rgba(240, 108, 127, 0.32);
}

.status-neutral {
  color: #d7e3ec;
  background: rgba(255, 255, 255, 0.05);
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
}

.page-grid.page-grid-focus {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.overview-intro {
  margin-top: 14px;
  padding: 16px 18px;
}

.overview-head {
  display: block;
}

.overview-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
  max-width: 720px;
  font-size: 14px;
}

.overview-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.022);
  padding: 14px 15px;
}

.overview-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(89, 216, 167, 0.14);
  color: #dffbf0;
  font-size: 13px;
  font-weight: 900;
}

.overview-card h3 {
  margin-top: 10px;
  font-size: 16px;
}

.overview-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
}

.main-column,
.side-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lens-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 18px;
}

.situation-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  background: rgba(255, 255, 255, 0.018);
}

.situation-group-head h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.situation-group-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 650;
  max-width: 720px;
  font-size: 13px;
}

.situation-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.group-defending-team {
  box-shadow: inset 3px 0 0 rgba(89, 216, 167, 0.22);
}

.group-defending-role {
  box-shadow: inset 3px 0 0 rgba(89, 216, 167, 0.18);
}

.group-defending-role .situation-group-head h3::after {
  content: " role focus";
  color: var(--violet);
  font-size: 14px;
  font-weight: 800;
  margin-left: 6px;
}

.group-attacking-team {
  box-shadow: inset 3px 0 0 rgba(103, 189, 232, 0.22);
}

.group-attacking-threat {
  box-shadow: inset 3px 0 0 rgba(229, 187, 93, 0.22);
}

.lens-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(16, 28, 38, 0.96), rgba(10, 18, 24, 0.98));
  color: var(--text);
  padding: 16px 16px 15px;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.lens-card:hover {
  transform: translateY(-2px);
  border-color: rgba(70, 186, 242, 0.32);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.lens-card.active {
  border-color: rgba(103, 189, 232, 0.38);
  box-shadow:
    inset 0 0 0 1px rgba(103, 189, 232, 0.18),
    0 16px 28px rgba(0, 0, 0, 0.18);
}

.lens-card-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.lens-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #dceaf2;
  background: rgba(255, 255, 255, 0.03);
}

.lens-active-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(103, 189, 232, 0.12);
  color: #dff5ff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(103, 189, 232, 0.14);
}

.lens-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.lens-card-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.18;
}

.lens-card-score {
  font-size: 28px;
  font-weight: 950;
  color: var(--green);
  line-height: 1;
}

.lens-score-block {
  min-width: 86px;
  text-align: right;
}

.lens-card-score-label {
  color: #7990a0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
  margin-bottom: 6px;
}

.lens-card-copy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  min-height: 44px;
  max-width: 42ch;
}

.lens-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.lens-focus-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #dce8ef;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.lens-card-empty-note {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.lens-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

.lens-mini {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.lens-mini-label {
  font-size: 10px;
  color: #6f8594;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.lens-mini-value {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.tone-green .lens-card-score,
.tone-green .lens-category-badge {
  color: #dffbf0;
}

.tone-green {
  box-shadow: inset 3px 0 0 rgba(89, 216, 167, 0.18);
}

.tone-green .lens-category-badge {
  background: rgba(89, 216, 167, 0.12);
  box-shadow: inset 0 0 0 1px rgba(89, 216, 167, 0.14);
}

.tone-cyan {
  box-shadow: inset 3px 0 0 rgba(103, 189, 232, 0.18);
}

.tone-cyan .lens-category-badge {
  background: rgba(103, 189, 232, 0.12);
  box-shadow: inset 0 0 0 1px rgba(103, 189, 232, 0.14);
}

.tone-blue {
  box-shadow: inset 3px 0 0 rgba(103, 150, 232, 0.18);
}

.tone-blue .lens-category-badge {
  background: rgba(103, 150, 232, 0.12);
  box-shadow: inset 0 0 0 1px rgba(103, 150, 232, 0.14);
}

.tone-teal {
  box-shadow: inset 3px 0 0 rgba(87, 208, 198, 0.18);
}

.tone-teal .lens-category-badge {
  background: rgba(87, 208, 198, 0.12);
  box-shadow: inset 0 0 0 1px rgba(87, 208, 198, 0.14);
}

.tone-violet .lens-category-badge,
.tone-purple .lens-category-badge {
  background: rgba(198, 145, 242, 0.12);
  box-shadow: inset 0 0 0 1px rgba(198, 145, 242, 0.14);
}

.tone-role .lens-category-badge {
  background: linear-gradient(90deg, rgba(89, 216, 167, 0.12), rgba(198, 145, 242, 0.12));
  box-shadow: inset 0 0 0 1px rgba(198, 145, 242, 0.14);
}

.tone-role {
  box-shadow: inset 3px 0 0 rgba(164, 156, 231, 0.18);
}

.tone-amber .lens-category-badge,
.tone-gold .lens-category-badge {
  background: rgba(229, 187, 93, 0.12);
  box-shadow: inset 0 0 0 1px rgba(229, 187, 93, 0.14);
}

.tone-amber,
.tone-gold {
  box-shadow: inset 3px 0 0 rgba(229, 187, 93, 0.18);
}

.detail-band {
  padding: 22px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-header-copy {
  max-width: 760px;
}

.detail-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.detail-header h2 {
  font-size: clamp(28px, 3.2vw, 46px);
  margin-top: 8px;
}

.detail-header p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.72;
  font-weight: 650;
}

.question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.question-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: #dfe8ef;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  font-weight: 800;
}

.detail-side-stat {
  min-width: 240px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.detail-side-stat h3 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.detail-side-stat p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #dbe6ed;
  font-weight: 700;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.kpi-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.028));
  padding: 15px 15px 16px;
  min-height: 118px;
}

.kpi-card .overline {
  color: #6b8292;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 950;
}

.kpi-card .value {
  margin-top: 14px;
  font-size: 31px;
  font-weight: 950;
  line-height: 1;
  color: #ecf8f4;
}

.kpi-card .sub {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 700;
}

.insight-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.detail-context-row {
  display: block;
  margin-top: 18px;
}

.top-fits-section {
  margin-top: 18px;
}

.top-fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.top-fit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  text-align: left;
  color: var(--text);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.top-fit-card.active {
  border-color: rgba(103, 189, 232, 0.32);
  box-shadow: inset 0 0 0 1px rgba(103, 189, 232, 0.16);
}

.top-fit-rank {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #dfe9ef;
  font-size: 12px;
  font-weight: 900;
}

.top-fit-name {
  font-size: 15px;
  font-weight: 850;
}

.top-fit-meta,
.top-fit-copy {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
}

.top-fit-score {
  font-size: 24px;
  font-weight: 950;
  color: #e8fbf4;
}

.context-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.024));
  padding: 17px;
}

.context-panel-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 700;
}

.context-tier + .context-tier {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.context-tier-title {
  color: #dbe6ee;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.context-tier-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.context-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.context-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 11px 10px;
  background: rgba(255, 255, 255, 0.026);
}

.context-chip-core {
  box-shadow: inset 0 0 0 1px rgba(55, 211, 154, 0.14);
}

.context-chip-support {
  box-shadow: inset 0 0 0 1px rgba(70, 186, 242, 0.14);
}

.context-chip-accent {
  box-shadow: inset 0 0 0 1px rgba(204, 140, 255, 0.14);
}

.context-chip-name {
  font-weight: 850;
}

.context-chip-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}

.insight {
  border-left: 3px solid rgba(70, 186, 242, 0.55);
  background: rgba(255, 255, 255, 0.032);
  padding: 14px 14px 14px 16px;
  color: #dce6ee;
  line-height: 1.64;
  font-weight: 700;
}

.insight-warning {
  border-left-color: rgba(229, 187, 93, 0.7);
  background: rgba(229, 187, 93, 0.06);
}

.lens-quiet-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  background: rgba(8, 14, 19, 0.48);
  position: relative;
  max-height: min(72vh, 980px);
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #122330;
  background-clip: padding-box;
  color: #93a8b6;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 8;
  background: #122330;
  width: var(--rank-col-width);
  min-width: var(--rank-col-width);
  max-width: var(--rank-col-width);
}

thead th:nth-child(2) {
  position: sticky;
  left: var(--rank-col-width);
  z-index: 8;
  background: #122330;
  width: var(--player-col-width);
  min-width: var(--player-col-width);
  max-width: var(--player-col-width);
}

thead th:nth-child(3) {
  min-width: var(--fit-col-width);
}

th,
td {
  padding: 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

tbody tr.selected {
  background: rgba(70, 186, 242, 0.08);
}

tbody tr.selected .rank-cell,
tbody tr.selected .player-cell {
  background: #153141;
}

.rank-cell {
  width: var(--rank-col-width);
  min-width: var(--rank-col-width);
  max-width: var(--rank-col-width);
  color: var(--muted);
  font-weight: 850;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #10202b;
  box-shadow: 10px 0 18px rgba(4, 8, 11, 0.12);
}

.player-cell {
  width: var(--player-col-width);
  min-width: var(--player-col-width);
  max-width: var(--player-col-width);
  position: sticky;
  left: var(--rank-col-width);
  z-index: 1;
  background: #10202b;
  box-shadow: 12px 0 20px rgba(4, 8, 11, 0.12);
}

.player-name {
  font-weight: 850;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-cell {
  min-width: var(--fit-col-width);
}

.score-band-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.band-strong {
  background: rgba(55, 211, 154, 0.18);
  color: #d6fff0;
}

.band-good {
  background: rgba(70, 186, 242, 0.18);
  color: #d9f5ff;
}

.band-working {
  background: rgba(243, 191, 68, 0.16);
  color: #ffedbb;
}

.band-risk {
  background: rgba(240, 108, 127, 0.18);
  color: #ffdce2;
}

.tier-head-core,
.tier-head-support,
.tier-head-accent {
  text-align: center;
}

.attr-col-head {
  min-width: 74px;
  white-space: normal;
  line-height: 1.18;
}

.tier-head-core {
  color: #bdfbe4;
}

.tier-head-support {
  color: #d8ecf8;
}

.tier-head-accent {
  color: #f3dfff;
}

.value-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  border-radius: 6px;
  padding: 5px 6px;
  font-weight: 900;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.attribute-cell {
  min-width: 60px;
  text-align: center;
}

.value-elite {
  background: var(--green);
  color: #032116;
}

.value-strong {
  background: var(--cyan);
  color: #032131;
}

.value-ok {
  background: var(--amber);
  color: #392500;
}

.value-weak {
  background: var(--red);
  color: #360812;
}

.value-empty {
  background: rgba(255, 255, 255, 0.06);
  color: #6d8392;
}

.side-panel {
  padding: 18px;
  position: sticky;
  top: 108px;
}

.attribute-stacks,
.selected-player-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack-block {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.stack-title {
  color: #dbe6ee;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.stack-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.attribute-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.attribute-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.024);
}

.attribute-name {
  font-weight: 800;
}

.attribute-avg {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.attribute-top {
  font-size: 12px;
  color: #d6e4ec;
  font-weight: 750;
}

.selected-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.selected-summary h3 {
  font-size: 24px;
  line-height: 1.08;
}

.selected-summary p {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.selected-score {
  text-align: right;
}

.selected-score .big {
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
  color: #effaf5;
}

.selected-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.selected-section h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 900;
}

.plain-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.plain-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 780;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.layer-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.layer-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 10px;
  align-items: center;
  font-weight: 750;
}

.layer-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.layer-fill {
  height: 100%;
  border-radius: inherit;
}

.fill-core {
  background: linear-gradient(90deg, rgba(55, 211, 154, 0.95), rgba(34, 197, 94, 0.95));
}

.fill-support {
  background: linear-gradient(90deg, rgba(70, 186, 242, 0.95), rgba(91, 157, 255, 0.95));
}

.fill-accent {
  background: linear-gradient(90deg, rgba(204, 140, 255, 0.95), rgba(168, 85, 247, 0.95));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 7, 10, 0.72);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-panel {
  width: min(1240px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
}

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

.modal-head p {
  margin-top: 8px;
  color: var(--muted);
}

.icon-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 800;
}

.manual-form {
  margin-top: 18px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.field input {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 750;
}

.manual-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

.manual-group {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.manual-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.manual-group-head p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.manual-attribute-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-field label {
  color: #d5e1e9;
  font-size: 13px;
  font-weight: 750;
}

.mini-field input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 10px;
  font-weight: 800;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.empty-state-band {
  padding: 18px;
}

.empty-state-centered {
  max-width: 880px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.02);
}

.empty-state-copy p {
  margin-top: 10px;
  line-height: 1.7;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 1240px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .sticky-app-main,
  .sticky-app-nav,
  .control-inline,
  .directory-toolbar,
  .directory-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .situation-card-grid,
  .top-fit-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

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

  h1 {
    font-size: clamp(28px, 7vw, 32px);
  }

  .overview-steps,
  .detail-context-row,
  .kpi-grid,
  .insight-row,
  .identity-grid,
  .manual-attribute-grid,
  .top-fit-grid {
    grid-template-columns: 1fr;
  }

  .detail-side-stat {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
    min-width: 0;
  }

  .sticky-app-bar {
    top: 0;
    border-radius: 0;
    margin-left: -14px;
    margin-right: -14px;
  }

  .sticky-app-actions,
  .anchor-group,
  .hero-process {
    width: 100%;
  }

}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .sticky-app-actions,
  .anchor-group,
  .control-inline,
  .directory-toolbar,
  .directory-tools,
  .legend-block {
    width: 100%;
  }

  .btn,
  .search-input {
    width: 100%;
  }

  .overview-steps {
    grid-template-columns: 1fr;
  }

  .selected-summary {
    flex-direction: column;
  }
}
