:root {
  color-scheme: light;
  --ink: #151922;
  --muted: #697386;
  --line: #dce2ec;
  --surface: #ffffff;
  --wash: #f5f7fb;
  --accent: #0f766e;
  --accent-2: #b95b1c;
  --accent-3: #315c96;
  --accent-4: #b4235a;
  --danger: #b42318;
  --shadow: 0 18px 42px rgb(18 24 40 / 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgb(245 247 251 / 0.94);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

.source-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(49, 92, 150, 0.24);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--accent-3);
  background: rgba(49, 92, 150, 0.08);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}

main {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px clamp(12px, 3vw, 40px) 36px;
}

.home-view,
.ranking-view,
.sources-view,
.methodology-view,
.model-view,
.benchmark-view,
.compare-view,
.provider-view {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.home-view,
.sources-view,
.methodology-view,
.model-view,
.benchmark-view,
.compare-view,
.provider-view {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
}

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

.home-metric {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.home-metric-model {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.home-metric-model strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-metric-number {
  font-size: 26px;
  line-height: 1;
}

.home-metric-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  padding: 0 clamp(12px, 3vw, 40px) 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.controls,
.custom-panel,
.chart-shell,
.ranking-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chart-shell {
  overflow: hidden;
  min-width: 0;
  padding: 18px;
}

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

.chart-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chart-head > div {
  min-width: 0;
}

.chart-head a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.controls {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.preset-row,
.filter-row,
.switch-row,
.summary-row,
.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.switch-row {
  justify-content: space-between;
}

.preset-row button,
.panel-head button,
.segmented-control button {
  min-height: 34px;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.preset-row button {
  border-radius: 999px;
}

.preset-row button[aria-selected="true"] {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.segmented-control {
  display: inline-flex;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented-control button {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent-3);
}

.segmented-control.compact button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.search-label {
  display: grid;
  grid-template-columns: auto minmax(180px, 320px);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.search-label input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.toggle-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.summary-row {
  color: var(--muted);
  font-size: 13px;
}

.summary-row strong {
  color: var(--ink);
}

.custom-panel {
  padding: 14px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-head button {
  border-radius: 8px;
}

.weights-grid {
  display: grid;
  gap: 16px;
}

.weight-group {
  display: grid;
  gap: 12px;
}

.custom-weight-preset-group,
.missing-mode-group {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.weight-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

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

.weight-group-head h3 {
  margin: 0;
  font-size: 15px;
}

.weight-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.metric-weight-head {
  align-items: center;
}

.metric-coverage-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-coverage-filter select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 30px 0 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.metric-filter-summary {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgb(38 95 159 / 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-3);
  background: rgb(38 95 159 / 0.07);
  font-size: 12px;
  font-weight: 800;
}

.metric-filter-empty {
  grid-column: 1 / -1;
}

.methodology-hero,
.methodology-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.methodology-hero {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 3vw, 28px);
}

.methodology-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.methodology-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
}

.methodology-card h3,
.methodology-card p {
  margin: 0;
}

.methodology-card h3 {
  font-size: 15px;
}

.methodology-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.methodology-card-wide {
  grid-column: 1 / -1;
}

.methodology-table-wrap {
  overflow-x: auto;
  min-width: 0;
}

.methodology-weight-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 13px;
}

.methodology-weight-table th,
.methodology-weight-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.methodology-weight-table th {
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 850;
}

.methodology-weight-table td:nth-child(2) {
  width: 96px;
  color: var(--accent-2);
  font-weight: 850;
}

.methodology-matrix-table {
  min-width: 920px;
}

.methodology-matrix-table td:nth-child(3) {
  min-width: 280px;
}

.methodology-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 6px 6px 0;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  white-space: nowrap;
}

.methodology-metric-pill code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.methodology-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.methodology-steps strong {
  color: var(--ink);
}

.metric-weight-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 14px 22px;
}

.custom-weight-preset-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.weight-preset-button {
  display: grid;
  gap: 5px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.weight-preset-button strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weight-preset-button em {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--accent-3);
  background: rgba(49, 92, 150, 0.08);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.weight-preset-button[aria-pressed="true"] {
  border-color: rgba(15, 118, 110, 0.6);
  background: rgba(15, 118, 110, 0.08);
}

.missing-mode-controls,
.custom-config-grid {
  min-width: 0;
}

.custom-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.custom-setting-block,
.range-setting {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(220, 226, 236, 0.86);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}

.control-label,
.range-setting-head {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.custom-setting-block p,
.range-setting em,
.custom-strategy-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.custom-setting-block .segmented-control {
  display: grid;
  grid-template-columns: repeat(var(--option-count), minmax(0, 1fr));
  width: 100%;
}

.custom-setting-block [data-missing-preset] {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  overflow: visible;
}

.custom-setting-block .segmented-control button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 58px;
  border-right: 0;
  padding: 8px 10px;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.custom-setting-block [data-missing-preset] button {
  min-height: 44px;
  overflow-wrap: normal;
  word-break: normal;
}

.custom-setting-block .segmented-control button + button {
  border-left: 1px solid var(--line);
}

.custom-strategy-status strong {
  color: var(--accent-3);
}

.range-setting-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.range-setting-head output {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.range-setting input {
  width: 100%;
  accent-color: var(--accent-2);
}

.normalization-method-controls button[aria-pressed="true"],
.calculation-method-controls button[aria-pressed="true"],
.missing-mode-controls button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent-3);
}

.weight-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 180px) 42px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.metric-weight-label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.metric-weight-label strong,
.metric-weight-label em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-weight-label strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-weight-link {
  width: fit-content;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.metric-weight-link:hover strong {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.metric-weight-label em {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--accent-3);
  background: rgba(6, 95, 70, 0.08);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.weight-control input {
  accent-color: var(--accent-2);
}

.weight-control output {
  color: var(--ink);
  text-align: right;
}

.source-card-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.ranking-shell {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  background: #fafafa;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.rank-col {
  width: 54px;
}

.model-main {
  display: grid;
  gap: 4px;
}

.model-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.model-name {
  font-weight: 700;
}

.provider-icon {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  overflow: hidden;
}

.provider-icon img {
  position: absolute;
  inset: 4px;
  z-index: 1;
  display: block;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  background: #fff;
  object-fit: contain;
  transition: opacity 0.12s ease;
}

.icon-fallback {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  background: var(--provider-color, #64748b);
}

.model-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.provider-text-link {
  color: var(--muted);
  text-decoration: none;
}

.provider-text-link:hover,
.provider-text-link:focus-visible {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.histogram-label .provider-text-link,
.compare-model-head .provider-text-link {
  color: var(--muted);
  font-size: inherit;
  font-weight: inherit;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.source-pill[data-source-type="open"] {
  border-color: rgb(15 118 110 / 0.28);
  color: var(--accent);
  background: rgb(15 118 110 / 0.07);
}

.source-pill[data-source-type="closed"] {
  border-color: rgb(180 83 9 / 0.28);
  color: var(--accent-2);
  background: rgb(180 83 9 / 0.08);
}

.score-cell {
  min-width: 140px;
}

.score-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.score-bar {
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: #ebe7dd;
  overflow: hidden;
}

.score-bar span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

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

.price-stack {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
}

.price-stack span {
  display: grid;
  grid-template-columns: 42px minmax(52px, 1fr) 36px;
  align-items: baseline;
  gap: 6px;
}

.price-stack strong {
  color: var(--ink);
  font-weight: 700;
}

.price-stack b {
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}

.price-stack em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.bar-chart {
  overflow: visible;
  min-width: 0;
  padding: 6px 0 0;
}

.top-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 2px 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 14px 0 4px;
  border-top: 1px dashed #d6d2c8;
}

.top-bar-item {
  display: grid;
  grid-template-columns: 42px minmax(190px, 1.1fr) minmax(120px, 0.9fr) 56px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  border-bottom: 1px solid #ece8df;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.top-bar-item:focus-visible,
.latest-model-card:focus-visible {
  outline: 2px solid rgb(38 95 159 / 0.45);
  outline-offset: 3px;
}

.histogram-row[data-card-href],
.benchmark-ranking-row[data-card-href],
.text-ranking-row[data-card-href],
tr[data-card-href] {
  cursor: pointer;
}

.histogram-row[data-card-href]:focus-visible,
.benchmark-ranking-row[data-card-href]:focus-visible,
.text-ranking-row[data-card-href]:focus-visible,
tr[data-card-href]:focus-visible {
  outline: 2px solid rgb(38 95 159 / 0.42);
  outline-offset: -2px;
}

.top-bar-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.top-bar-model {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.top-bar-model > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.top-bar-model strong,
.top-bar-model em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar-model strong {
  font-size: 13px;
}

.top-bar-model em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.top-bar-track {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #ebe7dd;
  overflow: hidden;
}

.top-bar-track span {
  display: block;
  width: var(--bar-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--accent));
}

.top-bar-value {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.top-bar-fill {
  width: 100%;
  max-width: 42px;
  height: var(--bar-height, 0%);
  min-height: 16px;
  border-radius: 6px 6px 0 0;
  background: var(--bar-color, var(--accent));
}

.top-bar-item .provider-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.top-bar-item .provider-icon img {
  width: 18px;
  height: 18px;
}

.top-bar-label {
  display: block;
  align-self: start;
  justify-self: center;
  width: 104px;
  max-width: 104px;
  margin-top: 30px;
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.15;
  text-align: left;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-36px) rotate(-58deg);
  transform-origin: top center;
}

.scatter-chart {
  overflow: hidden;
  min-width: 0;
  max-width: 1060px;
  margin-inline: auto;
}

.scatter-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 12px;
}

.quadrant-key {
  width: 18px;
  height: 12px;
  border: 1px solid #a7dfad;
  border-radius: 3px;
  background: #ddf7df;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot-color, var(--accent));
}

.scatter-scroll {
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  padding-top: 2px;
}

.scatter-scroll svg {
  display: block;
  min-width: 1040px;
  width: 1180px;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

.scatter-plot-bg {
  fill: #fff;
  stroke: #ece8df;
}

.scatter-quadrant {
  fill: #dff6df;
  opacity: 0.82;
}

.scatter-grid {
  stroke: #dedbd3;
  stroke-dasharray: 3 5;
}

.scatter-axis {
  stroke: #9ca3af;
  stroke-width: 1.25;
}

.scatter-tick {
  fill: var(--muted);
  font-size: 12px;
}

.scatter-axis-label {
  fill: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.scatter-leader {
  fill: none;
  stroke: #aeb7c6;
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.78;
}

.scatter-label {
  fill: var(--ink);
  stroke: #fff;
  stroke-width: 4px;
  paint-order: stroke;
  font-size: 10.5px;
  font-weight: 650;
}

.scatter-point circle {
  opacity: 0.72;
  stroke: #fff;
  stroke-width: 2px;
}

.scatter-point.is-labeled circle {
  opacity: 1;
  stroke-width: 2.5px;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  min-width: 0;
}

.score-bands,
.provider-chart {
  display: grid;
  gap: 10px;
}

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

.latest-model-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 126px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, #fff, #f8fbff);
  text-decoration: none;
}

.latest-model-card:hover {
  border-color: rgb(38 95 159 / 0.36);
  box-shadow: 0 13px 30px rgb(15 23 42 / 0.1);
  transform: translateY(-1px);
}

.latest-model-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-right: 100px;
}

.latest-model-compare {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.latest-model-compare .compare-entry-link {
  min-height: 28px;
  padding-inline: 8px;
}

.latest-model-date {
  width: fit-content;
  border: 1px solid rgb(38 95 159 / 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-3);
  background: rgb(38 95 159 / 0.08);
  font-size: 11px;
  font-weight: 850;
}

.latest-model-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.latest-model-main > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.latest-model-main strong,
.latest-model-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-model-main strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 820;
}

.latest-model-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.latest-model-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px dashed rgb(148 163 184 / 0.35);
  color: var(--muted);
  font-size: 12px;
}

.latest-model-meta b {
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
}

.latest-model-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.latest-model-score .ui-icon {
  width: 17px;
  height: 17px;
  color: var(--accent-3);
}

.latest-model-score .ui-icon svg {
  width: 16px;
  height: 16px;
}

.latest-model-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.model-inline-link,
.compare-entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  min-height: 28px;
  border: 1px solid rgb(148 163 184 / 0.36);
  border-radius: 7px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.compare-entry-link {
  color: var(--accent-3);
  background: rgb(38 95 159 / 0.07);
}

.compare-entry-link .ui-icon {
  width: 15px;
  height: 15px;
}

.compare-entry-link .ui-icon svg {
  width: 15px;
  height: 15px;
}

.model-inline-link:hover,
.compare-entry-link:hover {
  border-color: rgb(38 95 159 / 0.38);
  background: #f6fbff;
  text-decoration: none;
}

.band-row,
.provider-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 38px;
  color: inherit;
  text-decoration: none;
}

.band-row {
  grid-template-columns: 54px minmax(0, 1fr) 42px;
}

.provider-row {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1.2fr) minmax(46px, auto) minmax(58px, auto);
}

.band-row > span,
.provider-row-name span:last-child {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-row-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.provider-row-name .provider-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.provider-row-name .provider-icon img {
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
}

.band-row strong,
.provider-row strong,
.provider-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.provider-row-metric {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
}

.provider-row-metric .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-3);
}

.band-track,
.provider-row-track {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.band-track span,
.provider-row-track span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.provider-row-track span {
  background: var(--bar-color, var(--accent));
}

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

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

.provider-model-list {
  display: grid;
  gap: 8px;
}

.provider-model-row {
  display: grid;
  grid-template-columns: 46px 34px minmax(180px, 1.35fr) minmax(72px, 0.55fr) minmax(100px, 0.7fr) minmax(112px, 0.7fr) minmax(74px, 0.45fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.provider-model-row:hover {
  background: linear-gradient(90deg, rgb(38 95 159 / 0.06), transparent);
}

.provider-model-row .provider-icon {
  width: 30px;
  height: 30px;
}

.provider-model-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.provider-model-copy strong,
.provider-model-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-model-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.provider-model-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.provider-model-stat {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.provider-model-stat .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-3);
}

.provider-model-stat b,
.provider-model-price {
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding-top: 2px;
}

.compare-picker > div:first-child {
  display: grid;
  gap: 10px;
  flex: 1 1 680px;
  min-width: min(100%, 680px);
}

.compare-picker h2,
.compare-selected-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.compare-search-label {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 6px;
  min-width: min(100%, 680px);
}

.compare-search-wrap {
  position: relative;
  z-index: 30;
  min-width: 0;
}

.compare-search-label input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.compare-option-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: min(360px, 48vh);
  min-width: 0;
  padding: 10px;
  border: 1px solid rgb(148 163 184 / 0.36);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.98);
  box-shadow: 0 18px 38px rgb(15 23 42 / 0.14);
  overflow: auto;
  z-index: 40;
}

.compare-option-list[hidden] {
  display: none;
}

.compare-option-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgb(148 163 184 / 0.34);
  border-radius: 8px;
  padding: 9px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #f8fbff);
  text-align: left;
  cursor: pointer;
}

.compare-option-card:hover {
  border-color: rgb(38 95 159 / 0.38);
  background: #f6fbff;
}

.compare-option-card .provider-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.compare-option-card > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compare-option-card strong,
.compare-option-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-option-card strong {
  font-size: 12.5px;
  font-weight: 850;
}

.compare-option-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.contribute-view {
  display: grid;
  gap: 16px;
}

.contribute-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.contribution-form {
  display: grid;
  gap: 12px;
}

.contribution-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.contribution-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contribution-field.full {
  grid-column: 1 / -1;
}

.contribution-field input,
.contribution-field select,
.contribution-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.contribution-field textarea {
  min-height: 96px;
  resize: vertical;
}

.contribution-preview {
  min-height: 420px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: #152238;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

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

.contribution-actions a,
.contribution-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent);
  background: #fff;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
}

.contribution-actions a.primary {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}

.contribution-actions [aria-disabled="true"],
.contribution-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.compare-option-card > .ui-icon {
  color: var(--accent-3);
}

.compare-option-empty {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dashed rgb(148 163 184 / 0.42);
  border-radius: 8px;
  background: #fbfdff;
}

.compare-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-picker-actions button,
.compare-chip button,
.compare-model-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.compare-picker-actions button {
  padding: 0 12px;
  font-weight: 780;
}

.compare-picker-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.compare-selected-head {
  margin-top: 18px;
}

.compare-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgb(38 95 159 / 0.18);
  border-radius: 10px;
  padding: 5px 6px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff, #f6f9fd);
}

.compare-chip .provider-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.compare-chip > span {
  overflow: hidden;
  max-width: 240px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 780;
}

.compare-chip button,
.compare-model-head button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-color: rgb(148 163 184 / 0.3);
  border-radius: 999px;
  padding: 0;
  color: var(--muted);
  background: #fff;
}

