/* ============================================================
 * 开智学堂 · LLM Architecture Tracker
 * Shadcn-inspired design · Warm stone neutrals + 开智红 accent
 * Light theme only
 * ============================================================ */

:root {
  /* Warm stone neutrals */
  --background: 30 20% 98%;          /* #FAFAF7 warm off-white */
  --foreground: 24 10% 15%;          /* #292524 */
  --card: 0 0% 100%;                 /* pure white cards */
  --card-foreground: 24 10% 15%;
  --popover: 0 0% 100%;
  --popover-foreground: 24 10% 15%;
  --muted: 30 14% 95%;               /* #F5F3F0 */
  --muted-foreground: 25 7% 40%;     /* #6F6661 */
  --subtle: 30 14% 97%;              /* #F9F7F5 */
  --accent: 30 14% 92%;              /* hover bg */
  --accent-foreground: 24 10% 15%;
  --border: 28 10% 88%;              /* #E4E0DA */
  --border-subtle: 28 10% 93%;
  --input: 28 10% 88%;

  /* 开智红 — primary brand */
  --primary: 354 72% 42%;            /* #B91E30 */
  --primary-hover: 354 74% 38%;      /* #AA1B2C */
  --primary-foreground: 0 0% 100%;
  --primary-soft: 354 80% 96%;       /* #FDEEF0 very soft red bg */

  --ring: 354 72% 42%;
  --radius: 0.5rem;

  /* Chart semantic palette — warm tones + 开智红 progression */
  --c-legacy-0: 30 8% 75%;           /* stone-300ish */
  --c-legacy-1: 25 6% 55%;           /* stone-500ish */
  --c-warm-1:   35 85% 58%;          /* amber-ish */
  --c-warm-2:   20 75% 52%;          /* orange */
  --c-primary:  354 72% 48%;         /* 开智红 */
  --c-purple:   280 40% 60%;         /* muted purple for outliers */
  --c-blue:     210 55% 52%;         /* muted teal-blue */
  --c-green:    145 40% 45%;         /* muted green */

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ===== Custom Scrollbars (warm, subtle) ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: hsl(28 10% 80%) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: hsl(28 10% 82%);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.15s;
}
*::-webkit-scrollbar-thumb:hover {
  background: hsl(354 40% 65%);
  background-clip: padding-box;
  border: 2px solid transparent;
}
*::-webkit-scrollbar-thumb:active {
  background: hsl(var(--primary));
  background-clip: padding-box;
  border: 2px solid transparent;
}
*::-webkit-scrollbar-corner { background: transparent; }

/* Thinner scrollbars inside cards and table */
.table-wrap::-webkit-scrollbar,
.side-body::-webkit-scrollbar,
.chart-tabs::-webkit-scrollbar {
  width: 8px; height: 8px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1, 'cv11' 1;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: hsl(var(--primary)); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }
input, select { font: inherit; color: inherit; }

.mono {
  font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* ===== Layout ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* ===== Header ===== */
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid hsl(var(--border));
}
.header-left { flex: 1; min-width: 0; }
.header-left h1 {
  font-size: 22px;
  font-weight: 700;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}
.header-left .subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
}
.header-left .subtitle b {
  color: hsl(var(--primary));
  font-weight: 600;
}
.header-right {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-shrink: 0;
}
.header-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.header-stat-value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--foreground));
  line-height: 1.1;
}
.header-stat-value.accent { color: hsl(var(--primary)); }
.header-stat-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-top: 2px;
}

/* ===== Card ===== */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid hsl(var(--border-subtle));
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--foreground));
}
.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.card-body { padding: 16px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-ghost {
  color: hsl(var(--muted-foreground));
}
.btn-ghost:hover {
  background: hsl(var(--accent));
  color: hsl(var(--foreground));
}
.btn-outline {
  border-color: hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
}
.btn-outline:hover {
  background: hsl(var(--muted));
}
.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}
.btn-primary:hover { background: hsl(var(--primary-hover)); }
.btn-link {
  color: hsl(var(--primary));
  padding: 2px 4px;
  font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }
.btn svg { width: 12px; height: 12px; }

