/* ============================================================
   GPU Inference Benchmark — Design System
   ============================================================ */

:root {
  /* New design tokens */
  --bg-0: #07070b;
  --bg-1: #0c0c13;
  --bg-2: #12121c;
  --bg-3: #1a1a27;
  --bg-4: #232333;
  --line-1: #1d1d2c;
  --line-2: #2a2a3e;
  --line-3: #3a3a52;

  --text-1: #ecedf2;
  --text-2: #b3b4c2;
  --text-3: #7d7e90;
  --text-4: #565768;

  --accent: #00d4aa;
  --accent-2: #00f0c0;
  --accent-dim: rgba(0, 212, 170, 0.12);
  --accent-soft: rgba(0, 212, 170, 0.05);

  --warn: #f0c040;
  --bad:  #ec5e6f;
  --info: #6aa9ff;

  --nvidia: #76b900;
  --amd:    #ed1c24;
  --intel:  #0071c5;
  --apple:  #a259ff;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  /* Back-compat aliases for detail pages */
  --bg-primary:    var(--bg-0);
  --bg-secondary:  var(--bg-2);
  --bg-tertiary:   var(--bg-3);
  --bg-hover:      var(--bg-4);
  --text-primary:  var(--text-1);
  --text-secondary:var(--text-2);
  --text-muted:    var(--text-3);
  --border:        var(--line-2);
  --border-light:  var(--line-1);
  --radius:        var(--r);
  --radius-sm:     var(--r-sm);
  --font-body:     var(--font);
  --font-mono:     var(--mono);
  --heat-low:      var(--bad);
  --accent-hover:  var(--accent-2);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,212,170,0.07), transparent 60%),
    linear-gradient(var(--line-1) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-1) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
body.no-grid::before {
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,212,170,0.07), transparent 60%);
}
.shell { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.container { max-width: 1480px; margin: 0 auto; padding: 0 28px; }

/* ============== NAV ============== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-1);
  position: sticky;
  top: 0;
  background: rgba(7,7,11,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo:hover { color: var(--text-1); }
.logo .prompt { color: var(--accent); }
.logo .cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1.1s steps(2) infinite;
  vertical-align: -2px;
}
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--mono);
}
.nav-links a:hover { color: var(--text-1); }
.nav-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--text-4); }
.nav-meta b { color: var(--accent); font-weight: 500; }

/* ============== HERO ============== */
.hero {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--line-1);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: end;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-top: 18px;
  text-wrap: balance;
}
.hero h1 .accent {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede { margin-top: 18px; color: var(--text-2); font-size: 1.08rem; max-width: 56ch; }
.hero-stats { display: flex; gap: 22px; margin-top: 28px; flex-wrap: wrap; }
.hero-stat {
  display: flex; flex-direction: column; gap: 2px;
  padding-right: 22px;
  border-right: 1px solid var(--line-2);
}
.hero-stat:last-child { border-right: none; padding-right: 0; }
.hero-stat .num {
  font-family: var(--mono); font-size: 1.6rem; font-weight: 600;
  color: var(--text-1); letter-spacing: -0.02em;
}
.hero-stat .lbl {
  font-size: 0.72rem; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500;
}

/* ============== ADVISOR ============== */
.advisor {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.advisor::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 0%, rgba(0,212,170,0.12), transparent 70%);
  pointer-events: none;
}
.advisor-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; position: relative;
}
.advisor-title {
  font-family: var(--mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}
.advisor-title .pulse {
  width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%; position: relative;
}
.advisor-title .pulse::after {
  content: '';
  position: absolute; inset: -4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
.advisor-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--text-4); }
.advisor-controls { display: flex; flex-direction: column; gap: 14px; position: relative; }
.advisor-row { display: flex; flex-direction: column; gap: 6px; }
.advisor-row label {
  font-family: var(--mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); display: flex; justify-content: space-between;
}
.advisor-row label .val { color: var(--accent); font-weight: 600; }
.advisor-row--filters { gap: 10px; }
.advisor-filter-group { display: flex; flex-direction: column; gap: 6px; }
.advisor-filter-label {
  font-family: var(--mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3);
}
.chip-row--sm .chip { padding: 3px 9px; font-size: 0.72rem; }

