:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #15171a;
  --ink-soft: #5b6168;
  --line: #e6e8eb;
  --line-strong: #c9cdd2;
  --accent: #15171a;

  --v-recommended: #1f8a4c;
  --v-recommended-bg: #e6f4ec;
  --v-solid: #2563eb;
  --v-solid-bg: #e6edfd;
  --v-niche: #b45309;
  --v-niche-bg: #fbf0db;
  --v-skip: #6b7280;
  --v-skip-bg: #ececef;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(15,17,20,.04), 0 1px 1px rgba(15,17,20,.03);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- header / nav ---- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand::before { content: "▶ "; color: var(--ink-soft); }
.nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: 14px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---- hero ---- */
.hero {
  padding: 48px 0 24px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero p { margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* ---- filter bar ---- */
.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 24px 0 28px;
  box-shadow: var(--shadow);
}
@media (min-width: 720px) {
  .filters { grid-template-columns: repeat(4, 1fr); align-items: end; }
}
.filter-group label {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit;
  font-size: 13px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.filter-reset {
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

/* ---- product grid ---- */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card-thumb {
  aspect-ratio: 4 / 3;
  background: #eef0f3;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.3; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-take { color: var(--ink-soft); font-size: 14px; margin: 0; }
.card-cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  align-self: flex-start;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

/* ---- verdict badge + price tier ---- */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge--recommended { color: var(--v-recommended); background: var(--v-recommended-bg); }
.badge--solid       { color: var(--v-solid);       background: var(--v-solid-bg); }
.badge--niche       { color: var(--v-niche);       background: var(--v-niche-bg); }
.badge--skip        { color: var(--v-skip);        background: var(--v-skip-bg); }
.price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ---- category landing cards ---- */
.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .cat-list { grid-template-columns: repeat(2, 1fr); } }
.cat-list a {
  display: block;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color .12s ease, transform .12s ease;
}
.cat-list a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.cat-list h3 { margin: 0 0 4px; font-size: 17px; }
.cat-list p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.cat-list a::after { content: " →"; color: var(--ink-soft); font-family: var(--font-mono); }

/* ---- empty state ---- */
.empty {
  text-align: center;
  padding: 48px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
}

/* ---- product page ---- */
.product {
  padding: 36px 0 64px;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .product { grid-template-columns: 1.1fr 1fr; align-items: start; }
}
.product-hero {
  aspect-ratio: 4 / 3;
  background: #eef0f3;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.product-hero img { width: 100%; height: 100%; object-fit: cover; }
.product h1 { margin: 0 0 8px; letter-spacing: -0.02em; }
.product .product-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.product .short-take { font-size: 17px; color: var(--ink); margin: 0 0 18px; }
.product .long-take { color: var(--ink); max-width: 65ch; }
.product .long-take p { margin: 0 0 14px; }
.product-cta-slot { /* CTA button mounts here when a product has a `link` field. */ }

/* ---- product gallery ---- */
.gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.gallery-thumb {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.gallery-thumb:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.gallery-thumb.is-active { border-color: var(--ink); }

/* ---- compare ---- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
}
.compare-table th, .compare-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.compare-table th { background: #f4f5f7; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); width: 140px; }
.compare-table tr:last-child td, .compare-table tr:last-child th { border-bottom: 0; }
.compare-table .col-img { aspect-ratio: 4/3; background: #eef0f3; border-radius: 6px; max-width: 280px; }

.picker {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.picker label { display: block; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.picker select { font: inherit; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); margin-right: 10px; }
.picker button { font: inherit; padding: 9px 14px; border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 6px; cursor: pointer; }

/* ---- about ---- */
.prose { max-width: 65ch; padding: 32px 0; }
.prose h1 { margin: 0 0 18px; letter-spacing: -0.02em; }
.prose p { color: var(--ink); margin: 0 0 14px; }

/* ---- 404 ---- */
.notfound { text-align: center; padding: 80px 16px; }
.notfound .code { font-family: var(--font-mono); font-size: 56px; color: var(--ink-soft); margin: 0; }
.notfound h1 { margin: 6px 0 12px; }

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 22px 0;
  color: var(--ink-soft);
  font-size: 13px;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.site-footer a { color: var(--ink-soft); }

/* ---- utility ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
