:root {
  --green: #2f5233;
  --green-light: #eaf2ea;
  --tan: #f7f4ee;
  --text: #232323;
  --muted: #6b6b63;
  --accent: #b5651d;
  --border: #ddd8cc;
  --heading: #1e3a21;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--tan);
  line-height: 1.6;
}
a { color: var(--accent); }
h1, h2, h3 { color: var(--heading); }
h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 0.6rem; text-wrap: balance; }
h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; margin: 2.5rem 0 0.4rem; }
h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 0.35rem; }

/* Editorial section labels — a small uppercase tag above a handful of major
   h2 sections, set directly in the markup as <span class="eyebrow">. */
.eyebrow {
  display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-weight: 800; margin: 2.5rem 0 0.35rem;
}
.eyebrow + h2, .eyebrow + section > h2:first-child { margin-top: 0; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--green);
  color: white;
}
.site-header .brand {
  color: white;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.55rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.site-header .brand .logo { font-size: 2rem; line-height: 1; }
.brand-group { display: inline-flex; align-items: center; gap: 0.75rem; }
.header-divider { width: 1px; height: 1.3rem; background: rgba(255,255,255,0.35); }
.tagline {
  color: rgba(255,255,255,0.82);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.site-header nav a {
  color: white;
  text-decoration: none;
  margin-left: 1.25rem;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  font-weight: 700;
  opacity: 0.92;
  transition: opacity 0.12s ease;
}
.site-header nav a:hover { opacity: 1; text-decoration: none; }

/* mobile hamburger toggle — hidden on desktop, shown in the phone media query */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 34px; height: 34px; background: transparent; border: none; padding: 0;
  cursor: pointer; flex-shrink: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}
.hero p { color: var(--muted); max-width: 640px; font-size: 1.05rem; }
.lede { color: var(--muted); font-size: 1.05rem; }

.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.filters input, .filters select {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--text);
  border-radius: 8px;
  font-size: 0.98rem;
  font-weight: 500;
  background: #fff;
}
.filters input { flex: 1; min-width: 220px; }

/* Homepage route planner — "find campsites along your route." Sits in a
   tinted card (not full-bleed like .callout, not plain like .filters)
   since it's the most content-dense new element on the page. */
