:root {
  --bg: #F4EFE6;
  --surface: #FBF8F2;
  --ink: #1F1B16;
  --muted: #6B6258;
  --line: #E0D7C8;
  --copper: #B05C32;
  --copper-deep: #8A4524;
  --shadow: 0 1px 2px rgba(31,27,22,.05), 0 8px 24px rgba(31,27,22,.06);
  --radius: 2px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--copper-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }

.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--copper); font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted); }

/* ---------- Home header ---------- */
.hero-head {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 20px 24px;
}
.hero-head h1 { font-size: clamp(40px, 7vw, 72px); margin: 0 0 12px; }
.hero-head .lede { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 60ch; margin: 0; }

/* ---------- Home cinematic hero band ---------- */
.home-hero {
  position: relative; max-width: var(--maxw); margin: 12px auto 0; padding: 0;
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: #ddd6c8;
  isolation: isolate;
}
.home-hero-img {
  width: 100%; aspect-ratio: 16/7; object-fit: cover; display: block;
}
.home-hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(20,16,12,.86) 0%, rgba(20,16,12,.50) 42%, rgba(20,16,12,.18) 78%, rgba(20,16,12,.30) 100%);
}
.home-hero-inner {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: clamp(22px, 4vw, 44px) clamp(20px, 4vw, 46px); color: #fff;
}
.home-hero-inner h1 { font-size: clamp(38px, 6.4vw, 70px); margin: 0 0 12px; color: #fff; }
.home-hero-inner .lede { font-size: clamp(15px, 2.1vw, 20px); color: rgba(255,255,255,.92); max-width: 56ch; margin: 0; }
.home-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 22px 0 0; }
.home-hero-btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 11px 24px;
  background: var(--copper); color: #fff; font-weight: 700; font-size: 15px;
  border-radius: 999px; letter-spacing: .01em;
  transition: background .15s ease, transform .12s ease;
}
.home-hero-btn:hover { background: var(--copper-deep); text-decoration: none; transform: translateY(-1px); }
.home-hero-ghost { color: #fff; font-weight: 600; font-size: 15px; }
.home-hero-ghost:hover { color: #f0c9b4; text-decoration: none; }
@media (max-width: 560px) {
  .home-hero { margin-top: 8px; border-radius: 8px; }
  .home-hero-img { aspect-ratio: 4/3; }
  .home-hero-cta { gap: 12px; }
  .home-hero-btn { width: 100%; justify-content: center; }
  .home-hero-ghost { width: 100%; text-align: center; }
}

/* ---------- Controls ---------- */
.controls {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 20px 28px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  position: sticky; top: 0; background: linear-gradient(var(--bg) 70%, transparent); z-index: 10;
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg-btn {
  font: inherit; font-weight: 500; padding: 9px 18px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; min-height: 44px;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.is-active { background: var(--copper); color: #fff; }
.select-wrap { font-size: 13px; color: var(--muted); display: inline-flex; flex-direction: column; gap: 4px; }
.select-wrap select {
  font: inherit; padding: 9px 12px; min-height: 44px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.count { margin-left: auto; font-size: 14px; color: var(--muted); }

/* ---------- Card grid ---------- */
.cards {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(31,27,22,.06), 0 16px 40px rgba(31,27,22,.12); text-decoration: none; }
.card-media { position: relative; aspect-ratio: 3/2; background: #ddd6c8; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-year {
  position: absolute; top: 10px; left: 10px; background: rgba(31,27,22,.78); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 4px 9px; border-radius: 2px;
}
.card-body { padding: 16px 18px 18px; }
.card-title { font-size: 22px; margin: 0 0 12px; }
.card-title span { color: var(--copper-deep); }
.card-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.card-specs .spec dt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.card-specs .spec dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; }

/* ---------- Detail ---------- */
.detail-nav { max-width: 880px; margin: 0 auto; padding: 24px 20px 0; }
.back-link { font-weight: 600; font-size: 14px; }
.detail { max-width: 880px; margin: 0 auto; padding: 16px 20px 56px; }
.detail-head h1 { font-size: clamp(34px, 6vw, 56px); margin: 0 0 14px; }
.detail-head h1 span { color: var(--copper-deep); }
.detail-hero { border-radius: var(--radius); overflow: hidden; background: #ddd6c8; margin: 8px 0 24px; box-shadow: var(--shadow); }
.detail-hero-img { width: 100%; height: auto; object-fit: cover; }
.detail-desc { font-size: 18px; color: #3a342c; max-width: 64ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.chip { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--copper-deep); background: rgba(176,92,50,.10); border: 1px solid rgba(176,92,50,.22); padding: 4px 10px; border-radius: 999px; }

.spec-table { margin: 36px 0 8px; }
.spec-table h2, .gallery h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.specs-grid { margin: 0; border-top: 1px solid var(--line); }
.specs-grid .spec {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 13px 2px; border-bottom: 1px solid var(--line);
}
.specs-grid .spec dt { margin: 0; color: var(--muted); font-size: 15px; }
.specs-grid .spec dd { margin: 0; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.spec-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; font-style: italic; }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 36px 0; }
.proscons h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 8px; }
.proscons .pros h3 { color: #3f7d54; }
.proscons .cons h3 { color: var(--copper-deep); }
.proscons ul { margin: 0; padding-left: 18px; }
.proscons li { margin: 6px 0; }

.gallery { margin: 40px 0 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery-img { width: 100%; border-radius: var(--radius); background: #ddd6c8; box-shadow: var(--shadow); }

/* ---------- Floor plan ---------- */
.floorplan { margin: 40px 0 0; }
.floorplan h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.floorplan-fig { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); text-align: center; }
.floorplan-img { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.floorplan-fig figcaption { margin-top: 12px; font-size: 12px; letter-spacing: .04em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 56px; font-size: 13px; color: var(--muted); }
.site-footer p { margin: 0 0 6px; }

/* ---------- Hidden (filtered out) ---------- */
.card[hidden], .xcard[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .proscons { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .controls { gap: 12px; }
  .count { margin-left: 0; width: 100%; }
  .hero-head { padding-top: 40px; }
}

/* ---------- Community gallery ---------- */
.hero-cta { margin: 14px 0 0; }
.hero-cta a { font-weight: 700; }
.community { max-width: 1180px; margin: 0 auto; padding: 8px 20px 32px; }
.csec { margin: 0 0 56px; }
.csec-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 8px; }
.csec-head h2 { font-size: clamp(24px, 3.5vw, 34px); margin: 0; }
.csec-count { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.csec-blurb { color: var(--muted); margin: 0 0 22px; max-width: 64ch; font-size: 15px; }
/* Masonry via CSS columns: photos keep their natural aspect ratio, no crop. */
.cgrid { columns: 3 280px; column-gap: 22px; }
.cphoto {
  margin: 0 0 22px; break-inside: avoid; -webkit-column-break-inside: avoid;
  display: block; background: transparent; border: 0; border-radius: 0;
  box-shadow: none; overflow: visible;
}
.cphoto-link { display: block; overflow: hidden; background: #e7e0d2; border-radius: 3px; }
.cphoto-link img { width: 100%; height: auto; display: block; transition: transform .35s ease, filter .35s ease; }
.cphoto-link:hover img { transform: scale(1.03); filter: brightness(1.03); }
.cphoto-cap { padding: 9px 2px 0; font-size: 13px; line-height: 1.45; }
.cphoto-desc { display: block; color: var(--ink); margin-bottom: 2px; }
.cphoto-credit { display: block; color: var(--muted); font-size: 12px; letter-spacing: .01em; }
.cphoto-credit a { color: var(--muted); }
.cphoto-credit a:hover { color: var(--copper-deep); }
.community-foot { max-width: 1180px; margin: 0 auto; padding: 0 20px 56px; font-size: 14px; }

/* ---------- Credits page ---------- */
.credits { max-width: 820px; margin: 0 auto; padding: 8px 20px 64px; }
.credit-list { list-style: none; margin: 0; padding: 0; }
.credit { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.credit-thumb { flex: 0 0 auto; display: block; width: 120px; height: 90px; border-radius: var(--radius); overflow: hidden; background: #ddd6c8; }
.credit-thumb img { width: 100%; height: 100%; object-fit: cover; }
.credit-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.credit-title { font-weight: 500; color: var(--ink); }
.credit-by { color: var(--muted); font-size: 14px; }
.credit-lic { font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
  .cgrid { columns: 2 200px; column-gap: 16px; }
  .cphoto { margin-bottom: 16px; }
  .credit-thumb { width: 88px; height: 66px; }
}
@media (max-width: 440px) {
  .cgrid { columns: 1; }
}

/* ---------- Brand bar ---------- */
.brandbar {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 20px 0;
  width: 100%; font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: 16px; color: var(--ink); letter-spacing: -.01em;
}
.brandbar:hover { text-decoration: none; color: var(--copper-deep); }
.brandbar-mark { color: var(--copper); font-size: 13px; transform: translateY(-1px); }

/* ---------- Family grid (home) ---------- */
.fam-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 72px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.fam {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  color: inherit; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fam:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(31,27,22,.06), 0 20px 48px rgba(31,27,22,.16); text-decoration: none; }
.fam-media { position: relative; aspect-ratio: 16/10; background: #ddd6c8; overflow: hidden; }
.fam-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.fam:hover .fam-media img { transform: scale(1.05); }
.fam-plans {
  position: absolute; bottom: 10px; right: 10px; background: rgba(31,27,22,.80);
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(2px);
}
.fam-flag {
  position: absolute; top: 10px; left: 10px; background: var(--copper);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 2px;
}
.fam-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 4px; }
.fam-name { font-size: 27px; margin: 0; }
.fam-range { font-size: 15px; font-weight: 700; color: var(--copper-deep); margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.fam-stats { display: grid; grid-template-columns: repeat(3, auto); gap: 18px; margin: 0; justify-content: start; }
.fam-stats .spec dt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
.fam-stats .spec dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Family page hero ---------- */
.fam-hero {
  position: relative; max-width: var(--maxw); margin: 12px auto 0; padding: 0 20px;
}
.fam-hero-img {
  width: 100%; aspect-ratio: 16/7; object-fit: cover;
  border-radius: 8px; box-shadow: var(--shadow); background: #ddd6c8;
}
.fam-hero-overlay {
  position: absolute; left: 20px; right: 20px; bottom: 0;
  padding: 28px 30px; border-radius: 0 0 8px 8px; color: #fff;
  background: linear-gradient(to top, rgba(20,16,12,.82) 0%, rgba(20,16,12,.45) 55%, rgba(20,16,12,0) 100%);
}
.fam-hero-overlay h1 { font-size: clamp(34px, 6vw, 60px); margin: 0; color: #fff; }
.fam-hero-meta { margin: 8px 0 0; font-size: clamp(14px, 2vw, 17px); color: rgba(255,255,255,.92); font-variant-numeric: tabular-nums; }
.eyebrow-light { color: #f0c9b4; }
.fam-flag-inline {
  position: static; display: inline-block; vertical-align: middle;
  margin-left: 10px; font-size: 12px;
}

@media (max-width: 900px) {
  .fam-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  .fam-grid { grid-template-columns: 1fr; }
  .fam-hero-img { aspect-ratio: 4/3; }
  .fam-hero-overlay { padding: 20px; }
}

/* ============================================================ */
/* Top navigation (all pages)                                   */
/* ============================================================ */
.topnav {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.topnav .brandbar { padding: 0; margin: 0; width: auto; }
.topnav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.topnav-links a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 7px 12px; border-radius: 999px; min-height: 38px; display: inline-flex; align-items: center;
}
.topnav-links a:hover { color: var(--ink); background: rgba(176,92,50,.08); text-decoration: none; }
.topnav-links a.is-active {
  color: var(--copper-deep); font-weight: 700; background: rgba(176,92,50,.10);
}
.topnav-links a.is-active:hover { background: rgba(176,92,50,.16); }
@media (max-width: 560px) {
  .topnav { padding-top: 12px; gap: 8px; }
  .topnav-links a { padding: 6px 10px; font-size: 13px; }
}

/* ============================================================ */
/* Explore page                                                 */
/* ============================================================ */
.explore-head { max-width: var(--maxw); margin: 0 auto; padding: 40px 20px 8px; }
.explore-head h1 { font-size: clamp(34px, 6vw, 60px); margin: 0 0 10px; }
.explore-head .lede { font-size: clamp(15px, 2vw, 19px); color: var(--muted); max-width: 64ch; margin: 0; }

/* --- Tow-vehicle matcher --- */
.tow-tool {
  max-width: var(--maxw); margin: 24px auto 0; padding: 0 20px;
}
.tow-tool-inner {
  background: linear-gradient(135deg, #2A2017 0%, #3A2A1C 100%); color: #F4EFE6;
  border-radius: 10px; padding: 24px 26px; display: flex; flex-wrap: wrap;
  gap: 26px 40px; align-items: flex-start; box-shadow: var(--shadow);
}
.tow-field { flex: 1 1 320px; min-width: 280px; }
.tow-field > label { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: #E8B89A; font-weight: 700; margin-bottom: 10px; }
.tow-input-row { display: flex; align-items: center; gap: 10px; }
#tow-input {
  font: inherit; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
  width: 160px; padding: 10px 14px; border: 1px solid rgba(244,239,230,.25);
  border-radius: 6px; background: rgba(244,239,230,.06); color: #fff;
}
#tow-input:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.tow-unit { font-size: 18px; color: rgba(244,239,230,.7); font-weight: 600; }
.tow-clear { font: inherit; font-size: 13px; background: transparent; color: #E8B89A; border: 1px solid rgba(232,184,154,.4); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 38px; }
.tow-clear:hover { background: rgba(232,184,154,.12); }
.tow-hint { font-size: 13px; color: rgba(244,239,230,.66); margin: 12px 0 0; max-width: 52ch; line-height: 1.5; }
.tow-hint strong { color: #F4EFE6; }
.tow-presets { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tow-presets-label { font-size: 13px; color: rgba(244,239,230,.7); width: 100%; margin-bottom: 2px; }
.tow-preset {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 40px;
  background: rgba(244,239,230,.08); color: #F4EFE6; border: 1px solid rgba(244,239,230,.2);
  border-radius: 999px; padding: 8px 14px; font-variant-numeric: tabular-nums;
}
.tow-preset:hover { background: rgba(244,239,230,.16); }
.tow-preset.is-active { background: var(--copper); border-color: var(--copper); color: #fff; }
.tow-summary {
  max-width: var(--maxw); margin: 14px auto 0; font-size: 15px; color: var(--ink);
  background: #FBF3E9; border: 1px solid #E7CDB4; border-left: 3px solid var(--copper);
  border-radius: 6px; padding: 12px 16px;
}

/* --- Explore controls --- */
.explore-controls { max-width: var(--maxw); margin: 28px auto 0; padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.xc-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.xc-row-2 { align-items: center; }
.xc-search { flex: 1 1 280px; }
.xc-search input {
  font: inherit; width: 100%; padding: 11px 14px; min-height: 46px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink);
}
.xc-search input:focus, .explore-controls select:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.xc-sort, .xc-year, .xc-sleeps { display: flex; flex-direction: column; gap: 4px; }
.xc-sort label, .xc-year label, .xc-sleeps label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.explore-controls select {
  font: inherit; padding: 10px 12px; min-height: 46px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: var(--ink);
}
.xc-tags { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.tagfilter {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 38px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
}
.tagfilter:hover { border-color: var(--copper); color: var(--copper-deep); }
.tagfilter[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); color: #fff; }
.xc-reset { font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 38px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; }
.xc-reset:hover { color: var(--ink); border-color: var(--muted); }
.xcount { max-width: var(--maxw); margin: 22px auto 0; padding: 0 20px; font-size: 14px; color: var(--muted); }
.xcount span { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.xcount-note { font-weight: 400; color: var(--muted); font-size: 13px; }

/* --- Explore grid --- */
.xgrid {
  max-width: var(--maxw); margin: 10px auto 0; padding: 0 20px 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.xcard {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease, opacity .2s ease;
}
.xcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(31,27,22,.06), 0 16px 40px rgba(31,27,22,.12); }
.xcard.is-over { opacity: .5; }
.xcard.is-over:hover { opacity: .85; }
.xcard-link { color: inherit; display: flex; flex-direction: column; }
.xcard-link:hover { text-decoration: none; }
.xcard-media { position: relative; aspect-ratio: 3/2; background: #ddd6c8; overflow: hidden; }
.xcard-media img { width: 100%; height: 100%; object-fit: cover; }
.xcard-year { position: absolute; top: 10px; left: 10px; background: rgba(31,27,22,.78); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 4px 9px; border-radius: 2px; }
.xcard-body { padding: 14px 16px 6px; }
.xcard-title { font-size: 20px; margin: 0 0 10px; }
.xcard-title span { color: var(--copper-deep); }
.xcard-specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin: 0; }
.xcard-specs .spec dt { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0; }
.xcard-specs .spec dd { margin: 1px 0 0; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.xcard-foot { margin-top: auto; padding: 10px 16px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.xcard-fit { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.fit-comfortable { color: #3f7d54; }
.fit-within { color: #b07a1f; }
.fit-over { color: #b04a2f; }
.xcard-compare { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.xcard-compare input { width: 16px; height: 16px; accent-color: var(--copper); cursor: pointer; }
.xempty { max-width: var(--maxw); margin: 8px auto 0; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 16px; }
.linklike { font: inherit; background: none; border: none; color: var(--copper-deep); cursor: pointer; text-decoration: underline; padding: 0; }

/* --- Compare sticky bar (explore) --- */
.cmp-bar {
  position: sticky; bottom: 16px; max-width: 560px; margin: 16px auto 40px;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 10px 12px 10px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: 0 10px 30px rgba(31,27,22,.28); z-index: 20;
}
.cmp-bar-text { font-size: 14px; }
.cmp-bar-text strong { font-size: 16px; }
.cmp-bar-actions { display: flex; gap: 8px; align-items: center; }
.cmp-bar-clear { font: inherit; font-size: 13px; background: transparent; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 40px; }
.cmp-bar-clear:hover { color: #fff; }
.cmp-bar-go { font-size: 14px; font-weight: 700; background: var(--copper); color: #fff; border-radius: 999px; padding: 9px 18px; min-height: 40px; display: inline-flex; align-items: center; }
.cmp-bar-go:hover { background: var(--copper-deep); text-decoration: none; }

@media (max-width: 900px) { .xgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .xgrid { grid-template-columns: 1fr; }
  .tow-tool-inner { padding: 18px; gap: 18px; }
  #tow-input { font-size: 22px; width: 130px; }
}

/* ============================================================ */
/* Compare page                                                 */
/* ============================================================ */
.cmp-pick { max-width: var(--maxw); margin: 22px auto 0; padding: 0 20px; position: relative; }
#cmp-search {
  font: inherit; width: 100%; max-width: 460px; padding: 12px 14px; min-height: 48px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink);
}
#cmp-search:focus { outline: 2px solid var(--copper); outline-offset: 1px; }
.cmp-suggest { list-style: none; margin: 4px 0 0; padding: 6px; position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-width: 460px; width: calc(100% - 40px); }
.cmp-suggest-item { font: inherit; display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 4px; cursor: pointer; color: var(--ink); min-height: 40px; }
.cmp-suggest-item:hover { background: rgba(176,92,50,.1); }
.cmp-chosen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cmp-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(176,92,50,.1); border: 1px solid rgba(176,92,50,.25); color: var(--copper-deep); font-size: 14px; font-weight: 600; padding: 6px 8px 6px 14px; border-radius: 999px; }
.cmp-chip-x { font: inherit; font-size: 18px; line-height: 1; background: none; border: 0; color: var(--copper-deep); cursor: pointer; padding: 0 4px; }
.cmp-chip-x:hover { color: var(--ink); }
.cmp-placeholder { max-width: var(--maxw); margin: 28px auto; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 16px; }
.cmp-table-wrap { max-width: var(--maxw); margin: 28px auto 64px; padding: 0 20px; overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 480px; }
.cmp-table thead th { vertical-align: bottom; padding: 0 10px 14px; text-align: center; }
.cmp-table thead th:first-child { width: 1%; }
.cmp-col-head { display: flex; flex-direction: column; align-items: center; gap: 6px; color: inherit; }
.cmp-col-head img { width: 100%; max-width: 200px; aspect-ratio: 3/2; object-fit: cover; border-radius: 6px; background: #ddd6c8; box-shadow: var(--shadow); }
.cmp-col-name { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 18px; }
.cmp-col-year { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.cmp-table tbody th { text-align: left; font-weight: 600; color: var(--muted); font-size: 14px; padding: 13px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cmp-table tbody td { text-align: center; padding: 13px 10px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.cmp-table tbody tr:nth-child(odd) td, .cmp-table tbody tr:nth-child(odd) th { background: rgba(176,92,50,.03); }
.cmp-best { color: #3f7d54; position: relative; }
.cmp-best::after { content: '★'; font-size: 10px; margin-left: 4px; vertical-align: top; color: #3f7d54; }
@media (max-width: 560px) {
  .cmp-col-name { font-size: 15px; }
  .cmp-table tbody th, .cmp-table tbody td { font-size: 13px; padding: 10px 6px; }
}

/* --- Detail page: towing callout --- */
.tow-callout {
  margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  background: linear-gradient(135deg, #2A2017 0%, #3A2A1C 100%); color: #F4EFE6;
  border-radius: 8px; padding: 20px 24px;
}
.tow-callout-main { flex: 0 0 auto; }
.tow-callout-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #E8B89A; font-weight: 700; margin: 0 0 4px; }
.tow-callout-value { font-family: 'Fraunces', Georgia, serif; font-size: 30px; font-weight: 600; margin: 0; font-variant-numeric: tabular-nums; }
.tow-callout-value span { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; color: rgba(244,239,230,.7); margin-left: 8px; letter-spacing: .02em; }
.tow-callout-note { flex: 1 1 280px; font-size: 13px; line-height: 1.5; color: rgba(244,239,230,.78); margin: 0; }
.tow-callout-note a { color: #E8B89A; font-weight: 600; white-space: nowrap; }
.tow-callout-note a:hover { color: #fff; }
@media (max-width: 560px) { .tow-callout { padding: 16px 18px; } .tow-callout-value { font-size: 26px; } }

/* ============================================================
   ESTIMATORS — off-grid endurance (detail pages)
   ============================================================ */
.estimator {
  max-width: var(--maxw); margin: 26px auto 0; padding: 26px 28px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.est-head h2 {
  font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600;
  margin: 0 0 6px; letter-spacing: -.01em;
}
.est-sub { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.est-controls {
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.est-field { display: flex; flex-direction: column; gap: 6px; }
.est-field-wide { flex: 1 1 280px; min-width: 240px; }
.est-field label { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.est-field select, .est-field input[type="number"] {
  font: inherit; padding: 10px 12px; min-height: 46px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--ink);
}
.est-field select:focus, .est-field input:focus { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.est-field-check { padding-bottom: 4px; }
.est-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; min-height: 46px; }
.est-check input { width: 18px; height: 18px; accent-color: var(--copper); }
.est-input-suffix { display: inline-flex; align-items: center; gap: 6px; }
.est-input-suffix input { width: 92px; }
.est-input-suffix span { font-size: 14px; color: var(--muted); font-weight: 600; }

.est-result { padding: 20px 0 4px; }
.est-big { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.est-number {
  font-family: 'Fraunces', Georgia, serif; font-size: 44px; font-weight: 600;
  line-height: 1; color: var(--copper-deep); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.est-per { font-family: 'DM Sans', sans-serif; font-size: 18px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.est-number-cap {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  color: var(--copper); background: rgba(176,92,50,.1); padding: 5px 11px; border-radius: 100px;
}
.est-detail { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.est-bars { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.est-bar { display: grid; grid-template-columns: 96px 1fr 76px; align-items: center; gap: 12px; }
.est-bar-label { font-size: 13px; color: var(--ink); font-weight: 500; }
.est-bar-track { height: 8px; background: #EDE5D6; border-radius: 100px; overflow: hidden; }
.est-bar-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--copper), var(--copper-deep)); border-radius: 100px; }
.est-bar-val { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }

.est-method { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.est-method summary { font-size: 13px; font-weight: 600; color: var(--copper); cursor: pointer; list-style: none; }
.est-method summary::-webkit-details-marker { display: none; }
.est-method summary::before { content: '+ '; font-weight: 700; }
.est-method[open] summary::before { content: '– '; }
.est-method p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 10px 0 2px; max-width: 80ch; }

@media (max-width: 640px) {
  .estimator { padding: 20px 18px; }
  .est-number { font-size: 36px; }
  .est-bar { grid-template-columns: 80px 1fr 64px; gap: 8px; }
}

/* ===================== Campground Finder ===================== */
.cg-hero { max-width: var(--maxw); margin: 0 auto; padding: 56px 24px 20px; }
.cg-hero .eyebrow { font: 600 12px/1 "DM Sans", sans-serif; letter-spacing: .18em; color: var(--copper); margin: 0 0 14px; }
.cg-hero h1 { font: 600 clamp(34px, 6vw, 56px)/1.02 "Fraunces", serif; margin: 0 0 14px; letter-spacing: -.01em; }
.cg-hero .lede { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 70ch; margin: 0; }
.cg-hero .lede strong { color: var(--ink); }

.cg-controls {
  max-width: var(--maxw); margin: 24px auto 0; padding: 16px 24px;
  display: flex; flex-wrap: wrap; gap: 16px 18px; align-items: end;
}
.cg-ctl { display: flex; flex-direction: column; gap: 6px; }
.cg-ctl-grow { flex: 1 1 220px; min-width: 180px; }
.cg-ctl label, .cg-check { font: 600 12px/1 "DM Sans", sans-serif; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.cg-ctl select, .cg-ctl input[type="search"], .cg-ctl input[type="number"] {
  font: 500 15px/1 "DM Sans", sans-serif; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-height: 42px;
}
.cg-ctl select:focus, .cg-ctl input:focus { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.cg-len-wrap { display: flex; align-items: center; gap: 6px; }
.cg-len-wrap input { width: 92px; }
.cg-len-unit { font: 500 14px "DM Sans", sans-serif; color: var(--muted); }
.cg-ctl-check { flex-direction: column; gap: 8px; align-items: start; }
.cg-check { display: inline-flex; align-items: center; gap: 7px; text-transform: none; letter-spacing: 0; cursor: pointer; color: var(--ink); font-weight: 500; }
.cg-check input { width: 16px; height: 16px; accent-color: var(--copper); }
.cg-reset {
  font: 600 13px "DM Sans", sans-serif; color: var(--copper); background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 16px; cursor: pointer; min-height: 42px;
}
.cg-reset:hover { border-color: var(--copper); background: var(--surface); }

.cg-summary { max-width: var(--maxw); margin: 6px auto 0; padding: 6px 24px 0; font: 500 15px "DM Sans", sans-serif; color: var(--muted); }
.cg-summary strong { color: var(--ink); font-weight: 700; }
.cg-src-tag { display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 999px; font: 600 11px/1 "DM Sans", sans-serif; letter-spacing: .03em; vertical-align: middle; }
.cg-src-live { background: #e3f1e8; color: #2e7d4f; }
.cg-src-static { background: #ece6da; color: var(--muted); }
.cg-src-fallback { background: #fbeede; color: var(--copper-deep); }

.cg-layout {
  max-width: var(--maxw); margin: 18px auto 0; padding: 0 24px 40px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start;
}
/* #cg-map.cg-map (id+class) deliberately out-specifies MapLibre's
   `.maplibregl-map{position:relative}`, which loads AFTER site.css and would
   otherwise win the cascade tie and kill the sticky desktop map. */
#cg-map.cg-map {
  height: 640px; position: sticky; top: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); background: #dfe5e2; z-index: 0;
}
/* First-paint placeholder inside the map box — replaces the blank gray flash
   until the basemap style loads. app.js removes it in onMapReady() (every init
   path — vector load, raster fallback, watchdog — converges there). */
.cg-map-loading {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; pointer-events: none;
  color: var(--muted); background: #dfe5e2;
}
.cg-map-loading-pin { font-size: 26px; color: var(--copper); opacity: .75; animation: cgPinPulse 1.4s ease-in-out infinite; }
.cg-map-loading-txt { font: 600 13px/1 "DM Sans", sans-serif; letter-spacing: .04em; }
@keyframes cgPinPulse { 0%,100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(-4px); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .cg-map-loading-pin { animation: none; } }
/* Honest fallback when WebGL is unavailable: the interactive map can't draw,
   but the full list below still works. Replaces the loading placeholder. */
.cg-map-fallback {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 24px; background: #dfe5e2; color: var(--muted);
}
.cg-map-fallback-pin { font-size: 26px; color: var(--copper); opacity: .8; }
.cg-map-fallback strong { font: 600 16px/1.2 "Fraunces", serif; color: var(--ink); }
.cg-map-fallback span { font: 500 13px/1.5 "DM Sans", sans-serif; max-width: 30ch; }
.cg-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 200px; }
.cg-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cg-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(31,27,22,.06), 0 14px 32px rgba(31,27,22,.10); }
.cg-card-img { width: 100%; height: 132px; object-fit: cover; display: block; background: #e7e0d3; }
.cg-card-noimg { display: grid; place-items: center; font-size: 30px; color: var(--line); }
.cg-card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.cg-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cg-card-name { font: 600 16px/1.18 "Fraunces", serif; margin: 2px 0 0; letter-spacing: -.005em; }
.cg-card-where { font: 500 12.5px "DM Sans", sans-serif; color: var(--muted); margin: 0; }
.cg-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; font: 500 12.5px "DM Sans", sans-serif; color: var(--ink); }
.cg-card-meta span { white-space: nowrap; }
.cg-stars { font: 600 13px "DM Sans", sans-serif; color: var(--copper-deep); }

.cg-fit { font: 600 11px/1 "DM Sans", sans-serif; letter-spacing: .02em; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.cg-fit-fits { background: #e3f1e8; color: #2e7d4f; }
.cg-fit-tight { background: #fbf0d8; color: #9a6a10; }
.cg-fit-no { background: #f7e0db; color: #c0392b; }
.cg-fit-unknown { background: #ece6da; color: var(--muted); }
.cg-fit-limit { background: #efeae0; color: #6b6258; }

.cg-empty { grid-column: 1 / -1; padding: 40px 16px; text-align: center; color: var(--muted); font: 500 16px "DM Sans", sans-serif; }
.cg-loading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--muted); font: 500 16px "DM Sans", sans-serif; }
.cg-retry { margin-left: 8px; font: 600 14px "DM Sans", sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 18px; cursor: pointer; }
.cg-retry:hover { border-color: var(--copper); color: var(--copper); }
.cg-more { max-width: var(--maxw); margin: 0 auto; padding: 4px 24px 0; text-align: center; }
.cg-more-btn { font: 600 14px "DM Sans", sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 28px; cursor: pointer; }
.cg-more-btn:hover { border-color: var(--copper); color: var(--copper); }
.cg-src { max-width: var(--maxw); margin: 18px auto 0; padding: 0 24px; font-size: 12.5px; line-height: 1.55; }

/* Popup inner content → editorial (.cg-pop is our markup inside the MapLibre popup) */
.cg-pop { font: 500 13px/1.45 "DM Sans", sans-serif; color: var(--ink); min-width: 170px; }
.cg-pop strong { font: 600 15px "Fraunces", serif; }
.cg-pop a { color: var(--copper); font-weight: 600; text-decoration: none; }
.cg-pop-fit { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; }
/* MapLibre popup chrome → editorial (popup created with className 'cg-ml-popup') */
.cg-ml-popup .maplibregl-popup-content {
  border-radius: var(--radius); padding: 13px 14px 12px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.cg-ml-popup .maplibregl-popup-close-button {
  width: 26px; height: 26px; font-size: 18px; line-height: 24px; color: var(--muted);
  border-radius: 0 var(--radius) 0 8px;
}
.cg-ml-popup .maplibregl-popup-close-button:hover { background: #f1ece2; color: var(--ink); }
.cg-ml-popup .maplibregl-popup-tip { border-top-color: var(--surface); }

@media (max-width: 880px) {
  .cg-layout { grid-template-columns: 1fr; }
  #cg-map.cg-map { height: 360px; position: relative; top: 0; order: -1; }
  .cg-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .cg-list { grid-template-columns: 1fr; }
  .cg-controls { gap: 12px; }
}

/* --- Fit confidence + "why this verdict" explainer (campground cards) ------ */
.cg-conf {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle; flex: 0 0 auto;
}
.cg-conf-posted { background: currentColor; opacity: .85; }
.cg-conf-unverified {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px currentColor; opacity: .7;
}
.cg-fit { display: inline-flex; align-items: center; }
.cg-fit-why {
  margin: 8px 0 0; padding: 7px 10px; border-radius: 8px;
  font: 500 12.5px/1.45 "DM Sans", sans-serif;
  border-left: 3px solid transparent; background: #f6f1e7; color: var(--muted);
}
.cg-fit-why-fits { background: #edf6f0; border-left-color: #2e7d4f; color: #2c6344; }
.cg-fit-why-tight { background: #fcf4e2; border-left-color: #c98a16; color: #855c10; }
.cg-fit-why-no { background: #fae7e2; border-left-color: #c0392b; color: #9c3022; }
.cg-fit-why-unknown { background: #efeee9; border-left-color: #9a9488; color: #6a6358; }
.cg-pop-why { display: block; margin: 4px 0 6px; font: 500 12px/1.4 "DM Sans", sans-serif; color: #555; }

/* Map clusters are GPU-rendered MapLibre circle+symbol layers (see app.js
   'cg-clusters'/'cg-cluster-count'), styled via paint props in JS — no DOM
   bubble elements, so the old .marker-cluster/.cg-cluster CSS was removed. */

/* --- Saved shortlist: heart button on cards + popups --------------------- */
.cg-card-outer { position: relative; display: flex; }
.cg-card-outer > .cg-card { flex: 1 1 auto; }
.cg-save {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 17px; line-height: 1;
  color: var(--copper-deep); background: rgba(251,248,242,.92);
  border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(31,27,22,.14);
  transition: transform .12s ease, background .12s ease, color .12s ease;
  backdrop-filter: blur(2px);
}
.cg-save:hover { transform: scale(1.08); background: #fff; }
.cg-save.is-saved { background: var(--copper); color: #fff; border-color: var(--copper); }
.cg-pop-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.cg-pop-save {
  font: 600 12px "DM Sans", sans-serif; cursor: pointer; color: var(--copper-deep);
  background: #faf4ee; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}
.cg-pop-save.is-saved { background: var(--copper); color: #fff; border-color: var(--copper); }

/* --- Saved tray --------------------------------------------------------- */
.cg-tray { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.cg-tray-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: 600 13px "DM Sans", sans-serif; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; margin: 2px 0 4px;
}
.cg-tray-heart { color: var(--copper); }
.cg-tray-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #ece6da; color: var(--muted); font: 700 12px "DM Sans", sans-serif;
  display: inline-grid; place-items: center;
}
.cg-tray.has-saved .cg-tray-count { background: var(--copper); color: #fff; }
.cg-tray-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
}
.cg-tray-empty { margin: 0; color: var(--muted); font: 500 13.5px "DM Sans", sans-serif; }
.cg-tray-head { display: flex; align-items: center; gap: 10px; font: 500 13px "DM Sans", sans-serif; color: var(--muted); margin-bottom: 8px; }
.cg-tray-head strong { color: var(--ink); }
.cg-tray-clear { margin-left: auto; font: 600 12px "DM Sans", sans-serif; cursor: pointer; color: var(--copper-deep); background: none; border: 0; text-decoration: underline; }
.cg-tray-scroll { overflow-x: auto; }
.cg-tray-table { width: 100%; border-collapse: collapse; font: 500 13px "DM Sans", sans-serif; }
.cg-tray-table th { text-align: left; font: 600 11px "DM Sans", sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px 0; white-space: nowrap; }
.cg-tray-table td { padding: 7px 10px 7px 0; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.cg-tr-name { white-space: normal; min-width: 160px; }
.cg-tr-name a { color: var(--ink); font-weight: 600; text-decoration: none; }
.cg-tr-name a:hover { color: var(--copper-deep); text-decoration: underline; }
.cg-tr-where { display: block; color: var(--muted); font-size: 11.5px; }
.cg-tr-x { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line); background: #faf4ee; color: var(--muted); font-size: 15px; line-height: 1; }
.cg-tr-x:hover { color: #c0392b; border-color: #e2b3aa; }

/* --- Share-this-view button --------------------------------------------- */
.cg-share {
  align-self: end; cursor: pointer; white-space: nowrap;
  font: 600 13px "DM Sans", sans-serif; color: #fff;
  background: var(--copper); border: 1px solid var(--copper);
  border-radius: var(--ctl-radius, 9px); padding: 10px 16px;
  transition: background .12s ease, transform .12s ease;
}
.cg-share:hover { background: var(--copper-deep); border-color: var(--copper-deep); }
.cg-share.is-copied { background: #2e7d4f; border-color: #2e7d4f; }

/* --- Availability drawer (#7 per-site fit, #8 hookups, #10 this weekend) -- */
.cg-avail-btn {
  margin-top: 10px; width: 100%; cursor: pointer; text-align: center;
  font: 600 12.5px "DM Sans", sans-serif; color: var(--copper-deep);
  background: #fbf4ee; border: 1px solid #e7d3c4; border-radius: 9px; padding: 9px 12px;
  transition: background .12s ease, border-color .12s ease;
}
.cg-avail-btn:hover { background: #f6e8dc; border-color: var(--copper); }
.cg-pop-avail { font: 600 12px "DM Sans", sans-serif; cursor: pointer; color: var(--copper-deep); background: #faf4ee; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }

.cg-drawer { position: fixed; inset: 0; z-index: 1000; }
.cg-drawer[hidden] { display: none; }
.cg-drawer-scrim { position: absolute; inset: 0; background: rgba(31,27,22,.42); backdrop-filter: blur(2px); animation: cgFade .18s ease; }
.cg-drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(460px, 92vw);
  background: var(--bg, #fbf8f2); box-shadow: -16px 0 48px rgba(31,27,22,.22);
  display: flex; flex-direction: column; animation: cgSlide .22s cubic-bezier(.22,.61,.36,1);
}
@keyframes cgFade { from { opacity: 0; } }
@keyframes cgSlide { from { transform: translateX(28px); opacity: .6; } }
.cg-drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.cg-drawer-title { font: 600 19px/1.2 "Fraunces", serif; margin: 0; flex: 1; letter-spacing: -.01em; }
.cg-drawer-x { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; cursor: pointer; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; color: var(--muted); }
.cg-drawer-x:hover { color: var(--ink); border-color: var(--copper); }
.cg-drawer-body { overflow-y: auto; padding: 16px 20px 28px; }

.cg-av-controls { margin-bottom: 12px; }
.cg-av-segs { display: flex; gap: 6px; background: #efe8dd; padding: 4px; border-radius: 10px; }
.cg-av-seg { flex: 1; cursor: pointer; font: 600 12.5px "DM Sans", sans-serif; color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 8px 6px; }
.cg-av-seg.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(31,27,22,.12); }
.cg-av-range { font: 500 13px "DM Sans", sans-serif; color: var(--muted); margin: 9px 2px 0; }
.cg-av-range strong { color: var(--copper-deep); }

.cg-av-status { display: flex; align-items: center; gap: 9px; padding: 22px 4px; color: var(--muted); font: 500 14px "DM Sans", sans-serif; }
.cg-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #d9cdbb; border-top-color: var(--copper); animation: cgSpin .7s linear infinite; }
@keyframes cgSpin { to { transform: rotate(360deg); } }
.cg-av-error { padding: 16px; background: #fae7e2; border: 1px solid #e6bdb2; border-radius: 10px; font: 500 13.5px/1.5 "DM Sans", sans-serif; color: #9c3022; }
.cg-av-error a, .cg-av-none a { color: var(--copper-deep); font-weight: 600; }

.cg-av-headline { font: 500 15px/1.45 "DM Sans", sans-serif; color: var(--ink); margin: 14px 2px 6px; }
.cg-av-headline strong { color: var(--copper-deep); font-weight: 700; }
.cg-av-none { color: var(--muted); }
.cg-av-note { font: 500 12px/1.45 "DM Sans", sans-serif; color: var(--muted); margin: 0 2px 12px; }
.cg-av-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.cg-av-site { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; border-left-width: 3px; }
.cg-av-site.cg-av-fits { border-left-color: #2e7d4f; }
.cg-av-site.cg-av-tight { border-left-color: #c98a16; }
.cg-av-site.cg-av-limit, .cg-av-site.cg-av-unknown { border-left-color: #b6ab99; }
.cg-av-site-id { font: 600 14px "DM Sans", sans-serif; color: var(--ink); }
.cg-av-loop { font-weight: 500; color: var(--muted); font-size: 12px; }
.cg-av-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cg-av-fit { font: 600 11px/1 "DM Sans", sans-serif; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.cg-av-hook { font: 600 11px/1 "DM Sans", sans-serif; padding: 4px 8px; border-radius: 999px; white-space: nowrap; background: #ece6da; color: var(--muted); }
.cg-av-hook.has-elec { background: #e3eef5; color: #2c5d7c; }
.cg-av-book { display: inline-block; margin-top: 4px; font: 600 13.5px "DM Sans", sans-serif; color: #fff; background: var(--copper); border-radius: 9px; padding: 11px 18px; text-decoration: none; }
.cg-av-book:hover { background: var(--copper-deep); }
body.cg-drawer-open { overflow: hidden; }