.compare-chip button .ui-icon,
.compare-model-head button .ui-icon {
  width: 15px;
  height: 15px;
}

.compare-chip button:hover,
.compare-model-head button:hover {
  border-color: rgb(148 163 184 / 0.34);
  color: var(--ink);
  background: #eef4fb;
}

.compare-results {
  display: grid;
  gap: 16px;
  min-width: 0;
}

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

.compare-model-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: var(--shadow);
}

.compare-model-card::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--card-color, var(--accent));
}

.compare-model-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.compare-model-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compare-model-head a,
.compare-model-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-model-head a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.compare-model-head span {
  color: var(--muted);
  font-size: 12px;
}

.compare-model-head .provider-text-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

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

.compare-model-facts > span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 3px 8px;
  min-width: 0;
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgb(148 163 184 / 0.26);
  border-radius: 8px;
  background: #fff;
}

.compare-model-facts .ui-icon {
  grid-row: span 2;
  align-self: center;
  justify-self: center;
  width: 18px;
  height: 18px;
  color: var(--accent-3);
}

.compare-model-facts .ui-icon svg {
  width: 16px;
  height: 16px;
}

.compare-model-facts b,
.compare-model-facts em {
  overflow-wrap: anywhere;
  white-space: normal;
}

.compare-model-facts b {
  color: var(--ink);
  font-size: 14px;
  align-self: end;
}

