:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-subtle: #f8fafb;
  --text: #17202a;
  --muted: #62707d;
  --faint: #88939d;
  --border: #dce2e6;
  --border-strong: #c8d0d6;
  --accent: #176b55;
  --accent-hover: #0f5744;
  --accent-soft: #e7f3ee;
  --blue: #2563a6;
  --blue-soft: #eaf2fb;
  --warning: #9a5b06;
  --warning-soft: #fff4db;
  --danger: #a43d3d;
  --danger-soft: #fcecec;
  --shadow: 0 12px 30px rgb(22 34 44 / 10%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111619;
  --surface: #181e22;
  --surface-subtle: #20272b;
  --text: #edf1f3;
  --muted: #aab4ba;
  --faint: #7e898f;
  --border: #30383d;
  --border-strong: #465158;
  --accent: #52b794;
  --accent-hover: #68c6a5;
  --accent-soft: #193a31;
  --blue: #77aee4;
  --blue-soft: #1c3145;
  --warning: #efbd65;
  --warning-soft: #3c2e16;
  --danger: #ef9090;
  --danger-soft: #3d2023;
  --shadow: 0 16px 34px rgb(0 0 0 / 30%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 38%, transparent); outline-offset: 2px; }

.app-header { position: sticky; top: 0; z-index: 30; height: 58px; background: color-mix(in srgb, var(--surface) 95%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.header-inner { width: min(1480px, 100%); height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; min-width: 178px; text-decoration: none; }
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand-wordmark { color: var(--text); font-size: 24px; font-weight: 800; white-space: nowrap; }
.brand-wordmark sup { position: relative; top: -.28em; margin-left: 1px; color: var(--accent); font-size: .62em; line-height: 0; }
.brand small { color: var(--muted); font-size: 15.4px; margin-top: 2px; }
.app-nav { display: flex; align-self: stretch; align-items: center; gap: 6px; }
.app-nav a, .app-nav button { height: 100%; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; }
.app-nav .is-current { color: var(--text); border-bottom-color: var(--accent); font-weight: 650; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.icon-button { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; padding: 6px 8px; border-radius: 5px; background: #17202a; color: white; font-size: 16.8px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-2px); transition: 120ms ease; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; transform: translateY(0); }
.status-button { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 18.2px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status-button.is-healthy .health-dot { background: var(--accent); }
.status-button.is-warning .health-dot { background: var(--warning); }
.status-button.is-error .health-dot { background: var(--danger); }
.live-refresh-button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 18.2px; font-weight: 650; color: var(--muted); }
.live-refresh-button:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.refresh-pulse { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: pulse-spin 5s linear infinite; }
.live-refresh-button.is-refreshing .refresh-pulse { animation-duration: .7s; }
@keyframes pulse-spin { 0% { transform: rotate(0deg); } 8% { transform: rotate(360deg); } 100% { transform: rotate(360deg); } }

.app-main { width: min(1480px, 100%); min-height: calc(100vh - 112px); margin: 0 auto; padding: 18px 24px 32px; }
.status-strip { min-height: 52px; display: flex; align-items: center; gap: 0; padding: 8px 0; border-bottom: 1px solid var(--border); }
.status-strip > div { min-width: 154px; padding-right: 24px; margin-right: 24px; border-right: 1px solid var(--border); }
.status-strip span, .status-strip strong { display: block; }
.status-strip span { color: var(--muted); font-size: 15.4px; }
.status-strip strong { margin-top: 3px; font-size: 18.2px; font-weight: 650; }
.status-strip p { margin-left: auto; color: var(--muted); font-size: 16.8px; }
.inline-alert { margin-top: 12px; padding: 9px 12px; border: 1px solid #e7c780; border-radius: 5px; background: var(--warning-soft); color: var(--warning); font-size: 18.2px; }

.search-section { padding: 18px 0 0; }
.search-row { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; gap: 9px; align-items: center; }
.search-combobox { position: relative; }
.search-icon { position: absolute; left: 14px; top: 50%; z-index: 1; display: grid; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
#model-search { width: 100%; height: 44px; padding: 0 42px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 21px; }
#model-search:focus { border-color: var(--blue); outline: 3px solid color-mix(in srgb, var(--blue) 15%, transparent); }
.suggestions { position: absolute; z-index: 50; top: calc(100% + 5px); left: 0; right: 0; overflow: hidden; max-height: 430px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.suggestion-item { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; cursor: pointer; }
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover, .suggestion-item.is-active { background: var(--accent-soft); }
.suggestion-main { min-width: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18.2px; }
.suggestion-meta, .suggestion-empty { color: var(--muted); font-size: 16.8px; white-space: nowrap; }
.suggestion-empty { padding: 16px; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 650; font-size: 18.2px; white-space: nowrap; }
.button-primary { background: var(--accent); color: white; }
.button-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button:hover { filter: brightness(.97); }
.family-tabs { display: flex; gap: 2px; overflow-x: auto; padding-top: 12px; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.family-tabs button { flex: 0 0 auto; min-height: 38px; padding: 0 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 18.2px; }
.family-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); font-weight: 700; }

.compare-toolbar { padding: 16px 0 12px; }
.result-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 13px; }
.result-heading h1 { max-width: 100%; margin: 0; overflow-wrap: anywhere; font-size: 25.2px; line-height: 1.35; }
.result-heading p { margin: 4px 0 0; color: var(--muted); font-size: 16.8px; }
.toolbar-controls { display: flex; align-items: center; gap: 9px; }
.segmented { display: inline-flex; flex: 0 0 auto; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-subtle); }
.segmented button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 16.8px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(20 30 36 / 12%); font-weight: 700; }
.filter-panel { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.filter-panel > label { display: flex; align-items: center; gap: 5px; }
.filter-panel label > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
select { min-width: 128px; height: 36px; padding: 0 28px 0 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 16.8px; }
.stale-toggle { min-height: 36px; padding: 0 6px; color: var(--muted); font-size: 16.8px; cursor: pointer; white-space: nowrap; }
.stale-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.filter-panel-header, .sheet-clear, .mobile-filter, .mobile-sort-bar { display: none; }

.content { padding-top: 12px; }
.offer-table-wrap, .model-table-wrap { overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--surface-subtle); color: var(--muted); font-size: 15.4px; font-weight: 650; text-align: left; }
td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 16.8px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.offer-table th:nth-child(1) { width: 5%; }
.offer-table th:nth-child(2) { width: 10%; }
.offer-table th:nth-child(3) { width: 18%; }
.offer-table th:nth-child(4) { width: 21%; }
.offer-table th:nth-child(5) { width: 9%; }
.offer-table th:nth-child(6) { width: 11%; }
.offer-table th:nth-child(7) { width: 13%; }
.offer-table th:nth-child(8) { width: 13%; }
.is-minimum td { background: color-mix(in srgb, var(--accent-soft) 52%, var(--surface)); }
.col-rank { color: var(--faint); font-variant-numeric: tabular-nums; }
.site-name, .site-backend, .raw-rate, .rate-formula, .time-line { display: block; }
.site-name { overflow-wrap: anywhere; font-size: 18.2px; }
.site-backend, .rate-formula { margin-top: 3px; color: var(--muted); font-size: 14px; }
.raw-group-name { overflow-wrap: anywhere; font-weight: 650; line-height: 1.35; }
.classification-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.classification-tag, .status-badge, .minimum-label { display: inline-flex; align-items: center; width: fit-content; min-height: 20px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; line-height: 1.2; }
.classification-tag.is-inferred { border-style: dashed; }
.tag-provider { color: var(--blue); background: var(--blue-soft); }
.tag-modality { color: var(--accent); background: var(--accent-soft); }
.classification-meta { margin-top: 5px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.confidence-note { margin-left: 5px; }
.model-id-list { display: grid; gap: 4px; }
.model-id-list.is-collapsed { max-height: 73px; overflow: hidden; }
.raw-model-id { display: block; color: var(--text); background: transparent; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15.4px; line-height: 1.45; overflow-wrap: anywhere; white-space: normal; }
.model-id-highlight { padding: 0 2px; border-radius: 2px; background: var(--warning-soft); color: var(--text); font-weight: 750; }
.model-list-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 14px; font-weight: 650; cursor: pointer; }
.model-list-toggle svg { transition: transform 140ms ease; }
.model-list-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.effective-rate { display: block; color: var(--accent); font-size: 23.8px; font-variant-numeric: tabular-nums; }
.minimum-label { margin-top: 4px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); color: var(--accent); background: var(--accent-soft); }
.raw-rate { font-variant-numeric: tabular-nums; }
.time-line { display: flex; gap: 7px; margin: 2px 0; }
.time-value { white-space: nowrap; }
.time-line.is-stale .time-value { color: var(--warning); font-weight: 700; }
.external-button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; max-width: 124px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface); color: var(--text); text-decoration: none; font-size: 16.8px; font-weight: 700; white-space: nowrap; }
.external-button.link-invite { border-color: var(--accent); background: var(--accent); color: white; }
.external-button.link-invite:hover { background: var(--accent-hover); }
.external-button.is-disabled { color: var(--faint); background: var(--surface-subtle); cursor: not-allowed; }
.status-stale { color: var(--warning); background: var(--warning-soft); }
.status-degraded { color: var(--danger); background: var(--danger-soft); }
.status-healthy { color: var(--accent); background: var(--accent-soft); }

