/* Layout: one reading column for pages, wider grids for cards; header and footer span the width.
   Palette: juniper green on a sage-tinted ground, ochre for seasons. A state can override any color token with theme.light and theme.dark in its site.json. */
:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --ink: #1d2b27;
  --muted: #56665f;
  --line: #d9e0da;
  --accent: #1e6b57;
  --mark: #8a5a0f;
  --mark-bg: #f6ead2;
  --sky-1: #dfe9e6;
  --sky-2: #c4d6d0;
  --ridge-1: #9fb8ae;
  --ridge-2: #6f8f83;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121917; --surface: #1a2421; --ink: #e6ece9; --muted: #a3b2ab; --line: #2b3833;
    --accent: #7cc7ad; --mark: #e8b65a; --mark-bg: #33291a;
    --sky-1: #17221f; --sky-2: #1d2d29; --ridge-1: #26392f; --ridge-2: #31493e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121917; --surface: #1a2421; --ink: #e6ece9; --muted: #a3b2ab; --line: #2b3833;
  --accent: #7cc7ad; --mark: #e8b65a; --mark-bg: #33291a;
  --sky-1: #17221f; --sky-2: #1d2d29; --ridge-1: #26392f; --ridge-2: #31493e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--font-body); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0 0 0.5rem; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 500; }
p { margin: 0 0 1rem; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.page { padding-block: 24px 8px; }

.draft-note { background: var(--mark-bg); color: var(--mark); font-size: 0.88rem; }
.draft-note .wrap { padding-block: 8px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; padding-block: 14px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
/* A state's flag sits left of the name: public-domain artwork, no state seals (see docs/flags.md). */
.brand-flag { display: block; flex: none; width: 36px; height: 24px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.brand-kicker, .brand-tail { font-weight: 500; color: var(--muted); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-header nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-header nav a:hover { text-decoration: underline; }

/* Home */
.hero { position: relative; overflow: hidden; border-radius: 14px; background: linear-gradient(180deg, var(--sky-1), var(--sky-2)); padding: 48px 28px 96px; margin-bottom: 40px; }
.hero .ridges { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 110px; }
.hero .r1 { fill: var(--ridge-1); }
.hero .r2 { fill: var(--ridge-2); }
.hero-text { position: relative; max-width: 40rem; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.eyebrow { font-family: var(--font-data); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }

.block { margin-block: 40px; }
.month-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.month-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; min-width: 0; }
.month-card p { margin: 0; color: var(--muted); }

.region-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.region-list li { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr) auto; gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.region-name { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.region-pitch { color: var(--muted); }
.region-count { font-family: var(--font-data); font-size: 0.8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .region-list li { grid-template-columns: 1fr; } }

.spot-grid { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.spot-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.spot-card a { text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.spot-card a:hover .spot-name { text-decoration: underline; }
.spot-region { font-family: var(--font-data); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.spot-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.spot-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.spot-card .look-for { margin-top: auto; color: var(--ink); font-size: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--font-data); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mark); background: var(--mark-bg); border-radius: 999px; padding: 2px 9px; }
.more { font-weight: 600; }

.plan-band { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px 28px; }
.plan-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-weight: 600; }

/* Pages */
.crumbs { font-size: 0.9rem; margin-bottom: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a::before { content: "\2190\00a0"; }
.prose-wrap, .prose { max-width: 42rem; }
.prose-wrap > h1 + .lede { margin-top: 0.25rem; }
.lede { font-size: 1.18rem; color: var(--muted); }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: 0.35rem; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 24px 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.facts dt { font-family: var(--font-data); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-top: 0.2em; }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }
.loop { border-left: 3px solid var(--mark); padding: 2px 0 2px 16px; margin: 28px 0; }
.loop h2 { font-size: 1.15rem; }
.ebird { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 28px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.ebird a { font-weight: 600; }
.code { font-family: var(--font-data); font-size: 0.8rem; color: var(--muted); }
.plain-list { padding-left: 1.2rem; }
.bird-list { list-style: none; padding: 0; columns: 2 18rem; column-gap: 32px; }
.bird-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bird-list .bird { font-weight: 600; display: block; }
.bird-list .where { font-size: 0.92rem; color: var(--muted); }

.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { padding-block: 22px 36px; }
.site-footer .independent { color: var(--ink); max-width: 44rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Bird photos: real photos from local birders, credited under each one. */
.photo { margin: 0; min-width: 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--line); }
.photo figcaption, .spot-photo figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.photo figcaption a, .spot-photo figcaption a { color: inherit; }
.photo-lead { margin: 4px 0 24px; max-width: 46rem; }
.photo-lead img { max-height: 520px; object-fit: cover; }
.hero.has-photo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.hero-photo { position: relative; z-index: 1; }
.hero-photo img { aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 1px 0 var(--line); }
.hero-photo figcaption { color: var(--ink); opacity: 0.75; }
@media (max-width: 760px) { .hero.has-photo { grid-template-columns: minmax(0, 1fr); } }
.spot-card { padding: 0; overflow: hidden; gap: 0; }
.spot-photo { margin: 0; }
.spot-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--line); }
.spot-photo figcaption { padding: 4px 20px 0; margin: 0; font-size: 0.7rem; }
.spot-body { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bird-list li.has-photo { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; align-items: center; }
.bird-list li.has-photo .bird, .bird-list li.has-photo .where { grid-column: 2; }
.bird-thumb { grid-row: span 2; width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.credit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 46rem; }
.credit-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
.credit-list img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.credit-list .bird { display: block; font-weight: 600; }
.credit-list .where { color: var(--muted); font-size: 0.9rem; }
