:root {
  /* Topo-paper palette — warm sage paper, deep trail green, bistre contour ochre. Neutrals
     carry a slight green bias so they read as "chosen paper," not flat grey. */
  --bg: #e7eae2;
  --panel: #f3f5ee;
  --panel-2: #e0e4d8;
  --line: #cbd2c1;
  --text: #18241d;
  --muted: #59685d;
  --accent: #1f7a52;
  --accent-dim: #2e7d5b;
  --ochre: #a9772f;
  --radius: 12px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.45 var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 5px; font-family: var(--mono); }

/* Topographic identity — a faint contour-map texture behind the whole app (SPA + every
   server-rendered page, since both link this stylesheet). Sits above the flat --bg but
   below all content; solid panels cover it, so it reads through the hero and page margins
   like a trail atlas underlay. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("/topo.svg") center / cover no-repeat;
  opacity: .45;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, rgba(0,0,0,.35) 100%);
          mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, rgba(0,0,0,.35) 100%);
}

/* Shared utility label — mono, uppercase, with a leading "legend key" tick (map vibe) */
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0;
  display: inline-flex; align-items: center;
}
.eyebrow::before, .hero-eyebrow::before {
  content: ""; display: inline-block; width: 18px; height: 2px; border-radius: 2px;
  background: currentColor; opacity: .85; margin-right: 10px;
}

/* Top bar + tabs */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(231, 234, 226, .85);
  backdrop-filter: blur(10px); z-index: 10;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 17px; letter-spacing: -.01em;
  background: none; border: none; color: var(--text); cursor: pointer; padding: 0;
}
.brand-mark { width: 24px; height: 19px; color: var(--accent); flex: none; }
.tabs { display: flex; gap: 2px; }
.tab {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 8px 13px; border-radius: 8px; font-size: 13px;
  font-family: var(--mono); letter-spacing: .04em; transition: color .12s, background .12s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--panel-2); }
