/* System fonts only: no external requests (privacy, speed, CSP). */
:root {
  --bg: #f6f6f3;
  --bg-tint: #eef3f0;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --text: #16181b;
  --muted: #5b5f66;
  --border: #e3e3de;
  --border-strong: #cfd2cc;
  --accent: #0b6e4f;
  --accent-strong: #08573e;
  --accent-text: #ffffff;
  --accent-soft: #e2f1eb;
  --gold: #a86a00;
  --gold-soft: #fbf0d9;
  --row-hover: #f2f6f4;
  --hero-from: #0a3d2e;
  --hero-to: #0b6e4f;
  --hero-text: #f3faf6;
  --hero-muted: #bfe0d2;
  --shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.06);
  --shadow: 0 1px 2px rgba(16, 24, 20, 0.05), 0 8px 24px -12px rgba(16, 24, 20, 0.18);
  --shadow-lg: 0 2px 4px rgba(16, 24, 20, 0.06), 0 18px 40px -16px rgba(16, 24, 20, 0.28);
  --radius: 14px;
  --radius-sm: 9px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1112;
    --bg-tint: #13201b;
    --surface: #181b1d;
    --surface-2: #1d2123;
    --text: #ebeced;
    --muted: #a2a7ad;
    --border: #2a2e31;
    --border-strong: #3a3f43;
    --accent: #3fbf8f;
    --accent-strong: #5fd3a6;
    --accent-text: #08150f;
    --accent-soft: #1a3027;
    --gold: #f0b54a;
    --gold-soft: #33280f;
    --row-hover: #1f2427;
    --hero-from: #0b1f18;
    --hero-to: #11402f;
    --hero-text: #eef8f3;
    --hero-muted: #9fc9b7;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px -12px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 20px 44px -16px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header / footer */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 62px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; font-weight: 750; font-size: 1.12rem; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.logo::before {
  content: "n"; margin-right: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--hero-to), var(--hero-from));
  color: #fff; font-weight: 800; font-size: 1rem; line-height: 1; box-shadow: var(--shadow-sm);
}
.logo span { color: var(--accent); }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 99px; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.site-footer { margin-top: 64px; padding: 28px 0 44px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 6px 0; }

main { padding: 28px 0; }
h1 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
h2 { letter-spacing: -0.01em; }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 760px; font-size: 1.06rem; }

