:root {
  --navy: #14213d;
  --blue: #2563eb;
  --blue-light: #e8effc;
  --gold: #fca311;
  --gold-dark: #b45309;
  --green: #15803d;
  --red: #b91c1c;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f3f4f6;
  --card: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue-light: #182742;
    --green: #4ade80;
    --red: #f87171;
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --border: #374151;
    --bg: #0f1420;
    --card: #1b2334;
  }
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── Header ─────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo { font-size: 1.35rem; font-weight: 800; white-space: nowrap; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
.logo span { color: var(--gold); }
.logo-mark { width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0; }

.icon { width: 1.05em; height: 1.05em; vertical-align: -0.16em; display: inline-block; }
.part-slot .icon, .s-slot .icon { color: var(--blue); }
.cat-icon { display: inline-flex; color: var(--blue); }
.cat-icon .icon { width: 1.6rem; height: 1.6rem; }
.s-rel .rel-bar i { width: 9px; height: 5px; }
.s-rel .rel-score { display: none; }
.header-tag { font-size: 0.85rem; opacity: 0.9; flex: 1; }
.updated { font-size: 0.72rem; opacity: 0.8; white-space: nowrap; margin-left: auto; }

.cat-nav { display: flex; gap: 0.2rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.cat-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
  opacity: 0.85;
}
.cat-nav a:hover { background: rgba(255, 255, 255, 0.15); opacity: 1; }
.cat-nav a.active { background: rgba(255, 255, 255, 0.2); opacity: 1; }

/* ── Hero ───────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy), var(--blue) 140%);
  color: #fff;
  text-align: center;
  padding: 2.4rem 1rem 2.2rem;
}
.hero-compact { padding: 1.6rem 1rem 1.5rem; }
.hero h1 { font-size: 2rem; letter-spacing: -0.02em; }
.hero .tagline { max-width: 620px; margin: 0.6rem auto 0; font-size: 1rem; opacity: 0.92; }

.gauge-banner {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 0.55rem 1rem;
  max-width: 640px;
  text-align: left;
}
.gauge-banner-note { font-size: 0.82rem; opacity: 0.92; }

/* ── Gauge pills ────────────────────────── */
.gauge-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
}
.gauge-pill::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  vertical-align: 1px;
}
.g-buy { background: rgba(21, 128, 61, 0.14); color: var(--green); }
.g-fair { background: rgba(180, 83, 9, 0.14); color: var(--gold-dark); }
.g-wait { background: rgba(185, 28, 28, 0.12); color: var(--red); }
@media (prefers-color-scheme: dark) {
  .g-buy { background: rgba(74, 222, 128, 0.15); }
  .g-fair { background: rgba(252, 163, 17, 0.15); color: var(--gold); }
  .g-wait { background: rgba(248, 113, 113, 0.15); }
}

/* ── Home: category cards ───────────────── */
.cats {
  max-width: 960px;
  margin: 1.6rem auto 0;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
  border-color: var(--blue);
}
.cat-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.cat-head h2 { font-size: 1.15rem; flex: 1; }
.cat-blurb { font-size: 0.88rem; color: var(--text-muted); flex: 1; }
.cat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
}
.cat-total { font-weight: 700; color: var(--blue); }

/* ── Method pillars ─────────────────────── */
.method { max-width: 960px; margin: 2.2rem auto 0; padding: 0 1rem; }
.method h2 { font-size: 1.15rem; margin-bottom: 0.8rem; color: var(--blue); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.pillar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.pillar h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.84rem; color: var(--text-muted); }

