/* Ranking: season score and opt-in historical metrics share one scroll region. */
.ops-ranking-page .ops-page-head h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
[data-ranking-section] header h2 { font-size: clamp(1.3rem, 2.4vw, 2rem); }
.ops-ranking-info { margin: 0 0 16px; color: var(--ops-muted, #91a299); font-size: .8rem; }
.ops-ranking-info summary { cursor: pointer; padding: 8px 0; }
[data-ranking-section] { min-width: 0; max-width: 100%; }
[data-ranking-section] .ops-ranking-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; border: 0; background: transparent; }
.ops-ranking-sort { display: grid; gap: 6px; color: var(--ops-muted, #91a299); font: 700 .7rem var(--ops-font-mono, monospace); }
.ops-ranking-sort select, .ops-ranking-columns summary { min-height: 44px; box-sizing: border-box; padding: 11px 14px; color: var(--ops-text, #edf3ef); border: 1px solid var(--ops-line, #34453a); border-radius: 4px; background: var(--ops-surface, #0d1411); font: inherit; }
.ops-ranking-sort select { max-width: 100%; cursor: pointer; }
.ops-ranking-columns { position: relative; font-size: .8rem; }
.ops-ranking-columns summary { cursor: pointer; color: var(--ops-amber, #f2a31b); }
.ops-ranking-columns[open] summary { border-color: var(--ops-amber, #f2a31b); }
.ops-ranking-columns fieldset { position: absolute; z-index: 5; top: 100%; right: 0; width: min(310px, calc(100vw - 48px)); box-sizing: border-box; display: grid; gap: 3px; margin: 6px 0 0; padding: 12px; border: 1px solid var(--ops-line, #34453a); border-radius: 4px; background: var(--ops-surface, #0d1411); box-shadow: 0 14px 28px #0009; }
.ops-ranking-columns legend { padding: 0 5px; color: var(--ops-muted, #91a299); font-size: .7rem; }
.ops-ranking-columns label { display: flex; align-items: center; gap: 9px; min-height: 36px; cursor: pointer; }
.ops-ranking-columns input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--ops-green, #58d88c); }
[data-ranking-section] :is(select, summary, input, a, .ops-table-wrap):focus-visible { outline: 2px solid var(--ops-amber, #f2a31b); outline-offset: 3px; }
[data-ranking-section] .ops-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 5px; }
[data-ranking-section] .ops-ranking-table { min-width: 0; width: 100%; border-collapse: collapse; background: var(--ops-surface, #0d1411); }
[data-ranking-section] .ops-ranking-table :is(th, td) { padding: 12px 10px; font-variant-numeric: tabular-nums; }
[data-ranking-section] .ops-ranking-table th { white-space: normal; line-height: 1.5; letter-spacing: .025em; }
[data-ranking-section] .ops-ranking-table :is(th, td):nth-child(2) { min-width: 6rem; max-width: 15rem; white-space: normal; overflow-wrap: anywhere; }
[data-ranking-section] .ops-ranking-table :is(th, td):nth-child(3) { max-width: 8rem; white-space: normal; overflow-wrap: anywhere; }
[data-ranking-section] .ops-ranking-table :is(th, td):nth-child(n+4) { text-align: right; }
[data-ranking-section] .ops-ranking-table [data-metric="score"] { color: var(--ops-amber, #f2a31b); font-weight: 700; }
[data-ranking-section] .ops-ranking-table [data-metric="rank"] { color: var(--ops-green, #58d88c); }
[data-ranking-section] .ops-ranking-table .ops-value-unavailable { color: var(--ops-muted, #91a299); font-weight: 400; }
[data-ranking-section] .ops-ranking-table small { display: block; color: var(--ops-muted, #91a299); font-size: .65rem; }
[data-ranking-section] .ops-metric-note, [data-ranking-section] .ops-accounting-status { max-width: 90ch; color: var(--ops-muted, #91a299); font-size: .76rem; line-height: 1.65; }
@media (max-width: 600px) {
  [data-ranking-section] .ops-ranking-controls { align-items: stretch; gap: 8px; }
  .ops-ranking-sort { flex: 1 1 150px; min-width: 0; }
  .ops-ranking-columns { align-self: flex-end; }
  [data-ranking-section] .ops-ranking-table { width: max-content; min-width: 100%; }
  [data-ranking-section] .ops-ranking-table :is(th, td) { padding: 10px 5px; font-size: .68rem; }
  [data-ranking-section] .ops-ranking-table th { font-size: .56rem; }
  [data-ranking-section] .ops-ranking-table :is(th, td):first-child { width: 2rem; min-width: 2rem; max-width: 2rem; white-space: normal; overflow-wrap: anywhere; }
  [data-ranking-section] .ops-ranking-table :is(th, td):nth-child(2) { width: 5.25rem; min-width: 5.25rem; max-width: 5.25rem; }
  [data-ranking-section] .ops-ranking-table :is(th, td):nth-child(3) { width: 4rem; min-width: 4rem; max-width: 4rem; }
  [data-ranking-section] .ops-ranking-table :is(th, td):nth-child(4) { width: 4.75rem; min-width: 4.75rem; max-width: 4.75rem; white-space: normal; overflow-wrap: anywhere; }
  [data-ranking-section] .ops-ranking-table :is(th, td):nth-child(n+5) { min-width: 6rem; max-width: 8rem; }
}
