.rankings-shell {
  max-width: 1500px;
}

.rankings-main {
  --table-header-offset: 56px;
  display: grid;
  gap: 10px;
}

.ranking-workbench-head { order: 1; }
#rankingSearchPanel { order: 2; }
#presetDeck { order: 3; }
#rankingControls { order: 4; }
#rankingDetailFilters { order: 5; }
.ranking-contract { order: 6; }
#scrollContextSpacer { order: 7; }
#scrollContextBar { order: 8; }
.ranking-results-workbench { order: 9; }
#rankingDeepDive { order: 10; }
.compare-panel,
.next-action-panel { order: 11; }
.ranking-read-guide { order: 12; }

#rankingControls,
#rowInspector,
#diagnosticPanel,
#rankingTablePanel {
  scroll-margin-top: calc(var(--table-header-offset) + 16px);
}

.ranking-workbench-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  border: 1px solid rgb(147 162 179 / 0.16);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgb(10 15 21 / 0.82);
  box-shadow: var(--shadow);
}

.ranking-workbench-head h2 {
  margin: 0 0 5px;
  font-size: clamp(1.28rem, 1.9vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.ranking-workbench-head p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: var(--soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.ranking-search-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  border: 1px solid rgb(45 212 191 / 0.2);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.78);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.22);
}

.ranking-primary-search {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: start;
}

.ranking-primary-search span {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
}

.ranking-primary-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgb(45 212 191 / 0.26);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgb(6 11 17 / 0.94);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 850;
}

.ranking-primary-search input:focus {
  border-color: rgb(45 212 191 / 0.58);
  outline: none;
  box-shadow: 0 0 0 3px rgb(45 212 191 / 0.12);
}

.ranking-search-results {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.search-state {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.search-state.no-result {
  color: #fcd6d6;
}

.search-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.search-result-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.74);
}

.search-result-meta,
.search-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.search-result-meta span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
}

.search-result-meta b {
  color: var(--soft);
}

.search-result-actions a,
.search-result-actions button,
.advanced-operation-actions a,
.advanced-operation-actions button,
.ranking-read-guide .action-link,
.mobile-actions a,
.mobile-actions button {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(45 212 191 / 0.28);
  border-radius: 7px;
  padding: 0 10px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.search-result-actions .primary,
.mobile-actions .primary,
.inspector-main-actions .primary {
  border-color: rgb(45 212 191 / 0.52);
  color: #06231f;
  background: linear-gradient(135deg, #2dd4bf, #99f6e4);
}

.search-result-actions .secondary,
.mobile-actions .secondary,
.inspector-main-actions .secondary {
  border-color: rgb(45 212 191 / 0.28);
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
}

.mobile-actions .tertiary {
  border-color: transparent;
  color: var(--soft);
  background: transparent;
}

.search-result-actions a:hover,
.search-result-actions button:hover,
.advanced-operation-actions a:hover,
.advanced-operation-actions button:hover,
.ranking-read-guide .action-link:hover,
.mobile-actions a:hover,
.mobile-actions button:hover,
.inspector-main-actions a:hover,
.inspector-related-actions a:hover,
.inspector-related-actions button:hover {
  border-color: rgb(45 212 191 / 0.52);
  color: #ffffff;
  background: rgb(45 212 191 / 0.14);
}

.report-link {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(45 212 191 / 0.34);
  border-radius: 7px;
  padding: 0 14px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.1);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.report-link:hover {
  border-color: rgb(45 212 191 / 0.64);
  color: #ffffff;
  background: rgb(45 212 191 / 0.16);
}

.preset-deck {
  display: grid;
  gap: 8px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgb(8 13 19 / 0.62);
}

.preset-deck-head,
.panel-title {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preset-deck-head {
  display: grid;
  gap: 4px;
}

.preset-deck-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.preset-card {
  min-height: 72px;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 8px;
  padding: 10px;
  color: var(--soft);
  background: rgb(15 22 30 / 0.72);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.preset-card:hover,
.preset-card.active {
  border-color: rgb(45 212 191 / 0.42);
  background: rgb(45 212 191 / 0.08);
}

.preset-card strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.preset-card span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.35;
}

.advanced-preset-drawer,
.advanced-analysis-panel,
.screening-controls {
  min-width: 0;
}

.advanced-preset-drawer {
  border-top: 1px solid rgb(147 162 179 / 0.1);
  padding-top: 8px;
}

.advanced-preset-drawer summary,
.advanced-analysis-panel > summary,
.screening-controls > summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #dffdfa;
  font-size: 0.74rem;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.advanced-preset-drawer summary::-webkit-details-marker,
.advanced-analysis-panel > summary::-webkit-details-marker,
.screening-controls > summary::-webkit-details-marker {
  display: none;
}

.advanced-preset-drawer summary::after,
.advanced-analysis-panel > summary::after,
.screening-controls > summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgb(45 212 191 / 0.26);
  border-radius: 999px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
}

.advanced-preset-drawer[open] summary::after,
.advanced-analysis-panel[open] > summary::after,
.screening-controls[open] > summary::after {
  content: "-";
}

.preset-grid.advanced {
  margin-top: 8px;
}

.analysis-lens-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgb(8 13 19 / 0.7);
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.lens-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: space-between;
}

.lens-head p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
}

.lens-coverage {
  border: 1px solid rgb(45 212 191 / 0.2);
  border-radius: 999px;
  padding: 6px 9px;
  color: #c7fffa;
  background: rgb(45 212 191 / 0.08);
  font-size: 0.66rem;
  font-weight: 950;
  white-space: nowrap;
}