.compare-model-facts em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  align-self: start;
}

.compare-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compare-table {
  min-width: 900px;
}

.compare-table th,
.compare-table td {
  min-width: 190px;
}

.compare-table thead th:first-child,
.compare-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 210px;
  background: #fafafa;
}

.compare-table tbody th {
  color: var(--ink);
  text-transform: none;
}

.compare-table tbody th a,
.compare-table tbody th > span,
.compare-table-model,
.compare-provider-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.compare-table-model span,
.compare-provider-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-table-model .provider-icon,
.compare-provider-link .provider-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.compare-value {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.compare-value strong,
.compare-value em {
  overflow-wrap: anywhere;
  white-space: normal;
}

.compare-value strong {
  color: var(--ink);
  font-size: 14px;
}

.compare-value em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.compare-metric-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgb(38 95 159 / 0.18);
  border-radius: 7px;
  color: var(--accent-3);
  background: rgb(38 95 159 / 0.08);
  font-size: 9px;
  font-weight: 850;
}

.source-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: linear-gradient(180deg, #fff, #f9fbfe);
  text-decoration: none;
}

.source-card-kicker {
  color: var(--accent-3);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-card-icon {
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
}

.source-card strong {
  font-size: 16px;
}

.source-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.source-card em {
  color: var(--accent-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.source-card.compact {
  min-height: 132px;
}

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

.source-list-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: start;
  gap: 8px 12px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: linear-gradient(180deg, #fff, #f9fbfe);
  text-decoration: none;
}

.source-list-card .source-card-icon {
  grid-row: 1 / 4;
}

.source-list-card strong,
.source-list-card p,
.source-list-card em,
.source-stat-row {
  min-width: 0;
  grid-column: 2;
}

.source-list-card strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-list-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.source-list-card em {
  color: var(--accent-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.source-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.source-stat-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 7px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 750;
}

.source-stat-row b {
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.source-metric-map {
  display: grid;
  gap: 10px;
}

.source-map-row {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.source-map-row:last-child {
  border-bottom: 0;
}

.source-map-row > div:first-child {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}

.source-map-row .source-card-icon {
  grid-row: 1 / 3;
}

.source-map-row strong,
.source-map-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-map-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.source-metric-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: center;
}

.source-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #dce7f3;
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--ink);
  background: #f7fbff;
  font-size: 12px;
  font-weight: 750;
}

.source-metric-chip b {
  color: var(--accent-3);
  font-size: 11px;
}

.source-metric-chip.is-empty {
  color: var(--muted);
  background: #fff;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent-3);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.detail-compare-link {
  justify-self: end;
}

.model-detail,
.provider-detail {
  display: grid;
  gap: 16px;
}

.detail-hero,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-top: 5px solid var(--detail-color, var(--accent));
}

.detail-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.detail-hero .provider-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.detail-hero p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.detail-provider-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}

.detail-provider-link .ui-icon {
  width: 14px;
  height: 14px;
  color: var(--detail-color, var(--accent-3));
}

.detail-provider-link:hover {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-hero h2 {
  max-width: 760px;
  font-size: clamp(26px, 4vw, 42px);
  overflow-wrap: anywhere;
}

.detail-meta {
  margin-top: 10px;
}

.detail-hero-facts {
  display: grid;
  gap: 8px;
  min-width: 210px;
}

.detail-hero-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcff;
  font-size: 12px;
  font-weight: 750;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.detail-section {
  min-width: 0;
  padding: 18px;
}

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

.detail-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.rank-card,
.detail-stat {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #fbfcff;
}

.rank-card .ui-icon,
.detail-stat .ui-icon {
  color: var(--detail-color, var(--accent-3));
}

.rank-card span,
.detail-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rank-card strong,
.detail-stat strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.rank-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-stat strong {
  overflow-wrap: anywhere;
  line-height: 1.08;
  white-space: normal;
}

.rank-card em,
.detail-stat em {
  color: var(--accent-3);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.radar-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgb(148 163 184 / 0.28);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.96), rgb(250 252 255 / 0.96)),
    radial-gradient(circle at 50% 44%, rgb(38 95 159 / 0.07), transparent 58%);
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.radar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  border: 1px solid rgb(148 163 184 / 0.28);
  border-radius: 8px;
  padding: 0 9px;
  background: rgb(255 255 255 / 0.78);
}

