/* The static locality pages. Deliberately self-contained: these load without
   the map, its libraries or its fonts, so they stay fast and readable even
   when someone arrives from a search result on a slow phone. */

:root {
  --ink: #1d232b;
  --ink-2: #4a545f;
  --muted: #666f7d;
  --bg: #faf9f5;
  --panel: #ffffff;
  --line: #e2ded2;
  --accent: #a07514;
  --accent-ink: #8a640f;
  --cancel: #9aa3ad;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eaf1f8;
    --ink-2: #c3cedb;
    --muted: #93a3b5;
    --bg: #111a27;
    --panel: #182434;
    --line: #26313f;
    --accent: #e0b44c;
    --accent-ink: #eec463;
    --cancel: #6a7787;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent-ink); }
a:hover { color: var(--accent); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 3px;
  transform: rotate(45deg);
}

.header-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.header-nav a { font-weight: 600; text-decoration: none; font-size: 15px; }
.header-nav a:hover { text-decoration: underline; }
.map-link { font-weight: 600; text-decoration: none; }
.map-link:hover { text-decoration: underline; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 36px 0 10px; }

.lede { font-size: 18px; color: var(--ink-2); margin: 0 0 28px; max-width: 62ch; }

/* A wide table on a narrow phone scrolls inside its own box rather than
   forcing the whole page sideways. */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }

table { border-collapse: collapse; width: 100%; font-size: 15px; }
caption { text-align: left; padding: 14px 16px 10px; color: var(--muted); font-size: 14px; }
th, td { padding: 11px 16px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; white-space: nowrap; }
td { white-space: nowrap; }
td:first-child, td:nth-child(6) { white-space: normal; min-width: 200px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.cancelled td { color: var(--cancel); text-decoration: line-through; }

.map-cta { margin: 32px 0; font-weight: 600; }

/* A single listing. The fact tables are two columns of prose, not the wide
   grid the county tables need, so they wrap instead of scrolling. */
.listing-place { color: var(--muted); margin: -4px 0 20px; font-size: 15px; }

.facts th, .facts td { white-space: normal; }
.facts th[scope="row"] {
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  width: 42%;
  max-width: 260px;
}
.facts td { font-variant-numeric: tabular-nums; }

/* Cancelled, or a date already gone by. Loud enough that nobody drives to a
   courthouse on the strength of this page. */
.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--panel);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 22px;
  max-width: 70ch;
}

.locality-index { list-style: none; padding: 0; margin: 0; columns: 3 220px; column-gap: 28px; }
.locality-index li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.locality-index .count { color: var(--muted); font-variant-numeric: tabular-nums; }

.other-localities { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 22px; }
.other-localities ul { list-style: none; padding: 0; margin: 0; columns: 4 170px; column-gap: 24px; font-size: 14px; }
.other-localities li { break-inside: avoid; padding: 3px 0; }

.page-footer {
  border-top: 1px solid var(--line);
  padding: 22px 20px 44px;
  color: var(--muted);
  font-size: 14px;
}
.page-footer p { max-width: 70ch; margin: 0 auto 8px; }
.muted { color: var(--muted); }

@media (max-width: 640px) {
  main { padding: 20px 16px 40px; }
  .lede { font-size: 17px; }
}

/* Where the county-records figures came from. Sits under the two tables it
   qualifies, not in the footer where nobody reading a number would look. */
.provenance {
  margin: 14px 0 0;
  max-width: 70ch;
  font-size: 14px;
  color: var(--muted);
}

/* The written page. Long-form, so it gets a narrower measure than the tables
   and a contents list that works as a jump menu on a phone. */
.guide-contents {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 16px 20px;
  margin: 0 0 8px;
}
.guide-contents ul { list-style: none; padding: 0; margin: 0; columns: 2 220px; column-gap: 28px; }
.guide-contents li { break-inside: avoid; padding: 4px 0; }
.guide-contents a { text-decoration: none; }
.guide-contents a:hover { text-decoration: underline; }

.guide-body p, main > p { max-width: 68ch; }
h3 { font-size: 17px; margin: 26px 0 6px; }