.model-index .section-heading { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.section-title { margin: 0; font-size: 23.8px; }
.section-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 16.8px; }
.model-table th:nth-child(1) { width: 48%; }
.model-table th:nth-child(2) { width: 14%; }
.model-table th:nth-child(3), .model-table th:nth-child(4) { width: 9%; }
.model-table th:nth-child(5) { width: 14%; }
.model-table th:nth-child(6) { width: 6%; }
.model-select-button { max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--blue); text-align: left; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.model-alias-note { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.count-cell, .model-rate-cell { font-variant-numeric: tabular-nums; }
.model-rate-cell { color: var(--accent); font-size: 19.6px; font-weight: 700; }
.model-row-action { text-align: right; }
.icon-button.compact { width: 32px; height: 32px; }
.family-badge { color: var(--muted); font-size: 15.4px; }

.loading-state { overflow: hidden; min-height: 400px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.skeleton-row { min-height: 58px; display: flex; align-items: center; gap: 8%; padding: 0 16px; border-bottom: 1px solid var(--border); }
.skeleton { height: 9px; border-radius: 3px; background: var(--border); animation: pulse 1.3s ease-in-out infinite alternate; }
.skeleton-wide { width: 36%; } .skeleton-mid { width: 20%; } .skeleton-short { width: 10%; }
@keyframes pulse { to { opacity: .42; } }
.empty-state { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); text-align: center; }
.empty-state svg { color: var(--muted); }
.empty-title { margin: 13px 0 0; font-size: 23.8px; }
.empty-detail { max-width: 480px; margin: 7px 0 18px; color: var(--muted); line-height: 1.6; }
.app-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 15.4px; }
.app-footer p { width: min(1480px, 100%); margin: 0 auto; padding: 16px 24px; }