.lens-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.68);
}

.lens-card:hover,
.lens-card.active {
  border-color: rgb(45 212 191 / 0.32);
  background: rgb(45 212 191 / 0.06);
}

.lens-card.active {
  box-shadow: inset 0 0 0 1px rgb(45 212 191 / 0.16), 0 14px 32px rgb(0 0 0 / 0.2);
}

.lens-card > div:first-child {
  display: grid;
  gap: 4px;
}

.lens-card span {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.3;
}

.lens-card p,
.lens-card small,
.lens-card em {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.4;
}

.lens-card em {
  color: #9ee8dd;
  font-style: normal;
}

.lens-card .song-cell {
  grid-template-columns: 34px minmax(0, 1fr);
}

.lens-card .song-cell img {
  width: 34px;
  height: 34px;
}

.lens-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lens-actions button {
  min-height: 28px;
  border: 1px solid rgb(45 212 191 / 0.26);
  border-radius: 7px;
  padding: 0 9px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 950;
  cursor: pointer;
}

.ranking-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 8px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 10px;
  background: rgb(13 19 27 / 0.82);
}

.ranking-controls-head {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.ranking-controls-head span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.ranking-controls-head small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.ranking-controls label,
.column-controls label {
  min-width: 0;
}

.ranking-controls label {
  display: grid;
  gap: 5px;
}

.ranking-controls label > span,
.column-controls > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.ranking-controls select,
.ranking-controls input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgb(147 162 179 / 0.18);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--text);
  background: rgb(6 11 17 / 0.92);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.screening-controls {
  display: grid;
  gap: 10px;
  border: 1px solid rgb(147 162 179 / 0.13);
  border-radius: var(--radius);
  padding: 10px;
  background: rgb(8 13 19 / 0.72);
}

.screening-controls > summary small,
.advanced-analysis-panel > summary small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
}

.screening-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.screening-head {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.screening-head button,
.table-tool-button {
  min-height: 30px;
  border: 1px solid rgb(147 162 179 / 0.2);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--soft);
  background: rgb(147 162 179 / 0.07);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.screening-head button:hover,
.table-tool-button:hover {
  border-color: rgb(45 212 191 / 0.42);
  color: #dffdfa;
  background: rgb(45 212 191 / 0.1);
}

.screening-controls label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.screening-controls label span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.screening-controls .screening-label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.screening-controls input,
.screening-controls select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgb(147 162 179 / 0.18);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--text);
  background: rgb(6 11 17 / 0.92);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
}

.screening-controls input:focus,
.screening-controls select:focus {
  border-color: rgb(45 212 191 / 0.42);
  outline: none;
  box-shadow: 0 0 0 3px rgb(45 212 191 / 0.1);
}

.ranking-detail-filters {
  scroll-margin-top: calc(var(--table-header-offset) + 20px);
}

.column-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgb(8 13 19 / 0.7);
}

.column-controls label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 850;
}

.column-controls input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.ranking-contract {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.ranking-display-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  border: 1px solid rgb(45 212 191 / 0.24);
  border-radius: var(--radius);
  padding: 12px;
  background: linear-gradient(135deg, rgb(8 13 19 / 0.88), rgb(15 23 42 / 0.76));
  box-shadow: inset 3px 0 0 rgb(45 212 191 / 0.55);
}

.ranking-display-title {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ranking-display-summary dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ranking-display-summary dl > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 8px;
  padding: 9px;
  background: rgb(15 22 30 / 0.62);
}

.ranking-display-summary dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
}

.ranking-display-summary dd {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.45;
}

#rankingContract {
  display: grid;
  gap: 8px;
  align-items: center;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgb(8 13 19 / 0.7);
}

.contract-primary-chips,
.contract-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contract-state-block {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.contract-state-block > span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contract-state-block.empty p {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 850;
}

.state-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.state-filter-chip {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgb(45 212 191 / 0.34);
  border-radius: 999px;
  padding: 0 11px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.1);
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.state-filter-chip span {
  color: var(--muted);
  font-weight: 850;
}

.state-filter-chip b {
  color: var(--text);
  font-weight: 950;
}

.state-filter-chip em {
  color: var(--teal);
  font-style: normal;
  font-size: 0.9em;
}

.state-filter-chip:hover,
.state-filter-chip:focus-visible {
  border-color: rgb(94 234 212 / 0.72);
  background: rgb(45 212 191 / 0.16);
}

.contract-detail-drawer {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgb(147 162 179 / 0.1);
  padding-top: 8px;
}

.contract-detail-drawer summary {
  color: #dffdfa;
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.contract-detail-drawer summary::-webkit-details-marker {
  display: none;
}

.contract-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--soft);
  background: rgb(15 22 30 / 0.82);
  font-size: 0.74rem;
  font-weight: 850;
}

.contract-chip b {
  color: var(--text);
  font-weight: 950;
}

.contract-filter-chip {
  justify-self: start;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgb(45 212 191 / 0.34);
  border-radius: 999px;
  padding: 0 11px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.1);
  font-size: 0.72rem;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.ranking-stats {
  min-width: 340px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ranking-stats:empty {
  display: none;
}

.ranking-stat {
  display: grid;
  gap: 3px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.78);
}

.ranking-stat span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
}

.ranking-stat strong {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 950;
}

.metric-guide-card {
  flex-basis: 100%;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgb(147 162 179 / 0.12);
  padding-top: 10px;
}