/* ── Summary table ──────────────────────── */
.summary { max-width: 960px; margin: 1.4rem auto 0; padding: 0 1rem; }
.summary h2 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--blue); }
.summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.summary-table td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.summary-table tr:not(.s-total) { cursor: pointer; }
.summary-table tr:not(.s-total):hover td { background: var(--blue-light); }
.s-slot { white-space: nowrap; font-weight: 600; }
.s-pick { color: var(--text-muted); }
.s-rel { color: var(--gold); font-size: 0.78rem; white-space: nowrap; }
.s-price { text-align: right; font-weight: 700; color: var(--blue); white-space: nowrap; }
.s-buy { text-align: right; width: 1%; }
.s-buy a {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.76rem;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
}
.s-buy a:hover { background: #e29200; }
.s-total td { border-bottom: none; font-weight: 800; }
.s-total .s-price { font-size: 1.05rem; color: var(--gold-dark); }
.summary-hint { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ── Item cards ─────────────────────────── */
.parts {
  max-width: 960px;
  margin: 1.4rem auto 3rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.part-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.part-main { display: flex; align-items: stretch; }
.part-media {
  flex: 0 0 200px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  padding: 1rem;
}
.part-media a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.part-media img { max-width: 100%; max-height: 190px; object-fit: contain; transition: transform 0.15s; }
.part-media a:hover img { transform: scale(1.04); }
.part-media .fallback-icon { display: none; }
.part-media.media-fallback .fallback-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 150px;
  background: var(--blue-light);
  border-radius: 8px;
  color: var(--blue);
}
.part-media.media-fallback .fallback-icon .icon { width: 3rem; height: 3rem; }
.part-content { flex: 1; min-width: 0; }
.part-head { display: flex; align-items: flex-start; gap: 0.9rem; padding: 1rem 1.2rem 0.5rem; }
.part-slot {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.part-pick { font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.part-price {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.price { font-size: 1.4rem; font-weight: 800; color: var(--blue); }
.discount {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: rgba(252, 163, 17, 0.14);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
}
.price-warn {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(185, 28, 28, 0.1);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
}

.part-body { padding: 0.5rem 1.2rem 0.8rem; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.89rem; }
.part-body strong { color: var(--blue); font-weight: 700; }
.part-body .muted { color: var(--text-muted); }

.reliability {
  background: var(--blue-light);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
}
.rel-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.rel-bar { display: inline-flex; gap: 3px; align-items: center; }
.rel-bar i { display: inline-block; width: 14px; height: 6px; border-radius: 2px; background: var(--border); }
.rel-bar i.on { background: var(--gold); }
.rel-score { font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }
.rel-note { flex-basis: 100%; font-size: 0.82rem; color: var(--text-muted); }

.gauge-note { font-size: 0.84rem; }
.gauge-note strong { color: inherit; }

.concerns summary {
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--blue);
}
.concerns ul { margin: 0.4rem 0 0 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.concerns li { font-size: 0.82rem; color: var(--text-muted); }

.part-buy {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.2rem 1rem;
  border-top: 1px dashed var(--border);
}
.buy-btn {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  transition: background 0.1s;
}
.buy-btn:hover { background: #e29200; }
.other-stores { font-size: 0.8rem; color: var(--text-muted); }
.other-stores a { text-decoration: underline; text-underline-offset: 2px; }
.other-stores a:hover { color: var(--blue); }
.price-note { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); font-style: italic; }

/* ── Footer ─────────────────────────────── */
footer {
  background: var(--navy);
  color: #9fb6dd;
  text-align: center;
  padding: 1.4rem 1rem;
  font-size: 0.85rem;
  margin-top: 2.5rem;
}
footer .fine-print {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  opacity: 0.75;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Mobile ─────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.55rem; }
  .header-tag { display: none; }
  .updated { display: none; }
  .s-pick { display: none; }
  .part-main { flex-direction: column; }
  .part-media { flex-basis: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .part-media img { max-height: 140px; }
  .part-head { flex-wrap: wrap; }
  .part-price { margin-left: 0; align-items: flex-start; }
  .price-note { margin-left: 0; }
}

/* ── Add-ons ("Pairs with") ─────────────── */
.addons {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.addons-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-dark);
}
.addon { display: block; font-size: 0.83rem; line-height: 1.45; }
.addon:hover .addon-name { color: var(--blue); }
.addon-name { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.addon-price { font-weight: 700; color: var(--blue); margin-left: 0.3rem; }
.addon-note { color: var(--text-muted); display: block; }

/* ── Market snapshot tiles ──────────────── */
.market { max-width: 960px; margin: 1.4rem auto 0; padding: 0 1rem; }
.market h2 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; }
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-val { font-size: 1.25rem; font-weight: 800; }
.stat-val b { font-size: 0.8rem; font-weight: 700; }
.t-up { color: var(--red); }
.t-down { color: var(--green); }
.t-flat { color: var(--text); }
.t-flat b { color: var(--text-muted); }
.stat-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.stat-note { font-size: 0.76rem; color: var(--text-muted); line-height: 1.35; }

/* ── Price position bar ─────────────────── */
.pricebar {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.8rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pb-track {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #16a34a, #eab308 55%, #dc2626);
  opacity: 0.9;
}
.pb-mark {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--text-muted);
  transform: translateX(-50%);
}
.pb-cur {
  position: absolute;
  top: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--blue);
  transform: translateX(-50%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.pb-cur.pb-over { border-color: var(--red); }
.pb-labels { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.72rem; color: var(--text-muted); flex-wrap: wrap; }
.pb-labels em { font-style: normal; opacity: 0.8; }
.pb-now { font-weight: 700; color: var(--text); }
.spark { display: flex; align-items: center; gap: 0.5rem; color: var(--blue); }
.spark svg { width: 120px; height: 26px; }
.spark span { font-size: 0.7rem; color: var(--text-muted); }

/* summary table gauge column */
.s-gauge { white-space: nowrap; }
@media (max-width: 640px) { .s-gauge { display: none; } }

/* ── Home: hero stats ───────────────────── */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.hstat { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.hstat b { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.hstat span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }

/* ── Home: buy-now signals ──────────────── */
.signals { max-width: 960px; margin: 1.6rem auto 0; padding: 0 1rem; }
.signals h2 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--blue); }
.signal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.9rem; }
.signal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.signal-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-color: var(--gold); }
.signal-media {
  height: 110px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem;
}
.signal-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.signal-icon { color: var(--blue); }
.signal-icon .icon { width: 2.6rem; height: 2.6rem; }
.signal-body { padding: 0.65rem 0.8rem 0.8rem; display: flex; flex-direction: column; gap: 0.25rem; }
.signal-cat { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue); }
.signal-pick { font-size: 0.86rem; font-weight: 700; line-height: 1.3; }
.signal-price { font-size: 1.05rem; font-weight: 800; color: var(--blue); display: flex; align-items: center; gap: 0.4rem; }
.signal-price .discount { font-size: 0.68rem; font-style: normal; }
.signal-note { font-size: 0.74rem; color: var(--text-muted); line-height: 1.35; }

/* ── Home: category card thumbnails ─────── */
.cat-thumbs { display: flex; gap: 0.5rem; }
.cat-thumbs span {
  width: 52px;
  height: 52px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}
.cat-thumbs img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ── Hero glow polish ───────────────────── */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 260px at 15% -10%, rgba(252, 163, 17, 0.18), transparent 65%),
    radial-gradient(700px 300px at 90% 115%, rgba(96, 165, 250, 0.22), transparent 65%);
  pointer-events: none;
}
.hero > * { position: relative; }

