/* ==========================================================================
   US23.com — site stylesheet
   Heritage-editorial: Georgia headings, system sans body, mountain palette.
   No external fonts or CDN dependencies. Light + dark.
   ========================================================================== */

:root {
  --paper:      #fbf9f4;
  --surface:    #ffffff;
  --surface-2:  #f4f1e9;
  --ink:        #1c2420;
  --ink-soft:   #52605a;
  --ink-faint:  #7d8a84;
  --line:       #ddd8cd;
  --line-soft:  #ebe7dd;
  --brand:      #1c5741;
  --brand-deep: #103527;
  --brand-tint: #e7efea;
  --accent:     #9c5f14;
  --accent-tint:#f6ecdb;
  --focus:      #1c5741;
  --shadow:     0 1px 2px rgba(28, 36, 32, .06), 0 4px 14px rgba(28, 36, 32, .05);

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1120px;
  --r:    10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #14181a;
    --surface:    #1b2124;
    --surface-2:  #222a2d;
    --ink:        #e9e7e1;
    --ink-soft:   #a8b2ad;
    --ink-faint:  #7d8a85;
    --line:       #2f373a;
    --line-soft:  #262d30;
    --brand:      #57ad8b;
    --brand-deep: #0d2b21;
    --brand-tint: #16332a;
    --accent:     #d9a24a;
    --accent-tint:#2b2418;
    --focus:      #57ad8b;
    --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff;
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.15rem; }

/* ── header ──────────────────────────────────────────────────────────────── */

.site-header {
  background: var(--brand-deep);
  color: #f2efe7;
  border-bottom: 3px solid var(--accent);
}
.header-in {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1.1rem;
  padding-block: 1.15rem;
}
.wordmark {
  font: 700 1.6rem/1 var(--serif);
  letter-spacing: .055em;
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: .55rem;
}
.wordmark:hover { color: #fff; }
.shield {
  font: 700 .72rem/1 var(--sans);
  background: #f2efe7; color: var(--brand-deep);
  border-radius: 3px; padding: .3rem .34rem .26rem;
  letter-spacing: .02em;
}
.tagline {
  font-size: .84rem; color: #b9cfc4; letter-spacing: .01em;
  margin-left: auto; text-align: right; max-width: 30ch;
}

/* ── nav ─────────────────────────────────────────────────────────────────── */

.site-nav { background: var(--brand); border-bottom: 1px solid rgba(0, 0, 0, .18); }
.nav-in { display: flex; align-items: stretch; }

.nav-toggle {
  display: none;
  font: 600 .9rem/1 var(--sans);
  background: none; border: 0; color: #fff;
  padding: .85rem 0; cursor: pointer;
  align-items: center; gap: .5rem;
}
.nav-toggle::before { content: "☰"; font-size: 1.1rem; }
.nav-toggle[aria-expanded="true"]::before { content: "✕"; }

.nav-list { display: flex; flex-wrap: wrap; list-style: none; padding: 0; }
.nav-list a {
  display: block; padding: .8rem .85rem;
  color: #e8f0ec; font-size: .93rem; font-weight: 500;
  text-decoration: none; border-bottom: 3px solid transparent;
}
.nav-list a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-list a[aria-current="page"] {
  color: #fff; border-bottom-color: var(--accent); background: rgba(0, 0, 0, .12);
}

@media (max-width: 760px) {
  .nav-in { flex-direction: column; }
  .nav-toggle { display: flex; }
  .nav-list { display: none; flex-direction: column; padding-bottom: .5rem; }
  .nav-list.open { display: flex; }
  .nav-list a { padding: .62rem .2rem; border-bottom: 0; border-left: 3px solid transparent; }
  .nav-list a[aria-current="page"] { border-left-color: var(--accent); padding-left: .55rem; }
}

/* ── layout ──────────────────────────────────────────────────────────────── */

main { flex: 1; padding-block: 2.2rem 3rem; }

.page-head { margin-bottom: 1.6rem; }
.page-head h1 {
  font: 700 clamp(1.75rem, 4.2vw, 2.5rem)/1.15 var(--serif);
  letter-spacing: -.01em;
}
.lede {
  font-size: 1.06rem; color: var(--ink-soft);
  max-width: 68ch; margin-top: .7rem;
}

.crumbs { font-size: .84rem; color: var(--ink-faint); margin-bottom: .55rem; }
.crumbs a { color: var(--ink-soft); }

.prose { max-width: 70ch; }
.prose > * + * { margin-top: 1.05rem; }
.prose h2 { font: 700 1.4rem/1.25 var(--serif); margin-top: 2.1rem; }
.prose h3 { font: 700 1.1rem/1.3 var(--serif); margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: .35rem; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: .15rem 0 .15rem 1.1rem;
  color: var(--ink-soft); font-style: italic;
}

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--brand-deep), var(--brand));
  color: #f4f1e9;
  padding-block: clamp(2.4rem, 6vw, 4rem);
}
.hero h1 {
  font: 700 clamp(2rem, 5.4vw, 3.1rem)/1.1 var(--serif);
  letter-spacing: -.015em; max-width: 24ch;
}
.hero p {
  margin-top: 1rem; max-width: 60ch;
  font-size: clamp(1rem, 2.2vw, 1.14rem); color: #cfe0d7;
}
.hero .eyebrow {
  font: 600 .78rem/1 var(--sans); letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: .85rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }

/* ── buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font: 600 .93rem/1 var(--sans);
  padding: .72rem 1.15rem; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #86500f; color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .4); color: #f4f1e9; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ── cards ───────────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--brand); color: inherit; }
a.card:hover h3 { color: var(--accent); }
.card h3 { font: 700 1.12rem/1.3 var(--serif); color: var(--brand); }
.card p { font-size: .93rem; color: var(--ink-soft); margin-top: .45rem; }
.card .count {
  display: inline-block; margin-top: .8rem;
  font: 600 .76rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-tint);
  padding: .38rem .6rem; border-radius: 20px;
}

.section { margin-top: 2.8rem; }
.section > h2 {
  font: 700 1.5rem/1.2 var(--serif);
  padding-bottom: .6rem; margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

/* ── directory ───────────────────────────────────────────────────────────── */

.dir-tools {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-block: .9rem;
  margin-bottom: 1.3rem;
}
.dir-search { position: relative; max-width: 30rem; }
.dir-search input {
  width: 100%;
  font: 400 1rem/1.4 var(--sans);
  padding: .72rem .85rem .72rem 2.35rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
}
.dir-search input::placeholder { color: var(--ink-faint); }
.dir-search::before {
  content: "⌕"; position: absolute; left: .8rem; top: 50%;
  transform: translateY(-52%); font-size: 1.3rem; color: var(--ink-faint);
  pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.chip {
  font: 500 .84rem/1 var(--sans);
  padding: .48rem .78rem; border-radius: 20px;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line); cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

.dir-count { font-size: .86rem; color: var(--ink-faint); margin-top: .8rem; }

.listings { list-style: none; padding: 0; display: grid; gap: .7rem; }
@media (min-width: 720px) { .listings { grid-template-columns: 1fr 1fr; } }

.listing {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r) var(--r) 0;
  padding: .9rem 1rem;
}
.listing[hidden] { display: none; }
.listing h3 { font: 700 1.02rem/1.3 var(--sans); }
.listing .addr { font-size: .9rem; color: var(--ink-soft); margin-top: .18rem; }
.listing .meta {
  display: flex; flex-wrap: wrap; gap: .35rem .95rem;
  margin-top: .55rem; font-size: .89rem;
}
.listing .meta a { font-weight: 600; text-decoration: none; }
.listing .meta a:hover { text-decoration: underline; }
.listing .desc {
  font-size: .9rem; color: var(--ink-soft);
  margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line-soft);
}
.listing .tag {
  font: 600 .7rem/1 var(--sans); letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-faint);
}

.empty {
  grid-column: 1 / -1; text-align: center;
  padding: 2.5rem 1rem; color: var(--ink-faint);
  border: 1px dashed var(--line); border-radius: var(--r);
}

/* ── notices, forms ──────────────────────────────────────────────────────── */

.notice {
  background: var(--brand-tint);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1rem 1.15rem; font-size: .93rem;
  max-width: 70ch;
}
.notice strong { color: var(--ink); }

.form { max-width: 34rem; display: grid; gap: 1rem; margin-top: 1.6rem; }
.field { display: grid; gap: .32rem; }
.field label { font: 600 .88rem/1.3 var(--sans); }
.field input, .field textarea, .field select {
  font: 400 1rem/1.45 var(--sans);
  padding: .65rem .75rem;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; }
.hint { font-size: .82rem; color: var(--ink-faint); }

/* ── footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--brand-deep); color: #b9cfc4;
  padding-block: 2.2rem; margin-top: auto;
  font-size: .9rem;
}
.footer-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.site-footer h2 {
  font: 600 .78rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .8rem;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: .42rem; }
.site-footer a { color: #dce8e2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-base {
  margin-top: 1.9rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  font-size: .84rem; color: #91a89d;
}

/* ── utility ─────────────────────────────────────────────────────────────── */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.counties { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.counties li {
  font-size: .86rem; background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--line-soft); border-radius: 20px; padding: .35rem .7rem;
}

@media print {
  .site-nav, .dir-tools, .site-footer, .skip, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
  .listing { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