.metric-guide-head {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: var(--text);
}

.metric-guide-head strong {
  font-size: 0.86rem;
}

.metric-guide-card dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.metric-guide-card dl > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 8px;
  padding: 9px;
  background: rgb(15 22 30 / 0.58);
}

.metric-guide-card dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 950;
}

.metric-guide-card dd {
  margin: 0;
  color: var(--soft);
  font-size: 0.73rem;
  line-height: 1.45;
}

.scroll-context-spacer {
  display: none;
  height: 0;
}

.scroll-context-spacer.active {
  display: block;
}

.scroll-context-bar {
  position: relative;
  z-index: 30;
  align-self: start;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgb(45 212 191 / 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgb(8 13 19 / 0.94);
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.34);
  backdrop-filter: blur(18px);
}

.scroll-context-bar.is-fixed {
  position: fixed;
  top: 0;
  left: var(--scroll-context-left, 16px);
  width: var(--scroll-context-width, calc(100vw - 32px));
  z-index: 80;
  border-radius: 0 0 10px 10px;
}

.scroll-context-primary,
.scroll-context-metrics {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.scroll-context-primary span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scroll-context-primary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scroll-context-metrics span {
  min-height: 26px;
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border: 1px solid rgb(147 162 179 / 0.13);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: rgb(15 22 30 / 0.74);
  font-size: 0.66rem;
  font-weight: 850;
  white-space: nowrap;
}

.scroll-context-metrics b {
  margin-left: 4px;
  color: var(--soft);
  font-weight: 950;
}

.scroll-context-screen {
  overflow: hidden;
  text-overflow: ellipsis;
}

.scroll-context-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

.scroll-context-actions a,
.scroll-context-actions button {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(45 212 191 / 0.28);
  border-radius: 7px;
  padding: 0 10px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.scroll-context-actions a:hover,
.scroll-context-actions button:hover {
  border-color: rgb(45 212 191 / 0.52);
  color: #ffffff;
  background: rgb(45 212 191 / 0.14);
}

.ranking-deep-dive {
  scroll-margin-top: calc(var(--table-header-offset) + 18px);
  display: grid;
  gap: 12px;
  border: 1px solid rgb(45 212 191 / 0.18);
  border-radius: var(--radius);
  padding: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgb(45 212 191 / 0.1), transparent 34%),
    rgb(8 13 19 / 0.82);
  box-shadow: 0 16px 42px rgb(0 0 0 / 0.22);
}

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

.deep-dive-head h2 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: clamp(1.1rem, 1.55vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.deep-dive-head p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.58;
}

.deep-dive-theme-state {
  display: inline-grid;
  gap: 4px;
  justify-items: end;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgb(6 11 17 / 0.68);
}

.deep-dive-theme-state span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
}

.deep-dive-theme-state strong {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  text-align: right;
}

.deep-dive-theme-state button {
  min-height: 24px;
  border: 1px solid rgb(45 212 191 / 0.28);
  border-radius: 999px;
  padding: 0 8px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 950;
  cursor: pointer;
}

.deep-dive-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.deep-dive-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 10px;
  padding: 11px;
  color: inherit;
  background: rgb(15 22 30 / 0.68);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.deep-dive-card.active {
  border-color: rgb(45 212 191 / 0.6);
  background: linear-gradient(135deg, rgb(45 212 191 / 0.14), rgb(15 22 30 / 0.78));
  box-shadow: inset 0 0 0 1px rgb(45 212 191 / 0.12);
}

.deep-dive-card-kicker {
  color: #78fff1;
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.deep-dive-card strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.26;
}

.deep-dive-card p,
.deep-dive-card small,
.deep-dive-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.42;
}

.deep-dive-caution {
  color: #f9d784;
}

.deep-dive-chip-list,
.deep-dive-preview-list,
.deep-dive-position-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.deep-dive-chip-list span,
.deep-dive-position-preview span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgb(45 212 191 / 0.18);
  border-radius: 999px;
  padding: 0 8px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.07);
  font-size: 0.62rem;
  font-weight: 900;
}

.deep-dive-position-preview strong {
  color: #78fff1;
  font-size: 0.7rem;
}

.deep-dive-preview-list {
  display: grid;
}

.deep-dive-preview-song {
  min-width: 0;
  display: grid;
  gap: 2px;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgb(6 11 17 / 0.5);
}

.deep-dive-preview-song strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deep-dive-preview-song small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deep-dive-panels {
  display: grid;
  gap: 10px;
}

.deep-dive-panel {
  display: none;
  gap: 10px;
}

.deep-dive-panel.active {
  display: grid;
}

.deep-dive-panel[hidden] {
  display: none !important;
}

.selection-summary {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.72);
}

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

.summary-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.68);
}

.summary-card span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-card strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.summary-card small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.38;
}

.diagnostic-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.15);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(10 16 22 / 0.82);
}

.diagnostic-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: space-between;
}

.diagnostic-head p {
  margin: 4px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
}

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

.diagnostic-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.13);
  border-left: 3px solid rgb(45 212 191 / 0.72);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.7);
}

.diagnostic-card.convert {
  border-left-color: rgb(96 165 250 / 0.72);
}

.diagnostic-card.borderline {
  border-left-color: rgb(251 191 36 / 0.76);
}

.diagnostic-card.finalsFit {
  border-left-color: rgb(34 197 94 / 0.72);
}

.diagnostic-card-head {
  display: grid;
  gap: 4px;
}

.diagnostic-card-head span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.25;
}

