/* Shared stylesheet for the generated advisory pages (livewell/templates/pages/).
 *
 * One file for ~4,800 pages: inlining this into each would add tens of MB per publish and
 * cost every visitor a re-download. Published by `livewell publish site` (NOT publish pages),
 * which sends .css with max-age=3600 — so an edit here takes up to an hour to reach visitors.
 *
 * Tokens mirror site/index.html so the generated pages and the marketing page read as one
 * site. Keep them in step.
 */

:root {
  --paper: #F3EEE1;
  --paper-2: #EAE2CF;
  --card: #FBF8F0;
  --ink: #18261C;
  --ink-soft: #42513F;
  --ink-mute: #6B7668;
  --pine: #1C4D30;
  --pine-deep: #0E2E1C;
  --moss: #4B8A5C;
  --water: #1C6E88;
  --signal: #C4462A;
  --signal-bg: #FBEAE5;
  --caution: #B4761B;
  --caution-bg: #FBF1DF;
  --ok-bg: #E9F3EA;
  --gold: #C68A2E;
  --line: rgba(24, 38, 28, .14);
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  background: var(--paper); color: var(--ink);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--pine); text-decoration-color: rgba(28, 77, 48, .35); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── header ───────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 238, 225, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Mirrors the homepage header (site/index.html) rule for rule — change one, change both. */
.nav { display: flex; align-items: center; height: 70px; }
.brand {
  display: flex; align-items: center; gap: 11px; text-decoration: none;
  font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.32rem;
  letter-spacing: -.02em; color: var(--ink);
}
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 3px 6px rgba(14, 46, 28, .3)); }
.nav-links { display: flex; align-items: center; gap: 34px; margin-left: auto; }
.nav-links a { font-size: .94rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--pine); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 34px; }
.nav-toggle {
  display: none; align-items: center; gap: 8px; font: inherit; font-size: .9rem; font-weight: 700;
  color: var(--pine); background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 9px 14px; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .2s, opacity .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.site-head.nav-open .nav-toggle-bars { background: transparent; }
.site-head.nav-open .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-head.nav-open .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }
.btn {
  display: inline-flex; align-items: center; background: var(--pine); color: #fff; text-decoration: none;
  font-weight: 700; padding: 12px 22px; border-radius: 999px; white-space: nowrap; font-size: .95rem;
  box-shadow: 0 10px 24px -10px rgba(28, 77, 48, .7);
}
.btn:hover { background: var(--pine-deep); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
/* Phones: the links sit behind a Menu toggle. Without JavaScript (no html.js) the toggle is
   hidden and the links simply wrap — visible either way, never removed. */
@media (max-width: 780px) {
  .nav { flex-wrap: wrap; height: auto; min-height: 70px; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; gap: 6px 18px; margin-left: 0; }
  .nav-links a { font-size: .9rem; }
  .nav-actions { margin-left: auto; }
  html.js .nav { flex-wrap: nowrap; height: 70px; padding-top: 0; padding-bottom: 0; }
  html.js .nav-toggle { display: inline-flex; }
  html.js .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0; width: auto;
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 14px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -18px rgba(14, 46, 28, .35);
  }
  html.js .site-head.nav-open .nav-links { display: flex; }
  html.js .nav-links a { padding: 13px 2px; font-size: 1rem; border-top: 1px solid var(--line); }
  html.js .nav-links a:first-child { border-top: none; }
}
@media (max-width: 400px) {
  .brand { font-size: 1.14rem; gap: 8px; }
  .nav-actions .btn { padding: 10px 15px; font-size: .86rem; }
  .nav-toggle { padding: 9px 11px; }
}
@media (max-width: 350px) { .brand { font-size: 0; } }

/* ── breadcrumbs ──────────────────────────────────────────────────── */
.crumbs { padding-top: 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: .84rem; color: var(--ink-mute); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--pine); text-decoration: underline; }

