/* Well & Radon Guide — static directory */
:root {
  --bg: #f4f1ea;
  --bg-card: #fffdf8;
  --ink: #1a2422;
  --ink-soft: #3c4a47;
  --muted: #5b6865;
  --line: #d9d3c7;
  --teal: #134e4a;
  --teal-deep: #0c3532;
  --teal-soft: #e4f0ee;
  --accent: #b4451a;
  --accent-hover: #8f3413;
  --ok: #135e3d;
  --ok-bg: #e5f4ec;
  --warn: #8a4b00;
  --warn-bg: #f8edd8;
  --alert: #8f1d1d;
  --alert-bg: #f8e4e2;
  --info: #2c3d66;
  --info-bg: #e8edf6;
  --zone: #8a4b00;
  --shadow: 0 1px 2px rgba(26, 36, 34, 0.06), 0 10px 30px rgba(26, 36, 34, 0.06);
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: clip;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
p, li, td, th, h1, h2, h3, .lede, .section-lead, .meta { overflow-wrap: break-word; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--teal-deep); color: #fff; padding: 0.5rem 1rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 20; }
header.site {
  background: var(--teal-deep);
  color: #f3f7f6;
  position: sticky; top: 0; z-index: 10;
  border-bottom: 3px solid #c9783a;
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand { display: flex; gap: 0.7rem; align-items: center; color: inherit; text-decoration: none; }
.brand-mark {
  width: 2.2rem; height: 2.2rem; border-radius: 8px;
  background: #1c6b66; display: grid; place-items: center; flex: none;
}
.brand strong { display: block; font-family: var(--serif); font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; color: #f3f7f6; }
.brand span { display: block; font-size: 0.78rem; color: #c9d9d6; }
nav.site { display: flex; gap: 0.35rem 0.85rem; flex-wrap: wrap; align-items: center; }
nav.site a {
  color: #e7f0ee; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.35rem 0.45rem; border-radius: 8px;
}
nav.site a:hover, nav.site a[aria-current="page"] { color: #fff; text-decoration: underline; }
.hero {
  padding: 2.6rem 0 2rem;
  background:
    radial-gradient(800px 280px at 10% -10%, rgba(28,107,102,0.16), transparent 60%),
    linear-gradient(#eef3ef, var(--bg));
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  max-width: 18ch;
}
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 62ch; margin: 0 0 1.3rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1.2rem; }
.pill {
  background: var(--teal-soft); color: var(--teal-deep);
  border-radius: 999px; padding: 0.22rem 0.7rem;
  font-size: 0.82rem; font-weight: 600;
}
.notice, .callout, .card, .lab, .cta-card, table.data {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.notice { padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.notice strong { color: var(--teal-deep); }
.grid-2, .grid-3, .cards { display: grid; gap: 1rem; }
.cards { grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 720px) {
  .grid-2, .cards { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 980px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
}
section { padding: 2.2rem 0; }
section h2 {
  font-family: var(--serif);
  font-size: 1.85rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.section-lead { color: var(--ink-soft); max-width: 70ch; margin: 0 0 1.1rem; }
.card {
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.55rem;
  text-decoration: none; color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
a.card:hover { transform: translateY(-2px); border-color: var(--teal); }
.card h3 { font-family: var(--serif); font-size: 1.35rem; margin: 0; }
.meta { color: var(--muted); font-size: 0.9rem; }
.badge, .status {
  display: inline-block; border-radius: 999px;
  padding: 0.12rem 0.55rem; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.status-exceeded, .badge-alert { background: var(--alert-bg); color: var(--alert); }
.status-at_standard, .badge-warn { background: var(--warn-bg); color: var(--warn); }
.status-below, .badge-ok { background: var(--ok-bg); color: var(--ok); }
.status-info, .badge-info { background: var(--info-bg); color: var(--info); }
.badge-zone { background: var(--warn-bg); color: var(--zone); }
.search {
  display: flex; gap: 0.5rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.25rem 0.8rem; max-width: 28rem; width: 100%;
  min-height: 48px;
}
.search input {
  border: 0; outline: 0; width: 100%; font: inherit; background: transparent;
  min-height: 44px;
}
.selector { display: grid; gap: 0.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font: inherit; font-weight: 600; font-size: 0.92rem;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 0.55rem 0.95rem; cursor: pointer;
  min-height: 44px;
}
.chip[aria-pressed="true"], .chip:hover { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-deep); }
.selector-result {
  padding: 1rem 1.15rem; border-left: 4px solid var(--teal);
  box-shadow: var(--shadow);
}
.selector-result h3 { margin: 0 0 0.4rem; font-family: var(--serif); }
.selector-result ul { margin: 0.3rem 0 0; padding-left: 1.15rem; }
.crumb { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.8rem; }
.crumb a { color: var(--teal); }
.page-head { padding: 1.6rem 0 0.4rem; }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 0.5rem; letter-spacing: -0.02em; }
.split { display: grid; gap: 1rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1.4fr 0.9fr; align-items: start; } }
table.data { width: 100%; border-collapse: collapse; overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td {
  text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line);
  vertical-align: top; font-size: 0.95rem;
}
table.data th { background: #eef3f1; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
table.data tbody tr:last-child td { border-bottom: 0; }
.table-wrap { margin-top: 1rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: stretch; }
.btn-row .btn { margin-top: 0; }
.lab, .cta-card, .callout { padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.lab h3, .cta-card h3 { margin: 0 0 0.3rem; font-family: var(--serif); font-size: 1.2rem; }
.lab p, .cta-card p { margin: 0.25rem 0; }
.fee { font-weight: 650; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  background: var(--accent); color: #fff !important;
  text-decoration: none; font-weight: 700; border-radius: 10px;
  padding: 0.7rem 1rem; margin-top: 0.55rem;
  min-height: 44px; box-sizing: border-box;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--teal); }
.btn.secondary:hover { background: var(--teal-deep); }
.btn.ghost { background: transparent; color: var(--teal) !important; border: 1.5px solid var(--teal); }
.sources { list-style: none; padding: 0; margin: 0; }
.sources li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.sources li:last-child { border-bottom: 0; }
.verified { color: var(--muted); font-size: 0.85rem; }
footer.site {
  margin-top: 2rem; background: var(--teal-deep); color: #d7e3e0;
  padding: 2rem 0 2.4rem; font-size: 0.95rem;
}
footer.site a { color: #fff; }
footer.site h2 { color: #fff; font-size: 1.1rem; margin: 0 0 0.4rem; font-family: var(--serif); }
.hidden { display: none !important; }
.stat-row { display: flex; flex-wrap: wrap; gap: 0.7rem 1.2rem; margin: 0.4rem 0 0.8rem; }
.stat { min-width: 7rem; }
.stat b { display: block; font-family: var(--serif); font-size: 1.35rem; }
.stat span { color: var(--muted); font-size: 0.8rem; }
ol.tests, ul.plain { margin: 0.4rem 0 0; padding-left: 1.2rem; }
ol.tests li, ul.plain li { margin: 0.35rem 0; }
.kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--teal); margin: 0 0 0.3rem; }

/* Mobile layout: stacked USGS table cards, roomy taps, no page overflow */
@media (max-width: 719px) {
  .wrap { width: min(var(--max), calc(100% - 1.5rem)); }
  header.site .bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.75rem 0 0.55rem;
  }
  .brand { min-width: 0; }
  .brand strong { font-size: 1.05rem; }
  nav.site {
    gap: 0.2rem;
    justify-content: space-between;
  }
  nav.site a {
    flex: 1 1 auto;
    padding: 0.4rem 0.35rem;
    font-size: 0.88rem;
  }
  .hero { padding: 1.7rem 0 1.4rem; }
  .hero h1 { max-width: none; }
  section { padding: 1.7rem 0; }
  .page-head { padding-top: 1.25rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .cta-card .btn, .lab .btn { width: 100%; }
  a[href^="tel:"], a[href^="mailto:"] {
    display: inline-block;
    padding: 0.2rem 0;
    min-height: 44px;
    line-height: 1.45;
    vertical-align: middle;
  }

  /* USGS groundwater table → stacked parameter cards */
  .table-wrap {
    overflow: visible;
  }
  table.data {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  table.data thead { display: none; }
  table.data tbody {
    display: grid;
    gap: 0.85rem;
  }
  table.data tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.95rem 1rem 1.05rem;
  }
  table.data td {
    display: grid;
    grid-template-columns: 7.4rem minmax(0, 1fr);
    gap: 0.3rem 0.7rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
    vertical-align: top;
    min-width: 0;
  }
  table.data td:last-child { border-bottom: 0; padding-bottom: 0; }
  table.data td:first-child {
    display: block;
    border-bottom: 1px solid var(--line);
    padding-top: 0;
    padding-bottom: 0.65rem;
    margin-bottom: 0.15rem;
  }
  table.data td:first-child strong {
    font-family: var(--serif);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  table.data td:first-child::before { content: none; }
  table.data td > span { min-width: 0; }
  table.data td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    padding-top: 0.18rem;
    line-height: 1.3;
  }
}

@media (min-width: 720px) {
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
