/* GunRanges.org — design tokens from v2/design/README.md (direction 3a)
   Plain CSS deliberately: no build step, so deploying is "upload the file". */

:root {
  --ink:        #22272A;
  --ink-2:      #3F4A47;
  --muted:      #667069;   /* never lighter than this on white — 4.5:1 */
  --rule:       #E6EAE7;
  --green:      #004D0E;
  --green-tint: #EBF2EC;
  --orange:     #FF4A00;   /* the single primary action per screen */
  --page:       #FFFFFF;
  --shell:      #E4E4E0;

  --r-input: 10px;
  --r-card:  12px;
  --r-chip:  999px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--ink);
  font-family: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { max-width: 1180px; margin: 0 auto; background: var(--page); min-height: 100vh; }

/* ---------------------------------------------------------------- header */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 0 34px; height: 80px;
  border-bottom: 1px solid var(--rule);
}
.site-head nav { display: flex; gap: 26px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .brand-2 { color: var(--orange); }

/* ------------------------------------------------------------------ page */
.page { padding: 40px 34px 64px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--muted); }

h1 { font-size: 44px; line-height: 1.06; letter-spacing: -.03em; font-weight: 800; margin: 0 0 14px; }
h2 { font-size: 22px; line-height: 1.2; font-weight: 600; margin: 40px 0 14px; }
.lede { font-size: 18px; line-height: 1.6; color: #55605C; max-width: 620px; margin: 0 0 8px; }

.kicker {
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  color: var(--green); margin-bottom: 14px;
}

/* ----------------------------------------------------------- stat strip */
.stats { display: flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; margin: 28px 0; }
.stats > div { flex: 1 1 160px; padding: 16px 20px; border-right: 1px solid var(--rule); }
.stats > div:last-child { border-right: 0; }
.stats b { display: block; font-size: 26px; font-weight: 800; color: var(--green); letter-spacing: -.02em; }
.stats span { font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------- listing */
.listing { border-top: 1px solid var(--rule); }
.listing-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.listing-name { font-size: 17px; font-weight: 650; margin-bottom: 4px; }
.listing-name a { color: var(--ink); }
.listing-meta { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Small caps label, reused for tags and categories. */
.chip {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--green); background: var(--green-tint);
  padding: 3px 9px; border-radius: var(--r-chip); margin: 6px 5px 0 0;
}

/* ---------------------------------------------------------------- detail */
.detail-top { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.detail-main { flex: 1 1 460px; }
.detail-side { flex: 0 0 300px; background: #FAFBFA; border: 1px solid var(--rule); border-radius: var(--r-card); padding: 22px; }
.detail-side h3 { margin: 0 0 4px; font-size: 13px; font-weight: 500; color: var(--muted); }

.btn {
  display: block; text-align: center; padding: 15px 20px; border-radius: var(--r-input);
  font-weight: 700; font-size: 19px; text-decoration: none;
}
.btn:hover { text-decoration: none; }
/* White on orange only passes AA at 19px+. Do not shrink this label. */
.btn-primary { background: var(--orange); color: #FFFFFF; }
.btn-secondary { background: #FFFFFF; color: var(--ink); border: 1px solid var(--rule); font-size: 15px; font-weight: 600; padding: 12px 20px; margin-top: 10px; }

.facts { display: flex; flex-wrap: wrap; border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; margin: 28px 0; }
.facts > div { flex: 1 1 150px; padding: 14px 18px; border-right: 1px solid var(--rule); }
.facts > div:last-child { border-right: 0; }
.facts dt { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 16px; font-weight: 600; }

.prose { font-size: 16px; line-height: 1.65; color: var(--ink-2); max-width: 660px; }

/* ------------------------------------------------------------- city grid */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 26px; }
.city-grid a { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.city-grid span { color: var(--muted); }

.empty { color: var(--muted); font-size: 15px; }

@media (max-width: 700px) {
  .site-head { height: auto; padding: 14px 18px; flex-wrap: wrap; }
  .page { padding: 24px 18px 48px; }
  h1 { font-size: 32px; }
  .detail-side { flex-basis: 100%; }
}

/* ================================================================ HOMEPAGE */
.hero { display: flex; gap: 0; align-items: stretch; border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; margin-bottom: 8px; }
.hero-copy { flex: 1 1 460px; padding: 42px 34px; }
.hero-map { flex: 1 1 440px; min-height: 380px; }
#map { width: 100%; height: 100%; min-height: 380px; }

.search-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.search-form input[type="text"] { flex: 1 1 240px; padding: 13px 15px; font: 400 15px Figtree, sans-serif; border: 1px solid var(--rule); border-radius: var(--r-input); outline: none; }
.search-form input[type="text"]:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,77,14,.12); }
.search-form select { padding: 13px 12px; font: 400 15px Figtree, sans-serif; border: 1px solid var(--rule); border-radius: var(--r-input); background: #fff; }
/* White on orange only meets AA at 19px+ — do not shrink this label. */
.search-form button { padding: 13px 28px; font: 700 19px Figtree, sans-serif; color: #fff; background: var(--orange); border: 0; border-radius: var(--r-input); cursor: pointer; }
.search-form button:hover { filter: brightness(.94); }
.search-form-top { margin: 0 0 28px; }

/* ================================================================== CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 24px; }
.card { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--rule); border-radius: var(--r-card); background: #fff; }
.card h3 { margin: 6px 0 8px; font-size: 17px; line-height: 1.3; font-weight: 650; }
.card h3 a { color: var(--green); }
.card p { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--muted); flex-grow: 1; }
.card-cta a { display: inline-block; padding: 8px 18px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); font-size: 14px; font-weight: 600; }
.card-cta a:hover { background: var(--green-tint); text-decoration: none; }

/* ==================================================== AMAZON PRODUCT CARD */
/* White, not grey: product photos have white baked in, so a grey card leaves
   a visible rectangle behind every image. */
.amazonCard { display: flex; gap: 20px; align-items: center; margin: 22px 0; padding: 16px; background: #fff; border: 1px solid #e3e3e3; border-radius: 8px; }
.amazonCardImg { flex: 0 0 auto; width: 130px; }
.amazonCardImg img { width: 100%; height: auto; border-radius: 5px; }
.amazonCardBody { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; flex-grow: 1; }
.amazonCardName { font-weight: 600; font-size: 15pt; line-height: 1.3; color: var(--green); }
.btn-amzn { display: inline-block; padding: 8px 20px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); font-size: 14px; font-weight: 600; }
.btn-amzn:hover { background: var(--green-tint); text-decoration: none; }
.amazonProduct { display: flex; justify-content: center; margin: 20px 0; }
.amazonProduct img { max-width: 260px; height: auto; border: 1px solid var(--rule); border-radius: 5px; padding: 10px; }

/* ============================================================ ARTICLE BODY */
.article-body h2 { font-size: 22px; margin: 34px 0 12px; }
.article-body h3 { font-size: 18px; margin: 26px 0 10px; font-weight: 650; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
/* The legacy grid-table markup used by the gear articles. */
.article-body .grid-table { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--green); border-radius: 6px; overflow: hidden; margin: 20px 0; font-size: 13px; }
.article-body .grid-header { background: var(--green); color: #fff; padding: 10px; font-weight: 700; text-align: center; }
.article-body .grid-cell { background: #fff; padding: 10px; text-align: center; border: .5px solid var(--rule); }
.article-body .resource-btn { display: inline-block; padding: 8px 20px; border: 1px solid var(--green); border-radius: 6px; color: var(--green); font-weight: 600; }

/* ============================================================ MISC / FOOT */
.dist { text-align: right; white-space: nowrap; }
.dist b { color: var(--green); font-size: 16px; }
.pager { margin-top: 28px; font-size: 14px; }
.pager svg { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.pager a, .pager span { display: inline-block; padding: 6px 11px; margin-right: 4px; border: 1px solid var(--rule); border-radius: 6px; }
.pager [aria-current] { background: var(--green); color: #fff; border-color: var(--green); }

.site-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 26px 34px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.disclosure { max-width: 520px; }

@media (max-width: 820px) {
  .hero { flex-direction: column; }
  .hero-copy { padding: 28px 20px; }
  .article-body .grid-table { grid-template-columns: repeat(2, 1fr); font-size: 12px; }
}