/* ── type ─────────────────────────────────────────────────────────── */
main { padding: 10px 0 56px; }
.eyebrow {
  font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: .7rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--water); font-weight: 500;
}
h1 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; line-height: 1.05;
  font-size: clamp(2.1rem, 5.5vw, 3.2rem); letter-spacing: -.02em;
  color: var(--pine-deep); margin: .18em 0 .3em;
}
h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: clamp(1.4rem, 3vw, 1.85rem);
  color: var(--pine); margin: 1.9em 0 .5em; line-height: 1.15; letter-spacing: -.01em;
}
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.4em 0 .4em; color: var(--ink); }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 64ch; }
p + p { margin-top: .8em; }
.note, .src { font-size: .88rem; color: var(--ink-mute); margin-top: .7em; }
.summary { margin-top: 1em; font-size: .95rem; color: var(--ink-soft); }
.count { color: var(--ink-mute); font-weight: 400; font-size: .85em; }

/* ── callouts ─────────────────────────────────────────────────────── */
.callout {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--water);
  border-radius: 10px; padding: 18px 20px; margin: 1.6em 0;
}
.callout h2 { margin: 0 0 .35em; font-size: 1.15rem; }
.callout.statewide { border-left-color: var(--gold); }
.statewide-list { list-style: none; margin-top: .8em; display: grid; gap: 10px; }
.statewide-list li {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line); font-size: .94rem;
}
.statewide-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.statewide-list .sp { font-weight: 700; }
.statewide-list .band, .statewide-list .scope {
  font-family: 'Spline Sans Mono', monospace; font-size: .78rem;
  background: var(--paper-2); padding: 2px 7px; border-radius: 5px; color: var(--ink-soft);
}
.statewide-list .who { color: var(--ink-mute); font-size: .86rem; }
.statewide-list .advice { flex: 1 1 100%; }

