/* ============================================
   Data Intelligence Index — Dashboard Layout
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font-display: 'JetBrains Mono', monospace;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg: #edf3ef;
  --surface: #f8faf8;
  --border: #c8d8ce;
  --border-light: #dbe7df;

  --text: #1c2e24;
  --text-2: #4a6b58;
  --text-3: #8aa698;

  --accent: #1a6b5a;
  --accent-light: #dceee9;

  --c-opus: #c45d3e;
  --c-sonnet: #d4936e;
  --c-glm: #4e8b8b;
  --c-kimi: #5a8a5c;
  --c-minimax: #a67c52;
  --c-qwen: #6878a0;

  --r: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }

/* ---- Topbar ---- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(237, 243, 239, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 1.5rem;
  height: 48px; display: flex; align-items: center; justify-content: space-between;
}
.topbar-logo { display: flex; align-items: center; gap: 0.5rem; color: var(--text); }
.logo-text { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; }
.topbar-links { display: flex; gap: 1.5rem; }
.topbar-links a { font-size: 0.85rem; font-weight: 500; color: var(--text-2); }
.topbar-links a:hover { color: var(--text); }
.topbar-toggle { display: none; flex-direction: column; gap: 3px; background: none; border: none; cursor: pointer; padding: 4px; }
.topbar-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); }
.topbar-mobile { display: none; flex-direction: column; padding: 0.25rem 1.5rem 0.75rem; }
.topbar-mobile a { font-size: 0.8rem; color: var(--text-2); padding: 0.35rem 0; }
.topbar-mobile.open { display: flex; }

/* ---- Header ---- */
.header {
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}
.header-inner {
  max-width: 1320px; margin: 0 auto; padding: 1.75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.header-badge {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}
.header h1 {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
  letter-spacing: -0.03em; line-height: 1.2;
}
.header p { font-size: 0.85rem; color: var(--text-2); margin-top: 0.25rem; }
.header-kpis { display: flex; gap: 2rem; flex-shrink: 0; }
.kpi { display: flex; flex-direction: column; align-items: center; }
.kpi-val { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; color: var(--text); }
.kpi-label { font-size: 0.65rem; color: var(--text-3); letter-spacing: 0.03em; }

/* ---- Landing Page ---- */
.landing-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}
.landing-hero-inner {
  max-width: 640px; margin: 0 auto;
}
.landing-hero h1 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 600;
  letter-spacing: -0.03em; margin-bottom: 0.6rem;
}
.landing-subtitle {
  font-size: 0.9rem; color: var(--text-2); line-height: 1.6;
  margin-bottom: 1.5rem;
}
.landing-kpis {
  display: flex; justify-content: center; gap: 2rem;
  margin-bottom: 1.75rem;
}
.landing-cta {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--surface); background: var(--text);
  padding: 0.6rem 1.5rem; border-radius: 6px;
  transition: opacity 0.2s var(--ease);
}
.landing-cta:hover { opacity: 0.85; color: var(--surface); }

.landing {
  max-width: 780px; margin: 0 auto; padding: 2rem 1.5rem 3rem;
  display: flex; flex-direction: column; gap: 2.5rem;
}
.landing-section h2 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 0.75rem; color: var(--text);
}
.landing-section p {
  font-size: 0.9rem; color: var(--text-2); line-height: 1.7;
  margin-bottom: 0.6rem;
}
.landing-section p:last-child { margin-bottom: 0; }
.landing-section strong { color: var(--text); font-weight: 600; }
.landing-section a { color: var(--accent); font-weight: 500; }