/* ===== Filters Card ===== */
.filters-card {
  margin-bottom: 16px;
}
.filters-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filters-card[data-collapsed="true"] .filters-body { display: none; }
#filtersToggle svg {
  transition: transform 0.2s;
}
.filters-card[data-collapsed="true"] #filtersToggle svg {
  transform: rotate(-90deg);
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
}
.filter-label {
  flex-shrink: 0;
  width: 88px;
  padding-top: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
}
.filter-label-hint {
  font-weight: 400;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: hsl(var(--muted-foreground));
  margin-left: 4px;
}
.filter-controls {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== Chips (Badges) ===== */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  transition: all 0.12s;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}
.chip:hover {
  border-color: hsl(var(--primary) / 0.5);
  color: hsl(var(--foreground));
}
.chip.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.chip.muted {
  background: hsl(var(--muted));
  border-color: hsl(var(--border-subtle));
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* collapsed chip group (orgs / families) */
.chip-collapse {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.chip-collapse-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.chip-search {
  padding: 5px 10px;
  font-size: 12px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  min-width: 180px;
  outline: none;
  transition: border-color 0.15s;
}
.chip-search:focus { border-color: hsl(var(--primary)); }
.chip-collapse[data-expanded="false"] .chip-collapse-body { display: none; }

/* ===== Select (shadcn-style) ===== */
.select {
  padding: 6px 30px 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236F6661' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
}
.select:hover {
  border-color: hsl(var(--primary) / 0.4);
  background-color: hsl(var(--subtle));
}
.select:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}
.select:focus-visible {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}

.range-row { display: flex; align-items: center; gap: 8px; }
.range-sep { color: hsl(var(--muted-foreground)); font-size: 12px; font-weight: 500; }

/* ===== Tabs (main nav) ===== */
.tabs-nav {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  padding: 4px;
  background: hsl(var(--muted));
  border-radius: var(--radius);
  overflow-x: auto;
}
.tab {
  flex: 1;
  min-width: fit-content;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.tab:hover { color: hsl(var(--foreground)); }
.tab.active {
  background: hsl(var(--card));
  color: hsl(var(--primary));
  box-shadow: var(--shadow-sm);
}
.tab-emoji { font-size: 14px; }

/* ===== Tab Panels ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-intro-text h2 {
  font-size: 18px;
  font-weight: 600;
  color: hsl(var(--foreground));
  letter-spacing: -0.01em;
}
.panel-intro-text p {
  margin-top: 4px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  max-width: 680px;
}
.panel-intro-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.panel-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.panel-stat-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--primary));
  line-height: 1;
}
.panel-stat-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
  margin-top: 4px;
}

/* ===== Charts Grid ===== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.charts-grid-1 { grid-template-columns: 1fr; }
.charts-grid-3 { grid-template-columns: repeat(3, 1fr); }

.chart-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.chart-card-title {
  padding: 12px 16px 4px;
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--foreground));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.chart-card-title-hint {
  font-weight: 400;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
}
.chart-box {
  width: 100%;
  height: 260px;
}

.chart-insight {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 16px 14px;
  margin-top: auto;
  border-top: 1px solid hsl(var(--border-subtle));
  background: hsl(var(--subtle));
  font-size: 12.5px;
  line-height: 1.55;
  color: hsl(var(--foreground));
}
.chart-insight-icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1.4;
  filter: saturate(1.2);
}
.chart-insight-text { flex: 1; min-width: 0; }
.chart-insight-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--primary));
  margin-right: 8px;
  padding: 1px 6px;
  background: hsl(var(--primary-soft));
  border-radius: 3px;
  vertical-align: baseline;
}
.chart-insight-text b {
  color: hsl(var(--primary));
  font-weight: 600;
}

/* 图表阅读提示 How-to-read banner above charts */
.how-to-read {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: hsl(var(--primary-soft));
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: calc(var(--radius) - 2px);
  font-size: 12.5px;
  color: hsl(var(--foreground));
  line-height: 1.5;
}
.how-to-read-icon { flex-shrink: 0; font-size: 14px; }
.how-to-read b { color: hsl(var(--primary)); font-weight: 600; }

/* ===== Table ===== */
.table-wrap {
  overflow: auto;
  max-height: 640px;
  border-radius: var(--radius);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.data-table thead th {
  position: sticky;
  top: 0;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid hsl(var(--border));
  user-select: none;
  cursor: pointer;
  white-space: nowrap;
  z-index: 2;
}
table.data-table thead th:hover { background: hsl(var(--accent)); }
table.data-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid hsl(var(--border-subtle));
  color: hsl(var(--foreground));
  white-space: nowrap;
}
table.data-table tbody tr:hover td {
  background: hsl(var(--primary-soft));
}
td.mono-cell, th.mono-cell {
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', ui-monospace, Menlo, monospace;
  font-size: 12px;
}
td.col-model {
  font-weight: 500;
  color: hsl(var(--foreground));
  min-width: 180px;
}
.sort-arrow { display: inline-block; margin-left: 4px; font-size: 10px; color: hsl(var(--muted-foreground)); }
.expand-toggle { display: inline-block; margin-left: 8px; font-size: 9px; color: hsl(var(--muted-foreground)); transition: transform 0.15s; }
.expand-toggle.open { transform: rotate(90deg); color: hsl(var(--primary)); }

/* ===== Table Pagination ===== */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid hsl(var(--border-subtle));
  background: hsl(var(--subtle));
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  flex-wrap: wrap;
}
.pagination-info { font-variant-numeric: tabular-nums; }
.pagination-info b { color: hsl(var(--foreground)); font-weight: 600; }
.pagination-controls {
  display: flex;
  gap: 2px;
  align-items: center;
}
.page-btn {
  min-width: 32px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.12s;
  cursor: pointer;
}
.page-btn:hover:not(:disabled):not(.active) {
  background: hsl(var(--accent));
  border-color: hsl(var(--primary) / 0.4);
}
.page-btn.active {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-ellipsis {
  padding: 5px 4px;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}
.pagination-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.pagination-size select { font-size: 12px; padding: 4px 24px 4px 8px; }

.detail-row td { background: hsl(var(--subtle)); padding: 12px 16px !important; }
.detail-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 20px;
}
.detail-item { display: flex; flex-direction: column; gap: 2px; }
.detail-item-wide { grid-column: span 2; }
.detail-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted-foreground));
}
.detail-value { font-size: 13px; color: hsl(var(--foreground)); font-variant-numeric: tabular-nums; }
.hf-link {
  color: hsl(var(--primary));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hf-link:hover { text-decoration: underline; }

/* ===== Badge for species/arch type in table ===== */
.type-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}
.type-badge.species-decoder { background: hsl(var(--primary-soft)); color: hsl(var(--primary)); }
.type-badge.species-encoder { background: hsl(40 80% 92%); color: hsl(30 50% 30%); }
.type-badge.species-encdec { background: hsl(210 70% 94%); color: hsl(210 50% 35%); }
.type-badge.species-nontrans { background: hsl(280 35% 94%); color: hsl(280 30% 40%); }
.type-badge.arch-moe { background: hsl(30 85% 93%); color: hsl(25 75% 40%); }