.diagnostic-card-head p,
.diagnostic-card small {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.42;
}

.diagnostic-card > strong {
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.diagnostic-card .song-cell {
  grid-template-columns: 34px minmax(0, 1fr);
}

.diagnostic-card .song-cell img {
  width: 34px;
  height: 34px;
}

.diagnostic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.diagnostic-actions button {
  min-height: 28px;
  border: 1px solid rgb(45 212 191 / 0.26);
  border-radius: 7px;
  padding: 0 9px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.diagnostic-actions button:hover {
  border-color: rgb(45 212 191 / 0.52);
  color: #ffffff;
  background: rgb(45 212 191 / 0.14);
}

.strategy-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(10 16 22 / 0.8);
}

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

.strategy-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.13);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.7);
}

.strategy-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.strategy-card-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.strategy-card-head span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.25;
}

.strategy-card-head p,
.strategy-action p,
.strategy-candidate-main small {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.42;
}

.strategy-card-head button,
.strategy-action button {
  min-height: 28px;
  border: 1px solid rgb(45 212 191 / 0.26);
  border-radius: 7px;
  padding: 0 9px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.strategy-candidates {
  display: grid;
  gap: 7px;
}

.strategy-candidate {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 8px;
  padding: 8px;
  background: rgb(8 13 19 / 0.58);
}

.strategy-index {
  width: 28px;
  height: 28px;
  border: 1px solid rgb(45 212 191 / 0.3);
  border-radius: 7px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  cursor: pointer;
}

.strategy-candidate-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.strategy-candidate .song-cell {
  grid-template-columns: 30px minmax(0, 1fr);
}

.strategy-candidate .song-cell img {
  width: 30px;
  height: 30px;
}

.strategy-action {
  display: grid;
  gap: 7px;
  align-self: end;
  border-top: 1px solid rgb(147 162 179 / 0.1);
  padding-top: 8px;
}

.strategy-action button {
  justify-self: start;
}

.positioning-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.76);
}

.position-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.position-head > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

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

.position-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.13);
  border-left: 3px solid rgb(45 212 191 / 0.6);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.68);
}

.position-card.convert {
  border-left-color: rgb(96 165 250 / 0.72);
}

.position-card.niche {
  border-left-color: rgb(34 197 94 / 0.72);
}

.position-card.lowSignal {
  border-left-color: rgb(251 113 133 / 0.72);
}

.position-card-head {
  display: grid;
  gap: 5px;
}

.position-card-head > div {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.position-card-head span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.25;
}

.position-card-head strong {
  color: #9ee8dd;
  font-size: 0.68rem;
  font-weight: 950;
  white-space: nowrap;
}

.position-card-head p,
.position-candidate-main small {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.42;
}

.position-candidates {
  display: grid;
  gap: 7px;
}

.position-candidate {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 8px;
  padding: 8px;
  background: rgb(8 13 19 / 0.58);
}

.position-index {
  width: 28px;
  height: 28px;
  border: 1px solid rgb(45 212 191 / 0.3);
  border-radius: 7px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  cursor: pointer;
}

.position-candidate-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.position-candidate .song-cell {
  grid-template-columns: 30px minmax(0, 1fr);
}

.position-candidate .song-cell img {
  width: 30px;
  height: 30px;
}

.position-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.position-actions button {
  min-height: 28px;
  border: 1px solid rgb(45 212 191 / 0.26);
  border-radius: 7px;
  padding: 0 9px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 950;
  cursor: pointer;
}

.insight-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(13 19 27 / 0.78);
}

.lens-readout {
  display: grid;
  gap: 12px;
  border: 1px solid rgb(45 212 191 / 0.24);
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgb(45 212 191 / 0.12), rgb(15 22 30 / 0.82) 46%, rgb(8 13 19 / 0.9)),
    rgb(8 13 19 / 0.9);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.lens-readout-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
  gap: 14px;
  align-items: start;
}

.lens-readout-kicker,
.lens-formula-card > span,
.lens-readout-target > span,
.lens-evidence-title {
  color: #78fff1;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lens-readout h3 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.lens-readout p {
  margin: 0;
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.65;
}

.lens-readout-score {
  min-width: 118px;
  display: grid;
  gap: 2px;
  justify-items: end;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 10px;
  padding: 10px;
  background: rgb(6 11 17 / 0.62);
}

.lens-readout-score span,
.lens-readout-score small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
}

.lens-readout-score strong {
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: 0;
}

.lens-readout-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 10px;
}

.lens-formula-card,
.lens-readout-target,
.lens-evidence-card {
  min-width: 0;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 10px;
  background: rgb(6 11 17 / 0.62);
}

.lens-formula-card,
.lens-readout-target {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
}

.lens-formula-card strong {
  color: #ffffff;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lens-readout-target .song-cell {
  grid-template-columns: 38px minmax(0, 1fr);
}

.lens-readout-target .song-cell img {
  width: 38px;
  height: 38px;
}

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

.lens-evidence-card {
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 10px;
}

.lens-evidence-card span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lens-evidence-card strong {
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
}

.lens-evidence-card small {
  color: #78fff1;
  font-size: 0.66rem;
  font-weight: 900;
}

.lens-evidence-card p {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

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

.insight-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgb(8 13 19 / 0.66);
}

.insight-card > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.insight-card strong {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.insight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.insight-actions a,
.insight-actions button {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(45 212 191 / 0.28);
  border-radius: 7px;
  padding: 0 9px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 950;
  cursor: pointer;
}

.distribution-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.72);
}

