/* Model comparison table (models section). */
.mt-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-search { min-width: 260px; color: var(--faint); }
.mt-search:focus-within { border-color: #cfd4da; box-shadow: 0 0 0 3px rgba(214, 255, 98, .45); }
.mt-search input { color: var(--ink); min-width: 0; }
.mt-search input::placeholder { color: var(--faint); }
.mt-search input::-webkit-search-cancel-button { cursor: pointer; }
.mt-csv { height: 44px; padding: 0 16px; font-weight: 500; color: var(--ink); }
.mt-csv:disabled { opacity: .5; cursor: default; }
.mt-scope { height: 44px; align-items: center; }

.mt-card { padding: 0; overflow: hidden; }
.mt-bar { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.mt-bar:empty { display: none; }
.mt-viewnote { display: flex; align-items: center; gap: 7px; flex: 1 1 320px; margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.mt-viewnote svg { flex: none; color: var(--faint); }
.mt-viewnote.mt-caveat { color: #9a3412; }
.mt-viewnote.mt-caveat svg { color: #d97706; }
.mt-frame { position: relative; }
.mt-frame::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 56px; pointer-events: none; opacity: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96)); transition: opacity .2s; z-index: 4; }
.mt-frame.mt-shade-r::after { opacity: 1; }
.mt-scroll { overflow: auto; max-height: min(860px, calc(100vh - 160px)); min-height: 280px; overscroll-behavior-x: contain; }
.mt-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

.mt-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13.5px; color: var(--ink-2); }
.mt-table th, .mt-table td { text-align: left; white-space: nowrap; background: #fff; }
.mt-table thead th { position: sticky; top: 0; z-index: 2; background: #f7f8fa; border-bottom: 1px solid var(--line);
  padding: 0; vertical-align: bottom; font-weight: 600; }
.mt-table thead th.mt-c-model { left: 0; z-index: 3; }
.mt-sort { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: 66px;
  padding: 16px 16px 13px; cursor: pointer; }
.mt-sort:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; border-radius: 8px; }
.mt-th { display: inline-flex; align-items: flex-end; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.mt-lbl { white-space: pre; }
.mt-chev { color: var(--faint); flex: none; margin-bottom: 3px; }
.mt-arrow { display: none; flex: none; margin-bottom: 2px; color: var(--ink); transition: transform .15s; }
.mt-sort:hover .mt-chev { color: var(--ink-2); }
th.mt-on .mt-chev { display: none; }
th.mt-on .mt-arrow { display: block; }
th.mt-on.mt-asc .mt-arrow { transform: rotate(180deg); }
.mt-unit { font-size: 11px; font-weight: 400; color: var(--faint); line-height: 1.2; }

.mt-table tbody th, .mt-table tbody td { padding: 10px 16px; height: 60px; border-bottom: 1px solid var(--line-2); font-weight: 400; }
.mt-table tbody tr:last-child > * { border-bottom: 0; }
.mt-table tbody .mt-c-model { position: sticky; left: 0; z-index: 1; padding-left: 15px; min-width: 236px; }
.mt-c-model::after { content: ""; position: absolute; top: 0; bottom: -1px; right: -10px; width: 10px; pointer-events: none; opacity: 0;
  background: linear-gradient(to right, rgba(16, 24, 40, .07), rgba(16, 24, 40, 0)); transition: opacity .2s; }
.mt-shade-l .mt-c-model::after { opacity: 1; }
.mt-vbar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.mt-vbar-ref { width: 0; background: none; border-left: 3px dashed; }
.mt-table tbody tr:first-child .mt-vbar { top: 0; }

.mt-table tbody tr.mt-click { cursor: pointer; }
.mt-table tbody tr.mt-click:hover > * { background: #f8f9fb; }
.mt-table tbody tr.mt-pick > * { background: #f9fee9; }
.mt-table tbody tr.mt-pick:hover > * { background: #f3fcd6; }

.mt-model-in { display: flex; align-items: center; gap: 11px; }
.mt-model-txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.mt-name { all: unset; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 550; color: var(--ink);
  line-height: 1.3; border-radius: 4px; }
button.mt-name { cursor: pointer; }
button.mt-name:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
tr.mt-click:hover button.mt-name { text-decoration: underline; text-decoration-color: #c4cad3; text-underline-offset: 3px; }
.mt-star { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: var(--lime);
  color: var(--ink); font-size: 10.5px; line-height: 1; }
.mt-variant { font-size: 12px; color: var(--muted); line-height: 1.3; }
.mt-engine { align-self: flex-start; margin-top: 4px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: #f4f6f8;
  font-size: 11px; font-weight: 500; line-height: 18px; color: var(--muted); white-space: nowrap; }
/* Notes stay readable but can't widen the sticky model column: two lines at most, the full text on hover. */
.mt-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; max-width: 236px;
  margin-top: 2px; font-size: 11.5px; line-height: 1.38; color: var(--faint); white-space: normal; }

.mt-main { display: block; line-height: 1.3; }
.mt-sub { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.3; margin-top: 2px; }
.mt-num { font-variant-numeric: tabular-nums; }
.mt-strong { font-weight: 650; color: var(--ink); font-size: 14px; }
.mt-ci { margin-left: 7px; font-size: 11.5px; color: var(--faint); }
.mt-partial { margin-left: 6px; font-size: 10.5px; font-weight: 600; color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 5px; padding: 0 5px; vertical-align: 1px; }
.mt-na { color: #b4bbc6; }
.mt-muted { color: var(--faint); }
.mt-count-n { margin-left: 4px; font-size: 11px; color: var(--faint); }

/* status chips */
.mt-st { font-size: 12px; }
.mt-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.mt-st-done .mt-dot { background: var(--good); }
.mt-st-speed { background: #f4f6f8; color: var(--ink-2); }
.mt-st-speed .mt-dot { background: #94a3b8; }
.mt-st-queued .mt-dot { background: #b4bbc6; }
.mt-st-waiting { background: #f3f2ff; border-color: #dcd9fb; color: #4338ca; }
.mt-st-cloud { background: #fff; border-color: var(--ink); color: var(--ink); font-weight: 550; }
.mt-cloud { flex: none; }
.mt-st-running .mt-dot { background: var(--ink); animation: mt-pulse 1.4s ease-in-out infinite; }
@keyframes mt-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .mt-st-running .mt-dot { animation: none; } }

.mt-empty { position: sticky; left: 0; display: grid; place-items: center; height: 160px; padding: 0 20px; text-align: center;
  color: var(--faint); font-size: 14px; }
.mt-empty[hidden] { display: none; }
.mt-foot { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding: 13px 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); background: #fff; }
.mt-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.mt-leg-ref { display: inline-block; height: 13px; margin-right: 7px; border-left: 3px dashed var(--muted); vertical-align: -2px; }
.mt-cov { padding: 12px 20px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.mt-cov-h { font-weight: 600; color: var(--ink-2); }
.mt-cov ul { margin: 4px 0 0; padding-left: 18px; }
.mt-cov li + li { margin-top: 2px; }
.mt-cov b { font-weight: 600; color: var(--ink-2); }

@media (max-width: 640px) {
  .mt-scope { order: 1; flex: 1 1 auto; }
  .mt-scope button { flex: 1 1 0; }
  .mt-csv { order: 2; flex: 0 0 auto; justify-content: center; }
  .mt-search { order: 3; min-width: 0; flex: 1 1 100%; }
  .mt-table tbody .mt-c-model { min-width: 0; max-width: 200px; white-space: normal; }
  .mt-table tbody th, .mt-table tbody td { padding: 10px 12px; }
  .mt-sort { padding: 14px 12px 12px; }
  .mt-foot { padding: 12px 16px; }
  .mt-bar { padding: 12px 16px; }
  .mt-bar .mt-view { width: 100%; }
  .mt-bar .mt-view button { flex: 1 1 0; }
  .mt-viewnote { align-items: flex-start; flex-basis: 100%; }
  .mt-viewnote svg { margin-top: 2px; }
  .mt-cov { padding: 12px 16px 14px; }
}