/* ── species / advisory tables ────────────────────────────────────── */
.species-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin: 1.1em 0;
}
.species-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.species-head h3 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; font-size: .76rem; font-weight: 600; text-decoration: none;
  background: var(--signal-bg); color: #8A2F1C; padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(196, 70, 42, .22);
}
.chip:hover { background: #F6DAD2; }

table { border-collapse: collapse; width: 100%; margin-top: .9em; font-size: .93rem; }
thead th {
  text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line);
}
td, tbody th { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
th.band {
  font-family: 'Spline Sans Mono', monospace; font-size: .82rem; font-weight: 500;
  white-space: nowrap; color: var(--ink); background: var(--paper-2);
  border-right: 1px solid var(--line);
}
td.who { color: var(--ink-soft); font-size: .88rem; max-width: 22ch; }
td.advice { font-weight: 500; }
tr.sev-avoid td.advice { color: #8A2F1C; }
tr.sev-avoid { background: var(--signal-bg); }
tr.sev-caution { background: var(--caution-bg); }
tr.sev-caution td.advice { color: #7A4F0E; }
tr.sev-ok { background: var(--ok-bg); }

/* ── regs ─────────────────────────────────────────────────────────── */
.regs-table, .states-table { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.regs-table td, .states-table td { font-size: .9rem; }
.num { text-align: right; font-family: 'Spline Sans Mono', monospace; font-size: .85rem; }
.srccell { font-size: .82rem; }
.srccell a { color: var(--water); }

/* ── lists ────────────────────────────────────────────────────────── */
.water-group { margin-top: 1.4em; }
.water-list { list-style: none; columns: 2; column-gap: 28px; margin-top: .5em; }
.water-list.cols { columns: 3; }
.water-list li { break-inside: avoid; padding: 3px 0; font-size: .95rem; }
.water-list .county { color: var(--ink-mute); font-size: .8rem; }
@media (max-width: 760px) { .water-list, .water-list.cols { columns: 1; } }

.state-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: .6em; }
.state-chips a {
  display: inline-block; text-decoration: none; font-size: .88rem; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.state-chips a:hover { background: var(--pine); color: #fff; border-color: var(--pine); }

.access-list { list-style: none; margin-top: .6em; }
.access-list li {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem;
}
.access-list .an { font-weight: 600; }
.access-list .at { color: var(--ink-mute); font-size: .82rem; text-transform: capitalize; }
.access-list .ad { font-family: 'Spline Sans Mono', monospace; font-size: .8rem; color: var(--ink-mute); }
.access-list a { margin-left: auto; font-size: .86rem; font-weight: 600; }

/* ── prep / detail ────────────────────────────────────────────────── */
.prep { background: var(--ok-bg); border: 1px solid rgba(75, 138, 92, .3); border-radius: 12px; padding: 18px 20px; margin: 1.6em 0; }
.prep h2 { margin-top: 0; }
.prep-block { margin-top: 1em; }
.prep-block h3 { margin: 0 0 .3em; font-size: 1rem; }
.prep-block ul { margin-left: 1.1em; }
.prep-block li { padding: 2px 0; font-size: .93rem; }
.detail p { max-width: 70ch; }

/* The sourced WebPs are ~640px wide; don't upscale them into blur. */
.species-image { margin: 1.4em 0; max-width: 640px; }
/* Fixed-ratio box: the reference images differ in aspect ratio and the pointer JSON carries
   no dimensions, so this reserves stable space (no layout shift) without distorting any of
   them. contain + a card background letterboxes the odd one out cleanly. */
.species-image img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: contain;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
.species-image figcaption { font-size: .8rem; color: var(--ink-mute); margin-top: .5em; }

.meta dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin-top: .6em; font-size: .93rem; }
.meta dt { color: var(--ink-mute); font-size: .84rem; }

/* ── app link ─────────────────────────────────────────────────────── */
.applink { padding-bottom: 40px; }
.applink-card {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1f5636, var(--pine-deep));
  color: #EDE7D6; border-radius: 16px; padding: 26px 28px;
}
.applink-card h2 { color: #F5F0E3; margin: 0 0 .25em; font-size: 1.35rem; }
.applink-card p { color: #C3CBBF; font-size: .95rem; max-width: 58ch; }
.applink-card .btn { background: var(--gold); color: #1A1206; box-shadow: none; }
.applink-card .btn:hover { background: #D89B3C; }

/* ── footer ───────────────────────────────────────────────────────────
   Deliberately identical to the footer on site/index.html (which keeps its own inline copy
   because the landing page is self-contained). If you change one, change both — a visibly
   different footer between the landing page and the content pages is what this replaced. */
.site-foot { background: var(--pine-ink, #08160E); color: #9fb0a2; font-size: .9rem; padding: 54px 0 40px; }
.site-foot .safety { color: #8fa393; max-width: 78ch; padding-bottom: 34px; }
.site-foot .safety strong { color: #c3cbbf; }
.site-foot .safety p + p { margin-top: .7em; }
.site-foot .safety .asof { color: #6f8074; }
.site-foot a { color: #c3cbbf; text-decoration: none; }
.site-foot a:hover { color: #F7E7A6; }
.foot-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: 34px 0 44px; border-top: 1px solid rgba(143,192,206,.12);
  border-bottom: 1px solid rgba(143,192,206,.12);
}
.foot-brand {
  display: flex; align-items: center; gap: 11px; font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 1.25rem; color: #EDE7D6; margin-bottom: 14px;
}
.foot-brand img { width: 32px; height: 32px; }
.foot-col h4 {
  font-family: 'Spline Sans Mono', monospace; font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: #7d8f80; margin-bottom: 16px; font-weight: 500;
}
.foot-col a { display: block; margin-bottom: 10px; }
.disclaimer { font-size: .8rem; color: #6f8074; line-height: 1.7; max-width: 52ch; }
.disclaimer strong { color: #c3cbbf; }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding-top: 26px; font-size: .8rem; color: #6f8074;
}
.foot-bottom .mono { font-family: 'Spline Sans Mono', monospace; letter-spacing: .06em; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr; gap: 30px; } }

@media print { .site-head, .applink { display: none; } }

/* The one statewide rule surfaced on a water page — must read as a warning, not a footnote. */
.strictest { margin-top: .7em; padding: 10px 12px; border-radius: 8px; font-size: .95rem; }
.strictest.sev-avoid { background: var(--signal-bg); color: #8A2F1C; }
.strictest.sev-caution { background: var(--caution-bg); color: #7A4F0E; }
.strictest.sev-ok { background: var(--ok-bg); }

/* Tables scroll themselves on narrow screens — never the page. */
@media (max-width: 620px) {
  .species-card, .regs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 460px; }
  td.who { max-width: none; }
}
body { overflow-x: hidden; }

/* ── prose pages (privacy, terms, sources) ─────────────────────────────
   These render through the same base.html shell as the advisory pages; only the body copy
   differs. Previously each was a standalone file with its own palette and no header/footer. */
.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); margin: 1.8em 0 .4em; }
.prose h3 { font-size: 1.04rem; margin: 1.5em 0 .3em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { margin: .6em 0 .6em 1.2em; }
.prose li { margin: 5px 0; }
.prose .eff { font-size: .88rem; color: var(--ink-mute); margin-bottom: 1.2em; }
.prose .muted { color: var(--ink-mute); }
.prose .agency { color: var(--ink-mute); font-size: .92em; }
.prose code { background: var(--paper-2); padding: 1px 5px; border-radius: 4px; font-size: .9em;
  font-family: 'Spline Sans Mono', ui-monospace, monospace; }
.prose table { margin: 1em 0; }
.prose th { background: var(--paper-2); font-size: .78rem; }
.prose .legal { text-transform: uppercase; font-size: .9rem; letter-spacing: .02em; }
/* the terms page's safety callout keeps its warning colour inside the shared shell */
.prose .safety, .prose .callout.warn {
  background: var(--signal-bg); border: 1px solid rgba(196,70,42,.25);
  border-left: 4px solid var(--signal); border-radius: 10px; padding: 16px 18px; margin: 1.4em 0;
}
.prose .safety h2 { margin-top: 0; color: #8A2F1C; }

/* County listings: the no-advisory waters are plain text, not links — there is no page to
   send anyone to, and faking one would be the thin-content trap this tier exists to avoid. */
.water-list.plain li { color: var(--ink-soft); }
.state-chips .cnt {
  font-family: 'Spline Sans Mono', monospace; font-size: .72rem;
  color: var(--water); margin-left: 4px;
}

/* ── 404 ────────────────────────────────────────────────────────────── */
.notfound { padding: 70px 0 40px; max-width: 46ch; }
.notfound h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; margin-bottom: .4em; }
.notfound h1 em { color: var(--gold); }
.notfound p { color: var(--ink-soft); }
.notfound-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; font-weight: 600; }

/* Pages with no advisory (legal, 404) leave the safety block empty; don't draw its divider. */
.site-foot .safety:not(:has(*)) { display: none; }

/* LEGACY — the pre-2026-09-23 header markup (head-inner / head-nav / brand-name). pages.css
   publishes with the site on push, but the ~4,750 advisory pages are only regenerated by the
   next data refresh, so for a while old pages load this stylesheet. Delete this block once a
   refresh has republished every page with the new header. */
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.head-nav { display: flex; align-items: center; gap: 20px; font-size: .93rem; font-weight: 600; }
.head-nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; }
.head-nav a:not(.btn):hover { color: var(--pine); }
.head-nav .btn { padding: 9px 17px; font-size: .9rem; box-shadow: none; }
@media (max-width: 620px) {
  .head-inner { gap: 12px; }
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .head-nav { gap: 16px; font-size: .9rem; }
  .head-nav .btn { padding: 8px 14px; font-size: .85rem; }
}
