:root {
  --ink: #172a2f;
  --muted: #53666b;
  --teal: #087a78;
  --teal-dark: #075f5e;
  --teal-soft: #e7f4f1;
  --paper: #fff;
  --wash: #f6f8f7;
  --line: #ccd7d5;
  --line-dark: #aabbb8;
  --red: #a42621;
  --red-soft: #fae9e7;
  --gold: #805b09;
  --gold-soft: #fff4d7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--teal-dark); }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid rgba(8, 122, 120, .28); outline-offset: 2px; }
main { min-height: 100vh; }
h1, h2, p { margin-top: 0; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1120px;
  height: 56px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  color: var(--ink);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -.02em;
  text-decoration: none;
}
.site-header nav { display: flex; gap: 24px; font-size: 13px; font-weight: 650; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

.hero { max-width: 880px; margin: 0 auto; padding: 48px 24px 40px; }
.kicker, .eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.lede { max-width: 680px; margin-bottom: 24px; color: var(--muted); font-size: 17px; }

.search { position: relative; max-width: 760px; }
.search label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  outline: none;
}
.input-wrap input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 122, 120, .12); }
.input-wrap input::placeholder { color: #718084; }
.typeahead {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 310px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  box-shadow: 0 12px 28px rgba(23, 42, 47, .14);
}
.typeahead[hidden], .typeahead-option[hidden], .typeahead-empty[hidden] { display: none; }
.typeahead-option {
  width: 100%;
  min-height: 52px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}
.typeahead-option:last-of-type { border-bottom: 0; }
.typeahead-option:hover,
.typeahead-option[aria-selected="true"] { background: var(--teal-soft); }
.typeahead-option span { font-weight: 680; }
.typeahead-option small { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.typeahead-option[data-loaded="false"] small { color: #7b6840; }
.typeahead-empty { margin: 0; padding: 13px; color: var(--muted); font-size: 13px; }
.search-button {
  min-width: 120px;
  height: 48px;
  padding: 0 18px;
  color: white;
  background: var(--teal-dark);
  border: 1px solid var(--teal-dark);
  border-radius: 5px;
  font-weight: 720;
  cursor: pointer;
}
.search-button:hover { background: var(--teal); border-color: var(--teal); }
.quick-links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 13px; }
.quick-links a { color: var(--teal-dark); text-underline-offset: 2px; }
.data-note { margin: 24px 0 0; padding-top: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px; }
.data-note strong { color: var(--ink); }

.breadcrumbs {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs a { color: var(--muted); text-underline-offset: 2px; }
.location-hero { max-width: 1120px; padding-top: 32px; padding-bottom: 32px; }
.location-hero h1 { max-width: 900px; }
.town-hero { padding-bottom: 24px; }

.provider-index { max-width: 960px; margin: 0 auto 16px; padding: 0 24px; }
.provider-index > p { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.provider-index > div { display: flex; flex-wrap: wrap; gap: 8px; }
.provider-index a {
  padding: 7px 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.provider-index a:hover { background: var(--teal-soft); border-color: var(--teal); }
.town-results { max-width: 960px; margin: 0 auto 40px; padding: 0 24px; display: grid; gap: 16px; }
.town-results .result-card { scroll-margin-top: 16px; }

.result-card { position: relative; padding: 24px; background: white; border: 1px solid var(--line); border-left: 5px solid var(--red); }
.result-topline { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.result-card h2 { margin: 0 0 8px; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; }
.status-pill {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 780;
  text-align: left;
}
.status-pill.ban { color: var(--red); background: var(--red-soft); }
.status-pill.mandatory { color: #8b2c27; background: #f7e2df; }
.status-pill.voluntary { color: #615f12; background: #f4f2ce; }
.status-pill.conflict { color: #6f4300; background: var(--gold-soft); border: 1px solid #d8b96b; }
.result-card.conflict-card { border-left-color: var(--gold); }
.result-summary { max-width: 800px; margin: 4px 0 16px; font-size: 19px; line-height: 1.4; font-weight: 680; }
.rules-heading { margin: 16px 0 2px; color: var(--muted); font-size: 11px; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.rules-list { max-width: 780px; margin: 0 0 16px; padding-left: 20px; }
.rules-list li { padding: 3px 0; color: var(--muted); }
.source-limitations { max-width: 780px; margin: 16px 0; padding: 12px; color: var(--muted); background: var(--gold-soft); border-left: 3px solid var(--gold); }
.source-limitations strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 12px; }
.source-limitations p { margin: 0; }
.conflict-notice { max-width: 780px; margin: 16px 0; padding: 12px 14px; color: #594b29; background: var(--gold-soft); border: 1px solid #e3cf97; }
.conflict-notice strong { display: block; color: var(--ink); }
.conflict-notice p { margin: 2px 0 0; }
.source-claims { max-width: 780px; display: grid; gap: 10px; margin: 16px 0; }
.source-claim { padding: 14px; background: var(--wash); border: 1px solid var(--line); }
.claim-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.claim-heading h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.25; }
.claim-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.source-claim > p { margin: 0 0 8px; color: var(--muted); }
.claim-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 8px; color: var(--muted); font-size: 11px; }
.result-meta { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border: 1px solid var(--line); }
.result-meta div { padding: 10px 12px; }
.result-meta div + div { border-left: 1px solid var(--line); }
.result-meta span, .result-meta strong { display: block; }
.result-meta span { color: var(--muted); font-size: 11px; }
.result-meta strong { margin-top: 2px; font-size: 13px; }
.source-section { margin-top: 16px; }
.source-section > p { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; }
.source-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 7px; color: var(--teal-dark); border: 1px solid var(--line); border-radius: 3px; font-size: 12px; font-weight: 650; text-decoration: none; }
.source-link:hover { background: var(--teal-soft); border-color: var(--teal); }
.source-mark { min-width: 23px; height: 20px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 2px; font-size: 8px; font-weight: 800; }
.source-mark.state { background: var(--ink); }
.source-mark.news { background: var(--gold); }
.scope-note { margin: 16px 0 0; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }

.town-section { max-width: 1120px; margin: 0 auto; padding: 40px 24px 56px; border-top: 1px solid var(--line); }
.state-directory { padding-top: 32px; }
.section-heading { margin-bottom: 16px; display: flex; justify-content: space-between; gap: 32px; align-items: end; }
.section-heading h2, .method-copy h2 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.03em; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
.town-list { border-top: 1px solid var(--line-dark); }
.town-list-head, .town-row { display: grid; grid-template-columns: minmax(130px, 1.05fr) minmax(180px, 1.4fr) minmax(260px, 3fr) 104px; gap: 16px; align-items: center; }
.town-list-head { min-height: 34px; padding: 0 10px; color: var(--muted); background: var(--wash); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 720; text-transform: uppercase; letter-spacing: .05em; }
.town-row { min-height: 58px; padding: 8px 10px; color: var(--ink); background: white; border-bottom: 1px solid var(--line); text-decoration: none; }
.town-row:hover { background: var(--teal-soft); }
.town-row > strong { font-size: 14px; }
.town-summary { color: var(--muted); font-size: 13px; line-height: 1.35; }
.checked { color: var(--muted); font-size: 11px; }

.method-section { max-width: 1120px; margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; border-top: 1px solid var(--line); }
.method-copy > p:last-child { max-width: 440px; margin: 12px 0 0; color: var(--muted); }
.method-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.method-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.method-list li > span { color: var(--teal-dark); font-weight: 750; }
.method-list strong { font-size: 14px; }
.method-list p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.disclaimer { max-width: 1072px; margin: 0 auto 40px; padding: 12px 16px; display: flex; gap: 10px; background: var(--gold-soft); border: 1px solid #e3cf97; }
.disclaimer > span { flex: 0 0 20px; width: 20px; height: 20px; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--gold); border-radius: 50%; font-size: 12px; font-weight: 750; }
.disclaimer p { margin: 0; color: #594b29; font-size: 12px; }
footer { max-width: 1120px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; gap: 24px; align-items: center; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
footer p { margin: 0; text-align: right; }

@media (max-width: 800px) {
  .town-list-head { display: none; }
  .town-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 8px; }
  .town-row .status-pill { justify-self: end; }
  .town-summary, .town-row .checked { grid-column: 1 / -1; }
  .method-section { grid-template-columns: 1fr; gap: 24px; }
  footer { gap: 10px; }
  footer p { text-align: left; }
}

@media (max-width: 600px) {
  .header-inner { height: 52px; padding: 0 16px; }
  .site-header nav { gap: 14px; }
  .site-header nav a:nth-child(2) { display: none; }
  .hero { padding: 32px 16px; }
  .breadcrumbs { padding: 12px 16px 0; }
  .location-hero { padding-top: 24px; padding-bottom: 24px; }
  h1 { font-size: 38px; }
  .lede { font-size: 16px; }
  .search-row { grid-template-columns: 1fr; }
  .search-button { width: 100%; }
  .typeahead-option { align-items: flex-start; flex-direction: column; gap: 2px; }
  .provider-index, .town-results { padding-right: 16px; padding-left: 16px; }
  .provider-index a { width: 100%; justify-content: space-between; }
  .result-card { padding: 18px 16px; }
  .result-topline { display: block; }
  .result-topline .status-pill { margin-bottom: 12px; }
  .result-card h2 { font-size: 28px; }
  .result-summary { font-size: 17px; }
  .result-meta { grid-template-columns: 1fr; }
  .result-meta div + div { border-top: 1px solid var(--line); border-left: 0; }
  .sources { display: grid; }
  .town-section { padding: 32px 16px 40px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 8px; text-align: left; }
  .town-row { grid-template-columns: 1fr; }
  .town-row .status-pill { justify-self: start; }
  .town-summary, .town-row .checked { grid-column: auto; }
  .method-section { padding: 40px 16px; }
  .disclaimer { margin: 0 16px 32px; }
  footer { margin: 0 16px; padding: 20px 0; flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
