:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-soft: #ebeae4;
  --text: #171916;
  --muted: #60645f;
  --line: #d5d7d0;
  --accent: #e85d45;
  --accent-strong: #b83725;
  --green: #1f6b50;
  --green-soft: #dfece5;
  --shadow: 0 14px 34px rgba(23, 25, 22, 0.08);
  --max: 1280px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151714;
  --surface: #20231f;
  --surface-soft: #2b2f2a;
  --text: #f2f2ec;
  --muted: #b7bcb4;
  --line: #3c413a;
  --accent: #ff765f;
  --accent-strong: #ff8d78;
  --green: #7ed2ac;
  --green-soft: #213c31;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 132px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}
button, input { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid var(--accent);
}

.site-header {
  min-height: 74px;
  padding: 12px max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 900;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.search-box input {
  width: min(300px, 38vw);
  height: 42px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
}
.search-box input:focus { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 22px;
}

.category-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.category-nav-inner {
  max-width: var(--max);
  min-height: 52px;
  margin: 0 auto;
  padding: 7px 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-button {
  min-height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.filter-button:hover { color: var(--text); background: var(--surface-soft); }
.filter-button.is-active { color: #fff; background: var(--green); }
.filter-button span { font-size: 16px; }

.hero {
  position: relative;
  height: clamp(470px, 66vh, 650px);
  min-height: 470px;
  overflow: hidden;
  background: #111;
}
.hero > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 12, 10, 0.86) 0%, rgba(10, 12, 10, 0.55) 38%, rgba(10, 12, 10, 0.04) 72%);
}
.hero-content {
  position: absolute;
  inset: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  text-transform: uppercase;
}
.hero .eyebrow { color: #ff9d89; }
.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}
.hero p:not(.eyebrow) { max-width: 570px; margin: 22px 0 28px; color: #eceee9; font-size: 18px; }
.primary-action, .secondary-action, .amazon-button {
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 4px;
  border: 0;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.primary-action { color: #fff; background: var(--accent); }
.primary-action:hover { background: var(--accent-strong); }
.secondary-action { color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); }

.trust-band {
  max-width: var(--max);
  min-height: 98px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.trust-band div { padding: 22px 28px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.trust-band div:last-child { border-right: 0; }
.trust-band strong { font-size: 22px; line-height: 1.1; }
.trust-band span { margin-top: 4px; color: var(--muted); font-size: 12px; }

.rankings-shell { max-width: var(--max); margin: 0 auto; padding: 88px 0 40px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 64px; margin-bottom: 64px; }
.section-heading h2, .method-band h2, .legal-page h1 { margin: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1.05; letter-spacing: 0; }
.section-heading > p { margin: 0; color: var(--muted); }
.active-filter { margin: -34px 0 36px; padding: 12px 14px; display: flex; justify-content: space-between; background: var(--green-soft); color: var(--text); border-left: 3px solid var(--green); }
.active-filter button { color: var(--green); background: transparent; border: 0; font-weight: 800; cursor: pointer; }

.ranking-section { margin-bottom: 104px; }
.ranking-header {
  margin-bottom: 24px;
  padding: 0 0 22px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}
.category-symbol {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 4px;
  font-size: 24px;
  font-weight: 800;
}
.ranking-header h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; }
.ranking-header p:not(.eyebrow) { max-width: 680px; margin: 8px 0 0; color: var(--muted); }
.source-link { align-self: end; color: var(--muted); font-size: 12px; font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-visual { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-soft); }
.product-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.product-card:hover .product-visual img { transform: scale(1.025); }
.rank-number {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(18, 22, 18, 0.88);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 900;
}
.product-content { padding: 18px; display: flex; flex: 1; flex-direction: column; }
.product-badge { color: var(--green); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.product-content h3 { min-height: 52px; margin: 7px 0 10px; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.product-content > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.product-use { margin-top: auto; padding: 12px 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.product-use span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.product-use strong { font-size: 13px; }
.amazon-button { min-height: 42px; margin-top: 8px; color: #fff; background: var(--accent); font-size: 13px; }
.amazon-button:hover { background: var(--accent-strong); }
.product-action { margin-top: 8px; }
.product-action .amazon-button { width: 100%; margin-top: 0; }
.paid-link-note { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; text-align: center; }

.empty-state { padding: 90px 24px; text-align: center; border: 1px solid var(--line); background: var(--surface); }
.empty-state strong { font-size: 24px; }
.empty-state p { color: var(--muted); }
.method-band {
  margin-top: 20px;
  padding: 88px max(24px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  background: #20241f;
  color: #f4f4ef;
}
.method-band h2 { max-width: 560px; }
.method-band > div:last-child { align-self: end; }
.method-band p:not(.eyebrow) { color: #c8cdc5; }
.text-link { display: inline-block; margin-top: 12px; color: #ff9d89; font-weight: 800; }

.site-footer {
  padding: 52px max(24px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 24px 48px;
  align-items: start;
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-brand { display: flex; gap: 10px; color: var(--text); }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand span:not(.brand-mark) { color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer small { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); }

.legal-header { border-bottom: 1px solid var(--line); }
.legal-page { max-width: 840px; min-height: 70vh; margin: 0 auto; padding: 80px 24px 120px; }
.legal-page h1 { margin-bottom: 20px; }
.legal-page h2 { margin-top: 46px; font-size: 24px; }
.legal-page p, .legal-page li { color: var(--muted); }
.legal-page a { color: var(--green); font-weight: 700; }
.source-list { padding: 0; list-style: none; }
.source-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 1100px) {
  .site-header, .hero-content, .rankings-shell, .category-nav-inner { padding-left: 24px; padding-right: 24px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust-band { padding: 0 24px; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 118px; }
  .site-header { min-height: 68px; padding: 10px 16px; gap: 10px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 32px; height: 32px; }
  .search-box input { width: min(44vw, 220px); height: 40px; }
  .icon-button { width: 40px; height: 40px; }
  .category-nav-inner { padding: 7px 16px; }
  .hero { height: 560px; }
  .hero > img { object-position: 68% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(10, 12, 10, 0.93) 0%, rgba(10, 12, 10, 0.62) 54%, rgba(10, 12, 10, 0.05) 100%); }
  .hero-content { padding: 40px 20px; justify-content: flex-end; }
  .hero h1 { font-size: 46px; }
  .hero p:not(.eyebrow) { font-size: 16px; }
  .trust-band { padding: 0; grid-template-columns: repeat(2, 1fr); }
  .trust-band div { min-height: 86px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
  .trust-band div:nth-child(2) { border-right: 0; }
  .rankings-shell { padding: 64px 16px 20px; }
  .section-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 50px; }
  .ranking-section { margin-bottom: 76px; }
  .ranking-header { grid-template-columns: 46px 1fr; gap: 12px; }
  .category-symbol { width: 44px; height: 44px; }
  .source-link { grid-column: 2; }
  .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .product-card { display: grid; grid-template-columns: 38% 62%; }
  .product-visual { height: 100%; min-height: 250px; aspect-ratio: auto; }
  .product-content { padding: 16px; }
  .product-content h3 { min-height: 0; font-size: 17px; }
  .product-content > p { font-size: 12px; }
  .method-band { padding: 64px 20px; grid-template-columns: 1fr; gap: 34px; }
  .site-footer { padding: 44px 20px; grid-template-columns: 1fr; }
  .site-footer small { grid-column: auto; }
}

@media (max-width: 460px) {
  .site-header { flex-wrap: wrap; }
  .brand { flex: 1; }
  .header-actions { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .hero h1 { font-size: 40px; }
  .product-card { grid-template-columns: 1fr; }
  .product-visual { min-height: 0; aspect-ratio: 16 / 8; }
  .product-content > p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