.budget-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: var(--bg-4);
  border-radius: 999px; outline: none; cursor: pointer;
}
.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: grab;
  box-shadow: 0 0 0 4px rgba(0,212,170,0.18), 0 0 18px rgba(0,212,170,0.6);
}
.budget-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: grab; border: none;
  box-shadow: 0 0 0 4px rgba(0,212,170,0.18), 0 0 18px rgba(0,212,170,0.6);
}

.advisor-result {
  margin-top: 6px; padding: 18px;
  background: var(--bg-0); border: 1px solid var(--line-2);
  border-radius: var(--r); position: relative;
}
.advisor-result::before {
  content: '';
  position: absolute; left: -1px; top: 14px; bottom: 14px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 2px;
}
.advisor-pick-name { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.advisor-pick-name a { color: var(--text-1); }
.advisor-pick-name a:hover { color: var(--accent); }
.advisor-pick-meta {
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-3);
  display: flex; gap: 14px; margin-bottom: 14px;
}
.advisor-pick-meta .speed { color: var(--accent); }
.advisor-pick-bars { display: flex; flex-direction: column; gap: 6px; }
.pickbar {
  display: grid; grid-template-columns: 70px 1fr 60px;
  align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.74rem;
}
.pickbar .lbl { color: var(--text-3); }
.pickbar .num { color: var(--text-1); text-align: right; }
.pickbar .track {
  height: 6px; background: var(--bg-3);
  border-radius: 999px; overflow: hidden;
}
.pickbar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px; transition: width 0.4s ease;
}

/* ============== SECTIONS ============== */
.section { padding: 56px 0; border-bottom: 1px solid var(--line-1); }
.section-head {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px; gap: 24px; flex-wrap: wrap;
}
.section-title { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.section-title .num {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--accent); margin-right: 10px;
  font-weight: 500; letter-spacing: 0;
}
.section-sub { color: var(--text-3); font-size: 0.92rem; margin-top: 4px; max-width: 60ch; }

/* ============== MODEL TABS ============== */
.model-tabs {
  display: flex; gap: 2px; padding: 4px;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r); overflow-x: auto; scrollbar-width: none;
}
.model-tabs::-webkit-scrollbar { display: none; }
.model-tab {
  padding: 10px 16px; background: transparent; border: none;
  border-radius: var(--r-sm); cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 2px; white-space: nowrap; transition: all 0.15s;
  color: var(--text-2); font-family: inherit; flex-shrink: 0;
}
.model-tab:hover { background: var(--bg-2); color: var(--text-1); }
.model-tab.active {
  background: var(--bg-3); color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.model-tab .name { font-weight: 600; font-size: 0.92rem; }
.model-tab .meta { font-family: var(--mono); font-size: 0.7rem; color: var(--text-4); }
.model-tab.active .meta { color: var(--accent); }

/* ============== FILTER BAR ============== */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 14px 24px;
  padding: 18px 20px;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r); align-items: center; margin-bottom: 0;
}
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-label {
  font-family: var(--mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3); font-weight: 500;
}
.chip-row { display: flex; gap: 4px; }
.chip {
  padding: 6px 12px; border-radius: 6px;
  border: 1px solid var(--line-2); background: transparent;
  color: var(--text-2); font-family: inherit; font-size: 0.82rem;
  font-weight: 500; cursor: pointer; transition: all 0.12s;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { color: var(--text-1); border-color: var(--line-3); }
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.chip .swatch { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.chip .swatch.nvidia { background: var(--nvidia); }
.chip .swatch.amd    { background: var(--amd); }
.chip .swatch.intel  { background: var(--intel); }
.chip .swatch.apple  { background: var(--apple); }

.select-input {
  padding: 7px 12px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text-1); font-family: inherit; font-size: 0.82rem;
  cursor: pointer; min-width: 140px;
}
.select-input:focus { outline: none; border-color: var(--accent); }

.search-input {
  padding: 7px 12px 7px 32px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text-1); font-family: inherit; font-size: 0.85rem;
  min-width: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d7e90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 14px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.filter-spacer { flex: 1; }
.filter-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); }
.filter-meta b { color: var(--text-1); font-weight: 600; }