/* ── Market pulse strip ─────────────────── */
.pulse {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.pulse-label {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.pulse-chip {
  color: #c7d4ec;
  font-size: 0.76rem;
  padding: 0.18rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  flex-shrink: 0;
}
.pulse-chip:hover { background: rgba(255, 255, 255, 0.1); }
.pulse-chip b { font-weight: 800; }
.pulse-chip .t-up { color: #f89b9b; }
.pulse-chip .t-down { color: #86e3a7; }

/* ── Wait signals ───────────────────────── */
.waits h2 { color: var(--red); }
.wait-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem; }
.wait-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform 0.12s, box-shadow 0.12s;
}
.wait-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.wait-head { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; }
.wait-head .icon { color: var(--red); }
.wait-price { margin-left: auto; font-weight: 800; color: var(--red); }
.wait-note { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; }

/* ── Category card gauge dots ───────────── */
.gauge-dots { display: flex; align-items: center; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.d-buy { background: var(--green); }
.d-fair { background: var(--gold); }
.d-wait { background: var(--red); }
.dots-label { font-size: 0.66rem; color: var(--text-muted); margin-left: 0.35rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Polish pass v16 ────────────────────── */
.part-pick a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a.part-price { cursor: pointer; }
a.part-price:hover .price { color: var(--gold-dark); }

.signal-pick:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.signal-actions { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.2rem; }
.signal-cta {
  background: var(--gold);
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
}
.signal-cta:hover { background: #e29200; }
.signal-why { font-size: 0.72rem; color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.signal-why:hover { color: var(--blue); }
.signal-media { cursor: pointer; }
.signal-media img { transition: transform 0.15s; }
.signal-media:hover img { transform: scale(1.05); }

.more-cats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 0 0;
  font-size: 0.82rem;
}
.more-cats span { color: var(--text-muted); font-weight: 600; }
.more-cats a {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 99px;
  padding: 0.28rem 0.75rem;
  font-weight: 600;
}
.more-cats a:hover { border-color: var(--blue); color: var(--blue); }
.more-cats .icon { color: var(--blue); }

.footer-cats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
}
.footer-cats a { color: #c7d4ec; }
.footer-cats a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .cat-nav a { font-size: 0.74rem; padding: 0.25rem 0.5rem; }
  .hero-stats { gap: 1.2rem; }
  .hstat b { font-size: 1.2rem; }
}

/* focus visibility for keyboard users */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Home dashboard ─────────────────────── */
.dash {
  max-width: 960px;
  margin: 1.6rem auto 0;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: start;
}
.dash-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.dash-panel h2 { font-size: 1.05rem; color: var(--blue); }
.dash-sub { font-size: 0.76rem; color: var(--text-muted); margin: 0.15rem 0 0.7rem; }
.dash-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.6rem; font-style: italic; }

.leader { width: 100%; border-collapse: collapse; }
.leader td { padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; vertical-align: middle; }
.leader tr:last-child td { border-bottom: none; }
.l-rank { color: var(--text-muted); font-weight: 800; width: 1.4rem; }
.l-thumb { width: 44px; }
.l-thumb a { display: flex; width: 40px; height: 40px; background: #fff; border: 1px solid var(--border); border-radius: 8px; align-items: center; justify-content: center; padding: 3px; color: var(--blue); }
.l-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.l-item { line-height: 1.3; }
.l-item > a { font-weight: 700; display: block; }
.l-item > a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.l-cat { font-size: 0.7rem; color: var(--text-muted); }
.l-cat:hover { color: var(--blue); }
.l-price { font-weight: 800; color: var(--blue); white-space: nowrap; text-align: right; }
.l-vs { display: block; font-size: 0.66rem; font-weight: 400; color: var(--text-muted); }
.l-atlow { color: var(--green); font-weight: 700; }
.l-disc { color: var(--green); font-weight: 800; white-space: nowrap; text-align: right; }
.l-buy { width: 1%; text-align: right; }
.l-buy a { background: var(--gold); color: var(--navy); font-weight: 700; font-size: 0.74rem; padding: 0.22rem 0.6rem; border-radius: 6px; }
.l-buy a:hover { background: #e29200; }

.groups { display: flex; flex-direction: column; gap: 0.45rem; }
.group-row { display: grid; grid-template-columns: 1fr 90px 3.2rem; align-items: center; gap: 0.55rem; font-size: 0.82rem; }
.group-row:hover .g-name { color: var(--blue); }
.g-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-name .icon { color: var(--blue); }
.g-bar { height: 9px; background: var(--blue-light); border-radius: 99px; overflow: hidden; display: block; }
.g-bar i { display: block; height: 100%; border-radius: 99px; }
.g-under { background: var(--green); }
.g-over { background: var(--red); }
.g-pct { font-weight: 800; font-size: 0.78rem; text-align: right; }

@media (max-width: 760px) {
  .dash { grid-template-columns: 1fr; }
  .l-vs { display: none; }
}

/* ── Quick search ───────────────────────── */
.search { position: relative; flex: 1; max-width: 340px; }
.search input {
  width: 100%;
  padding: 0.42rem 0.8rem;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  outline: none;
}
.search input::placeholder { color: #64748b; }
.q-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 30;
}
.q-results:empty { display: none; }
.q-results a { display: block; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); }
.q-results a:last-child { border-bottom: none; }
.q-results a:hover { background: var(--blue-light); }
.q-results b { display: block; font-size: 0.84rem; color: var(--text); }
.q-results span { font-size: 0.72rem; color: var(--text-muted); }
.q-none { display: block; padding: 0.6rem 0.8rem; font-size: 0.8rem; color: var(--text-muted); }

/* deep-link highlight */
.part-card.flash { animation: flashcard 1.6s ease-out 1; }
@keyframes flashcard {
  0% { box-shadow: 0 0 0 3px var(--gold); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (max-width: 640px) { .search { max-width: none; } }

/* ── Static-site additions ──────────────── */
.crumbs { font-size: 0.75rem; opacity: 0.85; margin-bottom: 0.4rem; }
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.chg { margin: 0.4rem 0 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; }
.chg a { font-weight: 700; }
.chg a:hover { color: var(--blue); text-decoration: underline; }
.dash-panel h2 { margin-top: 0.6rem; }
.dash-panel h2:first-child { margin-top: 0; }

/* ── Analyst brief ──────────────────────── */
.brief { max-width: 960px; margin: 1.2rem auto 0; padding: 0 1rem; }
.brief-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}
.brief-label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold-dark); }
.brief-inner p { font-size: 0.9rem; margin-top: 0.25rem; }

/* ── AI verify links ────────────────────── */
.ai-verify {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  padding: 0.6rem 0.2rem 0;
  color: var(--text-muted);
}
.ai-verify a {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 99px;
  padding: 0.22rem 0.7rem;
  font-weight: 600;
}
.ai-verify a:hover { border-color: var(--blue); color: var(--blue); }