/* ===== Compare View ===== */
.compare-section { display: flex; flex-direction: column; gap: 16px; }
.compare-select-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
/* ===== Combobox (searchable select) ===== */
.combobox {
  position: relative;
}
.combobox-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
  text-align: left;
}
.combobox-trigger:hover {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--subtle));
}
.combobox.open .combobox-trigger {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}
.combobox-value-empty { color: hsl(var(--muted-foreground)); font-weight: 400; }
.combobox-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
  transition: transform 0.15s;
}
.combobox.open .combobox-chevron { transform: rotate(180deg); }
.combobox-clear {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: hsl(var(--muted-foreground));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s;
}
.combobox-clear:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }

.combobox-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 360px;
  overflow: hidden;
}
.combobox:not(.open) .combobox-panel { display: none; }
.combobox-search {
  padding: 10px 12px;
  font-size: 13px;
  border: none;
  border-bottom: 1px solid hsl(var(--border-subtle));
  outline: none;
  background: transparent;
}
.combobox-search::placeholder { color: hsl(var(--muted-foreground)); }
.combobox-options {
  overflow-y: auto;
  padding: 4px;
  flex: 1;
}
.combobox-option {
  padding: 7px 10px;
  font-size: 12.5px;
  color: hsl(var(--foreground));
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: background 0.08s;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.combobox-option:hover,
.combobox-option.focus {
  background: hsl(var(--accent));
}
.combobox-option.selected {
  background: hsl(var(--primary-soft));
  color: hsl(var(--primary));
  font-weight: 600;
}
.combobox-option-meta {
  margin-left: auto;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}
.combobox-empty {
  padding: 20px 12px;
  text-align: center;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.combobox-highlight {
  color: hsl(var(--primary));
  font-weight: 600;
}
.compare-chart-container { height: 360px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th, .compare-table td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border-subtle));
}
.compare-table th {
  background: hsl(var(--muted));
  font-weight: 600;
}
.compare-table td.diff {
  color: hsl(var(--primary));
  font-weight: 500;
}

/* ===== Side Panel ===== */
.side-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.side-overlay.open { transform: translateX(0); }
.side-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid hsl(var(--border));
  font-weight: 600;
  font-size: 14px;
}
.side-close {
  font-size: 20px;
  color: hsl(var(--muted-foreground));
  padding: 4px 8px;
  border-radius: 4px;
}
.side-close:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.side-body { overflow-y: auto; padding: 12px 18px 24px; flex: 1; }
.model-item {
  padding: 8px 0;
  border-bottom: 1px solid hsl(var(--border-subtle));
}
.model-item:last-child { border-bottom: none; }
.model-name { font-size: 13px; font-weight: 500; color: hsl(var(--foreground)); }
.model-meta { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.side-overlay-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.2);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  z-index: 40;
}
.side-overlay-backdrop.open { opacity: 1; pointer-events: auto; }

/* ===== Footer ===== */
footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid hsl(var(--border));
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 1023px) {
  .charts-grid, .charts-grid-3 { grid-template-columns: 1fr; }
  .compare-select-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .container { padding: 16px 12px 48px; }
  header { flex-direction: column; align-items: stretch; }
  .header-right { justify-content: space-between; }
  .filter-group { flex-direction: column; gap: 6px; }
  .filter-label { width: auto; padding-top: 0; }
  .tabs-nav { flex-wrap: nowrap; overflow-x: auto; }
  .panel-intro { flex-direction: column; }
  .panel-intro-stats { width: 100%; justify-content: flex-start; }
  .side-overlay { width: 100%; }
  .chart-box { height: 240px; }
}