/* Aspects list */
.landing-aspects {
  display: flex; flex-direction: column; gap: 0; margin-top: 0.5rem;
}
.landing-aspect {
  padding: 0.75rem 0; border-bottom: 1px solid var(--border-light);
  display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: baseline;
}
.landing-aspect:first-child { border-top: 1px solid var(--border-light); }
.landing-aspect-head {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.landing-aspect-tag {
  font-family: var(--font-mono); font-size: 0.92rem; font-weight: 700;
  color: var(--text); text-transform: uppercase; letter-spacing: 0.04em;
}
.landing-aspect-benchmarks {
  font-size: 0.82rem; color: var(--text-2); font-family: var(--font-body); font-weight: 400;
}
.landing-aspect-benchmarks a { color: var(--accent); font-weight: 500; }
.landing-aspect-benchmarks a:hover { text-decoration: underline; }
.landing-aspect-benchmarks .bench-upcoming { color: var(--text-3); font-style: italic; }
.landing-aspect p { font-size: 0.85rem; margin-bottom: 0; }

/* Findings */
.landing-findings {
  display: flex; flex-direction: column; gap: 0; margin-top: 0.5rem;
}
.landing-finding {
  padding: 0.75rem 0; border-bottom: 1px solid var(--border-light);
}
.landing-finding:first-child { border-top: 1px solid var(--border-light); }
.landing-finding h3 {
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.3rem;
}
.landing-finding p { font-size: 0.85rem; margin-bottom: 0; }

/* Landing leaderboard */
.landing-leaderboard-wrap {
  max-width: 780px; margin: 0 auto; padding: 2rem 1.5rem 0;
}
.landing-leaderboard-panel {
  margin: 0;
}

/* CTA section */
.landing-section-cta { text-align: center; }
.landing-section-cta .landing-cta { margin-top: 0.5rem; }
.landing-note {
  margin-top: 1.25rem; font-size: 0.72rem; color: var(--text-3);
}

/* ---- Dashboard Grid ---- */
.dashboard {
  max-width: 1320px; margin: 0 auto; padding: 1.25rem 1.5rem 2rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}

.dash-row {
  display: grid; gap: 1.25rem;
}
.dash-row-hero {
  grid-template-columns: 1.15fr 0.85fr;
}
.dash-row-bottom {
  grid-template-columns: 1.4fr 0.6fr;
}

/* ---- Panel ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  min-width: 0;
}
.panel-full { grid-column: 1 / -1; }

.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.panel-head h2 {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  letter-spacing: -0.02em; white-space: nowrap;
}
.panel-head-icon {
  width: 24px; height: 24px; object-fit: contain;
  vertical-align: middle; margin-right: 0.4rem; margin-top: -2px;
}
.panel-sub { font-size: 0.7rem; color: var(--text-3); }
.panel-desc {
  font-size: 0.75rem; color: var(--text-2); line-height: 1.5;
  margin: -0.5rem 0 0.75rem;
}
.panel-credit {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  margin-top: 0.75rem; padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.65rem; color: var(--text-3);
}
.panel-note {
  font-size: 0.65rem; color: var(--text-3); font-style: italic;
}
.panel-credit strong { color: var(--text-2); font-weight: 600; }
.panel-credit a { color: var(--accent); font-weight: 500; }
.panel-credit-sep { opacity: 0.4; }

/* ---- Dashboard Intro ---- */
.dash-intro {
  max-width: var(--max-w); margin: 0 auto 1.25rem; padding: 0 var(--gutter);
  font-size: 0.82rem; line-height: 1.7; color: var(--text-2);
}
.dash-intro p { margin-bottom: 0.35rem; }
.dash-intro p:last-child { margin-bottom: 0; }
.dash-intro strong { color: var(--text-2); font-weight: 600; }
.dash-intro a { color: var(--accent); font-weight: 500; }

/* ---- Vision Toggle ---- */
.vision-toggle {
  display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
  font-size: 0.7rem; color: var(--text-3); user-select: none;
}
.vision-toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--border); position: relative;
  cursor: pointer; transition: background 0.2s var(--ease);
  flex-shrink: 0;
}
.vision-toggle input[type="checkbox"]::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); transition: transform 0.2s var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.vision-toggle input[type="checkbox"]:checked {
  background: var(--accent);
}
.vision-toggle input[type="checkbox"]:checked::after {
  transform: translateX(14px);
}
.vision-toggle-label { font-weight: 500; letter-spacing: 0.02em; }

/* ---- Leaderboard ---- */
.leaderboard {
  display: flex; align-items: flex-end; justify-content: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  padding: 0.5rem 0 0;
  height: 340px;
}
.leader-col {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  flex: 1; max-width: 140px;
}
.leader-score {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 600; color: var(--text);
}
.leader-cost {
  position: absolute; bottom: 0.4rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.55rem; font-weight: 500;
  color: rgba(255,255,255,0.6); white-space: nowrap;
}
.leader-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--bar-color);
  position: relative;
  min-height: 30px;
}
.leader-rank {
  position: absolute; top: 0.5rem; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600;
  color: rgba(255,255,255,0.25);
}
.leader-icon-wrap {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.leader-icon-wrap img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.leader-name {
  font-size: 0.75rem; font-weight: 600; color: var(--text);
  text-align: center; line-height: 1.3;
  min-height: 2.4em; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  white-space: nowrap;
}
.leader-vendor { font-size: 0.62rem; color: var(--text-3); font-weight: 400; }

/* ---- Radar ---- */
.radar-wrap { aspect-ratio: 1; max-height: 420px; }
.radar-wrap canvas { cursor: crosshair; }

/* ---- Scatter ---- */
.scatter-wrap { height: 340px; }

/* ---- Benchmark Tabs ---- */
.bench-tabs { display: flex; gap: 0.2rem; overflow-x: auto; scrollbar-width: none; }
.bench-tabs::-webkit-scrollbar { display: none; }
.bench-tab {
  padding: 0.3rem 0.65rem; font-size: 0.725rem; font-weight: 500;
  font-family: var(--font-body); color: var(--text-3);
  background: transparent; border: 1px solid var(--border); border-radius: 5px;
  cursor: pointer; white-space: nowrap; transition: all 0.2s var(--ease);
}
.bench-tab:hover { color: var(--text-2); background: var(--bg); }
.bench-tab.active { background: var(--text); color: var(--surface); border-color: var(--text); }

.bench-panel { display: none; }
.bench-panel.active { display: block; animation: fadeUp 0.25s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.bench-desc { font-size: 0.8rem; color: var(--text-2); margin-bottom: 1rem; }
.bench-desc em { color: var(--text-3); font-size: 0.725rem; }

.bench-subtabs { display: flex; gap: 0.2rem; margin-bottom: 0.75rem; }
.bench-subtab {
  padding: 0.25rem 0.6rem; font-size: 0.675rem; font-weight: 500;
  font-family: var(--font-body); color: var(--text-3);
  background: transparent; border: 1px solid var(--border); border-radius: 4px;
  cursor: pointer; transition: all 0.2s var(--ease);
}
.bench-subtab.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }

.bench-mode-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.bench-mode-tab {
  padding: 0.3rem 0.75rem; font-size: 0.7rem; font-weight: 600;
  font-family: var(--font-mono); color: var(--text-3);
  background: transparent; border: 1.5px solid var(--border); border-radius: 5px;
  cursor: pointer; transition: all 0.2s var(--ease);
}
.bench-mode-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.bench-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start;
}
.bench-chart-wrap { height: 300px; }
.bench-table-wrap { overflow-x: auto; }
.bench-scatter-wrap { grid-column: 1 / -1; height: 280px; margin-top: 0.25rem; }