.radar-legend i {
  width: 16px;
  height: 10px;
  border: 2px solid var(--legend-color, var(--accent-3));
  border-radius: 3px;
  background: color-mix(in srgb, var(--legend-color, var(--accent-3)) 14%, transparent);
}

.radar-legend .average-key {
  border-color: var(--accent-2);
  background: rgb(189 91 34 / 0.14);
}

.radar-plot-wrap {
  overflow-x: auto;
  min-width: 0;
}

.radar-plot {
  display: block;
  width: min(100%, 980px);
  min-width: 760px;
  height: auto;
  margin-inline: auto;
}

.radar-grid polygon {
  fill: none;
  stroke: #d8d0c5;
  stroke-width: 1;
}

.radar-grid line {
  stroke: #e1d9cf;
  stroke-width: 1;
}

.radar-area {
  stroke-linejoin: round;
}

.radar-average-area {
  fill: rgb(189 91 34 / 0.18);
  stroke: rgb(189 91 34 / 0.62);
  stroke-width: 2.5;
}

.radar-average-line {
  fill: none;
  stroke: rgb(189 91 34 / 0.82);
  stroke-width: 2.5;
}

.radar-series-area {
  fill: color-mix(in srgb, var(--series-color, var(--accent-3)) 26%, transparent);
  stroke: var(--series-color, var(--accent-3));
  stroke-width: 2.5;
  opacity: calc(0.78 - (var(--series-index, 0) * 0.04));
}

.radar-series-line {
  fill: none;
  stroke: var(--series-color, var(--accent-3));
  stroke-width: 2.4;
}

.radar-point {
  fill: var(--series-color, var(--accent-3));
  stroke: #fff;
  stroke-width: 2;
}

.radar-axis-label {
  display: grid;
  align-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.16;
  overflow: visible;
}

.radar-axis-label.is-left {
  text-align: right;
}

.radar-axis-label.is-center {
  text-align: center;
}

.radar-axis-label strong {
  display: block;
  overflow-wrap: anywhere;
}

.radar-axis-label strong b {
  color: var(--accent-3);
}

.radar-axis-label em {
  color: var(--accent-2);
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
}

.radar-axis-score-list {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.radar-axis-score {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.1;
}

.radar-axis-label.is-left .radar-axis-score {
  justify-content: flex-end;
}

.radar-axis-label.is-center .radar-axis-score {
  justify-content: center;
}

.radar-axis-score i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--score-color, var(--accent-3));
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.9);
}

.radar-axis-score b {
  color: var(--score-color, var(--accent-3));
  font-size: 11px;
  font-weight: 850;
}

.radar-axis-score span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.radar-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.radar-foot b {
  color: var(--accent-2);
  font-weight: 760;
}

.radar-basis {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.radar-basis-head {
  display: grid;
  gap: 3px;
}

.radar-basis-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.radar-basis-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.radar-basis-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgb(148 163 184 / 0.26);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.radar-basis-grid strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.radar-basis-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

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

.detail-modality-card {
  align-content: start;
}

.modality-support-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.modality-support-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #aab2be;
  background: transparent;
  opacity: 0.58;
}

.modality-support-icon.is-supported {
  border-color: rgb(38 95 159 / 0.2);
  color: var(--accent-3);
  background: rgb(38 95 159 / 0.08);
  opacity: 1;
}

.modality-support-icon .ui-icon,
.modality-support-icon .ui-icon svg {
  width: 18px;
  height: 18px;
}

.compare-modality-value {
  gap: 5px;
}

.compare-modality-value .modality-support-grid {
  gap: 5px;
}

.compare-modality-value .modality-support-icon {
  width: 24px;
  height: 24px;
}

.compare-modality-value .modality-support-icon .ui-icon,
.compare-modality-value .modality-support-icon .ui-icon svg {
  width: 16px;
  height: 16px;
}

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

.detail-info-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgb(148 163 184 / 0.28);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdff;
}