/* ============== CHART CARD ============== */
.chart-card {
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); padding: 22px; position: relative;
}
.chart-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 14px; gap: 18px;
}
.chart-title-block .ttl { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.chart-title-block .sub { font-family: var(--mono); font-size: 0.74rem; color: var(--text-4); margin-top: 2px; }
.chart-legend {
  display: flex; gap: 14px; align-items: center;
  font-family: var(--mono); font-size: 0.74rem; color: var(--text-3);
}
.legend-dot {
  width: 9px; height: 9px; border-radius: 50%;
  margin-right: 6px; display: inline-block; vertical-align: middle;
}
.chart-canvas-wrap { position: relative; height: 420px; }
.quadrant-labels {
  position: absolute; inset: 22px 28px 32px 56px;
  pointer-events: none; font-family: var(--mono); font-size: 0.68rem;
  color: var(--text-4); letter-spacing: 0.06em;
}
.quadrant-labels span {
  position: absolute; text-transform: uppercase;
  background: rgba(7,7,11,0.7); padding: 2px 6px; border-radius: 3px;
}
.qd-tl { top: 4px; left: 0; color: var(--accent); }
.qd-tr { top: 4px; right: 0; }
.qd-bl { bottom: 4px; left: 0; }
.qd-br { bottom: 4px; right: 0; color: var(--bad); }

/* ============== GPU TABLE ============== */
.gpu-table-wrap {
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden;
}
.table-scroll { overflow-x: auto; }
.gpu-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.gpu-table thead { background: var(--bg-2); border-bottom: 1px solid var(--line-2); }
.gpu-table th {
  padding: 12px 14px; text-align: left; font-weight: 600;
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  white-space: nowrap; user-select: none; font-family: var(--mono);
}
.gpu-table th.numeric { text-align: right; }
.gpu-table th.sortable { cursor: pointer; transition: color 0.1s; }
.gpu-table th.sortable:hover { color: var(--text-1); }
.gpu-table th.sorted { color: var(--accent); }
.sort-arrow {
  display: inline-block; margin-left: 4px;
  font-size: 0.62rem; opacity: 0; transition: opacity 0.1s;
}
.gpu-table th.sortable:hover .sort-arrow { opacity: 0.5; }
.gpu-table th.sorted .sort-arrow { opacity: 1; }
.gpu-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--line-1);
  white-space: nowrap; vertical-align: middle;
}
.gpu-table tbody tr { transition: background 0.08s; cursor: pointer; }
.gpu-table tbody tr:hover { background: var(--bg-2); }
.gpu-table tbody tr.selected {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 0 var(--accent);
}
.gpu-table tbody tr.selected:hover { background: var(--accent-dim); }
.gpu-table tbody tr:last-child td { border-bottom: none; }

/* GPU name cell */
.cell-name { display: flex; align-items: center; gap: 10px; }
.brand-bar { width: 3px; height: 22px; border-radius: 2px; flex-shrink: 0; }
.brand-bar.nvidia { background: var(--nvidia); }
.brand-bar.amd    { background: var(--amd); }
.brand-bar.intel  { background: var(--intel); }
.brand-bar.apple  { background: var(--apple); }
.gpu-link { color: var(--text-1); font-weight: 500; font-size: 0.92rem; letter-spacing: -0.005em; }
.gpu-link:hover { color: var(--accent); }
.cell-name .meta {
  display: block; font-family: var(--mono);
  font-size: 0.7rem; color: var(--text-4); margin-top: 1px;
}
.tag-ws {
  display: inline-block; font-family: var(--mono); font-size: 0.62rem;
  padding: 2px 5px; border: 1px solid var(--line-3);
  border-radius: 3px; color: var(--text-3); margin-left: 6px;
  text-transform: uppercase; letter-spacing: 0.05em; vertical-align: middle;
}
.tag-flag {
  display: inline-block; font-family: var(--mono); font-size: 0.62rem;
  padding: 2px 5px; border-radius: 3px; margin-left: 6px;
  text-transform: uppercase; letter-spacing: 0.05em; vertical-align: middle;
}
.tag-flag.flagship { background: rgba(0,212,170,0.12); color: var(--accent); }

