
/*
  Polish pass, 30 Oct 2026.
  Loaded after every other stylesheet so these rules win without editing the
  earlier layers. Each block names the review finding it addresses (#n).
*/

/* #1 One ranking module: List and Matrix views share scope, search and status. */
.ranking-scope-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.leaderboard-section[data-view="list"] #rank-heatmap { display: none !important; }
.leaderboard-section[data-view="matrix"] .ranking-list,
.leaderboard-section[data-view="matrix"] .ranking-setting,
.leaderboard-section[data-view="matrix"] #ranking-context { display: none !important; }
.leaderboard-section[data-view="matrix"] .ranking-subtoolbar { justify-content: flex-end; }
.rank-heatmap.rank-matrix { margin-top: 10px; }
.ranking-view button { min-width: 72px; justify-content: center; }

/* #2 Phones and small tablets keep the score: date and venue move under the model name. */
.ranking-model-meta { display: none; }
@media (max-width: 800px) {
  .ranking-table, .ranking-table.ranking-setting-view { min-width: 0; }
  #ranking-first-public-heading, #ranking-venue-heading, .ranking-first-public, .ranking-venue { display: none; }
  .ranking-model-meta { display: block; margin-top: 3px; font: 400 12px/1.5 var(--sans); color: var(--muted); }
  .ranking-table .ranking-model { min-width: 0; }
  .ranking-value { width: 96px; min-width: 0; }
  .ranking-bar { margin-left: auto; width: 100%; max-width: 80px; }
}
@media (max-width: 550px) {
  .ranking-view { width: 100%; }
  .ranking-view button { flex: 1; }
  .ranking-table tbody td, .ranking-table tbody th { padding: 14px 10px; }
  .ranking-table .ranking-position { width: 48px; padding-left: 10px; }
  /* Paper and weights links stay one tap away in the model profile. */
  .ranking-resource-icons { display: none; }
  .ranking-value { width: 76px; }
  .ranking-bar { max-width: 64px; }
}

/* #3 Charts are drawn at the width they are shown, so their labels stay 12 px. */
#scaling-chart { min-width: 0; }
#scaling-chart text, #scaling-chart .scaling-axis-title { font-size: 12px; }
.memory-chart-scroll { overflow-x: visible; }
.memory-chart-scroll svg { min-width: 0; }
.memory-chart-scroll text { font-size: 12px; }

/* #4 One set of modality colours (the --dna, --rna and --protein tokens). */
.rank-matrix-group[data-group="DNA"] { color: var(--dna); }
.rank-matrix-group[data-group="RNA"] { color: var(--rna); }
.rank-matrix-group[data-group="Protein"] { color: var(--protein); }

/* #6 The methods section now follows the overview: one divider above, none below. */
.approach-section { border-top: 1px solid var(--line); border-bottom: 0; }

/* #8 Model library: compact rows that fit at 1280 px and up, stacked specs on phones. */
.model-comparison-table { min-width: 1100px; }
.model-col-name { width: 270px; }
.model-col-architecture { width: 128px; }
.model-col-parameters { width: 92px; }
.model-col-input_length { width: 116px; }
.model-col-tokenizer { width: 124px; }
.model-col-pretraining_objective { width: 124px; }
.model-col-pretraining_data { width: auto; }
.model-comparison-table th, .model-comparison-table td { padding: 14px 16px; }
.model-comparison-table thead th { padding-block: 12px; }
.model-resource-copy h3 { margin: 2px 0 6px; }
.model-resource-copy .model-resource-links { gap: 2px 10px; }
.model-reference-details { margin-top: 0; }
.model-reference-details[open] { flex-basis: 100%; }
.model-reference-details summary { font: 12px/1.6 var(--sans); color: var(--green); min-height: 24px; }
.model-reference-details p { margin-top: 4px; }
@media (min-width: 1280px) { .model-scroll-hint { display: none; } }
@media (max-width: 600px) {
  .model-scroll-hint { display: none; }
  .model-table-scroll { overflow: visible; }
  .model-comparison-table, .model-comparison-table tbody { display: block; width: 100%; min-width: 0; }
  .model-comparison-table colgroup, .model-comparison-table thead, .model-comparison-table caption { display: none; }
  /* Each model becomes a card: name and links on top, specs in a two-column grid. */
  .model-comparison-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 16px; border-top: 1px solid var(--line); }
  .model-comparison-table tbody tr:first-child { border-top: 0; }
  .model-comparison-table tbody th, .model-comparison-table td { display: block; position: static; border: 0; padding: 0; background: transparent; }
  .model-comparison-table tr > :first-child { position: static; border-right: 0; grid-column: 1 / -1; }
  .model-comparison-table tbody tr:hover > *, .model-comparison-table tbody tr:focus-within > * { background: transparent; }
  .model-comparison-table td::before { content: attr(data-label); display: block; font: 11px/1.6 var(--mono); color: var(--muted); }
  .model-comparison-table .model-spec-pretraining_data { grid-column: 1 / -1; }
}