.detail-info-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-info-row strong,
.detail-info-row a {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.detail-info-row a:hover {
  color: var(--accent-3);
  text-decoration: underline;
}

.benchmark-profile,
.benchmark-evidence-list,
.variant-list {
  display: grid;
  gap: 8px;
}

.benchmark-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 1fr) 54px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.benchmark-row:last-child {
  border-bottom: 0;
}

.benchmark-row div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.benchmark-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benchmark-row a {
  color: inherit;
  text-decoration: none;
}

.benchmark-row a:hover strong {
  color: var(--accent-3);
}

.benchmark-row span {
  color: var(--muted);
  font-size: 12px;
}

.benchmark-track {
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.benchmark-track span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-4));
}

.benchmark-row em {
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.benchmark-evidence-row {
  display: grid;
  grid-template-columns: 40px minmax(180px, 0.9fr) minmax(180px, 1fr) 64px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.benchmark-evidence-row:last-child {
  border-bottom: 0;
}

.benchmark-evidence-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-4));
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.benchmark-evidence-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.benchmark-evidence-copy strong,
.benchmark-evidence-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benchmark-evidence-copy strong {
  font-size: 13px;
}

.benchmark-evidence-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.benchmark-evidence-track {
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.benchmark-evidence-track span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-4));
}

.benchmark-evidence-row b {
  color: var(--ink);
  font-size: 13px;
  text-align: right;
}

.benchmark-page-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.benchmark-picker,
.benchmark-ranking-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.benchmark-picker h3 {
  margin: 0;
  font-size: 14px;
}

.benchmark-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(72vh, 760px);
  overflow: auto;
  padding-right: 4px;
}

.benchmark-picker-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon meta";
  align-items: center;
  gap: 2px 10px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
}

.benchmark-picker-item.is-active {
  border-color: color-mix(in srgb, var(--accent-3), transparent 30%);
  background: color-mix(in srgb, var(--accent-3), white 92%);
}

.benchmark-picker-item > span {
  grid-area: icon;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-4));
  font-size: 10px;
  font-weight: 850;
}

.benchmark-picker-item strong {
  grid-area: name;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benchmark-picker-item em {
  grid-area: meta;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benchmark-ranking-list {
  display: grid;
  gap: 8px;
}

.benchmark-ranking-row {
  display: grid;
  grid-template-columns: 44px 40px minmax(180px, 0.9fr) minmax(160px, 1fr) 70px minmax(78px, auto);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.benchmark-ranking-row:last-child {
  border-bottom: 0;
}

.benchmark-ranking-row .provider-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 10px;
}

.benchmark-ranking-model {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.benchmark-ranking-model > a {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.benchmark-ranking-model > a:hover {
  color: var(--accent-3);
}

.benchmark-ranking-model strong,
.benchmark-ranking-model em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benchmark-ranking-model strong {
  font-size: 13px;
}

.benchmark-ranking-model em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.benchmark-ranking-model em a {
  color: var(--accent-3);
}

.benchmark-ranking-track {
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.benchmark-ranking-track span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-4));
}

.benchmark-ranking-row b,
.rank-number {
  font-size: 13px;
  font-weight: 850;
}

.benchmark-ranking-row b {
  text-align: right;
}

.histogram-row .compare-entry-link,
.benchmark-ranking-row .compare-entry-link,
.text-ranking-row .compare-entry-link {
  justify-self: end;
}

.variant-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.variant-row:last-child {
  border-bottom: 0;
}

.variant-row.is-current {
  color: var(--accent-3);
}

.variant-row span,
.variant-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.variant-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
}

.ui-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ui-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.histogram-list {
  display: grid;
  padding: 8px 10px;
}

.histogram-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 360px) minmax(220px, 1fr) 72px minmax(78px, auto);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}

.histogram-row:last-child {
  border-bottom: 0;
}

.histogram-rank {
  color: var(--muted);
  font-weight: 800;
}