/* Numeric cells */
.numeric { text-align: right; font-family: var(--mono); }
.numeric .unit { color: var(--text-4); font-size: 0.85em; margin-left: 2px; }
.numeric .est  { color: var(--warn); margin-left: 2px; font-size: 0.85em; }

.vram-cell { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.vram-cell .gb   { font-weight: 600; color: var(--text-1); }
.vram-cell .type { font-size: 0.68rem; color: var(--text-4); }

/* tok/s mini-bar */
.perf-cell { text-align: right; font-family: var(--mono); }
.perf-cell .barwrap { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.perf-cell .minibar { width: 80px; height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.perf-cell .minibar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.perf-cell .num { min-width: 36px; font-weight: 600; color: var(--text-1); }
.perf-na { color: var(--text-4); font-style: italic; font-family: var(--font); font-size: 0.78rem; }

/* Checkbox */
.checkbox-cell { width: 36px; text-align: center; padding: 0 8px !important; }
.compare-check {
  width: 16px; height: 16px; border: 1.5px solid var(--line-3);
  border-radius: 4px; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.12s; position: relative;
}
.compare-check:hover { border-color: var(--accent); }
.compare-check.checked { background: var(--accent); border-color: var(--accent); }
.compare-check.checked::after {
  content: '';
  width: 8px; height: 4px;
  border-left: 2px solid var(--bg-0);
  border-bottom: 2px solid var(--bg-0);
  transform: rotate(-45deg) translate(0, -1px);
}

/* Price trend */
.price-trend { font-size: 0.75em; vertical-align: middle; }
.price-trend--falling { color: var(--accent); }
.price-trend--rising  { color: var(--bad); }

/* ============== COMPARE TRAY ============== */
.compare-tray {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--bg-2); border: 1px solid var(--line-3);
  border-radius: 14px; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 16px 48px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,170,0.1);
  z-index: 40; min-width: 420px;
  transition: transform 0.3s cubic-bezier(.2,.9,.2,1.1);
}
.compare-tray.open { transform: translateX(-50%) translateY(0); }
.tray-label { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }
.tray-label b { color: var(--accent); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.tray-pill {
  background: var(--bg-3); border: 1px solid var(--line-2);
  padding: 4px 8px; border-radius: 6px; font-size: 0.78rem;
  display: inline-flex; align-items: center; gap: 6px;
}
.tray-pill .x { color: var(--text-3); cursor: pointer; font-family: var(--mono); }
.tray-pill .x:hover { color: var(--bad); }

/* Buttons */
.btn {
  padding: 8px 14px; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text-1); font-family: inherit; font-size: 0.85rem;
  font-weight: 500; cursor: pointer; transition: all 0.12s; white-space: nowrap;
}
.btn:hover { border-color: var(--line-3); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg-0); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }

/* ============== COMPARE MODAL ============== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 24px; overflow-y: auto;
}
.modal {
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: 16px; width: 100%; max-width: 1200px;
  padding: 28px; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; background: transparent;
  border: 1px solid var(--line-2); border-radius: 6px;
  color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.9rem;
}
.modal-close:hover { color: var(--text-1); border-color: var(--line-3); }
.compare-grid {
  display: grid; gap: 0; margin-top: 20px;
  border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden;
}
.compare-row { display: grid; border-bottom: 1px solid var(--line-1); }
.compare-row:last-child { border-bottom: none; }
.compare-row:nth-child(even) { background: var(--bg-2); }
.compare-cell {
  padding: 12px 14px; font-family: var(--mono); font-size: 0.85rem;
  display: flex; align-items: center; border-right: 1px solid var(--line-1);
}
.compare-cell:last-child { border-right: none; }
.compare-cell.label {
  font-family: var(--font); font-size: 0.78rem;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 500;
}
.compare-cell.header {
  background: var(--bg-3); flex-direction: column;
  align-items: flex-start; gap: 4px; font-family: var(--font);
}
.compare-cell.header .name { font-weight: 600; font-size: 0.95rem; }
.compare-cell.header .meta { font-family: var(--mono); font-size: 0.72rem; color: var(--text-4); }
.compare-cell.best { color: var(--accent); font-weight: 600; position: relative; }
.compare-cell.best::before {
  content: '★'; position: absolute; left: 4px;
  color: var(--accent); font-size: 0.7rem;
}

/* ============== METHODOLOGY ============== */
.methodology {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-top: 28px;
}
.method-card {
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 18px;
}
.method-card .icon {
  font-family: var(--mono); color: var(--accent);
  font-size: 0.78rem; margin-bottom: 10px; display: block;
}
.method-card h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.method-card p { font-size: 0.82rem; color: var(--text-3); line-height: 1.55; }

