/* Per-river page. Mobile-first on purpose: almost everyone arriving here came
   from a phone (a forum link, a QR at a put-in), and the page has to be useful
   on a bad signal. The reading is the hero; the number to text is never more
   than a thumb away. */

.river-page { margin: 0 auto; max-width: 44rem; padding: 1.5rem 1rem 2.5rem; }

.river-head { margin-bottom: 1.1rem; }
.river-head h1 { font-size: 1.35rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.15rem; }
.river-head .river-where { color: var(--muted); font-size: 0.8rem; }

/* The reading. Big, and colored by the run's own range — never by another
   run's, which is why runs sharing a gauge still get their own roster row. */
.river-now {
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  background: #fafafa;
}
.river-flow {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  overflow-wrap: anywhere;
}
.river-flow .trend { font-size: 1.1rem; vertical-align: 0.28em; margin-left: 0.15rem; }
[data-status="low"]  .river-flow { color: #b4231f; }
[data-status="good"] .river-flow { color: #1b7f3b; }
[data-status="high"] .river-flow { color: #1f4fb4; }

.river-meta { color: var(--faint); font-size: 0.72rem; margin-top: 0.35rem; }
.river-age.age-stale   { color: #a8620a; }
.river-age.age-offline { color: #b4231f; font-weight: 700; }

/* Shown only when the page cannot show a live number. It carries the page's
   honesty: a saved reading says so, a dead gauge says so, and neither is ever
   dressed up as current. */
.river-note {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  color: #a8620a;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* The ask. This is the whole point of the page, so it sits directly under the
   reading and repeats the number as tappable text. */
.river-cta { border: 2px solid #111; padding: 0.9rem 1rem; margin-bottom: 1.4rem; }
.river-cta-line { font-size: 0.9rem; line-height: 1.6; }
.river-cta code {
  font-family: inherit;
  background: #ececec;
  padding: 0.1rem 0.35rem;
  font-weight: 700;
}
.river-cta .num { white-space: nowrap; font-weight: 700; }
.river-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }
.river-btn {
  display: inline-block;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  letter-spacing: 0.02em;
}
.river-btn.ghost { background: #fff; color: #111; }

.river-body h2 { font-size: 0.85rem; font-weight: 700; margin: 1.3rem 0 0.4rem; }
.river-body p  { color: var(--muted); font-size: 0.82rem; line-height: 1.75; margin-bottom: 0.9rem; }
.river-body ul { color: var(--muted); font-size: 0.82rem; line-height: 1.8; margin: 0.2rem 0 1rem 1.1rem; }
.river-body a  { color: inherit; }

.river-gauges { border-top: 1px solid var(--border); margin-top: 0.6rem; padding-top: 0.6rem; }
.river-gauges dt { font-size: 0.78rem; font-weight: 700; margin-top: 0.5rem; }
.river-gauges dd { color: var(--muted); font-size: 0.76rem; line-height: 1.6; margin-left: 0; }

/* The QR is the desktop/print path only — a phone cannot scan a code it is
   itself displaying, so on small screens the vCard tap link does that job. */
.river-qr { display: none; }
@media (min-width: 700px) {
  .river-qr { display: block; margin-top: 1rem; }
  .river-qr img { width: 150px; height: 150px; }
  .river-qr .cap { color: var(--faint); font-size: 0.68rem; margin-top: 0.3rem; }
}

/* ---- Guidebook layer (2026-09-22) -----------------------------------------
   The pages grew from "a gauge with a phone number" into a guidebook entry:
   a fact strip up top, a jump list, then the river, the logistics, the
   permits, the camps. Same monospace, same black rules — the guidebook feel
   comes from structure, not decoration. */

.river-head .river-kicker {
  display: block;
  color: var(--faint);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

/* The fact strip — the box every printed guidebook opens with. Two columns
   on a phone, four on a desk. */
.river-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  margin: 0 0 1.2rem;
}
.river-facts > div {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  min-width: 0;
}
.river-facts > div:nth-child(2n) { border-right: 0; }
.river-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.river-facts dt {
  color: var(--faint);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}
.river-facts dd { font-size: 0.78rem; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.river-facts dd a { color: inherit; }
@media (min-width: 700px) {
  .river-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .river-facts > div:nth-child(2n) { border-right: 1px solid var(--border-light); }
  .river-facts > div:nth-child(4n) { border-right: 0; }
  .river-facts > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--border-light); }
  .river-facts > div:nth-last-child(-n+4) { border-bottom: 0; }
}

/* Jump list. On a phone this page is long; the list is the table of contents. */
.river-toc {
  color: var(--faint);
  font-size: 0.7rem;
  line-height: 1.9;
  margin-bottom: 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.river-toc a { color: var(--muted); }

.river-body h3 { font-size: 0.78rem; font-weight: 700; margin: 0.9rem 0 0.3rem; }
.river-body h2[id] { scroll-margin-top: 1rem; }

/* Operator / place lists (shuttle drivers, access points). Reuses the gauge
   list look so the page reads as one voice. */
.river-list { margin: 0.2rem 0 1rem; }
.river-list dt { font-size: 0.78rem; font-weight: 700; margin-top: 0.55rem; }
.river-list dd { color: var(--muted); font-size: 0.76rem; line-height: 1.6; margin-left: 0; }
.river-list dd a { color: inherit; }

/* The guide's aside — the margin note in a paper guidebook. Amber rule so it
   reads as advice, not as a warning state (those are red). */
.river-tip {
  border-left: 3px solid #a8620a;
  padding: 0.5rem 0.8rem;
  margin: 0.8rem 0 1rem;
  background: #fafafa;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}
.river-tip strong { color: var(--text); }

/* Example reply, same card as /help so the two pages agree on what a reply
   looks like. */
.river-reply {
  border: 1px solid var(--border);
  background: #fafafa;
  padding: 0.6rem 0.9rem;
  margin: 0.4rem 0 1rem;
  font-size: 0.76rem;
  line-height: 1.7;
  white-space: pre-line;
  color: var(--text);
}
.river-reply .lbl {
  display: block;
  color: var(--faint);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

/* Sibling runs at the foot of the body — the "see also" line. */
.river-related { border-top: 1px solid var(--border); margin-top: 1.4rem; padding-top: 0.8rem; }
.river-related h2 { margin-top: 0; }

/* ---- Photos ---------------------------------------------------------------
   Guidebook plates. One opener after the ask (the reading and the number stay
   above the fold on a phone), then a plate or two inside the sections they
   illustrate. Every image carries width/height so the page never jumps while
   a slow link fills it in, and everything below the opener lazy-loads. All
   sources are public-domain agency photos or CC BY, credited in the caption. */
.river-photo { margin: 0 0 1.3rem; }
.river-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  background: #eee;
}
.river-photo figcaption {
  color: var(--faint);
  font-size: 0.68rem;
  line-height: 1.5;
  margin-top: 0.35rem;
}
.river-photo figcaption a { color: inherit; }
.river-photo.opener { margin-bottom: 1.5rem; }
.river-body .river-photo { margin: 0.9rem 0 1.2rem; }

/* ---- Camp guide (2026-09-30) ------------------------------------------------
   /<river>-camps, generated by scripts/build-camp-guide.mjs. One entry per
   camp: mile and side, the reservable badge, then the two Forest Service
   capacities side by side — low water and high water — because the gap between
   them is the reason the page exists. The filters above the list set
   data-level on .camp-guide, which decides which of the two numbers is lit. */

.camp-guide .river-kicker a { color: inherit; }
.camp-range, .camp-at { color: var(--faint); font-weight: 400; }
.camp-range { font-size: 0.7rem; margin-left: 0.3rem; white-space: nowrap; }
.camp-at { font-size: 0.68rem; }
.camp-section h2 { border-top: 2px solid var(--border); padding-top: 0.8rem; margin-top: 1.8rem; scroll-margin-top: 1rem; }

.camp {
  border-top: 1px solid var(--border-light);
  padding: 0.85rem 0 0.75rem;
  scroll-margin-top: 0.5rem;
}
.camp:target { background: #fffbe8; box-shadow: -0.6rem 0 0 #fffbe8, 0.6rem 0 0 #fffbe8; }
.camp-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--faint);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.river-body .camp h3 { font-size: 0.95rem; margin: 0.15rem 0 0.45rem; }
.river-body .camp p { margin-bottom: 0.4rem; }

.camp-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; }
.camp-badge { border: 1px solid var(--border-mid); padding: 0.05rem 0.4rem; white-space: nowrap; color: var(--muted); }
.camp-badge.solid { background: #111; border-color: #111; color: #fff; }
.camp-badge.outline { border-color: #111; color: #111; font-weight: 700; }

/* The two capacities. The level the reader picked is full strength; the other
   is still legible, just quieter. "No camp" is red at either level. */
.camp-cap { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--border); margin: 0 0 0.55rem; }
.camp-cap > div { padding: 0.35rem 0.6rem; min-width: 0; }
.camp-cap > div + div { border-left: 1px solid var(--border-light); }
.camp-cap dt { color: var(--faint); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.08em; }
.camp-cap dd { font-size: 0.95rem; font-weight: 700; margin: 0; }
.camp-cap .none dd { color: var(--low); }
.camp-cap .unknown dd { color: var(--faint); font-weight: 400; font-style: italic; }
/* camps.js adds .dim to every level except the one picked in the filters. */
.camp-cap .dim { background: #f6f6f6; }
.camp-cap .dim dd { font-weight: 400; opacity: 0.75; }
@media (max-width: 420px) { .camp-cap dd { font-size: 0.85rem; } }

.river-body .camp .camp-level { font-size: 0.78rem; line-height: 1.6; }
.camp-level strong { color: var(--text); }
.river-body .camp .camp-conflict {
  border-left: 3px solid #a8620a;
  padding-left: 0.6rem;
  font-size: 0.74rem;
  line-height: 1.55;
}
.river-body .camp .camp-fs { color: var(--faint); font-size: 0.7rem; margin: 0.35rem 0 0; }

.river-body ul.camp-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 0.45rem 0 0; padding: 0; }
.camp-tags li {
  border: 1px solid var(--border-light);
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
  padding: 0 0.4rem;
}

/* The aerial: north up, nothing drawn on it. */
.camp-aerial { margin: 0.6rem 0 0.4rem; }
.camp-aerial img { display: block; width: 100%; height: auto; border: 1px solid var(--border); background: #ddd; }
.camp-aerial figcaption { color: var(--faint); font-size: 0.68rem; line-height: 1.5; margin-top: 0.3rem; }

.camp-photos { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 0.6rem 0 0.3rem; }
@media (min-width: 560px) { .camp-photos { grid-template-columns: 1fr 1fr; } }
.camp-photo { margin: 0; }
.camp-photo img { display: block; width: 100%; height: auto; border: 1px solid var(--border); background: #eee; }
.camp-photo figcaption { color: var(--faint); font-size: 0.66rem; line-height: 1.5; margin-top: 0.3rem; }

/* Filters: the directory's grey strip. Not pinned — on a phone it would eat a
   fifth of the screen. No `display` on the base rule, so `hidden` (until
   camps.js runs) still wins. */
.camp-filters {
  background: #f6f6f6;
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem 0.45rem;
  margin: 0.4rem 0 0.2rem;
}
.camp-filters:not([hidden]) { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: flex-end; }
.camp-filter-wide { flex-basis: 100%; }
.camp-filter-label {
  display: block;
  color: var(--faint);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.camp-size { width: 5.5rem; }
.camp-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.camp-chip {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.68rem;
  padding: 0.18rem 0.5rem;
  cursor: pointer;
}
.camp-chip:hover { background: #ececec; }
.camp-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.river-body p.camp-count { flex-basis: 100%; color: var(--muted); font-size: 0.72rem; margin: 0; }
/* Today's gauge reading against the list's columns (Middle Fork). */
.river-body p.camp-live { flex-basis: 100%; color: var(--text); font-size: 0.74rem; line-height: 1.55; margin: 0; padding-bottom: 0.35rem; border-bottom: 1px solid var(--border-light); }
.camp-reset {
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  margin-left: 0.4rem;
  text-decoration: underline;
  cursor: pointer;
}
.river-body p.camp-empty { border: 1px solid var(--border); padding: 0.8rem; text-align: center; }
.camp[hidden], .camp-section[hidden] { display: none; }

@media print {
  .site-header, .site-footer, .camp-filters, .river-toc, .river-related, #photos, #photos + p, #photos ~ .river-tip { display: none; }
  .camp { break-inside: avoid; }
  .camp[hidden], .camp-section[hidden] { display: none; }
  .camp-badge.solid { background: none; color: #000; font-weight: 700; }
}