.histogram-model {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.histogram-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.histogram-label a,
.histogram-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.histogram-label a {
  font-weight: 800;
}

.histogram-label .provider-text-link {
  color: var(--muted);
  font-weight: 700;
}

.histogram-label span {
  color: var(--muted);
  font-size: 12px;
}

.histogram-track {
  position: relative;
  height: 32px;
  border: 1px solid #e6e0d4;
  border-radius: 6px;
  background: #f2efe7;
  overflow: hidden;
}

.histogram-fill {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.histogram-score {
  text-align: right;
  font-weight: 800;
}

.text-ranking {
  display: grid;
  gap: 0;
  padding: 8px 10px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.text-ranking-row {
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) minmax(86px, 0.45fr) 72px 120px minmax(78px, auto);
  gap: 12px;
  min-height: 34px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.text-ranking-row:last-child {
  border-bottom: 0;
}

.text-model {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .source-block {
    justify-content: flex-start;
  }

  .header-actions {
    justify-items: start;
    max-width: 100%;
    width: 100%;
  }

  .header-actions .segmented-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .chart-shell {
    padding: 14px;
  }

  .chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-head a {
    align-self: flex-start;
  }

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

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

  .insight-grid,
  .detail-grid,
  .benchmark-page-grid,
  .source-grid,
  .source-grid.compact {
    grid-template-columns: 1fr;
  }

  .source-map-row {
    grid-template-columns: 1fr;
  }

  .source-stat-row {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-hero-facts {
    min-width: 0;
  }

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

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

  .benchmark-evidence-row {
    grid-template-columns: 36px minmax(0, 1fr) 58px;
  }

  .benchmark-ranking-row {
    grid-template-columns: 38px 34px minmax(0, 1fr) 62px;
  }

  .benchmark-ranking-row .compare-entry-link {
    grid-column: 3 / -1;
    justify-self: start;
    order: 2;
  }

  .benchmark-track,
  .benchmark-evidence-track,
  .benchmark-ranking-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .benchmark-picker-list {
    max-height: none;
  }

  .provider-row {
    grid-template-columns: minmax(0, 1fr) 34px 52px;
  }

  .provider-row-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .top-bars {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .top-bar-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
  }

  .top-bar-track {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
  }

  .top-bar-value {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .scatter-scroll svg {
    min-width: 920px;
    width: 1040px;
  }

  .switch-row {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
    padding: 0 8px;
  }

  .filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .search-label {
    grid-template-columns: 1fr;
  }

  .weight-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-coverage-filter {
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
    width: 100%;
  }

  .metric-coverage-filter select {
    width: 100%;
  }

  .weight-group-head p {
    text-align: left;
  }

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

  .custom-weight-preset-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-config-grid {
    grid-template-columns: 1fr;
  }

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

  .weight-control {
    grid-template-columns: minmax(0, 1fr) 130px 40px;
  }

  .histogram-row {
    grid-template-columns: 44px minmax(0, 1fr) 64px;
  }

  .histogram-track {
    grid-column: 2 / -1;
  }

  .histogram-row .compare-entry-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .text-ranking-row {
    grid-template-columns: 42px minmax(0, 1fr) 54px;
  }

  .text-ranking-row > .provider-text-link {
    display: none;
  }

  .text-ranking-row > strong {
    grid-column: 3;
  }

  .text-ranking-row .text-source {
    display: none;
  }

  .text-ranking-row .compare-entry-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

}

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

  .rank-card-grid,
  .stat-grid,
  .benchmark-ranking-row {
    grid-template-columns: 1fr;
  }

  .benchmark-ranking-row .provider-icon {
    display: none;
  }

  .home-metric {
    min-height: 0;
  }

  .custom-weight-preset-controls {
    grid-template-columns: 1fr;
  }

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

  .weight-control output {
    text-align: left;
  }
}

/* Visual refresh: data-product polish without changing generated data. */
:root {
  color-scheme: light;
  --ink: #0b1220;
  --muted: #526071;
  --muted-2: #748095;
  --line: #d8e0ea;
  --line-strong: #c4cfdd;
  --surface: #ffffff;
  --surface-raised: #fbfdff;
  --wash: #f3f6fa;
  --wash-2: #e9eff6;
  --accent: #087f78;
  --accent-strong: #075e59;
  --accent-2: #bd5b22;
  --accent-3: #265f9f;
  --accent-4: #bf2e63;
  --danger: #b42318;
  --focus: #1d70b8;
  --shadow: 0 14px 34px rgb(15 23 42 / 0.08), 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow-soft: 0 8px 22px rgb(15 23 42 / 0.06);
  --control-shadow: inset 0 1px 0 rgb(255 255 255 / 0.82);
}

html {
  scrollbar-color: #94a3b8 transparent;
}

body {
  background:
    linear-gradient(180deg, #f7fafe 0, var(--wash) 260px, #eef3f8 100%),
    linear-gradient(90deg, rgb(38 95 159 / 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgb(38 95 159 / 0.04) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

body::selection {
  color: #fff;
  background: var(--accent-3);
}

a,
button,
input {
  transition:
    border-color 0.16s ease,
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-3);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(29 112 184 / 0.35);
  outline-offset: 2px;
}

button:active,
.chart-head a:active,
.back-link:active,
.source-card:active,
.source-list-card:active,
.top-bar-item:active,
.histogram-row:active,
.benchmark-picker-item:active {
  transform: translateY(1px);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(520px, auto);
  align-items: start;
  gap: 28px;
  padding: 22px clamp(18px, 4vw, 48px);
  border-bottom-color: rgb(148 163 184 / 0.36);
  background: rgb(247 250 253 / 0.9);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.8), 0 14px 42px rgb(15 23 42 / 0.06);
  backdrop-filter: blur(18px) saturate(150%);
}

.topbar > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

h1 {
  max-width: none;
  color: var(--ink);
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 850;
  line-height: 1.06;
}

h2 {
  color: var(--ink);
  font-size: 19px;
  font-weight: 820;
}

.header-actions {
  grid-template-columns: 1fr;
  justify-items: end;
  gap: 10px;
}

.source-block {
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.source-block a:not(.source-badge) {
  color: var(--accent-3);
  font-weight: 720;
  text-decoration: none;
}

.source-badge,
.pill,
.source-metric-chip,
.weight-preset-button em,
.metric-weight-label em {
  border-color: rgb(38 95 159 / 0.18);
  color: var(--accent-3);
  background: rgb(38 95 159 / 0.08);
}

main {
  gap: 18px;
  max-width: 1510px;
  margin-inline: auto;
  padding: 20px clamp(14px, 3vw, 40px) 42px;
}

.home-view,
.sources-view,
.model-view,
.benchmark-view,
.compare-view,
.provider-view {
  max-width: 1280px;
}

.ranking-view {
  width: 100%;
  max-width: 1460px;
  margin-inline: auto;
}

.controls,
.custom-panel,
.chart-shell,
.ranking-shell,
.detail-hero,
.detail-section,
.detail-empty {
  border-color: rgb(148 163 184 / 0.35);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.96), rgb(248 251 255 / 0.96));
  box-shadow: var(--shadow);
}

.chart-shell,
.detail-section {
  position: relative;
  padding: 22px;
}

.chart-shell::before,
.detail-section::before,
.controls::before,
.custom-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), transparent 72%);
  opacity: 0.78;
  pointer-events: none;
}

.controls,
.custom-panel,
.chart-shell {
  overflow: hidden;
}

.chart-head {
  gap: 20px;
  margin-bottom: 18px;
  min-width: 0;
  max-width: 100%;
}

.chart-head p,
.detail-section-head p {
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chart-head a,
.back-link,
.panel-head button {
  min-height: 38px;
  border-color: rgb(38 95 159 / 0.22);
  border-radius: 8px;
  color: var(--accent-3);
  background: linear-gradient(180deg, #fff, #f4f8fc);
  box-shadow: var(--control-shadow);
}

.chart-head a:hover,
.back-link:hover,
.panel-head button:hover {
  border-color: rgb(38 95 159 / 0.42);
  color: var(--accent-strong);
  background: #fff;
  box-shadow: 0 8px 20px rgb(38 95 159 / 0.12);
}

.home-metrics {
  gap: 14px;
}

.home-metric {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 16px;
  border-color: rgb(148 163 184 / 0.32);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.98), rgb(246 250 255 / 0.98)),
    linear-gradient(135deg, rgb(8 127 120 / 0.1), transparent 55%);
  box-shadow: var(--shadow-soft);
}

.home-metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  opacity: 0.42;
}

.home-metric-label,
.source-card-kicker,
.rank-card span,
.detail-stat span,
th {
  color: #46566b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.home-metric-model:hover .model-name,
.home-metric-model:hover strong {
  color: var(--accent-3);
}

.home-metric-number {
  color: var(--ink);
  font-size: 32px;
  font-weight: 850;
  line-height: 0.95;
}

.home-metric-meta,
.model-meta,
.summary-row,
.muted {
  color: var(--muted);
}

.segmented-control {
  min-height: 38px;
  border-color: rgb(148 163 184 / 0.38);
  background: rgb(255 255 255 / 0.82);
  box-shadow: var(--control-shadow);
}

.segmented-control.compact {
  min-height: 32px;
}

.preset-row button,
.panel-head button,
.segmented-control button {
  min-height: 38px;
  border-color: rgb(148 163 184 / 0.36);
  color: var(--muted);
  background: linear-gradient(180deg, #fff, #f7fafc);
  font-size: 13px;
  font-weight: 760;
}

.segmented-control.compact button {
  min-height: 32px;
  padding-inline: 12px;
  font-size: 12px;
}

.preset-row button:hover,
.segmented-control button:hover,
.weight-preset-button:hover,
.benchmark-picker-item:hover {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.08);
}

.preset-row button[aria-selected="true"],
.segmented-control button[aria-pressed="true"],
.normalization-method-controls button[aria-pressed="true"],
.calculation-method-controls button[aria-pressed="true"],
.missing-mode-controls button[aria-pressed="true"] {
  border-color: var(--accent-3);
  color: #fff;
  background: linear-gradient(180deg, #2f6fb1, #245b95);
  box-shadow: 0 9px 18px rgb(38 95 159 / 0.22);
}

.preset-row {
  gap: 8px;
}

.controls {
  position: relative;
  gap: 16px;
  padding: 18px;
}

.filter-row {
  padding-top: 4px;
}

.search-label {
  color: var(--muted);
  font-weight: 720;
}

.search-label input {
  min-height: 42px;
  border-color: rgb(148 163 184 / 0.42);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--control-shadow);
}

.search-label input::placeholder {
  color: #8a96a8;
}

.search-label input:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgb(29 112 184 / 0.14);
}

.toggle-label {
  min-height: 42px;
  padding-inline: 10px;
  border: 1px solid rgb(148 163 184 / 0.25);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.72);
  font-weight: 720;
}