.route-planner {
  background: var(--green-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin: 1.5rem 0;
}
.route-planner .eyebrow { margin-top: 0; }
.route-planner > p { color: var(--muted); font-size: 0.92rem; max-width: 640px; margin: 0 0 1.1rem; }
.route-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.route-field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 200px; }
.route-field label {
  font-size: 0.76rem; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.route-form input {
  padding: 0.7rem 0.9rem; border: 1.5px solid var(--text); border-radius: 8px;
  font-size: 0.98rem; font-weight: 500; background: #fff; font-family: inherit; width: 100%;
}
.route-form input:disabled { background: #f1efe8; color: var(--muted); }
.route-form button {
  background: var(--accent); color: white; border: none; border-radius: 999px;
  padding: 0.72rem 1.5rem; font-size: 0.95rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
  transition: filter 0.12s ease;
}
.route-form button:hover { filter: brightness(1.08); }
.route-form button:disabled { background: #c9c2b3; cursor: not-allowed; filter: none; }
.route-status {
  color: var(--muted); font-size: 0.9rem; margin: 0.85rem 0 0; display: flex; align-items: center; gap: 0.5rem;
}
.route-status.error { color: #96331f; font-weight: 600; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Vertical stack, not a grid (unlike .region-grid) — ranking order
   (closest/least-detour first) carries meaning and must survive reflow. */
.route-results { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.route-card {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 0.9rem 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.route-card-main h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.route-card-main h3 a { color: var(--green); text-decoration: none; }
.route-card-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.route-card-meta { text-align: right; font-size: 0.8rem; color: var(--muted); flex: 0 0 auto; line-height: 1.5; }
.route-card-meta strong { display: block; color: var(--text); font-size: 0.9rem; }

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.region-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.region-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.1); border-color: var(--green); }
.region-card h3 { margin: 0 0 0.25rem; color: var(--green); }
.region-card .muted { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.5rem; }
.region-card .count {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.75rem;
  background: var(--green);
  font-weight: 700;
  color: #fff;
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .camp-table { min-width: 560px; }
.camp-table { width: 100%; border-collapse: collapse; background: white; }
.camp-table th, .camp-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.camp-table th {
  background: var(--heading); color: #fff; font-size: 0.76rem;
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  background: #e4e2d8;
  color: #4a4a42;
  margin-right: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge-yes { background: var(--green); color: #fff; }
.badge-no { background: #96331f; color: #fff; }
.callout {
  background: var(--heading);
  color: #f2f1ea;
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
  margin: 2.25rem 0;
}
.callout h2 { color: #fff; margin-top: 0; }
.callout a { color: #f0c896; }
.breadcrumb { font-size: 0.72rem; color: var(--muted); margin-bottom: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.breadcrumb a { color: var(--green); text-decoration: none; }
.fact-list { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem 1.3rem; }
.fact-list dt { font-weight: 800; margin-top: 0.65rem; color: var(--green); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.fact-list dd { margin: 0.1rem 0 0; }
.camp-list, .sources-list { list-style: none; padding: 0; }
.camp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.camp-card h3 { margin: 0 0 0.35rem; }
.camp-photo {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.6rem;
}
.camp-photo-block { margin: 0.75rem 0 1.25rem; }
.camp-photo-large { max-height: 320px; }
.photo-credit { display: block; font-size: 0.75rem; margin-top: 0.3rem; color: var(--muted); }
.camp-card h3 a { color: var(--green); text-decoration: none; }
.sources-list li { margin-bottom: 0.3rem; word-break: break-all; font-size: 0.9rem; }
.site-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 2rem 1.5rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}

/* Netlify form honeypot — visually hidden, not display:none (some bots skip
   display:none fields but still fill in off-screen ones). */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.newsletter-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  margin: 1.5rem auto;
  max-width: min(92vw, 760px);
  text-align: left;
}
.newsletter-cta {
  display: block;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 0.6rem;
}
.newsletter-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.newsletter-row input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--text);
  border-radius: 8px;
  font-size: 0.98rem;
}
.newsletter-form button,
.suggest-site-form button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.12s ease;
}
.newsletter-form button:hover,
.suggest-site-form button:hover { filter: brightness(1.08); }
.site-footer .newsletter-form { text-align: left; }

.suggest-site-form {
  max-width: 560px;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.suggest-site-form label {
  font-weight: 700;
  color: var(--green);
  margin-top: 0.75rem;
}
.suggest-site-form .req { color: var(--accent); }
.suggest-site-form input,
.suggest-site-form select,
.suggest-site-form textarea {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--text);
  border-radius: 8px;
  font-size: 0.98rem;
  font-family: inherit;
}
.suggest-site-form button { margin-top: 1rem; align-self: flex-start; }

.footer-sponsor-link {
  display: block;
  margin: 0.5rem 0 1.25rem;
  font-size: 0.8rem;
}

/* Sponsored listings (paid business placements) — deliberately styled
   distinctly from .camp-card/.fact-list so paid content is never mistaken
   for the free/permit-free editorial camping data (specs/mission.md). */
.sponsored-section {
  margin: 1.5rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: 10px;
  background: #fdf6ee;
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.sponsored-label {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}
.sponsor-list { list-style: none; padding: 0; margin: 0; }
.sponsor-card { margin-bottom: 0.75rem; }
.sponsor-card:last-child { margin-bottom: 0; }
.sponsor-card h4 { margin: 0 0 0.15rem; }
.sponsor-card h4 a { color: var(--accent); text-decoration: none; }
.sponsor-card p { margin: 0.15rem 0; }

.faq { margin: 1.5rem 0; }
.faq h2 { margin-bottom: 0.75rem; }
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  margin-bottom: 0.6rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--green);
}
.faq-item p { margin: 0.6rem 0 0; color: var(--text); }

/* ================================================================
   MOBILE — phone-width layout: hamburger nav, stacked controls,
   scaled-down type/spacing, horizontally-scrolling table.
   ================================================================ */
@media (max-width: 640px) {
  main { padding: 1rem 1rem 2rem; }
  .site-header { position: relative; padding: 0.85rem 1rem; gap: 0.5rem; }
  .site-header .brand { font-size: 1.2rem; }
  .site-header .brand .logo { font-size: 1.55rem; }
  .header-divider, .tagline { display: none; }
  .site-header nav a { font-size: 0.68rem; margin-left: 0.55rem; }

  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--green);
    padding: 0.25rem 1.25rem 0.75rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    z-index: 10;
  }
  .site-header nav.nav-open { display: flex; }
  .site-header nav a { margin-left: 0; padding: 0.8rem 0; border-top: 1px solid rgba(255,255,255,0.18); }
  .site-header nav a:first-child { border-top: none; }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.2rem; margin: 1.75rem 0 0.35rem; }
  .eyebrow { margin-top: 1.75rem; }

  .filters { flex-wrap: nowrap; gap: 0.5rem; }
  .filters input { min-width: 0; flex: 1; }
  .filters select { flex: 0 0 auto; width: auto; max-width: 40%; padding-left: 0.6rem; padding-right: 0.6rem; }

  /* Deliberately NOT the one-row .filters treatment above: this form has
     2 required text inputs plus a button, which would be unusably narrow
     squeezed onto one row at phone width. Full-width stacked instead. */
  .route-planner { padding: 1.1rem 1.15rem; }
  .route-form { flex-direction: column; align-items: stretch; }
  .route-form input, .route-form button { width: 100%; }
  .route-card { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .route-card-meta { text-align: left; }

  .region-grid { grid-template-columns: 1fr; }
  .newsletter-row { flex-direction: column; align-items: stretch; }
  .newsletter-row button { width: 100%; }
}
