:root {
  color-scheme: dark;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: #0b1013;
  color: #dbe5e8;
  --bg: #0b1013;
  --surface: #111a1e;
  --surface-raised: #172328;
  --surface-hover: #1c3038;
  --surface-selected: #203f49;
  --line: rgba(255, 255, 255, 0.09);
  --text: #dbe5e8;
  --muted: #8fa3aa;
  --soft: #a9bcc1;
  --accent: #8fd0df;
  --good: #72d39b;
  --warn: #f0be72;
  --shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 16px rgba(0, 0, 0, 0.16);
  --radius-control: 3px;
  --radius-surface: 4px;
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-width: 320px; margin: 0; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button, input, textarea, select { color: var(--text); }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: #0e161a;
  border-right: 1px solid var(--line);
}

.brand { padding: 3px 2px 0; }
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: pretty;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2, h3 { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1 { color: #f0f6f7; font-size: 21px; line-height: 1.15; font-weight: 650; }
h2 { color: #edf5f6; font-size: 15px; line-height: 1.2; font-weight: 650; }
h3 { color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.brand-copy { margin-top: 8px; color: var(--muted); font-size: 12px; text-wrap: pretty; }

.search-label, .filter-section h2, .source-section h2 { color: var(--soft); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.search-label { display: block; margin-bottom: 6px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; top: 12px; left: 11px; width: 16px; height: 16px; stroke: var(--muted); stroke-width: 1.8; fill: none; pointer-events: none; }
input[type="search"], textarea {
  width: 100%;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: var(--shadow-border);
}
input[type="search"] { min-height: 40px; padding: 0 10px 0 35px; }
textarea { min-height: 148px; padding: 9px; resize: vertical; }
input[type="search"]::placeholder, textarea::placeholder { color: #6f858c; }

select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: var(--shadow-border);
}

.filter-section, .source-section { display: grid; gap: 8px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; }
.provider-buttons { display: grid; gap: 5px; }
.provider-button, .secondary-button, .reset-button, .text-button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-control);
  transition-property: scale, background-color, color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.provider-button, .secondary-button {
  background: var(--surface-raised);
  box-shadow: var(--shadow-border);
}
.provider-button:hover, .secondary-button:hover { background: var(--surface-hover); box-shadow: var(--shadow-hover); }
.provider-button:active, .secondary-button:active, .reset-button:active, .text-button:active { scale: 0.96; }
.provider-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 12px;
  color: var(--soft);
  text-align: left;
}
.provider-button span { color: var(--muted); font-variant-numeric: tabular-nums; }
.provider-button.is-selected { color: var(--accent); background: #1b343d; box-shadow: 0 0 0 1px rgba(143, 208, 223, 0.2); }
.provider-button.is-selected span { color: #b9e7f0; }
.variant-section { gap: 5px; }
.variant-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--soft);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: var(--shadow-border);
  cursor: pointer;
  transition-property: background-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.variant-toggle:hover { background: var(--surface-hover); box-shadow: var(--shadow-hover); }
.variant-toggle input {
  appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 2px;
  background: #0d171b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.variant-toggle input:checked { background: var(--accent); box-shadow: 0 0 0 1px rgba(143, 208, 223, 0.45); }
.variant-toggle input:checked::after { content: "✓"; display: block; color: #102126; font-size: 12px; font-weight: 900; line-height: 14px; text-align: center; }
.group-section { gap: 6px; }
.group-note { color: var(--muted); font-size: 11px; line-height: 1.45; text-wrap: pretty; }
.account-model-toggle:has(input:disabled) { cursor: default; opacity: 0.55; }
.reset-button, .text-button { padding: 0; color: var(--accent); background: transparent; box-shadow: none; }
.reset-button { min-height: 28px; font-size: 11px; }
.text-button { justify-self: start; min-height: 30px; font-size: 11px; text-decoration: underline; text-decoration-color: rgba(143, 208, 223, 0.35); text-underline-offset: 3px; }

.source-section { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.snapshot-meta { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; text-wrap: pretty; }
.secondary-button { width: 100%; padding: 0 12px; color: var(--text); text-align: left; }
.paste-panel { display: grid; gap: 7px; }
.paste-panel[hidden] { display: none; }
.paste-panel label { color: var(--muted); font-size: 11px; line-height: 1.45; text-wrap: pretty; }
.paste-guide { display: grid; gap: 3px; margin: 0; padding-left: 20px; color: var(--soft); font-size: 11px; line-height: 1.4; text-wrap: pretty; }

.content { min-width: 0; padding: 18px; }
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.status { color: var(--good); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; text-wrap: pretty; }
.status.is-warning { color: var(--warn); }

.table-surface { overflow: hidden; border-radius: var(--radius-surface); background: var(--surface); box-shadow: var(--shadow-border); }
.table-summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; font-variant-numeric: tabular-nums; }
.table-summary h3 span { color: var(--text); }
.table-wrap { max-height: calc(100dvh - 126px); overflow: auto; overscroll-behavior: contain; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; color: var(--muted); background: #18252a; font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-align: left; text-transform: uppercase; }
tbody tr { transition-property: background-color; transition-duration: 120ms; transition-timing-function: ease-out; }
tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
tbody tr:last-child td { border-bottom: 0; }
.model-name { color: #eef5f6; font-weight: 650; }
.provider-tag { display: inline-flex; min-width: 82px; justify-content: center; padding: 3px 6px; border-radius: 2px; color: var(--soft); background: rgba(143, 208, 223, 0.08); font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }
.provider-tag.openai { color: #bcead0; background: rgba(114, 211, 155, 0.11); }
.provider-tag.anthropic { color: #f2cc9f; background: rgba(240, 190, 114, 0.11); }
.provider-tag.grok { color: #c4d5fa; background: rgba(124, 155, 232, 0.12); }
.provider-tag.gemini { color: #e2c3f1; background: rgba(196, 129, 220, 0.12); }
.release-tag { color: var(--muted); font-variant-numeric: tabular-nums; }
.number { color: #e5f2f4; font-variant-numeric: tabular-nums; text-align: right; }
.muted-value { color: #60777f; }
.empty-state { padding: 28px 12px; color: var(--muted); text-align: center; text-wrap: pretty; }

@media (max-width: 780px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { gap: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .provider-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-section { margin-top: 0; padding-top: 14px; }
  .content { padding: 12px; }
  .table-wrap { max-height: 62dvh; }
}
