/* All Gas Stations Phase 3. Mobile first. No left-border callouts. */
:root {
  --teal-800: #005a73;
  --teal-700: #006e8b;
  --teal-600: #007897;
  --teal-500: #008ead;
  --header: #007b9d;
  --ink: #1c2621;
  --muted: #4a564e;
  --faint: #6a736c;
  --line: #d4dbc8;
  --bg: #eef2e8;
  --card: #ffffff;
  --ad-bg: #f3f4f1;
  --ok: #1d6b3a;
  --ev: #0b5cab;
  --other: #7a4b12;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(28, 38, 33, 0.06), 0 8px 24px rgba(28, 38, 33, 0.06);
  --max: 1080px;
  --stack-gap: 1.35rem;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--teal-800); }
h1, h2, h3 { color: var(--teal-700); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 1.85rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; color: var(--ink); }
p { margin: 0 0 0.9rem; }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.4rem 0.6rem; z-index: 20; }

.site-header {
  background: linear-gradient(180deg, #008ead, var(--header));
  color: #fff;
  padding: 0.85rem 0;
}
.site-header a { color: #fff; }
.header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.brand img { width: 48px; height: 48px; display: block; flex: 0 0 48px; object-fit: contain; }
.header-search {
  display: flex;
  gap: 0.4rem;
  flex: 1 1 220px;
  max-width: 360px;
}
.header-search input {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--ink);
}
.header-search button, .btn {
  background: #fff;
  color: var(--teal-800);
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.header-search button:hover, .btn:hover { background: #e8f6fa; }
nav.primary { margin-left: auto; display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.95rem; }
nav.primary a { text-decoration: none; opacity: 0.95; }
nav.primary a:hover, nav.primary a[aria-current="page"] { text-decoration: underline; }

main { padding: 1.35rem 0 2.5rem; }

/* Consistent space between stacked cards and sections (the gap Mike asked for). */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}
.stack > * { margin-top: 0; margin-bottom: 0; }

.hero, .card, .faq, .source-box, .notice, .tax-price, .article-body, .table-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero { padding: 1.25rem 1.25rem 1.4rem; }
.hero p.lead { font-size: 1.05rem; max-width: 42rem; color: var(--muted); margin-bottom: 0; }
.crumbs { font-size: 0.92rem; color: var(--muted); margin: 0; }
.crumbs a { color: var(--teal-700); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 0;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 0.95rem;
}
.hero .stat { box-shadow: 0 0 0 1px var(--line); }
.stat .n { font-size: 1.45rem; font-weight: 750; color: var(--teal-700); letter-spacing: -0.03em; }
.stat .l { color: var(--muted); font-size: 0.88rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-gap);
}
@media (min-width: 800px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 2.1rem; }
}
.tax-price, .card { padding: 1rem 1.1rem; }
.tax-price .figure { font-size: 1.6rem; font-weight: 750; color: var(--teal-700); }
.tax-price .note { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0; }

.section { margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.section-head h2 { margin: 0; }

.states {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}
@media (min-width: 600px) { .states { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .states { grid-template-columns: repeat(4, 1fr); } }
.states a { text-decoration: none; padding: 0.2rem 0; display: flex; justify-content: space-between; gap: 0.5rem; }
.states a span { color: var(--faint); font-variant-numeric: tabular-nums; }

.city-list, .near-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
@media (min-width: 700px) { .city-list { grid-template-columns: 1fr 1fr; } }
.city-item, .near-list a {
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
}
.city-item:hover, .near-list a:hover { box-shadow: 0 2px 10px rgba(28,38,33,0.12); }
.city-item strong, .near-list a strong { color: var(--teal-700); }
.meta { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }

.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.15rem 0 0.85rem; }
.filters button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  cursor: pointer;
}
.filters button[aria-pressed="true"] {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

.listings { display: flex; flex-direction: column; gap: 0.55rem; }
.listing {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem 0.9rem;
  display: grid;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
}
.listing:hover { outline: 2px solid #b9e0ea; }
.listing .name { font-weight: 700; color: var(--teal-700); }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  vertical-align: middle;
}
.badge.gas { background: #e6f6ec; color: var(--ok); }
.badge.ev { background: #e7f1fb; color: var(--ev); }
.badge.other { background: #f8eedf; color: var(--other); }

.ad-slot {
  background: var(--ad-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--faint);
  text-align: center;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot.rect { min-height: 120px; }
.ad-slot ins { text-transform: none; letter-spacing: 0; width: 100%; }

.faq { padding: 1rem 1.1rem; }
.faq details { border-top: 1px solid var(--line); padding: 0.65rem 0; }
.faq details:first-of-type { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { margin: 0.45rem 0 0; color: var(--muted); }

.source-box, .notice {
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.notice p:last-child, .source-box p:last-child, .article-body > :last-child { margin-bottom: 0; }
ul.plain { margin: 0 0 0.8rem; padding: 0 0 0 1.15rem; }
ul.plain li { margin: 0 0 0.3rem; }

.dl { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.45rem 0.8rem; margin: 0.6rem 0 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

.article-body { padding: 1.25rem 1.25rem 1.5rem; }
.article-body p, .article-body li { font-size: 1.02rem; }
.article-body h2 { margin-top: 1.4rem; }
.article-body h2:first-child { margin-top: 0; }
.byline { color: var(--muted); font-size: 0.92rem; margin: 0 0 1rem; }

.table-card { padding: 0; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 0.55rem 0.85rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-size: 0.85rem; color: var(--muted); font-weight: 650; background: #f7f8f4; }
table.data tr:last-child th, table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-bottom: 0.7rem; }
.site-footer p { margin: 0.25rem 0; }

#count-live { font-weight: 650; color: var(--muted); }