.distribution-head,
.ranking-visual-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.distribution-head p,
.ranking-visual-head p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.5;
}

.distribution-use {
  min-width: 260px;
  max-width: 420px;
  display: grid;
  gap: 6px;
  border: 1px solid rgb(45 212 191 / 0.2);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgb(45 212 191 / 0.07);
}

.distribution-use strong {
  color: #dffdfa;
  font-size: 0.72rem;
  font-weight: 950;
}

.distribution-use span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.4;
}

.distribution-panel .distribution-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.distribution-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgb(15 22 30 / 0.68);
}

.distribution-card > span {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.25;
}

.distribution-card-note,
.result-mix-note,
.visual-card-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.4;
}

.distribution-bars,
.result-mix-list {
  display: grid;
  gap: 7px;
}

.distribution-bin,
.result-mix-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: center;
}

.distribution-bin small,
.result-mix-row small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  white-space: nowrap;
}

.distribution-bin b,
.result-mix-row b {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 950;
  text-align: right;
}

.distribution-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(147 162 179 / 0.14);
}

.distribution-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: rgb(45 212 191 / 0.72);
}

.distribution-track span.positive,
.result-mix-row.advanced .distribution-track span,
.result-mix-row.finalist .distribution-track span {
  background: rgb(34 197 94 / 0.74);
}

.distribution-track span.negative,
.result-mix-row.eliminated .distribution-track span {
  background: rgb(251 113 133 / 0.72);
}

.distribution-track span.model {
  background: rgb(96 165 250 / 0.78);
}

.ranking-visual-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.72);
}

.ranking-visual-state {
  min-width: 230px;
  display: grid;
  gap: 5px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--soft);
  background: rgb(15 22 30 / 0.78);
}

.ranking-visual-state > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ranking-visual-state strong,
.ranking-visual-state em {
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.35;
}

.ranking-visual-state strong {
  color: var(--text);
}

.ranking-visual-state em {
  color: #9ee8dd;
  font-style: normal;
}

.ranking-visual-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.25fr) minmax(260px, 1fr) minmax(220px, 0.85fr);
  gap: 10px;
}

.ranking-visual-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 11px;
  background: rgb(15 22 30 / 0.68);
}

.ranking-visual-card > strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.3;
}

.visual-card-head {
  display: grid;
  gap: 4px;
}

.visual-bar-list,
.profile-mix-list {
  display: grid;
  gap: 7px;
}

.visual-bar-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 58px;
  gap: 7px;
  align-items: center;
  border: 0;
  padding: 0;
  color: var(--soft);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.visual-bar-row > span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
}

.visual-bar-row > div {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 7px;
  padding: 6px 8px;
  background: rgb(147 162 179 / 0.08);
}

.visual-bar-row b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(45 212 191 / 0.32), rgb(96 165 250 / 0.2));
}

.visual-bar-row strong {
  position: relative;
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-bar-row em {
  color: #dffdfa;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

.visual-bar-row.active > div {
  outline: 1px solid rgb(45 212 191 / 0.7);
}

.scatter-plot {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgb(147 162 179 / 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgb(147 162 179 / 0.08) 1px, transparent 1px),
    rgb(6 11 17 / 0.72);
  background-size: 25% 25%;
}

.scatter-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgb(255 255 255 / 0.68);
  padding: 0;
  border-radius: 99px;
  transform: translate(-50%, 50%);
  background: rgb(45 212 191 / 0.7);
  cursor: pointer;
}

.scatter-dot.eliminated {
  background: rgb(251 113 133 / 0.76);
}

.scatter-dot.finalist {
  background: rgb(96 165 250 / 0.78);
}

.scatter-dot.active {
  width: 13px;
  height: 13px;
  box-shadow: 0 0 0 4px rgb(45 212 191 / 0.18);
}

.scatter-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
}

.scatter-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.35;
}

.profile-mix-list button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 6px 9px;
  align-items: center;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 7px;
  padding: 8px;
  color: var(--soft);
  background: rgb(8 13 19 / 0.74);
  font: inherit;
  cursor: pointer;
}

.profile-mix-list button:hover,
.profile-mix-list button:focus-visible,
.visual-bar-row:hover > div,
.visual-bar-row:focus-visible > div {
  outline: 1px solid rgb(45 212 191 / 0.46);
  background: rgb(45 212 191 / 0.08);
}

.profile-mix-list span {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-mix-list i {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 999px;
  background: rgb(45 212 191 / 0.62);
}

.profile-mix-list b {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 950;
  text-align: right;
}

.row-inspector {
  display: grid;
  gap: 12px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(13 19 27 / 0.8);
  min-width: 390px;
  word-break: normal;
  overflow-wrap: normal;
  line-break: strict;
}

.inspector-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.inspector-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.inspector-head > div:first-child > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.inspector-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.inspector-main-actions,
.inspector-related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-start;
}

.inspector-related-actions {
  max-width: none;
}

.inspector-related-actions > span {
  align-self: center;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 950;
}

.inspector-main-actions a,
.inspector-related-actions a,
.inspector-related-actions button {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(147 162 179 / 0.16);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--soft);
  background: rgb(147 162 179 / 0.06);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.inspector-related-actions a,
.inspector-related-actions button {
  min-height: 26px;
  border-radius: 999px;
  font-size: 0.62rem;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

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

.inspector-rank-card,
.inspector-key-metrics article,
.inspector-metric,
.inspector-signal-card,
.stage-path-card {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgb(8 13 19 / 0.64);
}

.inspector-rank-card span,
.inspector-key-metrics span,
.inspector-metric span,
.inspector-signal-card > span,
.stage-path-card span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.inspector-rank-card strong,
.inspector-key-metrics strong,
.inspector-metric strong,
.stage-path-card strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.35;
}