/* ============== FOOTER ============== */
.footer { padding: 40px 0 56px; font-size: 0.82rem; color: var(--text-3); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px; margin-bottom: 32px;
}
.footer-brand { color: var(--text-2); }
.footer-brand p { margin-top: 8px; max-width: 36ch; }
.footer h5 {
  font-family: var(--mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-4); margin-bottom: 12px; font-weight: 500;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 6px; }
.footer ul a { color: var(--text-2); }
.footer ul a:hover { color: var(--accent); }
.footer-bot {
  padding-top: 20px; border-top: 1px solid var(--line-1);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 0.74rem; color: var(--text-4);
}

/* ============== DETAIL PAGE ============== */
.detail-header { display: flex; align-items: center; gap: 16px; padding: 32px 0 24px; }

.back-link { font-size: 0.85rem; color: var(--text-3); }
.back-link:hover { color: var(--accent); }

.detail-title { font-size: 1.8rem; font-weight: 700; }

.detail-brand-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Keep brand-dot circle for detail page (brand-bar is the table bar) */
.brand-dot { border-radius: 50%; }
.brand-dot.nvidia { background: var(--nvidia); }
.brand-dot.amd    { background: var(--amd); }
.brand-dot.intel  { background: var(--intel); }
.brand-dot.apple  { background: var(--apple); }

.spec-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line-1);
}
.spec-item {
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 14px 16px;
}
.spec-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 4px;
}
.spec-value { font-family: var(--mono); font-size: 1.1rem; font-weight: 600; color: var(--text-1); }
.spec-unit { font-size: 0.8rem; color: var(--text-2); font-weight: 400; }

.detail-chart-section { padding: 24px 0; border-bottom: 1px solid var(--line-1); }
.detail-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.detail-chart-container {
  position: relative; height: 350px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 16px;
}

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 0; }
.pros-list, .cons-list { list-style: none; }
.pros-list li, .cons-list li { padding: 6px 0; font-size: 0.9rem; color: var(--text-2); }
.pros-list li::before { content: '+ '; color: var(--accent); font-weight: 700; font-family: var(--mono); }
.cons-list li::before { content: '- '; color: var(--bad); font-weight: 700; font-family: var(--mono); }

.price-history-section { margin-top: 2rem; }
.price-range-group { display: flex; gap: 0.5rem; }
.price-chart-container {
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 1rem; height: 300px; position: relative;
}

/* Detail page compare/filter select compat */
.filter-select, .compare-group .filter-select {
  padding: 7px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--text-1); font-family: inherit; font-size: 0.85rem;
  cursor: pointer; min-width: 160px;
}
.filter-select:focus { outline: none; border-color: var(--accent); }
.compare-group { display: flex; align-items: center; gap: 8px; }

/* ============== RESPONSIVE ============== */
@media (max-width: 980px) {
  .hero-grid     { grid-template-columns: 1fr; gap: 28px; }
  .methodology   { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .compare-tray  { min-width: calc(100vw - 32px); }
}
@media (max-width: 640px) {
  .hero      { padding: 48px 0 32px; }
  .section   { padding: 40px 0; }
  .container { padding: 0 18px; }
  .nav-links { display: none; }
  .methodology  { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
  .hero-stats .hero-stat { padding-right: 14px; }
  .hero-stat .num { font-size: 1.3rem; }
  .pros-cons  { grid-template-columns: 1fr; }
  .detail-chart-container { height: 280px; }
  .price-chart-container  { height: 220px; }
  .spec-grid  { grid-template-columns: repeat(2, 1fr); }
}