.pill {
  background: var(--accent-dim); color: #eafff5; border-radius: 999px;
  padding: 1px 8px; font-size: 11px; margin-left: 5px; font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- Home view */
.view-home { max-width: 1080px; }

.hero {
  padding: clamp(36px, 8vw, 88px) 0 clamp(30px, 5vw, 56px);
  border-bottom: 1px solid var(--line); margin-bottom: 44px;
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ochre); margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(34px, 6.5vw, 60px); line-height: 1.02; font-weight: 800;
  letter-spacing: -.03em; margin: 0; max-width: 15ch; text-wrap: balance;
}
.hero-dek {
  color: var(--muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.5;
  max-width: 52ch; margin: 20px 0 0;
}
.hero-search { display: flex; gap: 10px; margin: 30px 0 0; max-width: 520px; }
.hero-search input {
  flex: 1; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; font-size: 15px; font-family: var(--sans);
}
.hero-search input:focus { outline: none; border-color: var(--accent-dim); }
.hero-search button {
  background: var(--accent); color: #f4faf6; border: none; border-radius: 10px;
  padding: 0 22px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--sans);
}
.hero-search button:hover { background: #17603f; }
.hero-trust {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 20px; color: var(--muted); font-family: var(--mono); font-size: 12.5px;
}
.hero-trust strong { color: var(--text); font-variant-numeric: tabular-nums; }
.hero-trust .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

.home-sec { margin-bottom: 46px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-sub { color: var(--muted); font-size: 14px; margin: -6px 0 16px; max-width: 60ch; }
.sec-link {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; transition: color .12s;
}
.sec-link:hover { color: var(--accent); }
a.sec-link { text-decoration: none; }

/* Browse by system — category tiles */
.home-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.home-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 15px 16px; cursor: pointer; color: var(--text); text-align: left;
  transition: border-color .12s, background .12s, transform .12s;
}
.home-cat:hover { border-color: var(--accent-dim); background: var(--panel-2); transform: translateY(-1px); }
.hc-name { font-size: 14px; font-weight: 600; }
.hc-count { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* The Big 3 */
.home-big3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.big3-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; cursor: pointer; color: var(--text); text-align: left;
  transition: border-color .12s, transform .12s;
}
.big3-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.b3-top { display: flex; align-items: center; justify-content: space-between; }
.b3-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); }
.b3-arrow { color: var(--muted); display: inline-flex; }
.big3-card:hover .b3-arrow { color: var(--accent); }
.b3-cat { font-size: 21px; font-weight: 750; letter-spacing: -.01em; margin-top: 8px; }
.b3-blurb { color: var(--muted); font-size: 13.5px; }
.b3-light {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
}
.b3-light strong { color: var(--accent); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.b3-light-k { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 3px; }

/* Featured kits strip — horizontal scroll */
.home-kits { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.home-kit {
  flex: 0 0 auto; min-width: 200px; display: flex; flex-direction: column; gap: 5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; color: var(--text); text-align: left; scroll-snap-align: start;
  transition: border-color .12s;
}
.home-kit:hover { border-color: var(--accent-dim); }
.hk-hiker { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ochre); }
.hk-name { font-size: 16px; font-weight: 700; }
.hk-meta { color: var(--muted); font-size: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Build CTA */
.home-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--panel-2), var(--panel));
  border: 1px solid var(--accent-dim); border-radius: 16px; padding: 30px 32px; margin-bottom: 20px;
}
.cta-copy { flex: 1; min-width: 260px; }
.home-cta h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.home-cta p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; max-width: 52ch; }
.cta-btn {
  background: var(--accent); color: #f4faf6; border: none; border-radius: 11px;
  padding: 14px 24px; font-size: 15px; font-weight: 700; cursor: pointer; flex: none; white-space: nowrap;
}
.cta-btn:hover { background: #17603f; }

@media (max-width: 720px) {
  .home-big3 { grid-template-columns: 1fr; }
}

.view { padding: 20px; max-width: 1100px; margin: 0 auto; }

/* Controls */
.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.controls input, .controls select {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 14px;
}
.controls input { flex: 1; min-width: 200px; }

/* Directory grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card .thumb {
  aspect-ratio: 1/1; background: #fff center/contain no-repeat; background-color: var(--panel-2);
}
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .brand-name { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); }
.card .title { font-weight: 600; font-size: 14px; }
.card .specs { margin-top: auto; display: flex; justify-content: space-between; font-size: 13px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.card .weight { color: var(--accent); font-weight: 600; }
.card .price { color: var(--text); }

/* Weight-trust tags */
.wtag {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  padding: 1px 5px; border-radius: 4px; vertical-align: middle; cursor: help;
}
.wtag-override { background: var(--accent-dim); color: #eafff5; }
.wtag-page     { background: #2e5a3a; color: #d8ffe4; }
.wtag-listed   { background: #2b3a4a; color: #cfe3ff; }
.wtag-shipping { background: #4a3a2b; color: #ffdfc0; }

.empty { color: var(--muted); text-align: center; margin-top: 40px; }

/* Ratings */
.rating { color: #b07d1a; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rating .rcount { color: var(--muted); font-weight: 400; margin-left: 3px; }
.card-rating { margin-top: 2px; }
.m-rating { margin: 6px 0 2px; font-size: 15px; }

/* Featured kits */
.featured-intro h2 { margin: 0 0 4px; }
.featured-intro p { color: var(--muted); margin: 0 0 20px; max-width: 640px; font-size: 14px; }
.featured-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.hiker-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.hiker-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hiker-name { font-size: 20px; font-weight: 700; }
.hiker-tag { color: var(--accent); font-size: 13px; }
.hiker-bio { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 10px 0 14px; }
.kit-chips { display: flex; flex-direction: column; gap: 8px; }
.kit-chip {
  text-align: left; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: border-color .12s;
  display: flex; flex-direction: column; gap: 2px;
}
.kit-chip:hover { border-color: var(--accent-dim); }
.kit-chip-name { font-weight: 600; }
.kit-chip-meta { color: var(--muted); font-size: 12px; }

.back-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 0 12px; }
.back-btn:hover { color: var(--text); }
.kit-header { margin-bottom: 16px; }
.kit-hiker { color: var(--accent); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.kit-header h2 { margin: 2px 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kit-blurb { color: var(--muted); margin: 0; font-size: 14px; }
.season-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--accent-dim); color: #eafff5; border-radius: 999px; padding: 2px 10px;
}
.season-badge.winter { background: #2b3a4a; color: #cfe3ff; }
.add-all-btn {
  background: var(--accent-dim); color: #eafff5; border: none; border-radius: 10px;
  padding: 11px 18px; font-size: 15px; font-weight: 600; cursor: pointer; margin: 16px 0; width: 100%;
}
.add-all-btn:hover { background: var(--accent); color: #f4faf6; }
.kit-item { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.kit-item .thumb { width: 42px; height: 42px; border-radius: 6px; background: #fff center/contain no-repeat; flex: none; }
.kit-item .info { flex: 1; min-width: 0; }
.kit-item .info .t { font-weight: 600; font-size: 14px; }
.kit-item .info .v { color: var(--muted); font-size: 12px; }
.kit-item-spec { color: var(--muted); font-size: 13px; white-space: nowrap; }
.add-one { background: var(--accent-dim); color: #fff; border: none; border-radius: 6px; padding: 6px 12px; cursor: pointer; flex: none; }
.add-one:hover { background: var(--accent); color: #f4faf6; }
.view-one { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 5px 9px; cursor: pointer; flex: none; }
.view-one:hover { border-color: var(--accent-dim); color: var(--text); }

/* Builder */
.totals {
  display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; min-width: 120px; flex: 1;
}
.stat .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-family: var(--mono); }
.stat .value { font-size: 22px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .value .unit { font-size: 13px; color: var(--muted); font-weight: 400; }
.stat.base .value { color: var(--accent); }

.cat-group { margin-bottom: 18px; }
.cat-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.pack-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; margin-bottom: 8px;
}
.pack-row .thumb { width: 40px; height: 40px; border-radius: 6px; background: #fff center/contain no-repeat; flex: none; }
.pack-row .info { flex: 1; min-width: 0; }
.pack-row .info .t { font-weight: 600; font-size: 14px; }
.pack-row .info .v { color: var(--muted); font-size: 12px; }
.pack-row .buy-link {
  display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 600;
  color: var(--accent); text-decoration: none; font-family: var(--mono);
}
.pack-row .buy-link:hover { text-decoration: underline; }
.pack-row .flags { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.pack-row .flags label { cursor: pointer; user-select: none; }
.pack-row .w { color: var(--accent); font-weight: 600; min-width: 64px; text-align: right; }
.pack-row .qty { width: 46px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px; text-align: center; }
.pack-row .rm { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.pack-row .rm:hover { color: #c0392b; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-width: 620px; width: 100%; max-height: 88vh; overflow: auto; position: relative; padding: 22px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.modal-card h2 { margin: 0 4px 2px 0; }
.modal-card .m-brand { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.modal-card .m-img { width: 100%; max-height: 260px; object-fit: contain; background: #fff; border-radius: 10px; margin: 14px 0; }
.variant-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.variant-table th, .variant-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.variant-table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; }
.variant-table .add { background: var(--accent-dim); color: #fff; border: none; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.variant-table .add:hover { background: var(--accent); color: #f4faf6; }
.m-desc { margin-top: 10px; color: var(--muted); font-size: 14px; }
.m-desc ul { padding-left: 18px; }
.m-desc-wrap { margin-top: 16px; }
.m-desc-wrap summary { cursor: pointer; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

/* Product-page spec sheet (scraped specs + warranty) */
.lp-specs { margin-top: 22px; }
.lp-specs h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.lp-spec-table { border-collapse: collapse; width: 100%; max-width: 560px; }
.lp-spec-table th, .lp-spec-table td {
  text-align: left; padding: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lp-spec-table th { color: var(--muted); font-weight: 600; width: 42%; }
.lp-spec-table td { font-variant-numeric: tabular-nums; }

/* Modal actions row: brand link + video button */
.m-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.m-link, .m-video {
  display: inline-block; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
}
.m-link { background: var(--accent-dim); color: #eafff5; }
.m-link:hover { background: var(--accent); color: #f4faf6; }
.m-video { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.m-video:hover { border-color: var(--accent-dim); }

/* Alternatives ("similar gear") */
.m-section { margin-top: 20px; }
.m-section-h { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 10px; }
.alt-row {
  display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color .12s;
}
.alt-row:hover { border-color: var(--accent-dim); }
.alt-thumb { width: 44px; height: 44px; border-radius: 6px; background: #fff center/contain no-repeat; flex: none; }
.alt-info { flex: 1; min-width: 0; }
.alt-t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alt-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.alt-delta { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; flex: none; }

.delta { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.delta.good { background: var(--accent-dim); color: #eafff5; }
.delta.bad { background: #4a3a2b; color: #ffdfc0; }
.delta.muted { background: var(--panel); color: var(--muted); }

/* Pack builder swap suggestions */
.savings-banner {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px;
}
.pack-row-wrap { margin-bottom: 8px; }
.pack-row-wrap .pack-row { margin-bottom: 0; }
.pack-row.owned { opacity: .8; border-style: dashed; }
.owned-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  background: var(--panel-2); color: var(--accent); border: 1px solid var(--accent-dim);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: middle;
}
.swap:not(:empty) { margin: 4px 0 0 52px; }
.swap-btn {
  background: none; border: 1px dashed var(--accent-dim); color: var(--accent);
  border-radius: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; text-align: left;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.swap-btn:hover { background: var(--panel-2); }

/* Pack coverage — beginner-facing "systems" checklist, vertical list, monochrome */
.coverage {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px 18px; margin-bottom: 20px;
}
.cov-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.cov-title { font-weight: 700; font-size: 15px; }
.cov-progress-label { color: var(--muted); font-size: 13px; white-space: nowrap; }
.cov-bar { height: 4px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.cov-bar-fill { height: 100%; width: 0; background: var(--accent-dim); border-radius: 999px; transition: width .35s ease; }
.cov-bar-fill.done { background: var(--accent); }

.cov-list { display: flex; flex-direction: column; }
.cov-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; border-top: 1px solid var(--line);
  padding: 13px 6px; margin: 0; cursor: pointer; color: var(--text); text-align: left;
  transition: background .12s;
}
.cov-row:hover { background: var(--panel-2); }
.cov-dot {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: transparent; transition: background .12s, border-color .12s, color .12s;
}
.cov-row.filled .cov-dot { background: var(--accent-dim); border-color: var(--accent-dim); color: #eafff5; }
.cov-label { font-size: 14px; font-weight: 600; }
.cov-status { color: var(--muted); font-size: 13px; margin-left: auto; }
.cov-row.filled .cov-status { color: var(--text); }
.cov-action {
  display: inline-flex; align-items: center; gap: 3px; flex: none;
  color: var(--muted); font-size: 12.5px; opacity: 0; transition: opacity .12s, color .12s;
}
.cov-row:hover .cov-action { opacity: 1; color: var(--accent); }

.cov-divider {
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  border-top: 1px solid var(--line); padding: 12px 6px 4px; margin: 0;
}

/* Packed items nested under their category row */
.cov-cat { border-top: 1px solid var(--line); }
.cov-cat .cov-row { border-top: none; }
.cov-divider + .cov-cat, .cov-list > .cov-cat:first-child { border-top: none; }
.cov-items { padding: 0 0 10px 30px; display: flex; flex-direction: column; }
.cov-items .pack-row-wrap { margin-bottom: 6px; }
.cov-items .pack-row-wrap:last-child { margin-bottom: 0; }
.cov-items .swap:not(:empty) { margin: 4px 0 0 8px; }
@media (max-width: 640px) { .cov-items { padding-left: 8px; } }

.cov-hints { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.cov-hint {
  text-align: left; font-size: 12.5px; color: var(--muted); cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 2px solid var(--accent-dim);
  border-radius: 6px; padding: 8px 11px; transition: color .12s, border-color .12s;
}
.cov-hint:hover { color: var(--text); border-left-color: var(--accent); }

/* On narrow screens the hover-reveal action is unreachable — always show it there. */
@media (max-width: 640px) { .cov-action { opacity: 1; } }

/* ---------------------------------------------- SEO landing pages (server-rendered) */
.topbar a.tab { text-decoration: none; }
.topbar .brand { text-decoration: none; }
a.card { text-decoration: none; color: inherit; }

.lp { max-width: 1080px; }
.lp-crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 18px; letter-spacing: .02em; }
.lp-crumbs a { color: var(--muted); text-decoration: none; }
.lp-crumbs a:hover { color: var(--accent); }
.lp-crumbs span { color: var(--text); }
.lp-h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.02em; margin: 8px 0 0; line-height: 1.05; text-wrap: balance; }
.lp-intro { color: var(--muted); font-size: 16px; line-height: 1.55; max-width: 62ch; margin: 14px 0 22px; }
.lp-intro strong { color: var(--text); }

.lp-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.lp-chip {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; color: var(--text); transition: border-color .12s, background .12s;
}
.lp-chip:hover { border-color: var(--accent-dim); background: var(--panel-2); }
.lp-chip span { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.lp-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--panel-2), var(--panel));
  border: 1px solid var(--accent-dim); border-radius: 16px; padding: 26px 30px; margin: 34px 0 10px;
}
.lp-cta h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.lp-cta p { margin: 0; color: var(--muted); font-size: 14px; max-width: 50ch; }
.lp-cta .cta-btn { text-decoration: none; display: inline-block; }

/* Product landing page */
.lp-product-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
.lp-media { background: #fff; border-radius: var(--radius); padding: 18px; }
.lp-img { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.lp-rating { margin: 8px 0 4px; font-size: 15px; }
.lp-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.lp-stats .stat { flex: 1; min-width: 96px; }
.lp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.lp-actions .cta-btn { text-decoration: none; }
.lp-actions .m-video { text-decoration: none; }
@media (max-width: 760px) { .lp-product-grid { grid-template-columns: 1fr; } }

/* Global footer — crawlable internal links, shared by SEO pages + the SPA */
.site-footer {
  max-width: 1080px; margin: 60px auto 0; padding: 34px 20px 48px;
  border-top: 1px solid var(--line); display: grid;
  grid-template-columns: repeat(3, 1fr); gap: 28px 40px;
}
.site-footer h3 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px; font-weight: 600;
}
.sf-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sf-links a { color: var(--text); text-decoration: none; font-size: 13.5px; }
.sf-links a:hover { color: var(--accent); }
.sf-legal { grid-column: 1 / -1; color: var(--muted); font-size: 12px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 20px; max-width: 70ch; }
@media (max-width: 560px) { .site-footer { grid-template-columns: 1fr; } }

/* ------------------------------------------------ Content: guides + best-of lists */
.lp-dek { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); line-height: 1.5; max-width: 60ch; margin: 12px 0 20px; }

/* Guides index cards */
.guide-sec { font-size: 15px; font-weight: 700; margin: 32px 0 14px; letter-spacing: -.01em; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: border-color .12s, transform .12s;
}
.guide-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.gc-kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ochre); }
.guide-card.best .gc-kind { color: var(--accent); }
.gc-title { font-size: 16px; font-weight: 700; line-height: 1.25; }
.gc-dek { font-size: 13px; color: var(--muted); line-height: 1.45; }

/* Article body (written guides) */
.article-body { max-width: 68ch; font-size: 16.5px; line-height: 1.65; }
.article-body h2 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; margin: 32px 0 10px; }
.article-body p { margin: 0 0 15px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 7px; }
.article-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 650; }
.article-body em { color: var(--text); }
.guide-cta-line {
  margin-top: 26px !important; padding: 16px 18px; background: var(--panel-2);
  border-left: 3px solid var(--accent); border-radius: 8px; font-size: 16px;
}
.guide-cta-line a { font-weight: 650; }

/* Guide figures (image slots with credit) + comparison tables */
.guide-fig { margin: 24px 0; }
.guide-fig img { width: 100%; display: block; border: 1px solid var(--line); border-radius: var(--radius); }
.fig-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 190px; padding: 22px; border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--panel-2); color: var(--muted); font-family: var(--mono); font-size: 13px; line-height: 1.5;
}
.guide-fig figcaption { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: italic; }
.article-body .table-wrap { overflow-x: auto; margin: 20px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.article-body th, .article-body td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body thead th {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; white-space: nowrap;
}
.article-body tbody tr:last-child td { border-bottom: none; }
.article-body .kit-total td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: none; }
.article-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 6px; letter-spacing: -.01em; }

/* Data-driven product picks inside a guide (the "shop the kit" cards) */
.pick-list { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.pick {
  display: grid; grid-template-columns: 132px 1fr; gap: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.pick-img { display: block; text-decoration: none; }
.pick-img img { width: 132px; height: 132px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pick-credit { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); text-align: center; }
.pick-body { min-width: 0; }
.pick-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ochre); }
.pick-name { display: block; font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none; margin: 3px 0 6px; letter-spacing: -.01em; }
.pick-name:hover { color: var(--accent); }
.pick-specs { display: flex; gap: 14px; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 9px; }
.pick-specs .weight { color: var(--accent); font-weight: 600; }
.pick-blurb { margin: 0 0 13px; font-size: 14.5px; line-height: 1.55; }
.pick-blurb a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.pick-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pick-detail { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; }
.pick-detail:hover { color: var(--accent); }
.pick-add {
  font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #f4faf6; border: 1px solid var(--accent);
  border-radius: 9px; padding: 9px 15px; transition: background .12s, border-color .12s;
}
.pick-add:hover { background: #17603f; border-color: #17603f; }
.pick-add.added { background: var(--accent-dim); border-color: var(--accent-dim); }
.pick-buy {
  font-family: var(--sans); font-size: 13px; font-weight: 600; text-decoration: none;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 14px; transition: border-color .12s;
}
.pick-buy:hover { border-color: var(--accent-dim); }
.lp-actions .pick-add { padding: 12px 20px; font-size: 15px; border-radius: 11px; }
@media (max-width: 560px) { .pick { grid-template-columns: 1fr; } .pick-img img { width: 100%; height: 180px; } }

/* Best-of ranked list */
.bo-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bo-item {
  display: grid; grid-template-columns: auto 84px 1fr auto; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.bo-rank { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--muted); width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.bo-thumb { display: block; }
.bo-thumb .thumb { display: block; width: 84px; height: 84px; border-radius: 8px; background: #fff center/contain no-repeat; background-color: var(--panel-2); }
.bo-body { min-width: 0; }
.bo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bo-title { font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; }
.bo-title:hover { color: var(--accent); }
.bo-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-dim); border-radius: 5px; padding: 2px 7px; white-space: nowrap;
}
.bo-specs { display: flex; gap: 14px; align-items: center; margin-top: 6px; font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bo-specs .weight { color: var(--accent); font-weight: 600; }
.bo-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: center; }
.cta-btn.sm { padding: 9px 14px; font-size: 13px; border-radius: 9px; text-decoration: none; white-space: nowrap; }
.bo-detail { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-decoration: none; }
.bo-detail:hover { color: var(--accent); }
.bo-note { color: var(--muted); font-size: 12.5px; margin-top: 20px; max-width: 68ch; }
@media (max-width: 640px) {
  .bo-item { grid-template-columns: auto 60px 1fr; grid-template-areas: "rank thumb body" "act act act"; row-gap: 10px; }
  .bo-thumb .thumb { width: 60px; height: 60px; }
  .bo-actions { grid-area: act; flex-direction: row; }
  .cta-btn.sm { flex: 1; }
}

/* Homepage "Field guides" section reuses .home-kit cards */
.home-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
a.home-guide { text-decoration: none; }

/* ===== Compare tool ======================================================= */
/* Compare toggle on each directory card (top-right of the thumbnail) */
.card .thumb { position: relative; }
.card-compare {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(243, 245, 238, .92);
  color: var(--muted); font-size: 15px; line-height: 1; font-weight: 700;
  display: grid; place-items: center; transition: background .12s, color .12s, border-color .12s;
}
.card-compare:hover { border-color: var(--accent-dim); color: var(--accent); }
.card-compare.on { background: var(--accent); color: #f4faf6; border-color: var(--accent); }

/* "Add to compare" button inside the product modal (matches .m-video styling) */
.m-compare {
  display: inline-block; font-size: 14px; font-weight: 600; padding: 8px 14px;
  border-radius: 8px; cursor: pointer; font-family: var(--sans);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
}
.m-compare:hover { border-color: var(--accent-dim); }
.m-compare.on { background: var(--accent); color: #f4faf6; border-color: var(--accent); }

/* Per-variant compare toggle inside the product modal's variant table */
.v-actions { white-space: nowrap; }
.v-compare {
  margin-left: 6px; width: 28px; height: 28px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: 14px; font-weight: 700; line-height: 1; vertical-align: middle;
}
.v-compare:hover { border-color: var(--accent-dim); color: var(--accent); }
.v-compare.on { background: var(--accent); color: #f4faf6; border-color: var(--accent); }

/* Floating compare tray */
.compare-tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--panel); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(24, 36, 29, .12);
}
.compare-tray.limit { animation: cmp-shake .35s; }
@keyframes cmp-shake { 0%,100%{transform:none} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.ctray-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ctray-label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ctray-count { color: var(--accent); font-weight: 700; }
.ctray-chips { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 0; }
.ctray-chip {
  display: flex; align-items: center; gap: 6px; max-width: 220px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px 3px 3px;
}
.ctray-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff center/cover no-repeat; background-color: var(--bg); flex: none; }
.ctray-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; line-height: 1.2; }
.ctray-sub { font-size: 10.5px; color: var(--ochre); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; }
.ctray-x { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 0 2px; flex: none; }
.ctray-x:hover { color: var(--text); }
.ctray-actions { display: flex; gap: 8px; align-items: center; }
.ctray-clear { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.ctray-clear:hover { color: var(--text); }
.ctray-go {
  background: var(--accent); color: #f4faf6; border: none; border-radius: 8px;
  padding: 9px 18px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--sans);
}
.ctray-go:disabled { background: var(--panel-2); color: var(--muted); cursor: default; }

/* Keep page content clear of the fixed tray */
body:has(.compare-tray:not(.hidden)) { padding-bottom: 74px; }

/* Compare view */
.compare-head h2 { margin: 0 0 4px; }
.compare-sub { color: var(--muted); font-size: 14px; max-width: 720px; margin: 0 0 18px; }
.compare-empty, .compare-loading { color: var(--muted); margin-top: 30px; }
.linklike { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }

.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
/* Fixed layout so every product column is the same width (and thus every image the same size) */
.compare-table { border-collapse: collapse; width: 100%; min-width: 560px; table-layout: fixed; }
.compare-table th, .compare-table td {
  border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top;
  font-size: 13.5px;
}
/* Row-label column: sticky so specs stay identifiable while scrolling columns */
.cmp-rowlabel, .cmp-corner {
  position: sticky; left: 0; z-index: 1; background: var(--panel-2);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; width: 150px; min-width: 128px;
}
.cmp-corner { z-index: 3; }
.compare-table thead th { background: var(--panel); position: sticky; top: 0; z-index: 2; }
.compare-table thead .cmp-corner { z-index: 4; }
.cmp-h { width: 210px; }
.cmp-remove { float: right; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.cmp-remove:hover { color: var(--text); }
.cmp-hthumb {
  width: 100%; height: 150px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  background: #fff center/contain no-repeat; background-color: var(--panel-2); display: block; margin-bottom: 8px;
}
.cmp-hbrand { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cmp-htitle { display: block; text-align: left; background: none; border: none; padding: 2px 0 2px; cursor: pointer; font: 600 14px var(--sans); color: var(--text); }
.cmp-htitle:hover { color: var(--accent); }
.cmp-hsub {
  display: inline-block; margin: 2px 0 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--ochre); letter-spacing: .02em;
}
.cmp-view { background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: var(--text); font-family: var(--sans); }
.cmp-view:hover { border-color: var(--accent-dim); color: var(--accent); }
.compare-table td { font-variant-numeric: tabular-nums; }
.cmp-best { background: rgba(31, 122, 82, .12); }
.cmp-best::after { content: " ★"; color: var(--accent); font-size: 11px; }
.cmp-range { color: var(--muted); font-size: 12px; }
.cmp-dash { color: var(--muted); }
tr.cmp-section .cmp-rowlabel { background: var(--panel); color: var(--ochre); }
tr.cmp-section td { background: var(--panel); }
.cmp-summary { font-size: 12.5px; line-height: 1.5; color: var(--muted); min-width: 200px; max-width: 320px; white-space: normal; }
.cmp-feat { margin: 0; padding-left: 16px; font-size: 12px; line-height: 1.45; color: var(--text); white-space: normal; min-width: 200px; max-width: 320px; }
.cmp-feat li { margin-bottom: 4px; }

/* ===== Bring Your Own Gear (custom items) ================================= */
/* Entry-point buttons (directory controls + My Pack) */
.byog-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 14px; height: 38px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: var(--sans); white-space: nowrap;
}
.byog-btn:hover { border-color: var(--accent-dim); color: var(--accent); }
.byog-btn.primary { background: var(--accent); color: #f4faf6; border-color: var(--accent); height: 40px; padding: 0 18px; }
.byog-btn.primary:hover { background: var(--accent-dim); color: #f4faf6; }
.pack-byog { margin: 4px 0 14px; }

/* "Add your own gear" card + custom-gear cards in the My Gear directory view */
.add-card {
  border: 1px dashed var(--line); background: var(--panel-2); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 20px; min-height: 210px; color: var(--muted);
}
.add-card:hover { border-color: var(--accent); color: var(--accent); }
.add-card-plus { font-size: 34px; line-height: 1; color: var(--accent); }
.add-card-t { font-weight: 700; font-size: 15px; color: var(--text); }
.add-card-d { font-size: 12px; }
.myg-empty { grid-column: 1 / -1; }

.custom-thumb {
  display: grid; place-items: center; background: var(--panel-2) !important; color: var(--muted);
}
.custom-thumb span {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
}
.custom-card .cc-actions { margin-top: 8px; display: flex; gap: 8px; }
.custom-card .cc-add, .custom-card .cc-edit {
  flex: 1; border-radius: 7px; padding: 6px 8px; font-size: 12.5px; cursor: pointer;
  font-family: var(--sans); font-weight: 600;
}
.custom-card .cc-add { background: var(--accent); color: #f4faf6; border: 1px solid var(--accent); }
.custom-card .cc-add:hover { background: var(--accent-dim); }
.custom-card .cc-edit { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.custom-card .cc-edit:hover { border-color: var(--accent-dim); color: var(--accent); }

/* Custom-item row in the pack: small "custom" thumb + edit pencil */
.pack-row .thumb.custom-thumb { display: grid; }
.pack-row .thumb.custom-thumb span { font-size: 7.5px; padding: 1px 3px; letter-spacing: .08em; }
.pack-row .edit-custom, .pack-row .edit-item {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px;
}
.pack-row .edit-custom:hover, .pack-row .edit-item:hover { color: var(--accent); }
.cf-reset { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.cf-reset:hover { color: var(--text); text-decoration: underline; }

/* ===== Trust/legal pages + 404 =========================================== */
.legal-page { max-width: 760px; }
.legal-page h1 { margin: 0 0 14px; }
.legal-page .lead { font-size: 16px; color: var(--text); }
.legal-page h2 { margin: 26px 0 8px; font-size: 18px; }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.6; }
.legal-page a { color: var(--accent); }
.notfound-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.notfound-actions .cta-btn { text-decoration: none; }

/* Price-drop (was $Y) shown next to a discounted price */
.was { color: var(--muted); font-weight: 400; margin-left: 4px; font-size: .92em; }

/* ===== Deals / on-sale ==================================================== */
.card .thumb { position: relative; }
.sale-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--ochre); color: #fff; font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 6px;
}
/* Directory numeric filters + on-sale toggle */
.num-filter { width: 92px; }
.onsale-toggle {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted);
  white-space: nowrap; cursor: pointer;
}
.onsale-toggle input { accent-color: var(--accent); }

/* ===== Pack tools + insights ============================================= */
.pack-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }

.insights-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
}
.ins-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ins-head h3 { margin: 0; font-size: 14px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.goal-set { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.goal-set input { width: 68px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; text-align: center; }

.wb { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.wb-row { display: grid; grid-template-columns: 130px 1fr 120px; align-items: center; gap: 10px; font-size: 13px; }
.wb-cat { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-track { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.wb-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.wb-val { text-align: right; color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

.goal-block { margin-top: 10px; }
.goal-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.goal-status { font-family: var(--mono); font-weight: 700; }
.goal-block.under .goal-status { color: var(--accent); }
.goal-block.over .goal-status { color: var(--ochre); }
.goal-track { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.goal-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.goal-block.over .goal-fill { background: var(--ochre); }

@media (max-width: 560px) {
  .wb-row { grid-template-columns: 96px 1fr 92px; gap: 8px; font-size: 12px; }
}

/* Trip planner output */
.trip-out { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel-2); }
.trip-line { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); padding: 3px 0; }
.trip-line strong { color: var(--text); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.trip-line.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 7px; }
.trip-line.total span, .trip-line.total strong { color: var(--accent); font-weight: 700; }

/* Saved packs list */
.pk-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pk-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--panel); }
.pk-row.active { border-color: var(--accent-dim); background: var(--panel-2); }
.pk-name { font-weight: 600; font-size: 14px; }
.pk-meta { color: var(--muted); font-size: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pk-act { display: flex; gap: 8px; flex: none; }
.pk-load { background: var(--accent); color: #f4faf6; border: 1px solid var(--accent); border-radius: 7px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pk-load:hover { background: var(--accent-dim); }
.pk-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; }
.pk-del:hover { color: #c0392b; }

/* "Report a correction" link (product modal + server product page) */
.lp-report { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.lp-report:hover { color: var(--accent); }

/* Newsletter signup in the footer */
.sf-sub .newsletter-form { display: flex; gap: 6px; margin-top: 4px; }
.sf-sub .newsletter-form input {
  flex: 1; min-width: 0; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px;
}
.sf-sub .newsletter-form button {
  background: var(--accent); color: #f4faf6; border: none; border-radius: 8px;
  padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.sf-sub .newsletter-form button:hover { background: var(--accent-dim); }
.sf-sub-note { color: var(--muted); font-size: 11.5px; margin: 6px 0 0; }

/* ===== Accessibility ===================================================== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #f4faf6; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===== Print: a clean pack sheet ========================================= */
@media print {
  .topbar, .site-footer, .compare-tray, .pack-actions, .pack-byog, #pack-savings,
  .cov-action, .cov-hints, .flags, .qty, .rm, .edit-item, .edit-custom, .swap,
  .card-compare, .byog-btn { display: none !important; }
  body::before { display: none; }
  body { background: #fff; }
  .view { display: block !important; }
  #view-home, #view-directory, #view-featured, #view-compare { display: none !important; }
  .pack-row { break-inside: avoid; border-color: #ccc; }
  a[href]::after { content: ""; }
}

/* ===== Responsive pack rows (mobile) ===================================== */
@media (max-width: 560px) {
  .pack-row { flex-wrap: wrap; gap: 8px 10px; }
  .pack-row .info { flex-basis: calc(100% - 52px); }
  .pack-row .w { order: 5; min-width: 0; margin-left: auto; }
  .pack-row .qty { order: 4; }
  .pack-row .flags { order: 6; flex-basis: 100%; justify-content: flex-start; gap: 14px; }
  .pack-row .edit-custom, .pack-row .edit-item, .pack-row .rm { order: 7; }
}

/* The add / edit form (rendered in the shared modal) */
.cf-help { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.custom-form { display: flex; flex-direction: column; gap: 12px; }
.custom-form .cf-row { display: flex; gap: 12px; flex-wrap: wrap; }
.custom-form .cf-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); flex: 1; min-width: 130px; }
.custom-form input, .custom-form select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; font-size: 14px; font-family: var(--sans);
}
.custom-form input:focus, .custom-form select:focus { outline: none; border-color: var(--accent-dim); }
.cf-flags { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text); }
.cf-flags label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.cf-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.cf-delete { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 13px; }
.cf-delete:hover { text-decoration: underline; }

/* ── Accounts & social ───────────────────────────────────────────────────── */
.account { display: flex; align-items: center; gap: 8px; position: relative; }
.acct-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--text); cursor: pointer;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-family: var(--mono);
  letter-spacing: .02em; transition: border-color .12s, background .12s;
}
.acct-btn:hover { border-color: var(--accent-dim); }
#signin-btn { background: var(--accent); color: #f4faf6; border-color: var(--accent); }
#signin-btn:hover { background: var(--accent-dim); }

.bell {
  position: relative; background: none; border: 1px solid var(--line); color: var(--muted);
  width: 36px; height: 34px; border-radius: 999px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: color .12s, border-color .12s;
}
.bell:hover { color: var(--text); border-color: var(--accent-dim); }
.bell svg { width: 18px; height: 18px; }
.bell-count {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--ochre); color: #fff; border-radius: 999px; font-size: 10.5px; line-height: 17px;
  text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums;
}

.acct-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; min-width: 200px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(24, 36, 29, .16); padding: 6px; display: flex; flex-direction: column;
}
.am-head { padding: 8px 10px 10px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; line-height: 1.4; }
.am-head strong { color: var(--text); font-size: 13px; }
.am-item {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); text-decoration: none;
  font-family: var(--sans);
}
.am-item:hover { background: var(--panel-2); }
.am-signout { color: #c0392b; border-top: 1px solid var(--line); margin-top: 4px; }

.cf-hint { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.auth-err {
  background: #fbeae7; border: 1px solid #e6b6ac; color: #a4321f;
  border-radius: 8px; padding: 8px 11px; font-size: 13px;
}
.auth-switch { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.linkish { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
.linkish:hover { color: var(--accent-dim); }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .account { order: 3; }
}

.custom-form textarea {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; font-size: 14px; font-family: var(--sans); resize: vertical;
}
.custom-form textarea:focus { outline: none; border-color: var(--accent-dim); }
.pk-list { display: flex; flex-direction: column; gap: 8px; }
.pk-act button { background: var(--panel); border: 1px solid var(--line); color: var(--text);
  cursor: pointer; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; }
.pk-act button:hover { border-color: var(--accent-dim); }
.pk-act .pk-del:hover { border-color: #c0392b; color: #c0392b; }

/* Public pack page (/p/{slug}) */
.pack-page { max-width: 1000px; margin: 0 auto; padding: 8px 4px 40px; }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.pp-head h1 { margin: 4px 0 6px; font-size: clamp(22px, 3vw, 30px); }
.pp-owner { color: var(--muted); font-size: 13px; margin: 0; font-family: var(--mono); }
.pp-owner-link { color: var(--accent); text-decoration: none; }
.pp-owner-link:hover { text-decoration: underline; }
.pp-desc { color: var(--text); font-size: 14.5px; margin: 10px 0 0; max-width: 60ch; line-height: 1.5; }
.pp-follow { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.pp-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; min-width: 120px; }
.pp-stat-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--mono); margin-bottom: 4px; }
.pp-stat strong { font-size: 18px; color: var(--text); font-variant-numeric: tabular-nums; }
.pp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.pp-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.pp-group { margin-bottom: 18px; }
.pp-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-family: var(--mono); margin: 0 0 8px; }
.pp-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pp-name { color: var(--text); }
.pp-opt { color: var(--muted); font-size: 12px; }
.pp-brand { color: var(--muted); font-size: 12px; font-family: var(--mono); text-align: right; }
.pp-wt { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pp-activity h2 { font-size: 14px; margin: 0 0 12px; }
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ev { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: baseline; font-size: 13px; }
.ev-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--muted); margin-top: 4px; }
.ev-added { background: var(--accent); }
.ev-removed { background: #c0392b; }
.ev-changed { background: var(--ochre); }
.ev-created { background: var(--accent-dim); }
.ev-text { color: var(--text); line-height: 1.4; }
.ev-detail { color: var(--muted); }
.ev-time { color: var(--muted); font-size: 11px; font-family: var(--mono); white-space: nowrap; }
.ev-empty { color: var(--muted); font-size: 13px; list-style: none; }
@media (max-width: 760px) { .pp-cols { grid-template-columns: 1fr; } }

/* Follow buttons */
.follow-btn {
  background: var(--accent); color: #f4faf6; border: 1px solid var(--accent);
  cursor: pointer; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: background .12s, color .12s, border-color .12s;
}
.follow-btn:hover { background: var(--accent-dim); }
.follow-btn.following { background: var(--panel); color: var(--text); border-color: var(--line); font-weight: 500; }
.follow-btn.following:hover { border-color: #c0392b; color: #c0392b; }
.follow-btn:disabled { opacity: .6; cursor: default; }

/* Profile page (/u/{handle}) */
.profile-page { max-width: 860px; margin: 0 auto; padding: 8px 4px 40px; }
.pr-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pr-avatar {
  width: 64px; height: 64px; border-radius: 999px; background: var(--accent-dim); color: #eafff5;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex: none;
}
.pr-id { flex: 1; min-width: 200px; }
.pr-id h1 { margin: 0 0 2px; font-size: clamp(20px, 3vw, 26px); }
.pr-handle { color: var(--muted); font-family: var(--mono); font-size: 13px; margin: 0 0 8px; }
.pr-bio { color: var(--text); font-size: 14px; line-height: 1.5; margin: 0 0 8px; max-width: 55ch; }
.pr-counts { color: var(--muted); font-size: 13px; margin: 0; }
.pr-counts strong { color: var(--text); font-variant-numeric: tabular-nums; }
.pr-sec { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-family: var(--mono); margin: 28px 0 12px; }
.pr-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pr-pack { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; text-decoration: none; transition: border-color .12s, transform .12s; }
.pr-pack:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.pr-pack-name { color: var(--text); font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.pr-pack-meta { color: var(--muted); font-size: 12px; font-family: var(--mono); }

/* Following list (modal) */
.fl-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--mono); margin: 16px 0 8px; }
.fl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.fl-main { text-decoration: none; color: var(--text); font-size: 14px; }
.fl-main:hover strong { color: var(--accent); }
.fl-sub { color: var(--muted); font-size: 12px; font-family: var(--mono); }
.fl-unfollow { background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; padding: 5px 11px; border-radius: 999px; font-size: 12px; }
.fl-unfollow:hover { border-color: #c0392b; color: #c0392b; }

/* Notification feed (/#feed) */
.feed-page { max-width: 720px; margin: 0 auto; padding: 8px 4px 40px; }
.feed-page h1 { font-size: clamp(20px, 3vw, 26px); margin: 0 0 4px; }
.feed-sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.feed-list { gap: 2px; }
.feed-ev { padding: 12px 12px; border-radius: 10px; align-items: baseline; }
.feed-ev .ev-text { text-decoration: none; }
.feed-ev .ev-text:hover strong { color: var(--accent); }
.feed-new { background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
.feed-pack { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-left: 4px; }
.feed-foot { margin-top: 20px; font-size: 13px; }

/* Watch-price button (product modal) */
.m-watch {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; cursor: pointer;
}
.m-watch:hover { border-color: var(--ochre); color: var(--ochre); }
.m-watch.watching { background: var(--ochre); color: #fff5e9; border-color: var(--ochre); }

/* Price-drop feed events */
.ev-price { background: var(--ochre); }
.feed-price { color: var(--ochre); font-size: 12.5px; font-family: var(--mono);
  font-variant-numeric: tabular-nums; margin-left: 4px; }
.feed-price strong { color: var(--ochre); }

/* Wishlist / price watch page */
.wishlist-page { max-width: 720px; margin: 0 auto; padding: 8px 4px 40px; }
.wishlist-page h1 { font-size: clamp(20px, 3vw, 26px); margin: 0 0 4px; }
.wl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wl-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.wl-row:hover { border-color: var(--accent-dim); }
.wl-thumb { width: 52px; height: 52px; flex: none; border-radius: 8px;
  background: #fff center/contain no-repeat; background-color: var(--panel-2); }
.wl-info { flex: 1; min-width: 0; }
.wl-t { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.wl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.wl-price { color: var(--accent); font-weight: 600; }
.wl-price.wl-drop { color: var(--ochre); }
.wl-was { color: var(--muted); }
.wl-badge { background: var(--ochre); color: #fff5e9; border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.wl-sale { background: var(--accent-dim); color: #eafff5; border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.wl-since { color: var(--muted); }
.wl-remove { flex: none; background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; width: 26px; height: 26px; cursor: pointer; line-height: 1; }
.wl-remove:hover { border-color: #c0392b; color: #c0392b; }