.inspector-metric-bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(147 162 179 / 0.16);
}

.inspector-metric-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}

.inspector-metric-bar.lower-good i {
  background: linear-gradient(90deg, var(--teal), rgb(147 162 179 / 0.72));
}

.inspector-metric-bar b {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  border-radius: 99px;
  transform: translateX(-1px);
  background: #f8fafc;
  box-shadow: 0 0 0 2px rgb(8 13 19 / 0.92);
}

.inspector-rank-card small,
.inspector-metric small,
.stage-path-card small,
.inspector-signal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.4;
}

.inspector-section {
  display: grid;
  gap: 8px;
}

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

.inspector-section.split {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
}

.inspector-section.split > div {
  display: grid;
  align-content: start;
  gap: 8px;
}

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

.inspector-metric.strong {
  border-color: rgb(34 197 94 / 0.26);
  background: rgb(34 197 94 / 0.07);
}

.inspector-metric.watch {
  border-color: rgb(251 113 133 / 0.24);
  background: rgb(251 113 133 / 0.06);
}

.inspector-metric.neutral {
  border-color: rgb(147 162 179 / 0.12);
}

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

.inspector-signal-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inspector-signal-card li {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 850;
}

.inspector-signal-card li small {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.inspector-signal-card.strong {
  border-color: rgb(34 197 94 / 0.24);
  background: rgb(34 197 94 / 0.06);
}

.inspector-signal-card.watch {
  border-color: rgb(251 113 133 / 0.22);
  background: rgb(251 113 133 / 0.055);
}

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

.stage-path-card.finalist,
.stage-path-card.advanced {
  border-color: rgb(45 212 191 / 0.24);
  background: rgb(45 212 191 / 0.06);
}

.stage-path-card.eliminated {
  border-color: rgb(251 113 133 / 0.18);
  background: rgb(251 113 133 / 0.045);
}

.next-action-panel,
.compare-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(13 19 27 / 0.78);
}

.next-action-panel {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr) auto;
  align-items: center;
}

.next-copy {
  display: grid;
  gap: 5px;
}

.next-copy p,
.panel-empty,
.compare-limit {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.5;
}

.next-target {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.next-reason {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.next-reason strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
}

.next-reason span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.45;
}

.next-actions,
.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.action-link,
.row-action,
.compare-actions a,
.compare-actions button {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(45 212 191 / 0.28);
  border-radius: 7px;
  padding: 0 9px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.action-link:hover,
.row-action:hover,
.compare-actions a:hover,
.compare-actions button:hover {
  border-color: rgb(45 212 191 / 0.54);
  color: #ffffff;
  background: rgb(45 212 191 / 0.14);
}

.action-link.secondary {
  border-color: rgb(147 162 179 / 0.2);
  color: var(--soft);
  background: rgb(147 162 179 / 0.07);
}

.row-action.selected {
  border-color: rgb(59 130 246 / 0.42);
  color: #dbeafe;
  background: rgb(59 130 246 / 0.12);
}

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

.compare-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.compare-card {
  min-width: 0;
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgb(8 13 19 / 0.66);
}

.compare-card p {
  margin: 0;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.45;
}

.compare-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.compare-metric {
  display: grid;
  gap: 2px;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 6px;
  padding: 6px;
  background: rgb(15 22 30 / 0.62);
}

.compare-metric span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
}

.compare-metric strong {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 950;
}

.advanced-analysis-panel {
  display: grid;
  gap: 10px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.66);
}

.advanced-analysis-panel > summary {
  min-height: 36px;
}

.advanced-analysis-panel > summary span {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 950;
}

.advanced-analysis-content {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.advanced-operation-panel {
  display: grid;
  gap: 9px;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: var(--radius);
  padding: 10px;
  background: rgb(13 19 27 / 0.72);
}

.advanced-operation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-table-panel {
  min-width: 0;
  border: 1px solid rgb(147 162 179 / 0.16);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(13 19 27 / 0.82);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.22);
}

.ranking-results-workbench {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(390px, 430px);
  gap: 12px;
  align-items: start;
}