.bench-table { width: 100%; border-collapse: collapse; font-size: 0.775rem; }
.bench-table th, .bench-table td {
  padding: 0.45rem 0.65rem; text-align: left; border-bottom: 1px solid var(--border-light);
}
.bench-table th {
  font-weight: 600; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-2); background: var(--bg);
}
.th-bench {
  display: block; font-size: 0.58rem; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--accent); margin-top: 0.15rem;
}
.bench-table td { font-family: var(--font-mono); font-size: 0.725rem; }
.bench-table td:first-child { font-family: var(--font-body); font-weight: 500; }
.bench-table tr:hover td { background: #f9f5f0; }
.bench-table .best { font-weight: 600; color: var(--accent); }

/* ---- Findings ---- */
.findings { display: flex; flex-direction: column; gap: 0; }
.finding {
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border-light);
}
.finding:first-child { border-top: 1px solid var(--border-light); }
.finding-tag {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em;
  flex-shrink: 0; width: 4.5rem;
}
.finding p { font-size: 0.8rem; color: var(--text-2); line-height: 1.5; }
.finding strong { color: var(--text); font-weight: 600; }

/* ---- Model List ---- */
.model-list { display: flex; flex-direction: column; gap: 0.4rem; }
.model-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.45rem 0.5rem; border-radius: 6px;
  transition: background 0.15s ease;
}
.model-row:hover { background: var(--bg); }
.model-row-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; background: var(--bg); border: 1px solid var(--border);
}
.model-row-icon img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.model-row-text { display: flex; flex-direction: column; }
.model-row-text strong { font-size: 0.775rem; font-weight: 600; }
.model-row-text span { font-size: 0.625rem; color: var(--text-3); }

.panel-footer {
  margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border-light);
  font-size: 0.725rem;
}

/* ---- Footer ---- */
.footer {
  text-align: center; padding: 1.25rem; font-size: 0.7rem; color: var(--text-3);
  border-top: 1px solid var(--border-light);
}
.footer-contact { display: block; margin-top: 0.35rem; font-size: 0.65rem; }
.landing-contact { font-size: 0.8rem; color: var(--text-2); margin-top: 1rem; }
.panel-contact { margin-top: 0.5rem; font-size: 0.65rem; color: var(--text-3); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .dash-row-hero { grid-template-columns: 1fr; }
  .dash-row-bottom { grid-template-columns: 1fr; }
  .bench-body { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .topbar-links { display: none; }
  .topbar-toggle { display: flex; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .header-kpis { gap: 1.5rem; }
  .panel-desc { font-size: 0.65rem; margin-bottom: 0.5rem; }
  .leaderboard { height: 240px; gap: 0.25rem; }
  .leader-col { max-width: 80px; gap: 0.3rem; }
  .leader-icon-wrap { width: 28px; height: 28px; }
  .leader-icon-wrap img { width: 18px; height: 18px; }
  .leader-score { font-size: 0.7rem; }
  .leader-name { font-size: 0.5rem; min-height: 2.8em; }
  .leader-vendor { font-size: 0.5rem; }
  .leader-cost { font-size: 0.45rem; }
  .leader-rank { font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .panel-desc { font-size: 0.6rem; line-height: 1.4; margin-bottom: 0.25rem; }
  .leaderboard { height: 200px; gap: 0.2rem; }
  .leader-col { max-width: 65px; gap: 0.2rem; }
  .leader-score { font-size: 0.6rem; }
  .leader-icon-wrap { width: 24px; height: 24px; }
  .leader-icon-wrap img { width: 16px; height: 16px; }
  .leader-name { font-size: 0.45rem; min-height: 2em; }
  .leader-vendor { font-size: 0.4rem; }
  .leader-cost { font-size: 0.4rem; }
  .leader-rank { font-size: 0.7rem; }
  .dashboard { padding: 0.75rem; }
  .panel { padding: 1rem; }
}
@media (max-width: 480px) {
  .dashboard { padding: 0.75rem; }
  .panel { padding: 1rem; }
}
