/* Shared styles. Each site sets its own colors via "theme" in site.json,
   which becomes CSS custom properties on :root. These are the fallbacks. */
:root {
  --ink: #13262b;
  --ink-soft: #2b3b41;
  --muted: #5b6b70;
  --paper: #ffffff;
  --wash: #f4f7f7;
  --cream: #faf8f2;
  --line: #d8e0e0;
  --line-strong: #b9c6c6;
  --primary: #0f5257;
  --primary-ink: #ffffff;
  --teal: #2f8f8b;
  --teal-light: #8ed1ca;
  --teal-wash: #e8f3f2;
  --accent: #e8a917;
  --accent-ink: #13262b;
  --accent-text: #8a6200;
  --radius: 3px;
  --wrap: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
blockquote { margin: 1.5em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.2rem; color: var(--ink-soft); }
blockquote p:last-child { margin-bottom: 0; }
small, .small { font-size: .88rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
code { font-size: .9em; background: var(--wash); padding: .1em .35em; border-radius: var(--radius); }
sup { font-size: .72em; line-height: 0; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { font: 600 .78rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid var(--line-strong); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { white-space: nowrap; }
th { white-space: normal; max-width: 16ch; }
td:first-child { white-space: nowrap; }
tbody tr:hover { background: var(--wash); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2em; }
.table-note { font-size: .85rem; color: var(--muted); margin-top: .6em; max-width: 80ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Draft state */
.draft-banner {
  background: #fff3c4; color: #5c4500; border-bottom: 1px solid #e0c35a;
  padding: 8px 16px; font-size: .9rem; text-align: center;
}
.draft {
  background: #fff7d6; border: 1px dashed #b88a00; color: #5c4500; border-radius: var(--radius);
  padding: 10px 14px; font-size: .9rem; margin-bottom: 24px;
}
.pill { display: inline-block; font: 600 .65rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; padding: 3px 6px; border-radius: 10px; background: #e0c35a; color: #3a2b00; vertical-align: middle; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-logo { height: 68px; width: auto; display: block; margin-left: -22px; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--primary); color: var(--primary-ink); font: 700 .95rem/1 var(--sans); letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font: 700 1.05rem/1.15 var(--serif); }
.brand-sub { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover { border-bottom-color: var(--teal-light); color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 8px 12px; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a:not(.btn) { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--primary); font-weight: 700; }
  .nav-cta { margin-top: 12px; text-align: center; }
  .brand-logo { height: 54px; margin-left: -16px; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--radius); border: 2px solid transparent;
  font: 600 .95rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(.95); color: var(--accent-ink); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--teal); color: var(--primary-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.band .btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.band .btn-ghost:hover { border-color: #fff; color: #fff; }

/* Labels and section furniture */
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 14px; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.rule { width: 56px; height: 4px; background: var(--accent); margin: 0 0 22px; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5; color: var(--ink-soft); max-width: 58ch; }
.meta { color: var(--muted); font-size: .9rem; }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.tight { padding: clamp(32px, 5vw, 56px) 0; }
.section.alt { background: var(--wash); }
.section.cream { background: var(--cream); }
.section.teal-wash { background: var(--teal-wash); }
.section-head { max-width: 64ch; margin-bottom: 32px; }
.section-head h2 { margin-bottom: .35em; }
.section-head p { color: var(--ink-soft); margin: 0; }
.section + .section:not(.alt):not(.cream):not(.teal-wash) { border-top: 1px solid var(--line); }

/* Hero */
.hero { background: var(--cream); border-bottom: 1px solid var(--line); padding: clamp(32px, 4.5vw, 56px) 0; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; }
.hero h1 { max-width: 16ch; margin-bottom: .45em; }
.hero .lede { margin-bottom: 1.4em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-aside { border-left: 1px solid var(--line-strong); padding-left: 32px; }
.hero-aside h2 { font-size: 1.1rem; font-family: var(--sans); font-weight: 700; margin-bottom: 18px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-aside { border-left: 0; border-top: 1px solid var(--line-strong); padding: 24px 0 0; }
}

/* Photos: credits appear on hover or keyboard focus, and in the credits line at the page foot */
.ph { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--wash); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px;
  background: rgba(19, 38, 43, .8); color: #fff; font: 400 .72rem/1.4 var(--sans);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.ph figcaption a { color: #fff; pointer-events: auto; }
.ph:hover figcaption, .ph:focus-within figcaption { opacity: 1; }
.hero-photos { padding: clamp(36px, 5vw, 64px) 0; }
.hero-photos .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 4vw, 56px); }
.hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-mosaic .ph:first-child { grid-column: 1 / -1; }
.hero-mosaic .ph:first-child img { aspect-ratio: 16 / 9; }
.hero-mosaic .ph img { aspect-ratio: 4 / 3; }
.success-band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(24px, 3.5vw, 40px) 0; }
.success-band .eyebrow { margin-bottom: 18px; }
.success-row { display: grid; gap: 24px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.success { border-top: 3px solid var(--accent); padding-top: 12px; }
.success p { margin: 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.5; }
.success strong { color: var(--ink); }
.card.card-photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-photo .ph { border-radius: 0; }
.card-photo .ph img { aspect-ratio: 3 / 2; }
.card-photo .card-body { padding: 22px 24px 24px; }
.card-photo .card-body p:last-child { margin-bottom: 0; }
.credits-line { background: var(--ink); color: #9fb3b6; padding: 14px 0 0; font-size: .74rem; line-height: 1.5; }
.credits-line p { margin: 0; }
.credits-line a { color: #c9d6d8; }
@media (max-width: 860px) {
  .hero-photos .hero-grid { grid-template-columns: 1fr; }
  .success-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .success-row { grid-template-columns: 1fr; } }

/* Stats */
.stats { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { border-top: 3px solid var(--accent); padding-top: 14px; }
.stat .figure { font: 600 clamp(2rem, 4vw, 2.9rem)/1 var(--serif); letter-spacing: -.02em; color: var(--primary); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.stat .src { display: block; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.stats-stack .stat { padding: 14px 0 18px; border-top: 1px solid var(--line-strong); }
.stats-stack .stat:first-child { border-top: 3px solid var(--accent); }
.stats-stack .figure { font-size: 2.1rem; }

/* Page head */
.page-head { background: var(--cream); border-bottom: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.page-head .lede { margin: 0; }
.page-head .meta { margin: 14px 0 0; }
.page-head-post h1 { max-width: 24ch; }

/* Prose */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose-serif { font-family: var(--serif); font-size: 1.12rem; line-height: 1.65; }
.prose-serif .meta, .prose-serif .table-note, .prose-serif table, .prose-serif .btn, .prose-serif .eyebrow, .prose-serif .notice { font-family: var(--sans); }
.prose-serif table { font-size: .92rem; }
.footnotes { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1em; margin-top: 2.5em; font-family: var(--sans); }
.footnotes ol { padding-left: 1.4em; }
.footnotes li { margin-bottom: .4em; }

/* Two-column article layout with a sticky side rail */
.two-col { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; }
.side-rail { position: sticky; top: 92px; font-size: .92rem; }
.side-rail h3 { font: 700 .78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.side-rail ul { list-style: none; padding: 0; margin: 0 0 24px; }
.side-rail li { padding: 7px 0; border-top: 1px solid var(--line); }
.side-rail a { text-decoration: none; }
.side-rail a:hover { text-decoration: underline; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .side-rail { position: static; } }

/* Grids, cards, lists */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--primary); padding: 24px; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .tag { font: 600 .74rem/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); margin-bottom: 12px; display: block; }
.card ul { padding-left: 1.2em; margin: .6em 0 0; }
.card li { margin-bottom: .35em; }
.pillar { border-top: 3px solid var(--accent); padding-top: 16px; }
.pillar h3 { font-size: 1.15rem; }
.pillar .core { font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; color: var(--ink); margin-bottom: .8em; }
.pillar ul { padding-left: 1.1em; margin: 0; font-size: .95rem; color: var(--ink-soft); }
.pillar li { margin-bottom: .4em; }

.numbered { counter-reset: n; list-style: none; padding: 0; margin: 0; }
.numbered > li { counter-increment: n; position: relative; padding: 18px 0 18px 56px; border-top: 1px solid var(--line); }
.numbered > li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 18px; font: 600 1.3rem/1 var(--serif); color: var(--accent-text); }
.numbered h3 { margin-bottom: .3em; }
.numbered p:last-child { margin-bottom: 0; }

.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.list-plain li:first-child { border-top: 1px solid var(--line); }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 22px 0; border-top: 1px solid var(--line); display: grid; gap: 6px 28px; grid-template-columns: 150px 1fr; }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list .meta { padding-top: 4px; }
.post-list h3 { margin-bottom: .25em; font-size: 1.3rem; }
.post-list h3 a { text-decoration: none; }
.post-list h3 a:hover { text-decoration: underline; }
.post-list p { margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) { .post-list li { grid-template-columns: 1fr; } }

.post-foot { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 760px) { .post-foot { grid-template-columns: 1fr; } }

.band { background: var(--primary); color: #fff; padding: clamp(40px, 6vw, 64px) 0; }
.band h2 { color: #fff; }
.band-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band p { margin: 0; opacity: .9; max-width: 54ch; }
.band .btn-accent { color: var(--accent-ink); }
.band-ink { background: var(--ink); }

.quote-band { background: var(--ink); color: #fff; padding: clamp(48px, 7vw, 80px) 0; }
.quote-band blockquote { border-left-color: var(--accent); color: #fff; font-size: clamp(1.35rem, 2.6vw, 1.9rem); max-width: 30ch; margin: 0; }
.quote-band .attrib { color: var(--teal-light); font: 500 .9rem/1.4 var(--sans); margin: 18px 0 0 calc(1.2em + 3px); }

.notice { background: var(--teal-wash); border-left: 4px solid var(--teal); padding: 12px 16px; }
.callout { background: var(--cream); border: 1px solid var(--line); padding: 20px 24px; margin: 1.5em 0; }
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.region-list { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: 0; font-size: .95rem; }
@media (max-width: 560px) { .region-list { columns: 1; } }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font: 600 .9rem/1.5 var(--sans); color: var(--primary); }
.timeline p { margin: 0; }
.timeline .src { display: inline-block; margin-left: .35em; font: .8rem/1.5 var(--sans); color: var(--muted); }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Data bank */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 20px; }
.filters label { font-weight: 600; font-size: .85rem; display: block; margin-bottom: 4px; }
.filters select, .filters input { width: auto; min-width: 200px; }
.filters .count { font-size: .9rem; color: var(--muted); margin-left: auto; }
.coverage th:nth-child(1), .coverage td:nth-child(1) { white-space: nowrap; width: 120px; }
.coverage th:nth-child(2), .coverage td:nth-child(2) { white-space: nowrap; width: 150px; }
.coverage td:last-child { white-space: nowrap; }
.coverage tr[hidden] { display: none; }
.coverage-section { margin-top: 2.5em; }
.coverage-section[hidden] { display: none; }
.source-list { list-style: none; padding: 0; margin: 0; }
.source-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.source-list li:last-child { border-bottom: 1px solid var(--line); }
.source-list .what { color: var(--muted); font-size: .9rem; display: block; }
.tier { display: inline-block; font: 600 .68rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; padding: 3px 7px; border-radius: 2px; background: var(--teal-wash); color: var(--primary); }
details.sources { margin: 1em 0 2em; }
details.sources summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
details.sources ol { font-size: .9rem; color: var(--muted); }

/* Forms */
form label { display: block; font-weight: 600; margin-bottom: 6px; }
input, textarea, select {
  font: inherit; font-size: 1rem; width: 100%; padding: 10px 12px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff;
}
textarea { min-height: 140px; resize: vertical; }
.field { margin-bottom: 18px; }
.field-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 5px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.form-status { margin-top: 12px; font-weight: 600; }

.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-row input[type=email] { flex: 2 1 180px; }
.signup-row input[name=zip] { flex: 1 1 80px; max-width: 110px; }
.signup-row .btn { flex: 0 0 auto; }

/* Donate */
.donate-box { max-width: 640px; }
.amounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 14px; }
.amount {
  display: block; text-align: center; padding: 14px 8px; border: 2px solid var(--primary); border-radius: var(--radius);
  font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--primary);
}
.amount:hover { background: var(--primary); color: var(--primary-ink); }
.donate-processor { font-size: .9rem; color: var(--muted); }
.legal-block { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.legal-block ol { padding-left: 1.2em; margin: 0; }
.legal-block li { margin-bottom: 4px; }

/* Footer */
.site-footer { background: var(--ink); color: #c9d6d8; margin-top: 0; padding-top: 56px; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--teal-light); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.3fr .7fr 1.3fr; padding-bottom: 40px; }
.footer-logo { height: 56px; width: auto; display: block; margin: -14px 0 10px -18px; }
.footer-name { font: 700 1.05rem/1.3 var(--serif); margin-bottom: 6px; color: #fff; }
.footer-about p { max-width: 40ch; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer nav li { margin-bottom: 8px; }
.site-footer .signup-label { color: #fff; }
.site-footer .signup input { border-color: transparent; }
.site-footer .signup .btn-primary { background: var(--accent); color: var(--accent-ink); }
.site-footer .form-note { color: #9fb3b6; }
.disclaimer {
  display: inline-block; border: 1.5px solid #fff; padding: 8px 14px; margin: 0 0 24px;
  font-weight: 600; font-size: .9rem; color: #fff;
}
.footer-base { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; padding-bottom: 28px; color: #9fb3b6; font-size: .82rem; }
.footer-base p { margin: 0 0 6px; max-width: 90ch; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

@media print {
  .site-header, .site-footer, .nav-toggle, .band, .signup, .draft-banner { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}