.overlay { position: fixed; z-index: 60; inset: 0; background: rgb(0 0 0 / 38%); }
.drawer { position: fixed; z-index: 70; top: 0; right: 0; width: min(440px, 100%); height: 100vh; overflow-y: auto; padding: 20px; border-left: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); transform: translateX(100%); transition: transform 160ms ease; }
.drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--border); }
.drawer-header span { color: var(--muted); font-size: 15.4px; }
.drawer-header h2 { margin: 3px 0 0; font-size: 25.2px; }
.health-summary { display: flex; flex-direction: column; gap: 5px; padding: 17px 0; }
.health-summary span { color: var(--muted); font-size: 16.8px; }
.health-list { border-top: 1px solid var(--border); }
.health-row { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.health-site strong, .health-site span { display: block; }
.health-site span { margin-top: 4px; color: var(--muted); font-size: 15.4px; line-height: 1.5; }
.health-row-status { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; max-width: calc(100% - 24px); padding: 10px 14px; border-radius: 6px; background: #17202a; color: white; box-shadow: var(--shadow); transform: translateX(-50%); font-size: 18.2px; }
.is-refreshing svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1119px) {
  .app-nav { display: none; }
  .toolbar-controls { flex-wrap: wrap; }
  .filter-panel { width: 100%; margin-left: 0; }
  select { flex: 1; min-width: 110px; }
  .offer-table th:nth-child(1) { width: 4%; }
  .offer-table th:nth-child(2) { width: 11%; }
  .offer-table th:nth-child(3) { width: 18%; }
  .offer-table th:nth-child(4) { width: 20%; }
}

@media (max-width: 719px) {
  .app-header { height: 54px; }
  .header-inner { padding: 0 12px; gap: 8px; }
  .brand { min-width: 74px; margin-right: auto; }
  .brand small { display: none; }
  .brand-wordmark { font-size: 20px; }
  .icon-button { width: 36px; height: 36px; }
  .live-refresh-button { min-height: 36px; padding: 0 9px; font-size: 14px; }
  .refresh-pulse { width: 13px; height: 13px; }
  [data-tooltip]::after { display: none; }
  .app-main { padding: 10px 12px 24px; }
  .search-section { padding-top: 12px; }
  .search-row { grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 6px; }
  #model-search { height: 42px; padding-left: 39px; padding-right: 10px; font-size: 18.2px; }
  .search-row .button { min-width: 40px; width: 40px; padding: 0; font-size: 0; }
  .search-row .button svg { width: 17px; height: 17px; }
  .family-tabs { padding-top: 7px; }
  .family-tabs button { min-height: 37px; padding: 0 11px; }
  .compare-toolbar { padding-top: 12px; }
  .result-heading { margin-bottom: 10px; }
  .result-heading h1 { font-size: 21px; }
  .result-heading p { font-size: 15.4px; line-height: 1.45; }
  .content { padding-top: 9px; }
  .mobile-sort-bar { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 8px; padding: 1px 0 4px; scrollbar-width: thin; }
  .mobile-sort-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; min-height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 14px; cursor: pointer; }
  .mobile-sort-button.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .offer-table-wrap, .model-table-wrap { border-radius: 5px; }
  .offer-table, .offer-table tbody, .offer-table tr, .offer-table td { display: block; }
  .offer-table thead { display: none; }
  .offer-table tr { position: relative; min-height: 246px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "rank site effective" "group group group" "model model model" "raw raw raw" "time time action"; gap: 9px 10px; padding: 13px 10px; border-bottom: 1px solid var(--border); }
  .offer-table tr:last-child { border-bottom: 0; }
  .offer-table td { padding: 0; border: 0; background: transparent !important; }
  .col-rank { grid-area: rank; }
  .col-site { grid-area: site; }
  .col-group { grid-area: group; }
  .col-model { grid-area: model; }
  .col-effective { grid-area: effective; text-align: right; }
  .col-raw { grid-area: raw; display: flex !important; align-items: baseline; gap: 8px; min-width: 0; }
  .col-time { grid-area: time; align-self: end; }
  .col-action { grid-area: action; align-self: end; text-align: right; }
  .site-name { font-size: 18.2px; }
  .effective-rate { font-size: 25.2px; }
  .model-id-list { gap: 5px; }
  .model-id-list.is-collapsed { max-height: 132px; }
  .raw-model-id { min-height: 35px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-subtle); font-size: 14px; }
  .external-button { min-width: 94px; min-height: 40px; }
  .raw-rate { flex: 0 0 auto; }
  .rate-formula { margin-top: 0; overflow-wrap: anywhere; }
  .time-line { display: block; }
  .time-line + .time-line { margin-top: 4px; }
  .time-label { margin-right: 4px; }
  .model-table th:nth-child(2) { display: none; }
  .model-table th:nth-child(1) { width: 58%; }
  .model-table th:nth-child(3), .model-table th:nth-child(4) { width: 10%; }
  .model-table th:nth-child(5) { width: 18%; }
  .model-table th:nth-child(6) { width: 4%; }
  .model-table td:nth-child(2) { display: none; }
  .model-table th, .model-table td { padding: 10px 7px; font-size: 15.4px; }
  .model-row-action .icon-button { display: none; }
  .empty-state { min-height: 310px; padding: 20px; }
  .app-footer p { padding: 14px 12px; line-height: 1.5; }
  .drawer { padding: 16px 12px; }
}

.modality-tabs { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 14px; }
.modality-tabs button { min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 15.4px; font-weight: 650; cursor: pointer; }
.modality-tabs button:hover { color: var(--text); background: var(--surface-subtle); }
.modality-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.sort-header-wrap { display: inline-flex; align-items: center; gap: 6px; }
.sort-header { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.sort-header:hover { color: var(--text); }
.sort-header.is-active { color: var(--accent); }
.sort-header svg { flex: none; }
.info-hint { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 800; font-style: italic; line-height: 1; opacity: .65; cursor: help; }
.info-hint:hover { opacity: 1; }

@media (max-width: 719px) {
  .modality-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 4px; margin-top: 8px; padding-bottom: 2px; scrollbar-width: thin; }
  .modality-tabs button { flex: 0 0 auto; padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