.ranking-results-workbench .row-inspector {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.table-status {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.table-status .rank-meaning {
  color: #dffdfa;
  font-weight: 950;
}

.estimate-warning {
  margin-bottom: 8px;
  border: 1px solid rgb(251 191 36 / 0.34);
  border-radius: 8px;
  padding: 9px 10px;
  color: #fde68a;
  background: rgb(251 191 36 / 0.1);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.45;
}

.estimate-warning[hidden] {
  display: none;
}

.ranking-table {
  position: relative;
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgb(147 162 179 / 0.12);
  border-radius: var(--radius);
}

.ranking-mobile-list {
  display: none;
}

.floating-table-header {
  position: fixed;
  top: var(--floating-table-top, 0);
  left: var(--floating-table-left, 0);
  z-index: 70;
  display: none;
  width: var(--floating-table-width, 100%);
  overflow: hidden;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 0 0 8px 8px;
  background: rgb(13 19 27 / 0.98);
  box-shadow: 0 14px 32px rgb(0 0 0 / 0.32);
}

.floating-table-header.visible {
  display: block;
}

.floating-table-header table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: rgb(13 19 27 / 0.98);
  transform: translateX(calc(var(--floating-table-scroll-left, 0px) * -1));
}

.floating-table-header th {
  padding: 9px 10px;
  color: #b5c6d8;
  background: rgb(13 19 27 / 0.98);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.floating-table-header th:nth-child(1) {
  width: 50px;
  min-width: 50px;
}

.floating-table-header th:nth-child(2) {
  width: 104px;
  min-width: 104px;
}

.floating-table-header th:nth-child(3) {
  width: 280px;
  min-width: 280px;
}

.ranking-table table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  background: rgb(8 13 19 / 0.65);
  table-layout: auto;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid rgb(147 162 179 / 0.11);
  padding: 9px 8px;
  text-align: left;
  vertical-align: middle;
  writing-mode: horizontal-tb;
  direction: ltr;
  word-break: normal;
  overflow-wrap: normal;
  line-break: strict;
}

.ranking-table th {
  color: #b5c6d8;
  background: rgb(13 19 27 / 0.96);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ranking-table td {
  color: var(--soft);
  font-size: 0.76rem;
  white-space: nowrap;
}

.ranking-table tbody tr:hover {
  background: rgb(45 212 191 / 0.055);
}

.ranking-table tbody tr.selected-row {
  background: rgb(45 212 191 / 0.075);
}

.ranking-table th:nth-child(-n+3),
.ranking-table td:nth-child(-n+3) {
  position: sticky;
  box-sizing: border-box;
}

.ranking-table th:nth-child(1),
.ranking-table td:nth-child(1) {
  left: 0;
  width: 50px;
  min-width: 50px;
}

.ranking-table th:nth-child(2),
.ranking-table td:nth-child(2) {
  left: 50px;
  width: 104px;
  min-width: 104px;
}

.ranking-table th:nth-child(3),
.ranking-table td:nth-child(3) {
  left: 154px;
  width: 280px;
  min-width: 280px;
  box-shadow: 10px 0 18px rgb(0 0 0 / 0.22);
}

.ranking-table th:nth-child(-n+3) {
  z-index: 9;
  background: rgb(13 19 27 / 0.98);
}

.ranking-table td:nth-child(-n+3) {
  z-index: 3;
  background: rgb(8 13 19 / 0.96);
}

.ranking-table tbody tr:hover td:nth-child(-n+3) {
  background: rgb(12 29 33 / 0.98);
}

.ranking-table tbody tr.selected-row td:nth-child(-n+3) {
  background: rgb(10 32 34 / 0.98);
}

.ranking-table .num {
  text-align: right;
  white-space: nowrap;
}

.ranking-table .strong {
  color: var(--teal);
  font-weight: 950;
}

.ranking-table .muted {
  color: var(--muted);
}

.metric-cell,
.signed-metric {
  min-width: 58px;
  display: inline-grid;
  gap: 4px;
  justify-items: end;
}

.metric-value,
.signed-metric > span:first-child {
  color: inherit;
  font-weight: 900;
}

.metric-track,
.signed-track {
  width: 54px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(147 162 179 / 0.16);
}

.metric-fill,
.signed-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: rgb(45 212 191 / 0.72);
}

.metric-fill.positive,
.signed-metric.positive .signed-track span {
  background: rgb(34 197 94 / 0.76);
}

.metric-fill.negative,
.signed-metric.negative .signed-track span {
  background: rgb(251 113 133 / 0.76);
}

.metric-fill.model {
  background: rgb(96 165 250 / 0.78);
}

.song-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.ranking-table .song-cell {
  min-width: 240px;
}

.song-cell img {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  object-fit: cover;
  background: rgb(147 162 179 / 0.12);
}

.song-cell span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.song-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-cell small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-pill {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(45 212 191 / 0.32);
  border-radius: 999px;
  color: #dffdfa;
  background: rgb(45 212 191 / 0.12);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  cursor: pointer;
}

.rank-pill.selected {
  border-color: rgb(255 255 255 / 0.42);
  color: #ffffff;
  background: rgb(45 212 191 / 0.24);
  box-shadow: 0 0 0 3px rgb(45 212 191 / 0.08);
}

.status-chip,
.phase-chip {
  display: inline-flex;
  max-width: 180px;
  align-items: center;
  border: 1px solid rgb(147 162 179 / 0.15);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--soft);
  background: rgb(15 22 30 / 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip.advanced,
.status-chip.finalist {
  border-color: rgb(45 212 191 / 0.28);
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
}

.status-chip.eliminated {
  border-color: rgb(251 113 133 / 0.22);
  color: #fecdd3;
  background: rgb(251 113 133 / 0.07);
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 190px;
}

.signal-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid rgb(147 162 179 / 0.15);
  border-radius: 999px;
  padding: 0 7px;
  color: var(--soft);
  background: rgb(147 162 179 / 0.07);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 950;
  white-space: nowrap;
  cursor: pointer;
}

.signal-chip.wide,
.signal-chip.strong,
.signal-chip.lowRisk,
.signal-chip.riser {
  border-color: rgb(45 212 191 / 0.28);
  color: #dffdfa;
  background: rgb(45 212 191 / 0.08);
}

.signal-chip.gapPlus {
  border-color: rgb(34 197 94 / 0.28);
  color: #dcfce7;
  background: rgb(34 197 94 / 0.08);
}

.signal-chip.gapMinus {
  border-color: rgb(251 113 133 / 0.24);
  color: #fecdd3;
  background: rgb(251 113 133 / 0.07);
}

.detail-link {
  color: var(--teal);
  font-weight: 900;
  white-space: nowrap;
}

.ranking-mobile-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgb(8 13 19 / 0.76);
}