.toggle-label input {
  width: 20px;
  height: 20px;
}

.summary-row {
  padding-top: 2px;
  font-size: 13px;
}

.custom-panel {
  position: relative;
  padding: 18px;
}

.weight-preset-button,
.custom-setting-block,
.range-setting,
.rank-card,
.detail-stat,
.source-card,
.source-list-card {
  border-color: rgb(148 163 184 / 0.3);
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.72);
}

.weight-preset-button {
  min-height: 76px;
}

.weight-preset-button[aria-pressed="true"] {
  border-color: rgb(8 127 120 / 0.55);
  background: linear-gradient(180deg, rgb(8 127 120 / 0.1), rgb(255 255 255 / 0.96));
  box-shadow: 0 10px 22px rgb(8 127 120 / 0.12);
}

.weight-control {
  min-height: 42px;
}

.weight-control input,
.range-setting input {
  accent-color: var(--accent-3);
}

.ranking-shell {
  background: rgb(255 255 255 / 0.96);
}

table {
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom-color: rgb(203 213 225 / 0.62);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 13px;
  background: linear-gradient(180deg, #f7fafc, #edf3f9);
  box-shadow: inset 0 -1px 0 rgb(148 163 184 / 0.34);
}

td {
  color: var(--ink);
}

tbody tr {
  background: #fff;
}

tbody tr:hover {
  background: #f6fbff;
}

.rank-col,
.rank-number,
.histogram-rank,
.top-bar-rank {
  color: #66758a;
  font-weight: 850;
}

.provider-icon {
  border-color: rgb(148 163 184 / 0.42);
  background: #fff;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.07);
}

.icon-fallback {
  background: linear-gradient(135deg, var(--provider-color, #66758a), #111827);
}

.model-name,
.model-heading a,
.histogram-label a,
.benchmark-ranking-model strong,
.top-bar-model strong {
  color: var(--ink);
  font-weight: 820;
  text-decoration: none;
}

.histogram-label .provider-text-link,
.benchmark-ranking-model .provider-text-link,
.top-bar-model .provider-text-link,
.latest-model-main .provider-text-link,
.compare-model-head .provider-text-link {
  color: var(--muted);
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
}

.histogram-label .provider-text-link:hover,
.benchmark-ranking-model .provider-text-link:hover,
.top-bar-model .provider-text-link:hover,
.latest-model-main .provider-text-link:hover,
.compare-model-head .provider-text-link:hover {
  color: var(--accent-3);
  text-decoration: underline;
}

.compare-model-head .provider-text-link {
  font-size: 12px;
  font-weight: 400;
}

.compare-view,
.compare-picker-shell {
  overflow: visible;
}

.compare-picker-shell {
  position: relative;
  z-index: 20;
}

.compare-results {
  position: relative;
  z-index: 1;
}

.pill {
  min-height: 22px;
  font-weight: 760;
}

.source-pill[data-source-type="open"] {
  border-color: rgb(8 127 120 / 0.26);
  color: var(--accent-strong);
  background: rgb(8 127 120 / 0.08);
}

.source-pill[data-source-type="closed"] {
  border-color: rgb(189 91 34 / 0.26);
  color: #984313;
  background: rgb(189 91 34 / 0.08);
}

.score-bar,
.top-bar-track,
.band-track,
.provider-row-track,
.benchmark-track,
.benchmark-evidence-track,
.benchmark-ranking-track,
.histogram-track {
  background: #e7edf4;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.08);
}

.score-bar span,
.band-track span,
.benchmark-ranking-track span,
.histogram-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}

.top-bars {
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 6px 18px;
  padding: 12px 0 0;
  border-top-color: rgb(148 163 184 / 0.36);
}

.top-bar-item {
  min-height: 58px;
  padding: 9px 10px;
  border-bottom-color: rgb(203 213 225 / 0.58);
  border-radius: 8px;
}

.top-bar-item:hover {
  background: #f6fbff;
  box-shadow: inset 3px 0 0 var(--bar-color, var(--accent-3));
}

.top-bar-rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-height: 28px;
  border-radius: 999px;
  background: #eef4fb;
  font-size: 12px;
}

.top-bar-track {
  height: 10px;
}

.top-bar-value,
.score-value,
.histogram-score,
.benchmark-ranking-row b,
.benchmark-row em,
.benchmark-evidence-row b {
  color: #061224;
  font-weight: 850;
}

.scatter-legend {
  color: var(--muted);
  font-weight: 720;
}

.scatter-plot-bg {
  fill: #fbfdff;
  stroke: #d7e0ec;
}

.scatter-quadrant {
  fill: rgb(8 127 120 / 0.13);
}

.scatter-grid {
  stroke: #d9e1eb;
}

.scatter-axis {
  stroke: #748095;
}

.scatter-label {
  fill: #061224;
  stroke: #fff;
}

.insight-grid {
  gap: 18px;
}

.band-row,
.provider-row {
  min-height: 42px;
  padding: 5px 0;
}

.band-row:hover,
.provider-row:hover,
.variant-row:hover,
.benchmark-row:hover,
.benchmark-evidence-row:hover,
.benchmark-ranking-row:hover {
  background: linear-gradient(90deg, rgb(38 95 159 / 0.06), transparent);
}

.provider-row {
  grid-template-columns: minmax(150px, 1fr) minmax(140px, 1.2fr) minmax(50px, auto) minmax(62px, auto);
}

.source-grid,
.source-overview-grid {
  gap: 14px;
}

.source-card,
.source-list-card {
  min-height: 168px;
  padding: 16px;
}

.source-card:hover,
.source-list-card:hover {
  border-color: rgb(38 95 159 / 0.36);
  box-shadow: 0 13px 30px rgb(15 23 42 / 0.1);
  transform: translateY(-1px);
}

.source-card-icon,
.benchmark-evidence-icon,
.benchmark-picker-item > span {
  background: linear-gradient(135deg, #265f9f, #087f78);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.24);
}

.source-card p,
.source-list-card p,
.custom-setting-block p,
.range-setting em,
.custom-strategy-status {
  color: var(--muted);
}

.source-stat-row span {
  border-color: rgb(148 163 184 / 0.28);
  background: #fbfdff;
}

.source-stat-row b {
  font-weight: 850;
}

.source-map-row {
  border-bottom-color: rgb(203 213 225 / 0.6);
}

.source-metric-chip {
  min-height: 28px;
  border-radius: 8px;
  font-weight: 760;
}

.detail-hero {
  padding: 26px;
  border-top-width: 0;
  box-shadow: var(--shadow);
}

.detail-hero {
  position: relative;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--detail-color, var(--accent)), var(--accent-3), transparent 80%);
}