/* #9 GPU table: no "not applicable" column in inference mode; stacked cards on phones. */
.memory-gpu-table[data-mode="inference"] th:nth-child(4),
.memory-gpu-table[data-mode="inference"] td:nth-child(4) { display: none; }
@media (max-width: 600px) {
  .memory-gpu-scroll { overflow: visible; }
  .memory-gpu-table, .memory-gpu-table tbody, .memory-gpu-table tr, .memory-gpu-table td { display: block; width: auto; min-width: 0; }
  .memory-gpu-table thead { display: none; }
  .memory-gpu-table tr { padding: 16px 18px; border-top: 1px solid var(--line); }
  .memory-gpu-table tbody tr:first-child { border-top: 0; }
  .memory-gpu-table td, .memory-gpu-table td:first-child { border: 0; padding: 5px 0; min-width: 0; }
  .memory-gpu-table td[data-label]::before { content: attr(data-label); display: block; font: 11px/1.7 var(--mono); color: #b5c5b9; }
  .memory-gpu-table tr[data-status="candidate"] td:nth-child(3) { padding-left: 12px; margin-top: 4px; }
  .memory-gpu-table small { max-width: none; }
}

/* #10 Nothing users need to read below 11 px; small controls at least 24 px tall. */
.eyebrow, .hero .eyebrow { font-size: 11px; }
.hero-footnote, .figure-topline, .modality-top .mono, .modality-numbers { font-size: 11px; }
.leaderboard-meta, .ranking-setting, .rank-matrix-legend p, .rank-matrix-ticks,
.rank-matrix-group small, .rank-matrix-count, .rank-matrix-table .rank-matrix-model-heading { font-size: 11px; }
.rank-matrix-category-toggle { min-height: 24px; font-size: 11px; }
.ranking-first-public a, .ranking-venue a { display: inline-block; padding-block: 4px; }
.model-profile-axis > div, .model-profile-label small, .model-profile-values small { font-size: 11px; }
.memory-chart-heading span, .memory-grid-heading span { font-size: 11px; }
.scaling-detail .eyebrow, .scaling-detail #scaling-param-exact { font-size: 11px; }
.scaling-detail .scaling-secondary dd { white-space: nowrap; }
@media (max-width: 480px) { .scaling-detail dl { grid-template-columns: minmax(0, 1fr); } }
.table-caption, .table-caption > span:last-child { font-size: 11px; }
.task-number, .task-modality { font-size: 11px; }
.task-settings, .task-category { font-size: 12px; }
.model-resource-category, .model-length-unit { font-size: 11px; }
.method-tag, .resource-type, .resource-label, .setting-labels span { font-size: 11px; }
.footer-bottom, .dialog-note { font-size: 12px; }
.memory-specs dt, .memory-section .memory-result .eyebrow, .model-category { font-size: 11px; }
.hero-figure .figure-note { margin: 0 0 14px; text-align: center; font: 12px/1.5 var(--sans); color: var(--muted); }
@media (max-width: 550px) {
  .section-heading .eyebrow, .hero .eyebrow, .leaderboard-meta, .leaderboard-meta span, .figure-topline, .task-modality,
  .model-resource-category, .model-category, .ranking-tabs button span { font-size: 11px; }
  .hero-footnote { font-size: 11px; }
  #ranking-date { font-size: 11px; }
}

/* #11 Contrast: rank numbers and tab counts use the muted ink at full strength. */
.ranking-table .ranking-position { color: var(--muted); }
.ranking-tabs button span { font-size: 11px; opacity: 1; color: var(--muted); }

/* #13 The DNA / RNA / PROTEIN sequence reads as text, not as buttons. */
.hero-footnote > span:not(.hero-footnote-end) { border: 0; border-radius: 0; padding: 4px 0; background: transparent; color: var(--muted); border-bottom: 2px solid transparent; }
.hero-footnote[data-active-modality] > [data-modality] { background: transparent; color: var(--muted); border-color: transparent; }
.hero-footnote[data-active-modality="DNA"] > [data-modality="DNA"] { background: transparent; color: var(--dna); border-color: var(--dna); }
.hero-footnote[data-active-modality="RNA"] > [data-modality="RNA"] { background: transparent; color: var(--rna); border-color: var(--rna); }
.hero-footnote[data-active-modality="Protein"] > [data-modality="Protein"] { background: transparent; color: var(--protein); border-color: var(--protein); }
.hero-footnote i { display: inline-block; width: 6px; height: 6px; margin: 0 4px 0 1px; border: solid var(--muted); border-width: 1px 1px 0 0; border-radius: 0; background: none; transform: rotate(45deg); }

/* #17 GPU planner: the result column stays in view while the controls scroll. */
@media (min-width: 651px) { .memory-display { position: sticky; top: 88px; } }

/* #18 One disclosure style: a + that turns into a ×. */
.memory-methods summary, .model-reference-details summary { list-style: none; cursor: pointer; }
.memory-methods summary::-webkit-details-marker, .model-reference-details summary::-webkit-details-marker { display: none; }
.memory-methods summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.memory-methods summary::after { content: "+"; font-size: 22px; font-weight: 300; line-height: 1; transition: transform .3s; }
.model-reference-details summary { display: inline-flex; align-items: center; gap: 6px; }
.model-reference-details summary::after { content: "+"; font-size: 16px; line-height: 1; transition: transform .3s; }
.memory-methods[open] summary::after, .model-reference-details[open] summary::after { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .memory-methods summary::after, .model-reference-details summary::after { transition: none; } }

/* #19 Keep hyphenated terms together. */
.nowrap { white-space: nowrap; }

