/* Rankings share the website's white, black and restrained blue foundation. */
.rankings-page { min-width:0; }
.rank-controls,.rank-chart-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .65rem; }
.rank-controls { justify-content:space-between; margin:.8rem 0; }
.rank-controls .toolbar { margin:0; }
.rank-view-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px; min-width:0; }
.rank-metric-heading { margin:0; font-size:18px; font-weight:700; line-height:1.4; }
.rank-views { display:flex; gap:.3rem; }
.rank-views [aria-pressed=true] { border-color:#0645ad; color:#0645ad; font-weight:bold; }
.rank-metric-definition { margin:.6rem 0 .3rem; }
.rank-exclusions { font-size:.85rem; margin:.5rem 0 1rem; }
.rank-exclusions p { display:inline-block; margin:.3rem .8rem .2rem 0; }
.rank-unranked { border-top:1px solid #bbb; margin-top:1.2rem; padding-top:.7rem; }
.rank-unranked>h2 { font-size:1rem; font-weight:normal; }
.rank-unranked .rank-number { color:#555; }
.rank-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.55rem; margin:.75rem 0 1.2rem; }
.rank-grid-top { grid-template-columns:repeat(auto-fill,minmax(172px,1fr)); padding-bottom:1rem; border-bottom:1px solid #bbb; }
.rank-grid-top .rank-comparison { align-self:start; }
.rank-card { display:flex; align-items:center; gap:.5rem; border:1px solid #d1d1d1; border-radius:4px; color:#000; text-decoration:none; padding:.35rem; min-width:0; background:#fff; }
.rank-card:hover,.rank-card:focus-visible { border-color:#0645ad; }
.rank-card.rank-arrival { position:relative; }
.rank-arrival::after { content:""; position:absolute; inset:-1px; outline:3px solid var(--ui-arrival,#c02d43); border-radius:inherit; pointer-events:none; opacity:1; animation:rank-arrival-pulse 3000ms ease-in-out both; }
@keyframes rank-arrival-pulse {
  0%,40%,80% { opacity:1; }
  20%,60%,100% { opacity:0; }
}
@media (prefers-reduced-motion:reduce) {
  .rank-arrival::after { animation:none; opacity:1; }
}
.rank-card img { width:46px; height:52px; object-fit:contain; flex-shrink:0; }
.rank-card-copy { display:flex; flex-direction:column; min-width:0; }
.rank-grid .rank-card:not(.rank-card-large) .rank-card-copy { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:0 .35rem; align-items:baseline; flex:1; }
.rank-grid .rank-card:not(.rank-card-large) .rank-value { grid-column:1/-1; }
.rank-card-copy .rank-name { overflow-wrap:anywhere; font-size:.88rem; }
.rank-number { color:#0645ad; font-size:.83rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rank-value { font-size:1rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rank-card-large { display:flex; flex-direction:column; align-items:stretch; gap:.3rem; padding:.4rem; }
.rank-card-large img { width:100%; height:180px; object-fit:contain; }
.rank-card-large .rank-card-copy { display:block; width:100%; text-align:center; }
.rank-card-large .rank-number { font-size:.94rem; line-height:1.3; }
.rank-card-large .rank-name { margin-left:.35rem; font-size:.94rem; font-weight:700; line-height:1.3; }
.rank-card-large .rank-value { display:block; margin-top:.15rem; text-align:center; font-size:1.15rem; line-height:1.3; }
.rank-comparison { border:1px dashed #0645ad; }
.rank-list { list-style:none; padding:0; margin:.7rem 0; width:100%; max-width:36rem; }
.rank-list li { background:rgba(6,69,173,var(--rank-tint)); border-bottom:1px solid #ddd; }
.rank-list .rank-card { border:0; border-radius:0; padding:.35rem .65rem; background:transparent; }
.rank-list .rank-card-copy { display:grid; grid-template-columns:3.8rem minmax(0,1fr) minmax(5.5rem,max-content); align-items:center; width:100%; gap:.4rem; }
.rank-list .rank-number { font-size:1.15rem; line-height:1.2; }
.rank-list .rank-name { font-size:1rem; }
.rank-list .rank-value { text-align:right; font-size:1.08rem; }
.rank-list .rank-comparison { border-left:2px dashed #0645ad; }
.rank-tiers { margin:.75rem 0; border:1px solid #aaa; }
.rank-tier { display:grid; grid-template-columns:115px 1fr; border-bottom:2px solid #777; }
.rank-tier:last-child { border-bottom:0; }
.rank-tier h2 { display:flex; align-items:center; justify-content:center; margin:0; padding:.55rem; background:#f2f2f2; border-right:1px solid #bbb; font-size:.9rem; text-align:center; }
.rank-tier-cards { display:flex; flex-wrap:wrap; align-items:flex-start; gap:.25rem; padding:.35rem; }
.rank-tier .rank-card { width:112px; flex-direction:column; gap:.08rem; padding:.15rem; }
.rank-tier .rank-card img { width:78px; height:78px; }
.rank-tier .rank-card-copy { display:block; width:100%; text-align:center; }
.rank-tier .rank-number { font-size:.8rem; }
.rank-tier .rank-name { font-size:.8rem; line-height:1.25; margin-left:.22rem; }
.rank-tier .rank-value { display:block; text-align:center; line-height:1.2; }
.rank-chart-actions { margin:1rem 0 .4rem; }
.rank-colors { display:flex; flex-wrap:wrap; gap:.35rem 1rem; margin:.25rem 0 .5rem; }
.rank-colors span { display:inline-flex; align-items:center; gap:.4rem; }
.rank-colors i { width:30px; height:10px; display:inline-block; border:1px solid #555; }
.rank-color-neutral { background:linear-gradient(90deg,#a0a0a0,#bcbcbc); }
.rank-color-comparison { background:linear-gradient(90deg,#87b7d2,#aacde1); }
.rank-color-selected { background:#002b67; }
#rank-chart .rank-bar-hovered { stroke:#000; stroke-width:2; filter:brightness(1.15); vector-effect:non-scaling-stroke; }
.rank-chart-wrap { position:relative; background:#fff; }
#rank-chart { display:block; width:100%; min-height:230px; height:auto; touch-action:pan-y; user-select:none; cursor:crosshair; }
#rank-chart[data-zoom-locked=true] { touch-action:pan-y pinch-zoom; }
#rank-chart:focus,#rank-chart:focus-visible { outline:none; }
.rank-hover { position:absolute; width:140px; display:flex; flex-direction:column; align-items:center; padding:.4rem; border:1px solid #777; background:#fff; box-shadow:0 2px 5px #0002; border-radius:4px; font-size:.82rem; pointer-events:none; z-index:2; text-align:center; }
.rank-hover[hidden] { display:none; }
.rank-hover img { width:58px; height:58px; object-fit:contain; }
.rank-selector-section { margin-top:1.5rem; padding-top:.7rem; border-top:1px solid #888; }
.rank-selector-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:.35rem; }
.rank-selector-card { min-width:0; border:1px solid #ccc; border-radius:3px; opacity:.4; padding:.2rem; text-align:center; }
.rank-selector-card.selected { opacity:1; border-color:#0645ad; }
.rank-selector-card button { display:flex; width:100%; flex-direction:column; align-items:center; background:none; border:0; padding:.2rem; font-size:.83rem; }
.rank-selector-card img { width:58px; height:58px; object-fit:contain; }
.rank-selector-card span { overflow-wrap:anywhere; }
.rank-selector-card a { font-size:.75rem; }
@media(max-width:650px) {
  .rank-grid-top { grid-template-columns:repeat(auto-fill,minmax(135px,1fr)); }
  .rank-card-large img { height:145px; }
  .rank-list .rank-card-copy { grid-template-columns:3.1rem minmax(0,1fr) minmax(4.7rem,max-content); gap:.3rem; }
  .rank-list .rank-number { font-size:1.08rem; }
  .rank-tier { grid-template-columns:76px 1fr; }
  .rank-tier h2 { font-size:.75rem; padding:.35rem; }
  .rank-tier .rank-card { width:104px; }
  .rank-controls { align-items:flex-start; }
  .rank-views { flex-wrap:wrap; }
}

.affiliation-card img { object-fit:contain; height:80px; width:80px; }
.affiliation-card.rank-card-large img { width:112px; height:112px; }
.rank-list .affiliation-card img { width:40px; height:40px; }
.ui-dialog.rank-export-dialog { width:min(460px,calc(100vw - 32px)); max-width:460px; box-sizing:border-box; }
.rank-export-dialog .settings-row { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; }
.rank-export-dialog .field { display:flex; flex-direction:column; gap:8px; min-width:0; }
.rank-export-dialog .section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.rank-export-dialog input { width:130px; max-width:100%; }
.rank-export-dialog .error { min-height:2.8em; font-size:13px; color:var(--ui-error,#aa2539); }
.analysis-workspace .rank-grid .affiliation-card .rank-card-copy>.small { grid-column:1/-1; }
.analysis-workspace .rank-list .affiliation-card .rank-card-copy>.small { grid-column:2; grid-row:2; white-space:nowrap; }
.analysis-workspace .rank-list .affiliation-card .rank-value { grid-column:3; grid-row:1; }
.analysis-workspace .affiliation-school-grid { grid-auto-rows:1fr; }
.analysis-workspace .affiliation-school-grid .affiliation-card { align-self:stretch; height:100%; box-sizing:border-box; }