.detail-hero h2 {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 860;
}

.detail-hero .provider-icon {
  border-radius: 8px;
  box-shadow: 0 10px 22px rgb(15 23 42 / 0.1);
}

.detail-hero-facts > span {
  min-height: 38px;
  border-color: rgb(148 163 184 / 0.3);
  background: #fbfdff;
  box-shadow: var(--control-shadow);
}

.rank-card,
.detail-stat {
  min-height: 116px;
  padding: 14px;
}

.rank-card strong,
.detail-stat strong {
  font-size: 27px;
  font-weight: 850;
}

.detail-stat strong {
  line-height: 1.08;
  white-space: normal;
}

.benchmark-row,
.benchmark-evidence-row,
.variant-row,
.benchmark-ranking-row {
  border-bottom-color: rgb(203 213 225 / 0.6);
}

.benchmark-picker-list {
  padding-right: 8px;
}

.benchmark-picker-item {
  min-height: 58px;
  border-color: rgb(148 163 184 / 0.32);
  background: #fff;
}

.benchmark-picker-item.is-active {
  border-color: rgb(38 95 159 / 0.48);
  background: linear-gradient(90deg, rgb(38 95 159 / 0.11), #fff);
  box-shadow: inset 3px 0 0 var(--accent-3);
}

.histogram-list {
  padding: 12px;
}

.histogram-row {
  min-height: 64px;
  padding: 9px 8px;
  border-bottom-color: rgb(203 213 225 / 0.62);
  border-radius: 8px;
}

.histogram-row:hover {
  background: #f6fbff;
}

.histogram-track {
  height: 34px;
  border-color: rgb(148 163 184 / 0.3);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.24) 1px, transparent 1px),
    #e7edf4;
  background-size: 40px 100%;
}

.text-ranking {
  color: #142033;
  background: #fbfdff;
}

.text-ranking-row {
  border-bottom-color: rgb(203 213 225 / 0.62);
}

.empty,
.detail-empty {
  color: var(--muted);
  font-weight: 720;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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

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

  h1 {
    max-width: none;
  }

  .source-block {
    justify-content: flex-start;
  }

  .contribute-layout,
  .contribution-field-grid {
    grid-template-columns: 1fr;
  }

  .top-bars {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    background-size: auto, 52px 52px, 52px 52px;
    overflow-x: hidden;
  }

  .topbar {
    padding: 18px 14px;
  }

  h1 {
    font-size: 30px;
  }

  main {
    padding-inline: 10px;
  }

  .chart-shell,
  .detail-section,
  .controls,
  .custom-panel {
    width: min(100%, calc(100vw - 20px));
    max-width: 100%;
    padding: 16px;
  }

  .ranking-shell,
  .detail-hero {
    width: min(100%, calc(100vw - 20px));
    max-width: 100%;
  }

  .chart-head h2,
  .chart-head p,
  .detail-section-head h2,
  .detail-section-head p {
    width: auto;
    max-width: calc(100vw - 52px);
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .chart-head > div,
  .detail-section-head > div {
    width: min(100%, calc(100vw - 52px));
    max-width: calc(100vw - 52px);
  }

  .chart-shell > *,
  .ranking-shell > *,
  .detail-section > *,
  .source-map-row > *,
  .benchmark-page-grid > * {
    min-width: 0;
  }

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

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

  .compare-picker {
    display: grid;
    align-items: stretch;
  }

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

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

  .provider-row {
    grid-template-columns: minmax(0, 1fr) minmax(50px, auto) minmax(62px, auto);
  }

  .provider-row-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .top-bar-rank {
    justify-self: start;
  }

  .top-bar-item {
    min-height: 62px;
  }

  .source-card,
  .source-list-card {
    min-height: 0;
  }

  .detail-hero {
    padding: 20px;
  }

  .detail-hero h2 {
    font-size: 32px;
  }

  .provider-model-row {
    grid-template-columns: 40px minmax(0, 1fr) 62px;
  }

  .provider-model-row .provider-icon,
  .provider-model-stat + .provider-model-stat,
  .provider-model-price {
    display: none;
  }
}

@media (max-width: 520px) {
  .home-metrics,
  .latest-models,
  .compare-model-grid,
  .compare-option-list,
  .rank-card-grid,
  .stat-grid,
  .detail-info-grid {
    grid-template-columns: 1fr;
  }

  .radar-card {
    padding: 10px;
  }

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

  .radar-plot {
    min-width: 700px;
  }

  .radar-basis-grid {
    grid-template-columns: 1fr;
  }

  .compare-model-facts {
    grid-template-columns: 1fr;
  }

  .compare-model-facts > span {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
  }

  .compare-model-facts .ui-icon {
    grid-row: span 2;
  }

  .compare-model-facts b,
  .compare-model-facts em {
    white-space: normal;
  }

  .home-metric-number {
    font-size: 30px;
  }

  .segmented-control {
    overflow-x: auto;
  }

  .segmented-control button {
    min-width: max-content;
  }

  .custom-setting-block [data-missing-preset] button {
    min-width: 0;
  }

  .top-bar-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .histogram-row {
    grid-template-columns: 40px minmax(0, 1fr) 56px;
  }
}
