
:root {
  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --blue-soft: #e8eefc;
  --navy: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-2: #f5f7fb;
  --green: #15803d;
  --star: #f5b400;
  --bar-1: #1d4ed8;
  --bar-2: #0f766e;
  --bar-3: #b45309;
  --bar-4: #6d28d9;
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-skip: 40;
  --z-header: 20;
  --z-flyout: 25;
  --z-tray: 30;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  font-family: var(--sans);
  background: var(--bg);
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: var(--z-skip); }
.wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
  white-space: nowrap;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}
.site-header > * { flex-shrink: 0; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
}
.logo strong { display: block; font-size: 1.05rem; }
.logo small { display: block; color: var(--muted); font-size: 0.72rem; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a, .nav-group > a {
  text-decoration: none;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav > a[aria-current="page"], .nav-group > a[aria-current="page"] { color: var(--blue); }
.nav-group { position: relative; }
.nav-flyout {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 240px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  white-space: normal;
  z-index: var(--z-flyout);
}
.nav-group:hover .nav-flyout, .nav-group:focus-within .nav-flyout { display: grid; gap: 4px; }
.nav-flyout a { text-decoration: none; padding: 10px; border-radius: 8px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.nav-flyout a:hover { background: var(--blue-soft); color: var(--blue); }
.search-bar {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.search-bar input {
  border: 0;
  padding: 10px 14px;
  min-width: 220px;
  outline: none;
  min-height: 44px;
}
.search-bar button {
  border: 0;
  background: var(--blue);
  color: #fff;
  width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.compare-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  min-height: 44px;
}
.compare-nav span {
  background: #fff;
  color: var(--blue);
  border-radius: 999px;
  min-width: 1.4em;
  text-align: center;
  font-size: 0.8rem;
}
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  padding: 48px 0 28px;
}
.pill {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.5rem); }
h1 em { color: var(--blue); font-style: normal; }
.lede { color: var(--muted); margin: 0 0 18px; text-wrap: pretty; }
.trust-inline { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 22px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  min-height: 44px;
}
.btn.ghost, .button.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn:disabled, .compare-toggle:disabled { opacity: 0.45; cursor: not-allowed; }
.text-link { color: var(--blue); font-weight: 700; text-decoration: none; }
.product-card h3 a, .guide-card h3 a { text-decoration: none; }
.bench-table img { width: 160px; height: 120px; object-fit: contain; background: var(--bg-2); border-radius: 10px; }
.compare-toggle { background: var(--blue-soft); color: var(--blue); }
.compare-toggle[aria-pressed="true"] { background: var(--navy); color: #fff; }
.hero-visual {
  position: relative;
  min-height: 320px;
}
.hero-blob {
  position: absolute;
  inset: 20px 0 0 20%;
  background: var(--blue);
  border-radius: 40% 28% 36% 24%;
}
.hero-visual img {
  position: relative;
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(15, 23, 42, 0.18));
}
.cat-bar {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  padding: 8px 0 36px;
}
.cat-bar a {
  text-decoration: none;
  text-align: center;
  padding: 14px 8px;
  border-radius: 16px;
  background: var(--bg-2);
  font-weight: 700;
  font-size: 0.82rem;
  min-height: 44px;
}
.cat-bar a:hover { background: var(--blue-soft); color: var(--blue); }
.cat-bar svg { width: 28px; height: 28px; margin: 0 auto 8px; stroke: var(--blue); fill: none; stroke-width: 1.8; }
.section { padding: 12px 0 36px; }
.section.alt { background: var(--bg-2); padding: 36px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.extra-head { margin-top: 28px; }
.section-head a { color: var(--blue); font-weight: 700; text-decoration: none; }
.card-grid, .ranking-grid, .guide-grid, .compare-expand-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  align-items: stretch;
}
.product-card, .guide-card, .card, .family-card, .part-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
}
.product-card img, .guide-card img, .card img, .family-card img, .detail-media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--bg-2);
}
.product-card-media { display: block; }
.card-body, .product-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 8px;
  z-index: 2;
}
.rank-badge.green { background: var(--green); }
.product-card h3, .card h3, .guide-card h3, .part-card h3 {
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  margin-bottom: 0;
}
.guide-card .text-link { margin-top: auto; padding-top: 12px; }
.card-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 8px 0 0;
}
.card-body p, .guide-card p, .family-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  margin: 8px 0 0;
}
.card-body .card-meta {
  -webkit-line-clamp: 1;
  min-height: 1.35em;
}
.product-card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.product-card-foot .btn,
.product-card-foot .compare-select {
  width: 100%;
  min-height: 44px;
  margin: 0;
}
.compare-select {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}
.compare-select:has(input:checked) {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
}
.compare-select input { width: 16px; height: 16px; accent-color: var(--blue); flex-shrink: 0; }
.product-card.is-compare-locked {
  opacity: 0.48;
}
.product-card.is-compare-locked .compare-select {
  pointer-events: none;
}
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.filter-row a {
  flex-shrink: 0;
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.filter-row a.active { background: var(--navy); color: #fff; }
.detail { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; padding-top: 28px; }
.detail-media { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-2); }
.spec-table, .bench-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec-table th, .spec-table td, .bench-table th, .bench-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.bench-table tr.diff td { background: #fff7d6; }
.bench-table .compare-select { margin-top: 10px; }
.verdict { background: var(--navy); color: #fff; padding: 22px; border-radius: 16px; margin: 22px 0; }
.verdict h2, .verdict p { color: #fff; }
.notice {
  background: var(--blue-soft);
  border: 1px solid var(--line);
  padding: 16px 18px;
  border-radius: 14px;
  margin: 0 0 22px;
  font-weight: 600;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.drawer { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.part-card { padding: 16px; }
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-bar article { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.trust-bar h3 { color: var(--blue); }
.newsletter {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  background: var(--navy);
  color: #fff;
  padding: 28px;
  border-radius: 20px;
}
.newsletter input { border: 0; border-radius: 10px; padding: 12px; width: 100%; min-height: 44px; }
.metric-charts { display: grid; gap: 18px; margin: 28px 0; }
.metric-charts > h2 { margin-bottom: 0; }
.metric-chart {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}
.metric-chart h3 { font-size: 1.05rem; margin-bottom: 6px; }
.metric-chart > p { color: var(--muted); margin: 0 0 14px; }
.bar-list { display: grid; gap: 10px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.34fr) 1fr auto;
  gap: 12px;
  align-items: center;
}
.bar-name { font-weight: 700; font-size: 0.92rem; }
.bar-track {
  height: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--bar-scale, 0));
  background: var(--bar, var(--blue));
  border-radius: 999px;
}
.bar-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.feat-board { margin: 28px 0; }
.feat-table {
  display: grid;
  grid-template-columns: minmax(8rem, 0.28fr) repeat(var(--cols, 2), 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.feat-head, .feat-label, .feat-cell {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.feat-head { background: var(--bg-2); }
.feat-label { color: var(--muted); font-weight: 600; }
.feat-cell { text-align: center; }
.feat-cell.on { background: var(--blue-soft); color: var(--blue); }
.feat-cell.off { color: var(--muted); font-weight: 600; }
.site-footer { background: var(--navy); color: #e2e8f0; padding: 36px 0 48px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.site-footer a { color: #e2e8f0; }
.tray {
  position: sticky;
  bottom: 0;
  z-index: var(--z-tray);
  background: var(--navy);
  color: #fff;
  padding: 12px 0;
}
.tray[hidden] { display: none !important; }
.tray-inner { display: flex; align-items: center; gap: 12px; overflow-x: auto; white-space: nowrap; }
.tray-inner .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.tray-list { display: flex; gap: 8px; }
.tray-group { color: #93c5fd; font-weight: 700; font-size: 0.88rem; }
.tray-status { color: #e2e8f0; }
.pill-item {
  border: 1px solid rgba(255,255,255,.3);
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  min-height: 44px;
}
.empty { padding: 40px 0; color: var(--muted); }
.kicker { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.prose p { margin: 0 0 14px; text-wrap: pretty; }
.tick-list { padding-left: 18px; }
@media (min-width: 981px) {
  .site-header { overflow: visible; }
}
@media (max-width: 980px) {
  .site-header { overflow-x: auto; overflow-y: hidden; }
  .search-bar input { min-width: 160px; }
  .hero, .detail, .footer-grid, .trust-bar, .newsletter {
    grid-template-columns: 1fr 1fr;
  }
  .cat-bar { grid-template-columns: repeat(4, 1fr); }
  .bar-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 700px) {
  .hero, .detail, .footer-grid, .trust-bar, .newsletter {
    grid-template-columns: 1fr;
  }
  .cat-bar { grid-template-columns: 1fr 1fr; }
  .product-card-foot { grid-template-columns: 1fr; }
  .feat-table { font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual img { filter: none; }
  .bar-fill { transition: none; }
}
