/* Both sort pickers share the same appearance and state. */
.collection-actions{flex-wrap:wrap;justify-content:flex-end;gap:9px}
.sort-picker{gap:9px;min-width:0}
.sort-picker>span{flex:none;font-size:12px;white-space:nowrap}
.sort-picker .benchmark-sort-select{appearance:none;width:clamp(180px,20vw,270px);min-width:0;max-width:100%;min-height:40px;padding:9px 36px 9px 13px;border:1px solid #cbd3c0;border-radius:var(--radius-control);background:var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%234b6244' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;color:var(--ink);font:inherit;font-size:12px;font-weight:550;line-height:1.4;text-overflow:ellipsis;cursor:pointer;box-shadow:0 1px 2px #29372408;transition:border-color .15s,box-shadow .15s}
.sort-picker .benchmark-sort-select:hover{border-color:#9eaf8e;background-color:#fffef9}
.sort-picker .benchmark-sort-select:focus-visible,.sort-direction:focus-visible{outline:2px solid var(--olive);outline-offset:3px;box-shadow:0 0 0 3px #4b624414}
.sort-direction{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;min-width:40px;min-height:40px;padding:0;border-color:#cbd3c0;border-radius:var(--radius-control);color:var(--olive);cursor:pointer}
.sort-direction>[aria-hidden]{font-size:21px;line-height:1}
.sort-direction-label{display:none}
.model-picker-actions{display:flex;gap:8px;margin-bottom:9px}
.model-picker-actions button{flex:1;min-width:0;margin-bottom:0;font:inherit}
.model-picker-actions button:disabled{opacity:.45;cursor:default}
.reset-data-button{flex:none;min-height:44px;padding:8px 0;border:0;background:transparent;color:var(--muted);font:inherit;font-size:11px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.reset-data-button[hidden]{display:none}
.reset-data-button:focus-visible{outline:2px solid var(--olive);outline-offset:3px}
.header-sort-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px;min-width:0}
/* One model leaves nothing to sort: the "Model" label stays, its sort control and the sort line go. */
body.has-model-detail #header-sort-controls,body.has-model-detail #top-sort-controls,body.has-model-detail #sort-context{display:none}
.prompt-headings{align-items:stretch}
.prompt-headings .sort-heading{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:10px 12px;border:1px solid #e2e5d9;border-radius:var(--radius-structure);background:#f0f2e9;min-width:0}
.prompt-headings .sort-heading>strong{font-size:13px;font-weight:650;line-height:1.3;letter-spacing:-.2px}
.prompt-headings .sort-heading[data-theme=selfie]{background:#e8eedf;border-color:#cddbbd}
.prompt-headings .sort-heading[data-theme=beach]{background:#f7eee0;border-color:#e9ddc8}
.prompt-headings .sort-heading[data-theme=mona-lisa]{background:#eee9e0;border-color:#dfd8cc}
.prompt-headings .sort-heading[data-theme=raccoon]{background:#e9eff0;border-color:#d3dfe0}
.prompt-headings .sort-heading[data-theme=pelican]{background:#f1f1eb}
.prompt-headings .sort-heading>small{color:var(--muted)}
.prompt-headings .model-sort-heading{position:sticky;left:0;z-index:4;background:#fffefa;border-color:transparent;padding:4px 0;gap:6px}
.model-sort-heading .sort-picker{display:block}
.model-sort-heading .sort-picker>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.model-sort-heading .sort-picker .benchmark-sort-select{width:100%;min-height:32px;padding:6px 25px 6px 8px;background-position:right 7px center;border-radius:var(--radius-control);font-size:11px}
.model-sort-heading .sort-direction{width:32px;min-width:32px;min-height:32px;border-radius:var(--radius-control)}
.model-sort-heading .sort-direction>[aria-hidden]{font-size:18px}
/* Keep focus inside the controls, clear of the sticky column's edge mask. */
.model-sort-heading .sort-picker .benchmark-sort-select:focus-visible,.model-sort-heading .sort-direction:focus-visible{border-color:var(--olive);outline-offset:-3px;box-shadow:none}
.sort-heading[hidden]{display:none}
.model-quality.is-selection-score{padding:10px;border-radius:var(--radius-label);background:#e8efdf;border:1px solid #bbccaa}
.selection-score-label{display:block;color:#314b2c;font-size:11px;line-height:1.45;font-weight:650;overflow-wrap:anywhere}
.model-quality .selection-overall{border-top:1px solid #c6d4b9;margin-top:5px;padding-top:6px;line-height:1.4;color:#5e6e55}
.model-quality strong.selection-unrated{font-size:15px;line-height:1.4;letter-spacing:0}
.model-quality>.model-overall-rank{display:inline-flex;align-items:center;gap:7px;width:fit-content;max-width:100%;padding:4px 6px;margin-top:3px;border:1px solid #cbd6bf;border-radius:var(--radius-label);background:#e8eedf;color:#344d31;font-size:10px;line-height:1.3;font-weight:500;letter-spacing:0;white-space:nowrap}
.model-overall-rank b{font-size:14px;font-weight:650;font-variant-numeric:tabular-nums}
.mobile-family-picker{display:none}
@media(max-width:950px){
  .mobile-sort-options .header-sort-controls{grid-column:1/-1;gap:10px}
  .mobile-family-picker{display:block;margin-top:14px;border-top:1px solid var(--line)}
  .mobile-family-picker summary{display:flex;align-items:center;gap:10px;min-height:44px;list-style:none;cursor:pointer;font-size:14px;color:var(--olive)}
  .mobile-family-picker summary::-webkit-details-marker{display:none}
  .mobile-family-picker summary:after{content:'+';margin-left:auto;font-size:20px}
  .mobile-family-picker[open] summary:after{content:'−'}
  #mobile-family-count{font-size:12px;color:var(--muted)}
  .mobile-family-picker summary:focus-visible{outline:2px solid var(--olive);outline-offset:2px}
  .mobile-family-selection{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;border:0;padding:8px 0 0;margin:0}
  .mobile-family-selection button{min-height:44px;padding:8px;border:1px solid var(--line);border-radius:var(--radius-control);font:inherit;font-size:13px;line-height:1.3;background:var(--white);color:var(--ink);cursor:pointer}
  .mobile-family-selection [data-all-families]{grid-column:1/-1}
  .mobile-family-selection button:focus-visible{outline:2px solid var(--olive);outline-offset:2px}
  .mobile-family-selection button[aria-pressed=true]{background:var(--olive);color:white;border-color:var(--olive)}
  .sort-picker .benchmark-sort-select{width:100%;max-width:none;min-height:44px;font-size:16px}
  .sort-direction{width:44px;min-width:44px;min-height:44px}
  .model-label>.model-quality.is-selection-score{max-width:130px;padding:7px;border:1px solid #bbccaa}
  .model-quality.is-selection-score .selection-score-label{font-size:10px}
}
@media(forced-colors:active){
  .sort-picker .benchmark-sort-select{appearance:auto;background-image:none;padding-right:12px}
}
