:root {
  --ink: #14242b;
  --muted: #5c6f78;
  --brand: #1366a6;
  --brand-dark: #0b3f6b;
  --brand-tint: #e7f0f8;
  --accent: #e8943a;        /* warm accent for real-estate / action */
  --accent-tint: #fdf1e2;
  --line: #e3ebe8;
  --bg: #f5f8f7;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(16,40,33,.04), 0 6px 18px rgba(16,40,33,.05);
  --shadow-lift: 0 4px 10px rgba(16,40,33,.08), 0 14px 34px rgba(16,40,33,.10);
  --max: 1040px;
  --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; margin: .1em 0 .35em; }
h2 { font-size: 1.35rem; letter-spacing: -.01em; margin: 1.8em 0 .6em; }
h3 { margin: 0; }
p { margin: .6em 0; }

/* ---------- header ---------- */
.site-header { background: rgba(255,255,255,.85); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; display: block; }
@media (min-width: 720px) { .brand img { height: 38px; } }
.site-nav a { margin-left: 20px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

/* hamburger toggle — hidden on desktop */
.nav-toggle { display: none; }

/* ---------- mobile nav ---------- */
@media (max-width: 719px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-right: -10px;
    padding: 0; border: 0; background: transparent; cursor: pointer; color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle-box { position: relative; display: block; width: 22px; height: 16px; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    content: ""; position: absolute; left: 0; width: 22px; height: 2px;
    background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease, top .2s ease;
  }
  .nav-toggle-bars { top: 7px; }
  .nav-toggle-bars::before { top: -7px; }
  .nav-toggle-bars::after { top: 7px; }
  .nav-open .nav-toggle-bars { background: transparent; }
  .nav-open .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
  .nav-open .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    display: grid; gap: 2px; padding: 8px 12px 12px;
    background: #fff; backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
    transform-origin: top; transform: scaleY(.96); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .site-nav a {
    margin-left: 0; padding: 12px 10px; border-radius: 10px;
    font-size: 1.02rem; color: var(--ink);
  }
  .site-nav a:hover { background: var(--brand-tint); }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: scaleY(1); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: visible;
  margin: 22px 0 8px; padding: 44px 34px 48px;
  border-radius: 20px; color: #fff;
  background: radial-gradient(820px 300px at 86% 135%, rgba(126,194,236,.5), transparent 62%), linear-gradient(135deg, #0b3f6b 0%, #155e96 55%, #2079b6 100%);
  box-shadow: var(--shadow-lift);
}
.hero-content { position: relative; z-index: 2; max-width: 56ch; }
.hero h1 { color: #fff; margin-top: 0; }
.hero p.lead { font-size: 1.12rem; color: #d6e8f6; max-width: 60ch; margin-bottom: 0; }

/* Town/address search */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.townsearch { position: relative; margin-top: 20px; max-width: 30rem; }
.townsearch input {
  width: 100%; box-sizing: border-box; font-size: 1.02rem; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  box-shadow: var(--shadow);
}
.townsearch input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.townresults {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  list-style: none; margin: 0; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.16);
  max-height: 21rem; overflow-y: auto;
}
.townresult {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 9px; cursor: pointer;
}
.townresult:hover, .townresult.is-active { background: var(--brand-tint); }
.townresult .t { font-weight: 600; color: var(--ink); }
.townresult .c { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.townhint { margin: 8px 2px 0; font-size: .9rem; color: #d6e8f6; }
.townctx { background: var(--brand-tint); color: var(--brand-dark); border-radius: 10px; padding: 9px 14px; font-weight: 550; margin: 4px 0 0; }
.hero-art {
  position: absolute; inset: 0 0 0 auto;
  width: min(61%, 610px); height: 100%; object-fit: cover; object-position: center;
  border-radius: 20px;
  z-index: 1; opacity: .92; filter: saturate(.82) contrast(.96);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.22) 20%, #000 46%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.22) 20%, #000 46%);
  pointer-events: none; user-select: none;
}
@media (max-width: 720px) {
  .hero-art {
    width: 100%; opacity: .4; object-position: 62% center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.18) 32%, #000 72%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.18) 32%, #000 72%);
  }
  .hero-content { max-width: none; }
}

/* ---------- situation cards ---------- */
.situations { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 22px 0 8px; }
.sit {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.sit:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--brand); text-decoration: none; }
.sit.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand), var(--shadow-lift); }
.sit.is-active .t::after { content: " ✓"; color: var(--brand); }
.intent-banner { display: block; background: var(--accent-tint); border: 1px solid #f0d3a6; color: #8a5a12; font-weight: 650; padding: 11px 15px; border-radius: 10px; margin: 12px 0 6px; }
.sit .ic { font-size: 1.6rem; line-height: 1; }
.sit .t { display: block; font-weight: 750; color: var(--ink); margin: 10px 0 2px; font-size: 1.05rem; }
.sit .d { display: block; color: var(--muted); font-size: .9rem; }

/* ---------- county grid ---------- */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 18px 0; padding: 0; list-style: none; }
.county-card { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.county-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--brand); text-decoration: none; }
.county-card .nm { font-weight: 700; color: var(--ink); }
.county-card .ct { color: var(--brand); font-weight: 700; font-size: .85rem; background: var(--brand-tint); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }

/* ---------- filter bar ---------- */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); margin: 16px 0; position: sticky; top: 65px; z-index: 10; }
.fgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fgroup-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 2px; }
.chip { font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 6px 13px; border-radius: 99px; transition: all .12s ease; }
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.fbar-sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fbar-sort select { font: inherit; font-size: .9rem; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; color: var(--ink); background: #fff; }
.clear-filters { font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; background: none; border: none; color: var(--brand); padding: 4px 6px; text-decoration: underline; }
.result-count { color: var(--muted); font-size: .92rem; margin: 6px 2px 2px; }

/* Stack into clear rows on narrow screens; sort gets its own full-width row. */
@media (max-width: 640px) {
  .filterbar { gap: 12px; }
  .fgroup { width: 100%; }
  .fbar-sort { width: 100%; margin-left: 0; padding-top: 10px; border-top: 1px solid var(--line); }
  .fbar-sort label { margin-left: auto; }
}

/* ---------- provider cards ---------- */
.providers { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.card h3 { font-size: 1.18rem; letter-spacing: -.01em; }
.card h3 a { color: var(--ink); }
.meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.gscore { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 700; color: var(--ink); }
.gscore .star { color: #f2a93b; }
.gscore .n { color: var(--muted); font-weight: 600; }
.gscore a { font-weight: 600; font-size: .82rem; }
.badges { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.badge { font-size: .76rem; font-weight: 650; padding: 3px 10px; border-radius: 99px; background: var(--brand-tint); color: var(--brand-dark); }
.badge.re { background: var(--accent-tint); color: #9a5a12; }
.badge.emg { background: #fde8e8; color: #a32020; }
.actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; font-weight: 700; padding: 9px 17px; border-radius: 10px; font-size: .95rem; }
.btn-call { background: var(--brand); color: #fff; }
.btn-call:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); text-decoration: none; }

/* ---------- breadcrumb / detail ---------- */
.crumb { font-size: .85rem; color: var(--muted); margin: 18px 0 4px; }
.hours { border-collapse: collapse; margin: 8px 0; }
.hours td { padding: 3px 16px 3px 0; color: var(--muted); }
.hours td.day { color: var(--ink); font-weight: 600; }
.asof { color: var(--muted); font-size: .8rem; }

/* ---------- requirements table + faq ---------- */
.reqtable { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .94rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.reqtable th { text-align: left; background: var(--brand-tint); color: var(--brand-dark); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; }
.reqtable td { padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.reqtable td.day { color: var(--ink); font-weight: 700; white-space: nowrap; }
.faq { border-top: 1px solid var(--line); padding: 14px 0; }
.faq-q { font-size: 1.05rem; color: var(--ink); margin-bottom: 2px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 52px; padding: 30px 0; border-top: 1px solid var(--line); background: var(--card); color: var(--muted); }
.fine { font-size: .82rem; }

@media (max-width: 560px) {
  .hero { padding: 28px 22px; }
  .filterbar { position: static; }
  .card .top { flex-direction: column; gap: 6px; }
}