/* Hero (home and category pages) */
.hero {
  position: relative; overflow: hidden; margin-top: 20px;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px);
  background:
    radial-gradient(1200px 400px at 110% -20%, rgba(255, 255, 255, 0.16), transparent 60%),
    radial-gradient(600px 300px at -10% 120%, rgba(255, 214, 120, 0.14), transparent 60%),
    linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
  box-shadow: var(--shadow-lg);
}
.hero h1 { color: var(--hero-text); max-width: 820px; }
.hero .lead { color: var(--hero-muted); margin-bottom: 0; }
.hero a:not(.btn) { color: var(--hero-text); }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hero-muted); margin-bottom: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .btn { padding: 12px 20px; font-size: 0.98rem; border-radius: 11px; }
.btn.btn-light { background: #ffffff; color: #0a3d2e; }
.btn.btn-ghost { background: rgba(255, 255, 255, 0.1); color: var(--hero-text); border: 1px solid rgba(255, 255, 255, 0.28); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--hero-text); font-size: 0.93rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: #ffd678; flex: none; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.stat { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 99px; padding: 6px 14px; font-size: 0.9rem; }
.stat strong { font-variant-numeric: tabular-nums; }
.crumbs { font-size: 0.88rem; color: var(--hero-muted); margin-bottom: 14px; }
.crumbs a { color: var(--hero-muted); text-decoration: none; }
.crumbs a:hover { color: var(--hero-text); }

/* Sections */
.section { margin-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

/* Home category cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.card-icon svg { width: 26px; height: 26px; }
.card h2, .card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.card-cta { margin-top: auto; padding-top: 14px; font-weight: 650; color: var(--accent); font-size: 0.95rem; }
a.card:hover .card-cta { text-decoration: underline; }
.card.soon { background: var(--surface-2); box-shadow: none; }
.card.soon .card-icon { background: var(--border); color: var(--muted); }
.card.soon h2, .card.soon h3 { color: var(--muted); }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: middle; }
.card.soon .badge { background: var(--gold-soft); color: var(--gold); }

/* How it works (home) */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 20px 66px; position: relative; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 20px; top: 20px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; background: var(--accent); color: var(--accent-text);
}
.steps strong { display: block; margin-bottom: 2px; }
.steps span { color: var(--muted); font-size: 0.95rem; }

/* Our picks (category pages) */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pick {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pick:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pick-label { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); }
.pick-label::before { content: "★"; font-size: 0.85rem; }
.pick-brand { margin: 16px 0 0; color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.pick h3 { margin: 2px 0 10px; font-size: 1.2rem; line-height: 1.25; }
.pick-reason { margin: 0 0 14px; color: var(--muted); font-size: 0.95rem; }
.pick-specs { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-specs li { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; font-size: 0.9rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.pick-specs li span { display: block; font-size: 0.72rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pick .btn { margin-top: auto; display: block; text-align: center; padding: 11px 14px; font-size: 0.95rem; }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.control { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.control input, .control select { font: inherit; font-size: 1rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; min-width: 210px; }
.control input:focus, .control select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0; margin-bottom: 5px; width: 100%; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 6px 13px; border: 1px solid var(--border); border-radius: 99px; cursor: pointer; font-size: 0.9rem; background: var(--surface-2); transition: background 0.12s ease, border-color 0.12s ease; }
.chip span:hover { border-color: var(--border-strong); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.count { color: var(--muted); font-size: 0.9rem; margin: 16px 0 10px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow-sm); }
.catalog-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.catalog-table th, .catalog-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.catalog-table tbody tr:last-child td { border-bottom: 0; }
.catalog-table tbody tr:hover { background: var(--row-hover); }
.catalog-table th { position: sticky; top: 0; background: var(--surface-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.catalog-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.catalog-table td.model { font-weight: 650; }
.sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font-weight: 650; font-size: 0.8rem; color: var(--muted); }
th[aria-sort] .sort { color: var(--accent); }
.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.arrow { font-size: 0.75rem; opacity: 0.7; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-text); text-decoration: none; padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 650; font-size: 0.85rem; border: 0; transition: background 0.15s ease, transform 0.15s ease; }
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(1px); }
.btn.btn-light:hover { background: #eaf6f0; }
.btn.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
/* Keep the Amazon button visible while the table scrolls sideways */
.catalog-table td.action, .catalog-table th.action-col { position: sticky; right: 0; background: var(--surface); box-shadow: -8px 0 8px -8px rgba(0, 0, 0, 0.25); }
.catalog-table th.action-col { background: var(--surface-2); }
.catalog-table tbody tr:hover td.action { background: var(--row-hover); }

.note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.2rem; margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  a.card:hover, .pick:hover { transform: none; }
}

/* Phone: each row becomes a card */
@media (max-width: 760px) {
  .site-nav a { padding: 5px 10px; }
  .hero { margin-top: 12px; }
  .hero .btn { flex: 1 1 auto; text-align: center; }
  .control input, .control select { min-width: 0; width: 100%; }
  .control { width: 100%; }
  .table-wrap { background: none; border: 0; overflow: visible; box-shadow: none; }
  .catalog-table { display: block; }
  .catalog-table thead { display: block; position: static; }
  .catalog-table thead tr { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
  .catalog-table thead th { border: 0; padding: 0; position: static; background: none; }
  .catalog-table thead th .sort { border: 1px solid var(--border); border-radius: 99px; padding: 5px 11px; background: var(--surface); }
  .catalog-table thead th.action-col { display: none; }
  /* Pre-rendered (no-JS) table: headers are plain text, not sort buttons, so they add nothing on phones */
  .catalog-table.prerendered thead { display: none; }
  .catalog-table tbody, .catalog-table tr, .catalog-table td { display: block; }
  .catalog-table tbody tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
  .catalog-table tbody tr:hover { background: var(--surface); }
  .catalog-table td { border: 0; padding: 4px 0; white-space: normal; text-align: right !important; display: flex; justify-content: space-between; gap: 12px; }
  .catalog-table td::before { content: attr(data-label); color: var(--muted); text-align: left; }
  .catalog-table td.model { font-size: 1.05rem; }
  .catalog-table td.action { display: block; padding-top: 12px; position: static; box-shadow: none; background: none; }
  .catalog-table tbody tr:hover td.action { background: none; }
  .catalog-table td.action::before { content: none; }
  .catalog-table td.action .btn { display: block; text-align: center; padding: 11px 14px; font-size: 0.95rem; }
}
