.rankings-body { min-height: 100vh; }
.rankings-topbar { min-height: 128px; }
.rankings-topbar h1 { max-width: 880px; }
.rankings-page { width: min(1500px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 70px; }

.ranking-intro { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 30px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.ranking-intro h2 { max-width: 900px; margin: 5px 0 8px; font-family: Georgia, serif; font-size: clamp(25px, 3vw, 39px); font-weight: 500; line-height: 1.16; }
.ranking-intro p:last-child { max-width: 910px; margin: 0; color: var(--muted); }
.cohort-stat { min-height: 116px; padding: 17px; border-radius: 14px; display: grid; place-content: center; text-align: center; color: #e5f3ec; background: linear-gradient(135deg, #173529, #2a5d4a); }
.cohort-stat span, .cohort-stat small { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.cohort-stat strong { font-family: Georgia, serif; font-size: 43px; font-weight: 500; line-height: 1.1; }

.ranking-controls { position: sticky; top: 0; z-index: 10; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; display: grid; grid-template-columns: auto minmax(420px, 1.5fr) minmax(150px, .5fr) minmax(120px, .4fr) minmax(210px, .7fr); gap: 16px; align-items: start; background: rgba(246,244,237,.96); box-shadow: 0 7px 25px rgba(38,48,43,.08); backdrop-filter: blur(12px); }
.control-block { min-width: 0; }
.control-label { display: block; margin-bottom: 7px; color: #5e6863; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.segmented { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.segmented button { padding: 7px 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; white-space: nowrap; }
.segmented button.active { color: white; background: #274c3e; }
.model-control { display: flex; flex-wrap: wrap; gap: 5px; }
.model-choice { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; color: #5e6863; background: white; cursor: pointer; font-size: 10px; font-weight: 750; }
.model-choice input { position: absolute; opacity: 0; pointer-events: none; }
.model-choice i, .model-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--model-color); }
.model-choice.active { border-color: var(--model-color); color: var(--ink); box-shadow: inset 0 0 0 1px var(--model-color); }
.model-choice:not(.active) i { background: #c8ccc7; }
.preset-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.preset-row button { padding: 3px 7px; border: 0; border-radius: 5px; color: #64706a; background: #e7e8e2; cursor: pointer; font-size: 9px; font-weight: 750; }
.compact-control select, .search-control input { width: 100%; height: 36px; padding: 7px 9px; border: 1px solid #cfd3cc; border-radius: 8px; color: var(--ink); background: white; outline: none; font-size: 11px; }
.compact-control select:focus, .search-control input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,115,74,.1); }

.ranking-notice { margin-top: 12px; padding: 10px 13px; border: 1px solid #e2d0ac; border-radius: 10px; color: #705621; background: #fbf3df; font-size: 11px; }
.ranking-summary { margin-top: 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.ranking-metric { min-height: 104px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; display: grid; align-content: center; background: var(--card); }
.ranking-metric span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ranking-metric strong { margin-top: 2px; font-size: 27px; font-variant-numeric: tabular-nums; }
.ranking-metric small { color: #77807b; font-size: 10px; }

.ranking-table-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 8px 32px rgba(38,48,43,.055); }
.table-heading { padding: 19px 21px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.table-heading h2 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.table-heading > p { margin: 0; color: var(--muted); font-size: 11px; }
.ranking-table-wrap { overflow-x: auto; }
.ranking-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.ranking-table th { position: sticky; top: 0; z-index: 2; padding: 10px 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #63706a; background: #eeeee8; text-align: left; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.ranking-table th .model-dot { margin-right: 5px; }
.ranking-table td { padding: 10px 11px; border-bottom: 1px solid #e8e8e2; vertical-align: middle; }
.ranking-table tr:last-child td { border-bottom: 0; }
.ranking-table tr:hover td { background: #f7f7f2; }
.ranking-table tr.predicted-accept td { background: #fbfffc; }
.ranking-table tr.predicted-accept:hover td { background: #f1faf5; }
.rank-column { width: 62px; text-align: center !important; }
.rank-column strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.selection-mark { padding: 1px 4px; border-radius: 4px; color: #0f633e; background: var(--green-soft); font-size: 7px; font-weight: 900; text-transform: uppercase; }
.paper-cell { min-width: 280px; max-width: 480px; }
.paper-cell a { display: block; color: var(--ink); font-size: 12px; font-weight: 750; line-height: 1.3; text-decoration: none; }
.paper-cell a:hover { color: var(--green); text-decoration: underline; }
.paper-cell span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.outcome { padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.outcome-accept { color: #0f633e; background: var(--green-soft); }
.outcome-reject { color: #913b32; background: var(--red-soft); }
.aggregate-score strong, .model-score strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.aggregate-score span, .model-score span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.aggregate-score strong { color: var(--green); }
.model-score { min-width: 104px; }
.spread-score { color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1180px) {
  .ranking-controls { grid-template-columns: 1fr 2fr 1fr 1fr; }
  .search-control { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .rankings-page { width: min(100% - 20px, 1500px); padding-top: 12px; }
  .ranking-intro { grid-template-columns: 1fr; padding: 20px; }
  .cohort-stat { min-height: 90px; }
  .ranking-controls { position: static; grid-template-columns: 1fr; }
  .ranking-summary { grid-template-columns: 1fr 1fr; }
  .ranking-metric:last-child { grid-column: 1 / -1; }
  .table-heading { align-items: flex-start; flex-direction: column; }
}
