:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --healthy: #22c55e;
  --degraded: #eab308;
  --failing: #ef4444;
  --none: #94a3b8;
  --accent: #111827;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.04);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom: 22px; }
.brand { display:flex; align-items:center; gap:12px; }
.brand-mark { display:none !important;
  width:36px; height:36px; border-radius:10px; background:linear-gradient(135deg,#111827,#334155);
  color:#fff; display:grid; place-items:center; font-weight:700; font-size:13px;
}
.brand h1 { margin:0; font-size:22px; letter-spacing:-.02em; }
.brand p { margin:2px 0 0; color:var(--muted); font-size:13px; }
.badge-mock {
  display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px;
  background:#fff7ed; color:#c2410c; border:1px solid #fdba74; font-size:12px; font-weight:600;
}
.hero {
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 18px; margin-bottom: 18px;
}
.hero h2 { margin:0 0 6px; font-size:28px; letter-spacing:-.03em; }
.hero .sub { color:var(--muted); font-size:14px; margin:0 0 16px; }
.status-line { display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; color:var(--muted); font-size:13px; }
.dot { width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:6px; }
.dot.ok { background: var(--healthy); }
.controls { display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:center; margin: 16px 0 8px; }
.pills { display:flex; flex-wrap:wrap; gap:8px; background:#eef2f7; padding:4px; border-radius:999px; }
.pill {
  border:0; background:transparent; color:var(--muted); padding:8px 14px; border-radius:999px;
  cursor:pointer; font-size:13px; font-weight:600;
}
.pill.active { background:#fff; color:var(--text); box-shadow:0 1px 2px rgba(0,0,0,.06); }
.vendor-grid {
  display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:12px; margin: 14px 0 18px;
}
@media (max-width: 900px) { .vendor-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.vendor-card {
  background:var(--card); border:1.5px solid var(--border); border-radius:12px; padding:14px 12px;
  display:flex; flex-direction:column; align-items:center; gap:8px; cursor:pointer; text-align:center;
  transition: border-color .15s, box-shadow .15s;
}
.vendor-card:hover { border-color:#cbd5e1; }
.vendor-card.active { border-color:#111827; box-shadow: inset 0 0 0 1px #111827; position:relative; }
.vendor-card.active::after {
  content:"✓"; position:absolute; top:8px; right:8px; width:18px; height:18px; border-radius:50%;
  background:#111827; color:#fff; font-size:11px; display:grid; place-items:center;
}
.vendor-card img, .vendor-card .icon-pair img {
  width:36px; height:36px; object-fit:contain; border-radius:8px; background:#fff;
}
.icon-pair { display:flex; gap:6px; align-items:center; }
.icon-row {
  display:flex; flex-wrap:wrap; gap:4px; align-items:center; justify-content:center;
  max-width:100%;
}
.vendor-card-many .icon-row img {
  width:22px; height:22px; border-radius:6px;
}
.vendor-card-many .hint { font-size:10.5px; min-height:32px; }
.vendor-card .name { font-weight:700; font-size:14px; }
.vendor-card .hint { color:var(--muted); font-size:11px; line-height:1.35; min-height:28px; }
.group-filter {
  display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 14px;
}
.chip {
  border:1px solid var(--border); background:#fff; color:var(--muted); padding:6px 12px;
  border-radius:999px; cursor:pointer; font-size:12px; font-weight:600;
  display:inline-flex; align-items:center; gap:6px;
}
.chip.active { background:#111827; color:#fff; border-color:#111827; }
.chip-ratio {
  font-size:11px; font-weight:700; opacity:.78;
  padding:1px 6px; border-radius:999px; background:rgba(15,23,42,.06);
}
.chip.active .chip-ratio { background:rgba(255,255,255,.18); opacity:1; }
.group-card {
  background:var(--card); border:1px solid var(--border); border-radius:var(--radius);
  box-shadow: var(--shadow); padding:18px 18px 8px; margin-bottom:16px;
}
.group-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; margin-bottom:10px; }
.group-title-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.group-head h3 { margin:0; font-size:18px; }
.ratio-badge {
  display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px;
  background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe;
  font-size:12px; font-weight:750; letter-spacing:.01em;
}
.group-head .desc { color:var(--muted); font-size:13px; margin-top:4px; max-width:720px; }
.group-meta { color:var(--muted); font-size:12px; margin-top:6px; }
.group-score { text-align:right; }
.group-score .big { font-size:22px; font-weight:750; }
.table { width:100%; border-collapse:collapse; }
.table th {
  text-align:left; font-size:12px; color:var(--muted); font-weight:600; padding:10px 8px;
  border-bottom:1px solid var(--border);
}
.table td { padding:12px 8px; border-bottom:1px solid #f1f5f9; font-size:13px; vertical-align:middle; }
.model-cell { display:flex; align-items:center; gap:10px; font-weight:600; }
.model-cell img { width:22px; height:22px; border-radius:6px; object-fit:contain; background:#fff; }
.spark { display:flex; align-items:flex-end; gap:2px; height:28px; min-width:140px; }
.spark i {
  display:block; width:4px; border-radius:2px 2px 1px 1px; background:var(--healthy); opacity:.9;
}
.spark i.deg { background:var(--degraded); }
.spark i.fail { background:var(--failing); }
.spark i.none { background:#e2e8f0; height:6px !important; }
.pill-status {
  display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px;
  font-size:12px; font-weight:700;
}
.pill-status.healthy { background:#dcfce7; color:#15803d; }
.pill-status.degraded { background:#fef9c3; color:#a16207; }
.pill-status.failing { background:#fee2e2; color:#b91c1c; }
.pill-status.none { background:#f1f5f9; color:#64748b; }
.num { font-variant-numeric: tabular-nums; }
.legend {
  display:flex; flex-wrap:wrap; gap:14px; color:var(--muted); font-size:12px; margin-top:18px;
  padding-top:14px; border-top:1px solid var(--border);
}
.legend span::before {
  content:""; display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px;
}
.legend .h::before { background:var(--healthy); }
.legend .d::before { background:var(--degraded); }
.legend .f::before { background:var(--failing); }
.legend .n::before { background:var(--none); }
.empty { padding:28px; text-align:center; color:var(--muted); }
.footer-note { margin-top:18px; color:var(--muted); font-size:12px; line-height:1.5; }


/* —— 折扣徽章（促销感） —— */
.model-cell { gap: 8px; }
.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 42px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #ff4d4f 0%, #ff7a45 55%, #fa8c16 100%);
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  text-shadow: 0 1px 0 rgba(0,0,0,0.12);
  white-space: nowrap;
  line-height: 1;
}
.discount-badge.hot {
  background: linear-gradient(135deg, #e11d48 0%, #f97316 50%, #fbbf24 100%);
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.4), inset 0 1px 0 rgba(255,255,255,0.28);
  animation: discPulse 2.4s ease-in-out infinite;
}
.discount-badge.deal {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
}
.discount-badge.soft {
  background: linear-gradient(135deg, #fb7185 0%, #fb923c 100%);
}
.discount-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  margin-left: 2px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  color: #b91c1c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  white-space: nowrap;
}
@keyframes discPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.model-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.model-name-wrap .nm {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-mock { display: none !important; }

/* modality entry cards + badges */
.vendor-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}
.vendor-card-modality {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.vendor-card-modality .name { letter-spacing: .02em; }
.mod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.mod-badge.image {
  color: #6d28d9;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
}
.mod-badge.video {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}
.icon-row {
  max-height: 52px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding: 2px 2px;
  scrollbar-width: thin;
}
.vendor-card-many .icon-row {
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
  max-height: none;
}


/* expand detail */
.term {
  border-bottom: 1px dotted #94a3b8;
  cursor: help;
}
.table th .term { border-bottom-color: #cbd5e1; }
.model-row { cursor: pointer; }
.model-row:hover td { background: #f8fafc; }
.model-row.open td { background: #f8fafc; }
.expand-cell { width: 36px; text-align: right; }
.expand-btn {
  border: 0; background: transparent; color: #64748b; cursor: pointer;
  font-size: 14px; width: 28px; height: 28px; border-radius: 8px;
}
.expand-btn:hover { background: #e2e8f0; color: #0f172a; }
.detail-row td { padding: 0 8px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.detail-row:not(.open) { display: none; }
.expand-panel {
  display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; gap: 12px;
  padding: 4px 0 2px;
}
@media (max-width: 900px) {
  .expand-panel { grid-template-columns: 1fr; }
}
.expand-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.expand-title {
  font-size: 13px; font-weight: 700; margin-bottom: 10px; color: #0f172a;
}
.pct-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pct-table th, .pct-table td { padding: 6px 4px; text-align: left; }
.pct-table thead th { color: var(--muted); font-weight: 600; border-bottom: 1px solid #f1f5f9; }
.pct-table tbody th { color: var(--muted); font-weight: 650; width: 48px; }
.fail-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fail-list li {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155;
}
.fail-list li .num { margin-left: auto; font-weight: 650; color: #0f172a; }
.dot-fail { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-fail.f5 { background: #ef4444; }
.dot-fail.fto { background: #14b8a6; }
.dot-fail.f429 { background: #eab308; }
.dot-fail.foth { background: #a855f7; }
.tps-block { padding: 8px 0 4px; }
.tps-label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.tps-value { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }

/* brand sub-filter */
.brand-filter {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  margin: 0 0 12px; padding: 10px 12px;
  background: #fff; border:1px solid var(--border); border-radius: 12px;
}
.brand-filter[hidden] { display:none !important; }
.brand-filter-label {
  font-size:12px; font-weight:750; color:var(--muted);
  margin-right: 4px;
}
.brand-chip {
  gap: 6px;
}
.brand-chip-icon {
  width: 16px; height: 16px; border-radius: 4px; object-fit: contain; background:#fff;
}
.chip.brand-chip.active .brand-chip-icon {
  background: rgba(255,255,255,.92);
}
