/* theme.css: the visual skin of the choosecleanwater.org audit.
 *
 * Colors come from the Coalition's own logo (navy #00447C, water blue #0094D0,
 * sun yellow #FFE000). IBM Plex Sans Condensed sets headings, figures and
 * labels, always in normal case; Manuale sets reading text. The Secchi disk (a
 * quartered navy-and-white circle, drawn with a conic gradient) appears only
 * on the 404 page and in empty search states. Screen captures of the
 * Coalition's site sit in a neutral evidence frame; photographs sit plain.
 * Motion is opt-in under prefers-reduced-motion: no-preference.
 */
:root {
  --navy: #00447c;
  --ink: #0b2236;
  --water: #0094d0;
  --channel: #00699a;
  --sun: #ffe000;
  --shallows: #eaf5fb;
  --mist: #f3f6f8;
  --rule: #7a8a99;
  --line: #c9d5de;
  --paper: #ffffff;
  --display: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Manuale", Georgia, "Times New Roman", serif;
  --wrap: 1240px;
  --gutter: clamp(1rem, 3.6vw, 2.5rem);
  --radius: 6px;
  --stoa-index-sticky-top: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--channel); text-decoration-thickness: 0.07em; text-underline-offset: 0.14em; }
a:hover { color: var(--navy); text-decoration-thickness: 0.12em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--sun); border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); line-height: 1.12; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(2.2rem, 1.55rem + 2.8vw, 3.7rem); letter-spacing: -0.01em; line-height: 1.06; }
h2 { font-weight: 700; font-size: clamp(1.65rem, 1.3rem + 1.5vw, 2.45rem); }
h3 { font-weight: 600; font-size: clamp(1.25rem, 1.12rem + 0.6vw, 1.6rem); }
h4 { font-weight: 600; font-size: 1rem; color: var(--channel); margin-bottom: 0.25em; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ── chrome ─────────────────────────────────────────────────────────── */
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 600; padding: 0.6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 0.75rem; }
.proto-banner { background: var(--navy); color: #fff; font-family: var(--display); font-size: 0.875rem; letter-spacing: 0.02em; text-align: center; padding: 0.4rem var(--gutter); }
.proto-banner a { color: #fff; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-bar { max-width: var(--wrap); margin: 0 auto; padding: 0.9rem var(--gutter); display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--navy); margin-right: auto; min-height: 44px; }
.brand-logo { width: clamp(170px, 14vw, 220px); height: auto; }
.brand-tagline { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--ink); padding-left: 0.9rem; border-left: 1px solid var(--line); display: inline-flex; align-items: center; white-space: nowrap; }
.nav-action { display: inline-flex; align-items: center; min-height: 44px; padding: 0.3rem 1.05rem; background: var(--sun); color: var(--ink); text-decoration: none; border-radius: var(--radius); font: 600 1rem/1.1 var(--display); }
.nav-action:hover { color: var(--ink); background: #fff27a; }
.nav-action[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--navy); }
.nav-action-label { font-size: 1rem; font-weight: 600; }
.header-search { position: relative; display: flex; align-items: stretch; flex: 1 1 260px; max-width: 360px; }
.header-search input { flex: 1; min-width: 0; min-height: 44px; font: 500 1rem var(--display); color: var(--ink); padding: 0.45rem 0.75rem; border: 2px solid var(--rule); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: #fff; }
.header-search input::placeholder { color: #5b6b78; opacity: 1; }
/* Joined controls (a search box and its button share an edge): each ring is drawn inside its own control, so it never lands on the neighbour. */
.header-search input:focus-visible, .header-search button:focus-visible,
.search-row input:focus-visible, .search-row button:focus-visible,
[data-stoa-index-controls] input:focus-visible, [data-stoa-index-controls] button:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--sun); }
.header-search button { min-height: 44px; font: 600 0.95rem var(--display); background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 0 var(--radius) var(--radius) 0; padding: 0 0.95rem; cursor: pointer; }
.header-search button:hover { background: var(--ink); }
.header-search [role="listbox"] { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; margin: 0; padding: 0.35rem 0; list-style: none; background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(11, 34, 54, 0.18); overflow-y: auto; min-width: min(420px, 92vw); }
.omni-group { font: 600 0.88rem var(--display); color: var(--channel); padding: 0.55rem 0.9rem 0.2rem; }
.omni-option { display: flex; flex-direction: column; gap: 0.05rem; padding: 0.5rem 0.9rem; cursor: pointer; min-height: 44px; justify-content: center; }
.omni-option-title { font: 500 0.98rem/1.25 var(--display); color: var(--ink); }
.omni-option-meta { font: 400 0.82rem/1.3 var(--display); color: #4a5b69; }
.omni-option[aria-selected="true"], .omni-option:hover { background: var(--shallows); box-shadow: inset 4px 0 0 var(--navy); }
.omni-option--all .omni-option-title { color: var(--navy); font-weight: 600; }
.omni-option--empty { cursor: default; font: 400 0.9rem/1.4 var(--display); color: #4a5b69; }
.menu-toggle { display: none; min-height: 44px; min-width: 44px; align-items: center; gap: 0.5rem; font: 600 1rem var(--display); color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 0 0.85rem; cursor: pointer; }
.menu-toggle-bars { width: 18px; height: 12px; background: linear-gradient(var(--navy) 0 2px, transparent 2px 5px, var(--navy) 5px 7px, transparent 7px 10px, var(--navy) 10px 12px); }
.site-nav { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 0 0.25rem; }
.nav-link { font: 600 1rem var(--display); color: var(--ink); text-decoration: none; padding: 0.7rem 0.8rem 0.8rem; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 4px solid transparent; }
.nav-link:first-child { padding-left: 0; }
.nav-link:hover { color: var(--navy); border-bottom-color: var(--shallows); }
.nav-link[aria-current="page"] { color: var(--navy); border-bottom-color: var(--water); }
.breadcrumb { max-width: var(--wrap); margin: 0 auto; padding: 0.6rem var(--gutter) 0; font: 500 0.9rem var(--display); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.4rem; color: var(--rule); }

@media (max-width: 899px) {
  .header-bar { gap: 0.75rem; }
  .brand-tagline { display: none; }
  .header-search { order: 5; flex-basis: 100%; max-width: none; }
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; flex-direction: column; padding-bottom: 0.75rem; }
  .site-nav.is-open { display: flex; }
  .nav-link, .nav-link:first-child { padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
  .nav-link[aria-current="page"] { border-bottom: 3px solid var(--water); }
}

.site-footer { margin-top: clamp(4rem, 8vw, 7rem); background: var(--navy); color: #fff; padding: clamp(2.5rem, 5vw, 4rem) var(--gutter) 2rem; display: grid; gap: 1.75rem; }
.site-footer > * { max-width: var(--wrap); width: 100%; margin: 0 auto; }
.footer-lockup { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: flex-start; }
.footer-home-link { background: #fff; padding: 0.8rem 1rem; border-radius: var(--radius); display: inline-block; }
.footer-home-link img { width: 200px; }
.footer-welcome { font-family: var(--display); max-width: 36rem; }
.footer-kicker { display: block; font-weight: 600; font-size: 1.05rem; color: var(--sun); margin-bottom: 0.3rem; }
.footer-welcome p { margin: 0 0 0.4rem; font-size: 1.05rem; }
.footer-address { font-style: normal; font-size: 0.98rem; color: #dbe9f3; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.3); padding-top: 1.25rem; }
.footer-nav a { color: #fff; font: 600 1rem var(--display); min-height: 44px; display: inline-flex; align-items: center; }
.footer-note { font: 500 0.95rem var(--display); color: #dbe9f3; margin: 0 auto; }
.footer-note a { color: #fff; }
.site-footer a:focus-visible { outline-color: #fff; box-shadow: 0 0 0 7px var(--sun); }

/* ── shared pieces ──────────────────────────────────────────────────── */
main { display: block; }
main > section, main > nav, main > form, main > p, main > .pair { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
/* A capture placed straight in main lines up with the sections' text column. */
main > figure.evidence { margin-left: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); margin-right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); }
.eyebrow { font: 500 1.05rem var(--display); color: var(--channel); margin-bottom: 0.7rem; }
.eyebrow a { color: inherit; }
.secchi { display: inline-block; flex: none; width: 0.95em; height: 0.95em; border-radius: 50%; background: conic-gradient(var(--navy) 0 25%, #fff 0 50%, var(--navy) 0 75%, #fff 0); box-shadow: 0 0 0 1.5px var(--navy); margin-right: 0.5em; vertical-align: -0.12em; }
.secchi--large { width: 3.2rem; height: 3.2rem; box-shadow: 0 0 0 3px var(--navy), 0 0 0 9px var(--sun); margin-right: 1.1rem; }
.section-lede, .chapter-lede { font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem); max-width: 46rem; color: #1d3547; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0.55rem 1.2rem; font: 600 1.05rem var(--display); text-decoration: none; border-radius: var(--radius); border: 2px solid var(--ink); }
.button--sun { background: var(--sun); color: var(--ink); }
.button--sun:hover { background: #fff27a; color: var(--ink); }
.button--line { background: #fff; color: var(--navy); border-color: var(--navy); }
.button--line:hover { background: var(--shallows); color: var(--navy); }
.also { margin-top: 1.5rem; font-family: var(--display); font-size: 1.05rem; }

.field-photo { margin: 0; }
.field-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.field-photo figcaption { font: 500 0.92rem/1.35 var(--display); color: #2c4152; padding: 0.55rem 0 0; }

.evidence { margin: clamp(2rem, 4vw, 3rem) 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--mist); }
.evidence img { width: 100%; background: #fff; }
.evidence figcaption { font: 500 0.92rem/1.4 var(--display); color: #2c4152; padding: 0.7rem 1rem 0.8rem; border-top: 1px solid var(--line); }
.evidence-bar, .frame-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.9rem; background: #e5ebef; border-bottom: 1px solid var(--line); }
.evidence-dots { width: 44px; height: 10px; flex: none; background: radial-gradient(circle at 5px 5px, #9aa8b3 4px, transparent 4.5px) 0 0 / 15px 10px repeat-x; }
.evidence-address { font: 500 0.88rem var(--display); color: #33495a; background: #fff; border-radius: 999px; padding: 0.15rem 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.readings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.5rem 2rem; }
.reading a { display: block; height: 100%; padding-top: 0.7rem; border-top: 2px solid var(--water); color: var(--ink); text-decoration: none; }
.reading a:hover .reading-label { text-decoration: underline; text-underline-offset: 0.14em; }
.reading-value { display: block; font: 700 clamp(1.8rem, 1.45rem + 1.2vw, 2.5rem)/1.05 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.reading-value--long { font-size: clamp(1.55rem, 1.3rem + 0.9vw, 2.05rem); white-space: nowrap; }
.reading-label { display: block; font: 500 1rem/1.35 var(--display); color: #2c4152; margin-top: 0.35rem; }
.reading--keep a { border-top-color: var(--navy); }

/* ── home ───────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-areas: "head photo" "body photo"; column-gap: clamp(1.5rem, 4vw, 3.5rem); row-gap: 0; align-content: center; padding-top: clamp(2rem, 5vw, 4.5rem); padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.hero-head { grid-area: head; align-self: end; }
.hero-body { grid-area: body; align-self: start; }
.hero-photo { grid-area: photo; align-self: center; }
.hero h1 { max-width: 15ch; }
.hero-lede { font-size: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem); max-width: 34rem; color: #1d3547; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.hero-photo img { aspect-ratio: 5 / 3.4; }

.annotated { padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.annotated-head { max-width: 48rem; }
.annotated-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; margin-top: 1.5rem; }
.frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--mist); box-shadow: 0 18px 40px rgba(11, 34, 54, 0.14); position: sticky; top: 1rem; }
.frame-window { max-height: min(78vh, 760px); overflow-y: auto; background: #fff; overscroll-behavior: contain; }
.frame-window:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--sun); }
.frame-window img { width: 100%; }
.frame-list { list-style: none; margin: 0; padding: 0; display: grid; }
.frame-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.85rem; padding: 0.85rem 0.6rem 0.9rem; border-top: 1px solid #b9d6e8; }
.frame-item:last-child { border-bottom: 1px solid #b9d6e8; }
.frame-item.is-active { background: #fffbd6; box-shadow: inset 4px 0 0 var(--sun); }
.frame-n { width: 1.85rem; height: 1.85rem; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font: 600 0.95rem var(--display); margin-top: 0.05rem; }
.frame-item.is-active .frame-n { background: var(--ink); box-shadow: 0 0 0 3px var(--sun); }
.frame-title { font: 600 1.06rem/1.3 var(--display); margin: 0 0 0.25rem; }
.frame-title a { color: var(--navy); }
.frame-fix { font-size: 0.98rem; margin: 0 0 0.35rem; color: #23394a; }
.frame-show { font: 600 0.92rem var(--display); color: var(--channel); background: none; border: 0; padding: 0.1rem 0; min-height: 24px; cursor: pointer; text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.14em; }
.frame-show:hover { color: var(--navy); text-decoration-thickness: 0.12em; }

.readings-band { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.readings-intro p { max-width: 30rem; }
.readings-photo { margin-top: 1.25rem; max-width: 380px; }
.readings-photo img { aspect-ratio: 4 / 3; }

.downstream-home { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.stops { list-style: none; margin: 1.75rem 0 0; padding: 1.4rem 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; border-top: 3px solid var(--water); border-image: linear-gradient(90deg, var(--water), var(--navy)) 1; }
.stop a { display: flex; flex-direction: column; gap: 0.3rem; height: 100%; text-decoration: none; color: var(--ink); }
.stop img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 0.45rem; }
.stop-name { font: 700 1.2rem/1.2 var(--display); color: var(--navy); }
.stop a:hover .stop-name { text-decoration: underline; text-underline-offset: 0.14em; }
.stop-q { font-size: 0.98rem; line-height: 1.45; color: #23394a; }

.platform-split, .first-steps { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.split-bar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; border: 2px solid var(--ink); margin: 1.5rem 0 1.25rem; max-width: 52rem; }
.split-seg--squarespace { background: var(--navy); }
.split-seg--code { background: var(--water); }
.split-seg--outside { background: repeating-linear-gradient(135deg, #fff 0 6px, var(--rule) 6px 8px); }
.split-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 60rem; margin: 0; }
.split-key div { border-left: 6px solid var(--navy); padding: 0.2rem 0 0.2rem 0.9rem; }
.split-key div:nth-child(2) { border-left-color: var(--water); }
.split-key div:nth-child(3) { border-left-color: var(--rule); }
.split-key dt { font: 700 1.6rem/1.05 var(--display); color: var(--navy); font-variant-numeric: tabular-nums; }
.split-key dd { margin: 0.3rem 0 0; font-size: 0.98rem; }
.first-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
@media (min-width: 900px) { .first-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.first-list a { display: grid; gap: 0.2rem; align-content: start; padding: 0.8rem 0 0.4rem; border-top: 2px solid var(--sun); text-decoration: none; color: var(--ink); height: 100%; }
.first-list a:hover .first-title { text-decoration: underline; text-underline-offset: 0.14em; }
.first-n { font: 500 0.95rem var(--display); color: var(--channel); }
.first-title { font: 600 1.1rem/1.25 var(--display); color: var(--navy); }
.first-chapter { font: 500 0.88rem var(--display); color: #2c4152; }

/* ── chapters ───────────────────────────────────────────────────────── */
.downstream { padding-top: 1.6rem; }
.downstream ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.downstream ol::before { content: ""; position: absolute; left: 0.4rem; right: 0; top: 0.42rem; height: 2px; background: linear-gradient(90deg, var(--water), var(--navy)); }
.ds-stop a { position: relative; display: block; padding: 1.4rem 0.75rem 0.2rem 0; min-height: 44px; font: 500 1rem/1.25 var(--display); color: #2c4152; text-decoration: none; }
.ds-stop a::before { content: ""; position: absolute; top: 0.05rem; left: 0; width: 0.82rem; height: 0.82rem; border-radius: 50%; background: #fff; border: 2px solid var(--water); box-sizing: border-box; }
.ds-stop.is-past a::before { background: var(--water); }
.ds-stop.is-here a { color: var(--navy); font-weight: 700; }
.ds-stop.is-here a::before { top: -0.08rem; left: -0.12rem; width: 1.06rem; height: 1.06rem; background: var(--sun); border: 2px solid var(--navy); }
.ds-stop a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 0.14em; }

.chapter-head, .roadmap-head, .inventory-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: start; padding-top: clamp(1.75rem, 4vw, 3rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.chapter-q { font: 600 clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem)/1.3 var(--display); color: var(--ink); margin-bottom: 0.8rem; }
.readings--chapter { margin-top: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.chapter-photo, .roadmap-photo, .inventory-photo { margin-top: 0.5rem; }

.findings { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.finding { padding: clamp(1.6rem, 3vw, 2.25rem) 0; border-top: 1px solid var(--line); scroll-margin-top: 1.5rem; }
.finding:target { box-shadow: -1rem 0 0 #fffdf0, 1rem 0 0 #fffdf0, inset 4px 0 0 var(--sun); background: #fffdf0; padding-left: 1rem; }
.finding-number { font: 500 1rem var(--display); color: var(--channel); display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.75rem; margin-bottom: 0.3rem; }
.finding-mark { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--channel); min-height: 24px; }
.finding-badge { width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: 0.8rem; font-weight: 600; }
.finding h3 { margin-bottom: 0.35rem; max-width: 42ch; }
.finding-reading { font-family: var(--display); margin: 0 0 1.2rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.1rem 0.45rem; color: #2c4152; }
.finding-reading .reading-value { display: inline; font-size: 1.4rem; }
.finding-reading .reading-label { display: inline; margin: 0; font-size: 1rem; }
.finding-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 2.5rem; align-items: start; }
.finding-body p { font-size: 1.02rem; overflow-wrap: break-word; }
.finding-main h4 + p, .finding-fix h4 + p { margin-bottom: 0.9rem; }
.finding-fix { background: var(--shallows); border-radius: var(--radius); padding: 1rem 1.15rem 0.35rem; }
.finding-fix h4 { color: var(--navy); }
.finding--keep .finding-fix { background: var(--mist); }
.finding-outside { font-family: var(--display); }
.sq-trail { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; font: 500 0.98rem/1.5 var(--display); color: var(--ink); }
.sq-trail li + li::before { content: "›"; color: var(--channel); margin: 0 0.45rem; }
.finding-meta { list-style: none; margin: 1.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; row-gap: 0.3rem; font: 500 0.95rem var(--display); color: #2c4152; }
.finding-meta li + li::before { content: "·"; margin: 0 0.55rem; color: var(--rule); }
.tag { display: inline-block; font: 600 0.9rem/1.5 var(--display); padding: 0 0.6rem; border-radius: 999px; color: var(--ink); background: var(--mist); }
.tag--now { background: var(--sun); }
.tag--next { background: var(--shallows); color: var(--navy); }
.tag--keep { background: var(--navy); color: #fff; }
.next-chapter { margin-top: 2rem; }

.snippet-demo, .menus, .hops, .audiences, .alt-gallery { padding-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.snippets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.snippet { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.15rem; background: #fff; box-shadow: 0 6px 16px rgba(11, 34, 54, 0.06); }
.snippet-url { font: 400 0.9rem var(--display); color: #2f5a3a; margin: 0 0 0.2rem; }
.snippet-title { font: 500 1.25rem/1.25 var(--display); color: #1a0dab; margin: 0 0 0.3rem; }
.snippet-desc { margin: 0; font-size: 0.98rem; }
.snippet-desc--missing { color: #6a3d00; background: #fff5c2; border-radius: 4px; padding: 0.3rem 0.5rem; }

.menus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.menu-col { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.25rem; background: #fff; }
.menu-col--rec { border: 2px solid var(--navy); box-shadow: 8px 8px 0 var(--shallows); }
.menu-col h3 { font-size: 1.1rem; }
.menu-tree, .menu-tree ul { list-style: none; margin: 0; padding: 0; }
.menu-tree > li { padding: 0.35rem 0; border-bottom: 1px solid var(--mist); }
.menu-tree ul { padding: 0.25rem 0 0.35rem 1rem; border-left: 3px solid var(--water); margin: 0.3rem 0 0 0.35rem; }
.menu-tree ul li { font: 400 0.98rem/1.5 var(--display); }
.menu-folder, .menu-item { font: 600 1.02rem var(--display); color: var(--navy); }
.menu-item--button { display: inline-block; background: var(--navy); color: #fff; border-radius: 4px; padding: 0.15rem 0.6rem; font-size: 0.9rem; }
.menu-note { font: 500 0.9rem var(--display); color: #2c4152; margin: 0.75rem 0 0; }
.menu-new { display: inline-block; margin-left: 0.35rem; padding: 0 0.45rem; border-radius: 999px; background: var(--sun); color: var(--navy); font: 600 0.72rem/1.5 var(--display); letter-spacing: 0.04em; vertical-align: 0.1em; }

.hop-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem; }
.hop { position: relative; border: 2px solid var(--navy); border-radius: 10px; padding: 1rem 1.1rem; background: #fff; display: grid; gap: 0.3rem; }
.hop + .hop::before { content: "→"; position: absolute; left: -1.85rem; top: 50%; transform: translateY(-50%); font: 700 1.5rem var(--display); color: var(--water); }
.hop:last-child { border-style: dashed; }
.hop-k { font: 600 0.95rem var(--display); color: var(--channel); }
.hop-addr { font: 600 1.05rem/1.25 var(--display); color: var(--navy); overflow-wrap: anywhere; }
.hop-note { font-size: 0.95rem; }

.table-pane { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.table-pane:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
thead th { font: 600 0.95rem var(--display); color: var(--channel); background: var(--mist); }
tbody th { font: 600 1rem/1.3 var(--display); color: var(--navy); }
.aud-table { min-width: 860px; }
.aud-link { font: 600 0.88rem var(--display); white-space: nowrap; display: inline-block; margin-right: 0.4rem; }
.aud-note { font-size: 1rem; max-width: 46rem; margin-top: 1rem; }

.alt-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.alt-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.alt-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.alt-said, .alt-better, .alt-note { margin: 0; padding: 0.6rem 0.9rem 0; font-size: 0.98rem; }
.alt-said q { font: 600 1.05rem var(--display); color: #8a1c1c; quotes: "“" "”"; }
.alt-said em { font-family: var(--display); color: #8a1c1c; }
.alt-k { display: block; font: 600 0.92rem var(--display); color: var(--channel); }
.alt-note { font: 500 0.9rem var(--display); color: #2c4152; padding-bottom: 0.8rem; }
.alt-better { padding-bottom: 0.8rem; }

/* ── roadmap ────────────────────────────────────────────────────────── */
.rm-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; padding-top: 1rem; padding-bottom: 1rem; position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); }
.rm-filter { display: grid; gap: 0.2rem; font: 600 0.95rem var(--display); color: var(--channel); }
.rm-filter select { min-height: 44px; font: 500 1rem var(--display); color: var(--ink); border: 2px solid var(--rule); border-radius: var(--radius); padding: 0.3rem 2.2rem 0.3rem 0.65rem; background-color: #fff; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat; appearance: none; letter-spacing: 0; text-transform: none; }
.rm-live { margin: 0 0 0.4rem; font: 500 0.95rem var(--display); }
.rm-group { padding-top: clamp(1.5rem, 3vw, 2.25rem); }
.rm-group h2 { display: flex; align-items: center; gap: 0.6rem; }
.rm-count { font-size: 1rem; background: var(--sun); color: var(--ink); border-radius: 999px; padding: 0.1rem 0.65rem; border: 1px solid var(--ink); }
.rm-note { color: #2c4152; margin-bottom: 0.2rem; }
.rm-table { min-width: 920px; table-layout: fixed; }
/* Fixed column widths, so the four priority tables line up as one roadmap. */
.rm-table th:nth-child(1) { width: 4.5rem; }
.rm-table th:nth-child(3) { width: 9.5rem; }
.rm-table th:nth-child(4) { width: 14.5rem; }
.rm-table th:nth-child(5) { width: 6rem; }
.rm-table th:nth-child(6) { width: 6rem; }
.rm-n { font: 700 1rem var(--display); color: var(--channel); width: 3rem; font-variant-numeric: tabular-nums; }

/* ── inventory ──────────────────────────────────────────────────────── */
.sec-table { min-width: 640px; }
.inventory-section { padding-top: clamp(1.75rem, 4vw, 3rem); }
[data-stoa-index-controls] { position: sticky; top: var(--stoa-index-sticky-top); z-index: 10; background: rgba(255, 255, 255, 0.97); padding: 0.75rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
[data-stoa-index-controls] form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
[data-stoa-index-controls] label { font: 600 0.9rem var(--display); color: var(--channel); flex-basis: 100%; }
[data-stoa-index-controls] input { flex: 1 1 240px; min-height: 44px; font: 500 1rem var(--display); border: 2px solid var(--rule); border-radius: var(--radius); padding: 0.35rem 0.7rem; }
[data-stoa-index-controls] button { min-height: 44px; font: 600 1rem var(--display); background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 0 1rem; cursor: pointer; }
[data-stoa-index-summary] { font: 500 0.95rem var(--display); margin: 0.5rem 0 0; color: #2c4152; }
#index-results { display: grid; gap: 0.6rem; }
#index-results:focus-visible { outline-offset: 6px; }
.inv-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; background: #fff; }
.inv-title { font-size: 1.1rem; margin: 0 0 0.2rem; }
.inv-meta { margin: 0 0 0.35rem; font: 400 0.92rem var(--display); color: #2c4152; display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }
.inv-path { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.inv-flags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.inv-flags li { font: 600 0.8rem var(--display); background: #fff5c2; border: 1px solid #c7a700; border-radius: 999px; padding: 0.1rem 0.55rem; color: #3d3000; }
.inv-ok { margin: 0; font: 500 0.85rem var(--display); color: #2f5a3a; }
.inv-empty { font-family: var(--display); }

/* ── search, 404 ────────────────────────────────────────────────────── */
.search-page, .not-found { padding-top: clamp(1.75rem, 4vw, 3rem); }
.search-form label { display: block; font: 600 0.95rem var(--display); color: var(--channel); margin-bottom: 0.4rem; }
.search-row { display: flex; gap: 0.5rem; max-width: 40rem; }
.search-row input { flex: 1; min-width: 0; min-height: 48px; font: 500 1.1rem var(--display); border: 2px solid var(--rule); border-radius: var(--radius); padding: 0.4rem 0.8rem; }
.search-row button { min-height: 48px; font: 600 1.05rem var(--display); background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 0 1.2rem; cursor: pointer; }
.search-summary { font: 500 1rem var(--display); margin-top: 1rem; }
.search-results { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; max-width: 50rem; }
.result { border: 1px solid var(--line); border-left: 6px solid var(--water); border-radius: var(--radius); padding: 0.75rem 1rem; }
.result--finding { border-left-color: var(--sun); }
.result-kind { font: 600 0.9rem var(--display); color: var(--channel); margin: 0 0 0.15rem; }
.result-title { font: 600 1.15rem/1.3 var(--display); overflow-wrap: break-word; }
.result-body { margin: 0.25rem 0 0; font-size: 0.98rem; overflow-wrap: break-word; }
.search-empty { margin-top: 1rem; max-width: 40rem; border: 2px dashed var(--rule); border-radius: var(--radius); padding: 1rem 1.2rem; }
.not-found .eyebrow { font-size: 1rem; }
.not-found h1 { max-width: 18ch; }
.nf-photo { max-width: 560px; margin-top: 1.5rem; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1099px) {
  .stops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .alt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .hero, .annotated-grid, .readings-band, .chapter-head, .roadmap-head, .inventory-head, .menus-grid, .snippets, .split-key, .finding-body { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-areas: "head" "photo" "body"; row-gap: 1.25rem; }
  .rm-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.75rem; position: static; }
  .rm-filter select { width: 100%; min-width: 0; }
  .hero h1 { max-width: none; }
  .frame { position: static; }
  .frame-window { max-height: 70vh; }
  .hop-list { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hop + .hop::before { content: "↓"; left: 1rem; top: -1.45rem; transform: none; font-size: 1.2rem; }
  .readings-photo { max-width: none; }
  .ds-stop a { font-size: 0.86rem; padding-right: 0.35rem; }
}
@media (max-width: 640px) {
  .stops { grid-template-columns: minmax(0, 1fr); }
  .alt-list { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .button { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .frame-item { transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
  .frame-window { scroll-behavior: smooth; }
}

@media print {
  .proto-banner, .site-header, .site-footer, .downstream, .rm-filters, [data-stoa-index-controls], .frame, .hero-actions, .next-chapter, .frame-show { display: none !important; }
  body { font-size: 11pt; }
  .finding { break-inside: avoid; border-left-width: 4px; }
  a { color: inherit; }
}

/* ── stories, pairs, crops ──────────────────────────────────────────── */
.stories { padding-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.story-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.story { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.story img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.story-title { font: 600 1.02rem/1.3 var(--display); color: var(--navy); margin: 0; padding: 0.7rem 0.85rem 0.2rem; }
.story-date { font: 500 0.88rem var(--display); color: #2c4152; margin: auto 0 0; padding: 0.2rem 0.85rem 0.8rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); align-items: start; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.pair .evidence, .pair .field-photo { margin: 0; }
.evidence--crop img { background: #fff; }
@media (max-width: 1099px) { .story-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .story-list { grid-template-columns: minmax(0, 1fr); } }

/* ── color bands (full-bleed backgrounds behind contained sections) ─── */
.annotated { background: var(--shallows); box-shadow: 0 0 0 100vmax var(--shallows); clip-path: inset(0 -100vmax); margin-top: clamp(1rem, 3vw, 2rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.readings-band { background: var(--navy); box-shadow: 0 0 0 100vmax var(--navy); clip-path: inset(0 -100vmax); color: #fff; margin-top: 0; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.readings-band h2 { color: #fff; }
.readings-band .readings-intro p { color: #dbe9f3; }
.readings-band .reading a { color: #fff; border-top-color: var(--sun); }
.readings-band .reading-value { color: #fff; }
.readings-band .reading-label { color: #dbe9f3; }
.readings-band .field-photo figcaption { color: #dbe9f3; }
.readings-band :focus-visible { outline-color: #fff; }
@media (min-width: 900px) {
  .readings-band .readings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 2.5rem; align-content: start; }
  .readings-band .reading-value { font-size: clamp(2.1rem, 1.3rem + 1.6vw, 2.9rem); }
  .readings-band .reading-value--long { font-size: clamp(1.8rem, 1.2rem + 1.2vw, 2.4rem); }
}
.evidence--crop img { max-height: 560px; object-fit: contain; object-position: center top; } /* evidence is shown whole, never cropped */

/* ── the Secchi disk: the 404 page and empty search states ───────────── */
.secchi-empty { position: relative; padding-left: 3.2rem !important; }
.secchi-empty::before { content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: conic-gradient(var(--navy) 0 25%, #fff 0 50%, var(--navy) 0 75%, #fff 0); box-shadow: 0 0 0 2px var(--navy), 0 0 0 6px var(--sun); }
.inv-empty.secchi-empty { padding: 0.9rem 1rem; border: 2px dashed var(--rule); border-radius: var(--radius); }
.evidence-date { color: #4a5b69; }
.evidence-when { margin-left: auto; font: 500 0.82rem var(--display); color: #33495a; white-space: nowrap; }
@media (max-width: 560px) { .evidence-when { display: none; } }
.snip-table { min-width: 620px; }
.snip-url { display: block; font: 400 0.82rem var(--display); color: #2f5a3a; }
.snip-missing { display: inline-block; font: 600 0.85rem var(--display); color: #6a3d00; background: #fff5c2; border: 1px solid #c7a700; border-radius: 999px; padding: 0.1rem 0.6rem; }

/* The narrowest phones: the five chapter names wrap inside their stops. */
@media (max-width: 400px) {
  .ds-stop a { font-size: 0.78rem; }
}
