.toolbar,.query-tools,.mode-control,.list-meta,.pair-choices { display: flex; align-items: center }
.toolbar { justify-content: space-between; gap: 14px; padding: 20px 0; flex-wrap: wrap }
.mode-control { border: 1px solid var(--edge); background: var(--base) }
.mode-control button { border: 0; min-height: 36px; padding: 6px 12px; font-size: 14px; background: transparent; white-space: nowrap }
.mode-control button + button { border-left: 1px solid var(--rule) }
.mode-control button[aria-pressed=true] { background: var(--tint); color: var(--accent-ink); box-shadow: inset 0 -2px var(--accent) }
.mode-control button:focus-visible { outline-offset: -3px }
.query-tools { gap: 8px; max-width: 100% }
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--edge); padding: 0 10px; width: clamp(158px,19vw,265px); min-width: 0; background: var(--paper) }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px }
.search input:not([type=checkbox]) { min-width: 0; width: 100%; border: 0; outline: 0; padding: 5px 0; min-height: 36px; font-size: 14px; background: transparent }
.glass { width: 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; flex: none }
.glass::after { content: ""; position: absolute; width: 6px; height: 1.5px; right: -4px; bottom: -2px; background: var(--muted); transform: rotate(45deg) }
.select-shell select,.filter-more select { font-size: 14px }
.filter-more { position: relative }
.filter-more summary { display: grid; place-items: center; list-style: none; border: 1px solid; border-color: var(--edge) var(--shadow) var(--shadow) var(--edge); width: 38px; height: 38px; cursor: pointer; background: var(--base); color: var(--muted) }
.filter-more summary::-webkit-details-marker { display: none }
.filter-more[open] summary,.filter-more[data-active] summary { border-color: var(--accent); color: var(--accent-ink) }
.filter-icon { position: relative; width: 15px; height: 9px; border-block: 1.5px solid currentColor }
.filter-icon::before,.filter-icon::after { content: ""; position: absolute; background: var(--base); width: 3px; height: 4px; border: 1px solid currentColor }
.filter-icon::before { left: 3px; top: -3px }
.filter-icon::after { right: 2px; bottom: -3px }
.menu { position: absolute; z-index: 3; right: 0; top: 43px; background: var(--paper); border: 1px solid var(--edge); padding: 12px; box-shadow: 2px 3px var(--shadow); display: grid; gap: 5px; min-width: 150px }
.menu label,.list-meta,.pair-choices label { font-size: 13px; color: var(--muted) }
.list-meta { justify-content: space-between; margin: -6px 0 8px; min-height: 26px }
.data-frame { background: var(--paper); border: 1px solid; border-color: var(--edge) var(--rule) var(--rule) var(--edge); overflow: hidden }
.scroll-table { overflow-x: auto }
.scroll-table:focus-visible { outline-offset: -3px }
table { width: 100%; border-collapse: collapse; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px }
thead { background: var(--soft); color: var(--accent-ink) }
th,td { padding: 11px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap }
thead th { height: 44px; font-weight: 500 }
th.text,td.text,th:first-child,td:first-child,th.model-cell { text-align: left }
th:first-child,td:first-child { width: 66px }
th.model-heading { width: 35% }
tbody tr:last-child > * { border-bottom: 0 }
tbody tr:hover,tbody tr:focus-within { background: var(--base) }
.sort,.model-name { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; border-radius: 0 }
.sort-mark { margin-left: 4px; color: var(--accent); font: 13px/1 var(--ui) }
tbody th,.strong { font-weight: 620 }
.strong { color: var(--accent-ink) }
.rank-cell,.model-source { color: var(--muted) }
.model-source { display: block; font-size: 12px; font-weight: 400 }
.model-name { max-width: 38ch; white-space: normal; overflow-wrap: anywhere; text-align: left; font-size: 15px; font-weight: 600; line-height: 1.45 }
.model-name:hover { text-decoration: underline; text-underline-offset: 3px }
.table-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: clamp(128px,20vh,200px); color: var(--muted); text-align: center; padding: 18px }
#pair-data { margin-top: 18px; overflow-x: auto }
#pair-data th,#pair-data td { padding: 7px 8px; overflow-wrap: anywhere; white-space: normal }
.pair-choices { align-items: flex-end; gap: 10px }
.pair-choices label { flex: 1; min-width: 0; display: grid; gap: 4px }
.pair-choices select { max-width: 100%; width: 100% }
#pair-history { margin-block: 14px 6px }
#continuation { height: 1px }
@media(max-width:760px) {
  .toolbar { align-items: flex-start; gap: 12px; padding: 15px 0 }
  .query-tools { flex: 1 1 100% }
  .search { width: auto; flex: 1 }
  .query-tools select { min-width: 95px }
  .mode-control button { padding-inline: 12px }
  .list-meta { margin: 0 0 8px }
  th,td { padding: 10px }
  .scroll-table { scrollbar-width: thin }
  .data-frame table { min-width: 510px }
  th:first-child,td:first-child { width: 46px }
}
@media(max-width:540px) {
  .data-frame table { min-width: 0; table-layout: fixed }
  .data-frame .compact-hide { display: none }
  .data-frame th,.data-frame td { padding: 10px 7px; font-size: 13px }
  .data-frame th:first-child,.data-frame td:first-child { width: 46px }
  .data-frame th.model-heading { width: 34% }
  .data-frame .model-name { font-size: 13px }
  .data-frame .model-source { font-size: 11px }
  .data-frame table.matches th:first-child,.data-frame table.matches td:first-child { width: 22% }
  .data-frame table.matches td { white-space: normal; overflow-wrap: anywhere }
  .data-frame .number-cell { overflow-wrap: anywhere; white-space: normal }
}