.ranking-mobile-card.selected {
  border-color: rgb(45 212 191 / 0.38);
  background: rgb(45 212 191 / 0.06);
}

.mobile-rank-line,
.mobile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.mobile-stage {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.mobile-selected-metric {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  border: 1px solid rgb(45 212 191 / 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgb(45 212 191 / 0.07);
}

.mobile-selected-metric span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 950;
}

.mobile-selected-metric strong {
  color: #dffdfa;
  font-size: 0.92rem;
  font-weight: 950;
}

.mobile-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.mobile-metrics div {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 1px solid rgb(147 162 179 / 0.1);
  border-radius: 7px;
  padding: 7px;
  background: rgb(15 22 30 / 0.68);
}

.mobile-metrics dt {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 950;
}

.mobile-metrics dd {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
}

.mobile-actions {
  justify-content: flex-start;
}

.ranking-read-guide {
  display: grid;
  gap: 10px;
  border: 1px solid rgb(147 162 179 / 0.14);
  border-radius: var(--radius);
  padding: 12px;
  background: rgb(8 13 19 / 0.7);
}

.ranking-read-guide p,
.ranking-read-guide li {
  margin: 0;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.6;
}

.ranking-read-guide ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.ranking-read-guide .action-link {
  justify-self: start;
}

.rankings-main .label-with-help {
  gap: 4px;
  vertical-align: baseline;
}

.rankings-main .info-tip {
  width: 16px;
  height: 16px;
  font-size: 0.58rem;
}

.ranking-table th .label-with-help {
  justify-content: flex-start;
  white-space: nowrap;
}

.table-head-content {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

.sort-header-button {
  min-height: 22px;
  border: 1px solid rgb(147 162 179 / 0.18);
  border-radius: 999px;
  padding: 0 7px;
  color: var(--muted);
  background: rgb(147 162 179 / 0.06);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 950;
  cursor: pointer;
}

.sort-header-button:hover,
.sort-header-button.active {
  border-color: rgb(45 212 191 / 0.38);
  color: #dffdfa;
  background: rgb(45 212 191 / 0.1);
}

.empty-state,
.error-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.error-state {
  color: #fecdd3;
}

@media (max-width: 1180px) {
  .rankings-main {
    --table-header-offset: 78px;
  }

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

  .ranking-search-panel,
  .ranking-display-summary dl {
    grid-template-columns: 1fr;
  }

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

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

  .lens-readout-body {
    grid-template-columns: 1fr;
  }

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

  .ranking-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ranking-results-workbench {
    grid-template-columns: 1fr;
  }

  .ranking-results-workbench .row-inspector {
    position: static;
    max-height: none;
    overflow: visible;
  }

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

  .ranking-contract {
    grid-template-columns: 1fr;
  }

  .contract-state-block {
    grid-template-columns: 1fr;
  }

  .ranking-stats {
    min-width: 0;
  }

  .metric-guide-card dl,
  .ranking-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

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

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

  .inspector-head,
  .inspector-grid,
  .inspector-section.split {
    grid-template-columns: 1fr;
  }

  .inspector-actions {
    justify-items: start;
  }

  .inspector-main-actions,
  .inspector-related-actions {
    justify-content: flex-start;
  }

  .inspector-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scroll-context-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .scroll-context-metrics {
    grid-column: 1 / -1;
    order: 3;
  }

  .next-action-panel {
    grid-template-columns: 1fr;
  }

  .next-target {
    grid-template-columns: 1fr;
  }

  .next-actions {
    justify-content: flex-start;
  }

  .compare-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }
}

@media (max-width: 1320px) {
  .ranking-results-workbench {
    grid-template-columns: 1fr;
  }

  .ranking-results-workbench .row-inspector {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .rankings-main {
    --table-header-offset: 112px;
  }

  .rankings-shell {
    padding-inline: 10px;
  }

  .ranking-workbench-head {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .preset-grid,
  .deep-dive-cards,
  .lens-grid,
  .lens-evidence-grid,
  .diagnostic-grid,
  .strategy-grid,
  .position-grid,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .lens-readout {
    padding: 12px;
  }

  .lens-readout-main {
    grid-template-columns: 1fr;
  }

  .lens-readout-score {
    justify-items: start;
  }

  .ranking-controls {
    grid-template-columns: 1fr;
  }

  .deep-dive-head {
    grid-template-columns: 1fr;
  }

  .deep-dive-theme-state {
    justify-items: start;
  }

  .screening-grid,
  .distribution-panel .distribution-grid,
  .metric-guide-card dl,
  .ranking-visual-grid {
    grid-template-columns: 1fr;
  }

  .ranking-table {
    display: none;
  }

  .ranking-mobile-list {
    display: grid;
    gap: 10px;
  }

  .floating-table-header {
    display: none !important;
  }

  .inspector-metrics,
  .inspector-signals,
  .stage-path-grid {
    grid-template-columns: 1fr;
  }

  .scroll-context-bar {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .scroll-context-primary,
  .scroll-context-metrics,
  .scroll-context-actions {
    justify-content: flex-start;
  }

  .scroll-context-metrics {
    max-height: 60px;
    overflow: hidden;
  }

  .ranking-stats {
    grid-template-columns: 1fr;
  }

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

  .column-controls {
    align-items: flex-start;
  }
}

/* Motion shutdown: rankings should render without animated movement. */
*,
*::before,
*::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
