:root {
  color-scheme: light;
  --ink: #23342b;
  --muted: #546258;
  --green: #245340;
  --deep-green: #183e30;
  --cream: #fcfaf4;
  --surface: #f3f5ed;
  --line: #d9e0d3;
  --white: #fffefb;
  --focus: #8e4b23;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding: 1.25rem; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 1rem/1.55 var(--sans); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.site-width { width: min(1184px, calc(100% - 88px)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: -6rem; padding: .65rem 1rem; background: white; z-index: 5; }
.skip:focus { top: .75rem; }

.header { border-bottom: 1px solid #e8e7db; }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.header-inner { min-height: 75px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; font-size: 1.06rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; }
.brand > span:last-child > span { font-weight: 500; }
.brand-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--deep-green); color: #f7f1dd; }
.brand-icon svg { width: 20px; height: 20px; }
nav { display: flex; gap: 1.75rem; align-items: center; }
nav a { text-decoration: none; font-size: .91rem; font-weight: 630; }
nav a:hover { text-decoration: underline; text-underline-offset: .3em; }

.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); padding-block: 56px 62px; }
.region { display: inline-flex; gap: .4rem; align-items: center; margin: 0 0 1rem; color: var(--green); font-size: .86rem; font-weight: 700; }
.region svg { width: 17px; height: 17px; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.051em; line-height: 1.02; }
h1 { margin: 0; font-size: clamp(2.65rem, 5.35vw, 4.85rem); }
h1 em { color: var(--green); font-weight: 400; }
.intro { max-width: 29rem; margin: 1.12rem 0 1.5rem; color: var(--muted); font-size: 1.04rem; }
.hero-visual { background: #dfd7bf; border-radius: 22px; overflow: hidden; aspect-ratio: 1.27; }
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 78% 53%; }
#zip-search { max-width: 29rem; }
#zip-search label { display: inline-block; margin-bottom: .36rem; font-size: .83rem; font-weight: 750; }
.search-field { display: flex; align-items: center; gap: .55rem; padding: .34rem; border: 1px solid #b9c5b6; border-radius: 12px; background: var(--white); }
.search-field:focus-within { border-color: var(--green); }
.search-field > span { flex: 0 0 auto; margin-left: .5rem; color: var(--green); }
.search-field input { width: 100%; min-width: 0; padding: .3rem .12rem; color: var(--ink); border: 0; background: transparent; }
.search-field input::placeholder { color: #626b63; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: .42rem; padding: .64rem .88rem; border: 0; border-radius: 8px; background: var(--deep-green); color: white; font-size: .9rem; font-weight: 750; white-space: nowrap; }
.primary:hover { background: #2e624c; }
.primary svg { width: 16px; height: 16px; }
.error { color: #96351f; font-size: .86rem; margin: .4rem 0 0; }
.examples { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .38rem .48rem; align-items: center; color: var(--muted); font-size: .82rem; }
.examples button { padding: .14rem .58rem; border: 1px solid #d8dfd1; border-radius: 999px; background: transparent; color: var(--green); }
.examples button:hover { background: var(--surface); }

.results-area { background: var(--surface); border-top: 1px solid #e2e7db; padding: 46px 0 52px; min-height: 30rem; }
.results-heading { display: flex; gap: 1.25rem; align-items: end; justify-content: space-between; margin-bottom: 1.35rem; }
h2 { font-size: clamp(1.85rem, 3.5vw, 3.12rem); margin: 0; }
.results-heading p { color: var(--muted); margin: .48rem 0 0; font-size: .92rem; }
.filters { display: inline-flex; flex: 0 0 auto; padding: .26rem; gap: .18rem; border: 1px solid var(--line); border-radius: 10px; background: #e9eee4; }
.filters button { display: inline-flex; align-items: center; gap: .34rem; border: 0; border-radius: 7px; padding: .48rem .75rem; background: transparent; color: #3f5146; font-size: .85rem; font-weight: 680; }
.filters button[aria-pressed="true"] { color: var(--deep-green); background: var(--white); box-shadow: 0 1px 3px #31453520; }
.filters button:hover:not([aria-pressed="true"]) { background: #e0e8dc; }
.filters svg { width: 16px; height: 16px; }
.match-context { display: flex; gap: .7rem; align-items: center; padding: .75rem 1rem; margin: 0 0 1.05rem; border-radius: 9px; background: #e7eee1; color: #395244; font-size: .84rem; }
.match-context p { margin: 0; }
.text-button { margin-left: auto; padding: 0; color: var(--deep-green); border: 0; background: transparent; text-decoration: underline; text-underline-offset: .16em; white-space: nowrap; font-size: inherit; font-weight: 700; }

.listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; }
.listing { display: flex; flex-direction: column; align-items: flex-start; min-height: 254px; padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.listing-top { display: flex; width: 100%; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.listing-icon, .empty-icon, .about-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: #e7eee2; color: var(--deep-green); }
.listing[data-tone="clay"] .listing-icon { background: #f3e6da; color: #7c472d; }
.listing[data-tone="gold"] .listing-icon { background: #f5edd6; color: #684e25; }
.listing-icon svg { width: 21px; height: 21px; }
.coverage { padding: .23rem .54rem; border-radius: 5px; background: #eff1eb; color: #435147; font-size: .73rem; line-height: 1.35; font-weight: 720; }
.coverage[data-match="exact"] { background: #e0eee0; color: #28543e; }
.coverage[data-match="town"] { background: #f5ecd8; color: #6a4d1e; }
.listing h3 { margin: .81rem 0 .05rem; font-size: 1.14rem; line-height: 1.23; letter-spacing: -.028em; }
.area { display: inline-flex; align-items: flex-start; gap: .33rem; margin: .26rem 0 .65rem; font-size: .84rem; color: var(--muted); }
.area svg { width: 14px; height: 14px; margin-top: .13rem; }
.pet-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.pet-tag { display: inline-flex; align-items: center; gap: .27rem; border: 1px solid #dde4d8; border-radius: 6px; padding: .13rem .42rem; font-size: .74rem; font-weight: 650; color: #3b5545; }
.pet-tag svg { width: 13px; height: 13px; }
.listing-summary { margin: .52rem 0 .9rem; color: var(--muted); font-size: .84rem; }
.listing-links { display: flex; width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; border-top: 1px solid #ebeee6; padding-top: .72rem; margin-top: auto; }
.provider-link { display: inline-flex; align-items: center; gap: .25rem; color: var(--green); font-size: .87rem; font-weight: 760; text-decoration: none; }
.source-link { color: #4a5f51; font-size: .78rem; text-underline-offset: .16em; }
.provider-link:hover { text-decoration: underline; text-underline-offset: .16em; }
.provider-link svg { width: 14px; height: 14px; }
.checked { margin: .42rem 0 0; color: var(--muted); font-size: .72rem; }

.empty { display: grid; justify-items: center; text-align: center; padding: 2.2rem 1.2rem; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.empty h3 { margin: .7rem 0 0; }
.empty p { margin: .35rem 0 1rem; max-width: 30rem; color: var(--muted); }
.about { display: flex; align-items: flex-start; gap: .9rem; max-width: 51rem; margin-top: 2rem; padding: 1.2rem 1.3rem; background: #e8eee3; border-radius: 12px; }
.about h2 { font: 750 1rem/1.4 var(--sans); letter-spacing: -.012em; }
.about p { margin: .38rem 0 0; color: #425447; font-size: .88rem; }
.about-icon { background: #dce7d8; }
.footer { padding-block: 1.2rem; }
.footer-inner > span { color: var(--muted); font-size: .79rem; }
[data-icon] svg { display: block; }
svg { width: 18px; height: 18px; }

@media (max-width: 930px) {
  .site-width { width: calc(100% - 54px); }
  .hero { gap: 1.8rem; padding-block: 44px; }
  .hero-visual { aspect-ratio: .99; }
  .listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 630px) {
  .site-width { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; }
  nav { gap: 0; }
  nav a { font-size: .83rem; }
  nav a:first-child { display: none; }
  .hero { grid-template-columns: 1fr; gap: 1.4rem; padding-block: 32px; }
  .hero-visual { aspect-ratio: 1.65; }
  .intro { margin-bottom: 1.15rem; }
  .results-area { padding-block: 30px; }
  .results-heading { align-items: start; flex-direction: column; gap: .8rem; }
  .listing-grid { grid-template-columns: 1fr; }
  .match-context { flex-wrap: wrap; align-items: flex-start; }
  .match-context p { flex: 1 1 80%; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .5rem; }
}
@media (max-width: 360px) {
  .search-field .primary { padding-inline: .65rem; font-size: .83rem; }
  .search-field > span { margin-left: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.source-links { display: inline-flex; gap: .55rem; }
.service-source { color: #4a5f51; font-size: .78rem; text-underline-offset: .16em; }
.listing-summary, .area, .examples, .filters button, .coverage, .pet-tag { font-size: .875rem; }
.source-link, .service-source { font-size: .875rem; }
.checked { font-size: .8125rem; }
.footer-inner { flex-wrap: wrap; }
.footer-inner > span { font-size: .875rem; }

@media (max-width: 360px) { .header-inner { flex-wrap: wrap; gap: .5rem; padding-block: .75rem; } nav { width: 100%; } .hero { padding-top: 26px; } }

.town-search { margin-top: 1.1rem; }
.town-search label { display: block; margin-bottom: .45rem; font-weight: 650; font-size: .88rem; }
.town-field { display: flex; gap: .5rem; }
.town-field select { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: .65rem; padding: .75rem; background: var(--white); color: var(--ink); font: inherit; }
.secondary { border: 1px solid var(--green); color: var(--green); background: transparent; border-radius: .65rem; padding: .75rem 1rem; font: inherit; font-weight: 650; }
.sync-status { font-size: .8rem; color: var(--muted); margin: .8rem 0 0; }
.sync-status[data-stale="true"] { color: #8e4b23; }
.examples a { font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.towns-section { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.towns-section h2 { font: 2rem/1.2 var(--serif); margin: 0 0 .7rem; }
.towns-section p { color: var(--muted); }
.towns-section summary { cursor: pointer; font-weight: 650; padding-block: .75rem; }
.town-links { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem 1rem; margin-top: 1rem; }
.town-links a { font-size: .88rem; }
@media (max-width: 700px) { .town-links { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 360px) { .town-field { flex-direction: column; } }

.sources-page { padding-block: 3rem; }
