/* Written by pipeline/site_shell.py from app/src/tokens.css and pipeline/site_shell.css.
   Edit those two files, never this one. */
:root {
  color-scheme: light;

  /* =========================================================================
     SURFACES
     Three perceptibly distinct paper steps plus two dark grounds. The old
     pair (#FDFBF7 and #F5F0E8) sat about 3% of lightness apart, below the
     perceptual threshold for a surface step, so header, sidebar and panels
     all read as one flat plane. These three do not.
     ====================================================================== */
  --paper:        #F7F4EE;  /* page and app ground */
  --paper-raised: #FFFDF9;  /* header, cards, inputs, selected row */
  --paper-sunk:   #EDE8DE;  /* filter well, sponsor band, table head */
  --spruce:       #14332A;  /* inverted bands: footer, plate grid, hero scrim */
  --spruce-deep:  #0D241D;  /* hero vignette floor */

  /* =========================================================================
     INK
     Ratios are measured against paper / paper-raised / paper-sunk in that
     order. Every value below passes AA for normal text on all three.
     ====================================================================== */

  /* body, headlines, filled-pill text on paper       15.27 / 16.49 / 13.72 */
  --ink:   #14201C;
  /* secondary prose, route meta lines                 7.06 /  7.63 /  6.35 */
  --ink-2: #4A5551;
  /* labels, eyebrows, counts, disabled state          5.29 /  5.72 /  4.76 */
  --ink-3: #5C6863;

  /* Text on the dark grounds. Ratios: spruce / spruce-deep. */
  /* headlines and body on spruce                     12.01 / 14.34 */
  --on-dark:   #F3F0EA;
  /* secondary prose and stat rails on spruce          6.10 /  7.28 */
  --on-dark-2: #9DB2A9;

  /* =========================================================================
     RULES
     Hairlines only. These are decorative separators, not control boundaries,
     and they are deliberately quiet so rules recede and content advances.
     The old --trail #D4C5A9 was a saturated warm beige on roughly 40 edges
     and was the single strongest craft-fair signal in the interface.
     ====================================================================== */
  --rule:        #DCD6CA;  /* separator hairline. 1.32:1 on paper, decorative */
  --rule-strong: #B7AF9F;  /* emphasis hairline.  1.98:1 on paper, decorative */
  --rule-dark:   rgb(var(--on-dark-rgb) / 0.16);  /* hairline on spruce */

  /* The boundary of an interactive control (input, segmented control, map
     button) is not decorative. WCAG 1.4.11 asks for 3:1 there, and neither
     --rule nor --rule-strong reaches it. Use this instead.
     3.47:1 on paper, 3.75:1 on paper-raised, 3.12:1 on paper-sunk. */
  --rule-control: #8A8272;

  /* =========================================================================
     THE ONE ACCENT
     A portage-blaze orange. It is the route line on the map, the active
     state in the interface, and the brand, all the same colour. It reads at
     full contrast over satellite imagery and over paper, and it never
     collides with water, which every blue, teal and cyan does.
     ====================================================================== */

  /* GRAPHICS ONLY. Route lines, active underlines, plate strokes, rules
     under active nav. Measured 3.63:1 on paper and 3.43:1 on spruce, which
     clears the 3:1 non-text bar and fails the 4.5:1 text bar.
     Never set this as a text colour. Use --flag-deep on light grounds and
     --flag-bright on dark grounds. */
  --flag:        #E04E1B;

  /* Flag as text or as a button fill on light grounds.
     As text: 5.53 / 5.98 / 4.97 on paper / raised / sunk.
     As a fill: white on it measures 6.07:1, --paper on it measures 5.53:1. */
  --flag-deep:   #B03A11;

  /* Flag as text on the dark grounds. 4.77:1 on spruce, 5.69:1 on
     spruce-deep. The design document proposed #EE6534 here, which measures
     4.26:1 on spruce and therefore fails AA for normal text. Lightened along
     the same hue until it cleared 4.5:1 with headroom. */
  --flag-bright: #F17446;

  /* Selected-row and active-chip wash. Composites to #F5E3D9 over --paper,
     which still holds --ink at 13.46:1 and --ink-2 at 6.23:1. */
  --flag-tint:   rgb(var(--flag-rgb) / 0.10);

  /* =========================================================================
     DATA COLOURS
     These encode information. They are never the brand and never decorate.
     All are measured as text on paper / paper-raised / paper-sunk.
     ====================================================================== */

  /* waterways, secondary links                        5.22 / 5.64 / 4.69 */
  --hydro:   #1E6E8C;

  /* Difficulty. The three grades are tuned to near-equal weight on paper
     (5.36, 5.37, 5.53) so no grade reads as louder than another. */
  /* Easy                                              5.36 / 5.79 / 4.81 */
  --grade-1: #297150;
  /* Intermediate                                      5.37 / 5.80 / 4.82 */
  --grade-2: #7E600C;
  /* Advanced, deliberately identical to --flag-deep   5.53 / 5.98 / 4.97 */
  --grade-3: #B03A11;

  /* Dams. A mark, not a text colour. A violet, so the hue is far from the
     rust of a rapid and the blue of a waterfall, and lighter than both
     (1.58:1 against --grade-3, 1.49:1 against --hydro), so the dot still
     separates from them without hue. Picked to clear the 3:1 non-text bar
     on the light grounds and on the dark ones the map draws over satellite:
       paper / paper-raised / paper-sunk               3.50 / 3.78 / 3.14
       spruce / spruce-deep                            3.56 / 4.25        */
  --dam:     #A066E0;

  /* Map point-of-interest dots. Marks on the map canvas, not text. Each one
     aliases a data colour above so the legend and the list agree. */
  --poi-rapid:   var(--grade-3);
  --poi-fall:    var(--hydro);
  --poi-camp:    var(--grade-1);
  --poi-portage: var(--grade-2);
  --poi-access:  var(--ink-3);
  --poi-dam:     var(--dam);

  /* =========================================================================
     CHANNEL TRIPLES
     For scrims, tints and any other alpha composite. Compose with
     rgb(var(--spruce-deep-rgb) / 0.86) rather than pasting a fresh rgba().
     These exist so that no hex value is ever written twice.
     ====================================================================== */
  --flag-rgb:        224 78 27;
  --spruce-rgb:      20 51 42;
  --spruce-deep-rgb: 13 36 29;
  --on-dark-rgb:     243 240 234;
  --ink-rgb:         20 32 28;

  /* =========================================================================
     TYPE FAMILIES
     Young Serif is a wedge serif with an engraved, slightly archaic
     character: park signage, an old atlas plate title. It ships one weight
     and no italic, which makes the one-font-one-colour-per-line rule
     structurally hard to violate.
     Archivo is a squarish grotesque carrying a real width axis (75 to 100),
     which is what lets us set genuinely condensed uppercase for map labels,
     province navigation and plate captions.
     JetBrains Mono carries every numeral: distances, grades, coordinates,
     counts, stat rails.
     ====================================================================== */
  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
  --font-ui:      'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Archivo width axis, applied with font-stretch. */
  --wdth-normal:    100%;
  --wdth-condensed: 82%;

  /* =========================================================================
     TYPE SCALE
     Root is 16px. Paired line heights follow each size.
     10px is the floor and it is reserved for mono numerals. The previous
     stylesheet set 10px uppercase label text in five places, which is the
     main reason the interface reads cramped.
     ====================================================================== */
  --fs-d1: clamp(3rem, 7.2vw, 5.75rem);  /* hero headline */
  --fs-d2: clamp(2rem, 4.2vw, 3.25rem);  /* section head */
  --fs-d3: 1.5rem;     /* 24px, panel and detail title */
  --fs-d4: 1.0625rem;  /* 17px, route name in the list */
  --fs-lg: 1.125rem;   /* 18px, landing lede */
  --fs-md: 1rem;       /* 16px, prose */
  --fs-sm: 0.875rem;   /* 14px, interface text */
  /* THE label voice. Filter labels, layer rows, panel rows, control labels,
     the count line, the sort. Archivo, SENTENCE CASE, tracking 0, --ink-2.
     Replaces 11px mono uppercase, which was the loudest dated signal in the
     app and also its least legible text on the surface that earns traffic. */
  --fs-ui: 0.8125rem;  /* 13px */
  --fs-xs: 0.75rem;    /* 12px, meta */
  --fs-lb: 0.6875rem;  /* 11px, mono and condensed caps labels */
  --fs-mi: 0.625rem;   /* 10px, mono numerals only, never label text */

  --lh-d1: 0.96;
  --lh-d2: 1.02;
  --lh-d3: 1.1;
  --lh-d4: 1.15;
  --lh-lg: 1.6;
  --lh-md: 1.7;
  --lh-sm: 1.5;
  --lh-xs: 1.4;
  --lh-lb: 1;

  /* Tracking */
  --tr-display:   -0.015em;  /* Young Serif at display sizes */
  --tr-body:      0;         /* all running text */
  /* DEPRECATED IN THE MAP APP. Numerals do not track, and mono does not set
     words. Still consumed by landing.css, so the token stays defined. */
  --tr-mono-caps: 0.12em;
  --tr-ui-caps:   0.08em;    /* Archivo condensed uppercase */

  /* =========================================================================
     SPACING
     ====================================================================== */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  20px;
  --s6:  24px;
  --s8:  32px;
  --s10: 40px;
  --s14: 56px;
  --s20: 80px;
  --s30: 120px;

  /* =========================================================================
     RADII
     Square stays the default and it stays the identity, but the identity
     belongs to CONTENT, not to CHROME. A survey document has square corners.
     A control floating over a map does not, and the old 2px and 3px were
     neither square nor round: at 1x they read as an antialiasing artifact
     rather than a decision.
     ====================================================================== */
  --r0:     0;      /* CONTENT: list rows, table cells, bands, the document */
  --r1:     4px;    /* chips, grade marks, swatches, thumbnails */
  --r2:     10px;   /* THE control radius: buttons, inputs, chips */
  --r3:     14px;   /* floating groups: control column, popovers, cards */
  --r4:     18px;   /* big surfaces: the sheet top, large panels */
  --r-full: 999px;  /* only where the shape is genuinely a pill */

  /* =========================================================================
     BORDERS
     One width. Fractional borders (the old 1.5px) render soft and uneven on
     non-retina displays.
     ====================================================================== */
  --bw: 1px;

  /* =========================================================================
     SHADOWS
     An elevation ladder. There were four box-shadow declarations in the whole
     stylesheet, so depth was previously communicated by drawing a 1px brown
     rectangle around things, which is the single strongest dated signal in
     the interface after the mono caps. Every step is one contact shadow plus
     one ambient shadow, and all of them share one shadow ink (spruce-deep)
     so the light source stays single.

     Measured from Parco, Komoot and Google Maps: the modern look here comes
     from radius and shadow on a SOLID surface, not from backdrop blur. None
     of the three uses backdrop-filter on its map chrome. Neither do we: blur
     costs a compositor layer on every pan and buys nothing over a basemap
     that is already low-contrast.
     ====================================================================== */
  --sh-1:     0 1px 2px rgb(var(--spruce-deep-rgb) / 0.10);     /* resting chips, toggle knob */
  --sh-2:     0 1px 2px rgb(var(--spruce-deep-rgb) / 0.16),
              0 4px 12px rgb(var(--spruce-deep-rgb) / 0.14);    /* map buttons, floating pills */
  --sh-3:     0 2px 4px rgb(var(--spruce-deep-rgb) / 0.14),
              0 12px 28px rgb(var(--spruce-deep-rgb) / 0.20);   /* panels, popovers, the desktop card */
  /* A visibility device, not a WCAG 1.4.11 boundary: no 1px edge on light
     chrome can clear 3:1 against an arbitrary basemap. It separates the
     control from the map, and the shadow does the real work. */
  --ring-map: 0 0 0 1px rgb(var(--spruce-deep-rgb) / 0.08);
  --sh-sheet: 0 -8px 32px rgb(var(--spruce-deep-rgb) / 0.22);   /* mobile bottom sheet */
  --sh-map:   0 1px 2px rgb(var(--spruce-deep-rgb) / 0.28),
              0 4px 14px rgb(var(--spruce-deep-rgb) / 0.22);    /* controls over the map canvas */
  --sh-pop:   0 6px 24px rgb(var(--spruce-deep-rgb) / 0.30);    /* map popups */

  /* =========================================================================
     MOTION
     Transition named properties, never all. Map camera moves are the
     exception and stay long (1200ms to 2000ms) because they are the show.
     ====================================================================== */
  --t-fast:    120ms;  /* colour and opacity feedback */
  --t-base:    200ms;  /* size, position, small transforms */
  --t-spatial: 320ms;  /* sheets, panel swaps */

  --e-out:   cubic-bezier(0.2, 0, 0, 1);
  --e-sheet: cubic-bezier(0.32, 0.72, 0, 1);
}

/* Collapse every duration to zero when the reader has asked for reduced
   motion. Doing it at the token layer means both the landing pages and the
   map app inherit the behaviour without either of them restating the rule.
   Consumers still have their own work to do: the hero globe must not mount,
   and flyTo must become jumpTo. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --t-fast:    0ms;
    --t-base:    0ms;
    --t-spatial: 0ms;
  }
}

/* ==========================================================================
   CanoeMap site shell
   ==========================================================================
   One header, one page head, one type system and one footer for every page
   that is not the landing page or the map app: route pages, province and park
   pages, lake maps, water levels, guides, the legal pages and the 404.

   pipeline/site_shell.py writes app/public/site.css from two parts: the :root
   block of app/src/tokens.css, copied, and this file. So a colour, a font or
   a size changes in tokens.css and nowhere else. No hex value belongs here.

   Before 2026-11-15 the site had six page tops: three logos, three type
   systems (Young Serif and Archivo on the landing page, Fraunces and DM Sans
   on generated pages, system fonts on the legal pages), four language
   switches and three footers. The header, the buttons and the footer below
   are the landing page's (app/src/landing.css), restated so a static page can
   load them without the app bundle.
   ========================================================================== */

/* The names the page templates used before the tokens existed. They resolve
   to tokens, so a template rule that says var(--forest) follows the system. */
:root {
  --forest: var(--spruce);
  --forest-light: var(--grade-1);
  --stone: var(--ink-3);
  --clay: var(--flag-deep);
  --river: var(--hydro);
  --sand: var(--paper);
  --parchment: var(--paper-raised);
  --bark: var(--ink);
  --bark-light: var(--ink-2);
  --bark-muted: var(--ink-3);
  --trail: var(--rule);
  --gold: var(--ink);

  --wrap: 1180px;
  --read: 720px;
  --gutter: clamp(20px, 5vw, 56px);
  --topbar-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: var(--flag-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 2px;
  border-radius: var(--r1);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tr-display);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Buttons (landing.css, section 3)
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 13px var(--s6);
  border: var(--bw) solid transparent;
  border-radius: var(--r2);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--e-out),
              border-color var(--t-fast) var(--e-out),
              color var(--t-fast) var(--e-out);
}

.btn--primary {
  background: var(--flag-deep);
  border-color: var(--flag-deep);
  color: #fff;
}

.btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--ink:hover {
  background: var(--flag-deep);
  border-color: var(--flag-deep);
  color: #fff;
}

/* The second action on a light ground. */
.btn--outline {
  background: var(--paper-raised);
  border-color: var(--rule-control);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--ink);
  color: var(--flag-deep);
}

.btn--sm {
  padding: 9px var(--s4);
  font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   Top bar (landing.css, section 4)
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  background: var(--paper-raised);
  border-bottom: var(--bw) solid var(--rule-strong);
}

.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: var(--tr-display);
  color: var(--ink);
  text-decoration: none;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.topbar__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}

.topbar__link:hover {
  color: var(--flag-deep);
}

.lang-toggle {
  padding: 7px 11px;
  border: var(--bw) solid var(--rule-control);
  border-radius: var(--r2);
  font-family: var(--font-ui);
  font-stretch: var(--wdth-condensed);
  font-size: var(--fs-lb);
  font-weight: 600;
  letter-spacing: var(--tr-ui-caps);
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t-fast) var(--e-out),
              color var(--t-fast) var(--e-out);
}

.lang-toggle:hover {
  border-color: var(--ink);
  color: var(--flag-deep);
}

@media (max-width: 760px) {
  .topbar__link {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Page head: the trail, the title, the meta line and the lede.
   One pattern, on paper, aligned left with the content under it. The hub
   classes are the ones the templates already carry.
   -------------------------------------------------------------------------- */

.hub-hero,
.rc-hero {
  background: var(--paper);
  color: var(--ink);
  padding: var(--s10) var(--gutter) var(--s6);
  text-align: left;
}

/* The hub pages (cards, maps, tables) take the header's own measure, so a
   title starts under the wordmark. */
.hub-hero-inner {
  max-width: calc(var(--wrap) - 2 * var(--gutter));
  margin: 0 auto;
}

.rc-hero-inner {
  max-width: var(--read);
  margin: 0 auto;
}

.hub-breadcrumb,
.rc-crumbs,
.crumbs {
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0 0 var(--s4);
}

.hub-breadcrumb a,
.rc-crumbs a,
.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
  border: 0;
}

.hub-breadcrumb a:hover,
.rc-crumbs a:hover,
.crumbs a:hover {
  color: var(--flag-deep);
}

.rc-crumb-sep {
  margin: 0 6px;
}

.hub-hero h1,
.rc-hero h1,
.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-d2);
  line-height: 1.05;
  letter-spacing: var(--tr-display);
  color: var(--ink);
  margin: 0 0 var(--s4);
}

/* The count line under a hub title: numerals, so mono. */
.hub-hero-count,
.rc-hero-region {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-3);
  margin: 0 0 var(--s3);
}

.hub-hero-lede,
.page-lede {
  font-size: var(--fs-lg);
  line-height: var(--lh-lg);
  color: var(--ink-2);
  max-width: 62ch;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Hub body: section titles and the card grid
   -------------------------------------------------------------------------- */

.hub-main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s6) var(--gutter) var(--s20);
}

/* A hub page that is prose, not cards: the guides and the lake pages keep a
   reading measure inside the same left edge. */
.hub-main > p,
.hub-main > ul:not(.hub-list):not(.lake-facts),
.hub-main > ol,
.hub-main > .guide-body {
  max-width: 72ch;
}

.hub-section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-d3);
  line-height: 1.2;
  color: var(--ink);
  margin: var(--s10) 0 var(--s4);
  padding-bottom: var(--s2);
  border-bottom: var(--bw) solid var(--rule);
}

.hub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s3);
}

.hub-card a {
  display: block;
  height: 100%;
  padding: var(--s4) var(--s5);
  background: var(--paper-raised);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r2);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--e-out);
}

.hub-card a:hover {
  border-color: var(--rule-control);
}

.hub-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-d4);
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: var(--s1);
}

.hub-card a:hover .hub-card-name {
  color: var(--flag-deep);
}

.hub-card-meta {
  display: block;
  font-size: var(--fs-ui);
  line-height: 1.45;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Reading pages: the legal pages, the attribution page and the 404
   -------------------------------------------------------------------------- */

.doc {
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s10) var(--gutter) var(--s20);
}

.doc h1 {
  font-size: var(--fs-d2);
  line-height: 1.05;
  margin: 0 0 var(--s5);
}

.doc h2 {
  font-size: var(--fs-d3);
  line-height: 1.2;
  margin: var(--s10) 0 var(--s4);
  padding-bottom: var(--s2);
  border-bottom: var(--bw) solid var(--rule);
}

.doc h3 {
  font-family: var(--font-ui);
  font-size: var(--fs-d4);
  font-weight: 700;
  letter-spacing: 0;
  margin: var(--s6) 0 var(--s2);
}

.doc p,
.doc li {
  font-size: var(--fs-md);
  line-height: 1.7;
}

.doc p {
  margin: 0 0 var(--s4);
}

.doc ul,
.doc ol {
  margin: 0 0 var(--s4) var(--s6);
  padding: 0;
}

.doc li {
  margin-bottom: var(--s2);
}

.doc-note {
  padding: var(--s4);
  margin: 0 0 var(--s6);
  background: var(--paper-sunk);
  border-left: 3px solid var(--flag);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-2);
}

.doc-note strong {
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-lb);
  line-height: var(--lh-lb);
  font-weight: 500;
  letter-spacing: var(--tr-mono-caps);
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--s4);
}

/* --------------------------------------------------------------------------
   Footer (landing.css, section 13)
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--spruce-deep);
  color: var(--on-dark-2);
  padding-block: var(--s14) var(--s10);
  font-size: var(--fs-sm);
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-mission {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: var(--tr-display);
  color: var(--on-dark);
  max-width: 46ch;
  padding-bottom: var(--s10);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s8);
  padding-block: var(--s10);
  border-top: var(--bw) solid var(--rule-dark);
}

.footer-col__title {
  font-family: var(--font-mono);
  font-size: var(--fs-lb);
  line-height: var(--lh-lb);
  letter-spacing: var(--tr-mono-caps);
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: var(--s4) !important;
}

.footer-list li + li {
  margin-top: var(--s2);
}

.footer-list a,
.footer-list button {
  font-family: var(--font-ui);
  font-stretch: var(--wdth-condensed);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--tr-ui-caps);
  text-transform: uppercase;
  color: var(--on-dark);
  text-decoration: none;
}

.footer-list button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.footer-list a:hover,
.footer-list button:hover {
  color: var(--flag-bright);
}

.footer-foot {
  padding-top: var(--s8);
  border-top: var(--bw) solid var(--rule-dark);
  display: grid;
  gap: var(--s4);
}

.footer-credit {
  font-size: var(--fs-xs);
  line-height: var(--lh-md);
  color: var(--on-dark-2);
  max-width: 58rem;
}

.footer-credit a,
.footer-legal a {
  color: var(--on-dark);
}

.footer-legal {
  font-family: var(--font-mono);
  font-size: var(--fs-lb);
  letter-spacing: var(--tr-mono-caps);
  text-transform: uppercase;
  color: var(--on-dark-2);
}

@media (max-width: 900px) {
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hub-hero,
  .rc-hero {
    padding-block: var(--s8) var(--s5);
  }

  .hub-main {
    padding-block: var(--s5) var(--s14);
  }

  .doc {
    padding-block: var(--s8) var(--s14);
  }

  .wordmark {
    font-size: 19px;
  }
}

/* ==========================================================================
   Route page (pipeline/09_generate_pages.py, generate_page)
   ==========================================================================
   The rules lived in a <style> block copied into each of 1,674 pages. They
   are one file now, cached once.
   ========================================================================== */

/* The route template writes bare elements and relied on a zero-margin reset.
   :where keeps the reset at zero specificity, so each rule below wins. */
:where(.rc-hero, .rc-stats, .rc-map-key, .rc-content) :where(h1, h2, h3, p, ul, ol, li, dl, dd, figure, table) {
  margin: 0;
  padding: 0;
}

.rc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.rc-diff,
.rc-ww {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-full);
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.4;
}

.rc-diff {
  background: var(--ink);
  color: var(--paper);
}

.rc-ww {
  border-color: var(--rule-control);
  color: var(--ink);
}

/* The trip facts: a rail of numerals, as on the landing page. */
.rc-stats {
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) var(--s6);
}

.rc-stats-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: var(--bw) solid var(--rule);
  border-bottom: var(--bw) solid var(--rule);
}

.rc-stat {
  min-width: 0;
  padding: var(--s4);
  border-left: var(--bw) solid var(--rule);
  text-align: left;
}

.rc-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.rc-stat-num {
  font-family: var(--font-mono);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
}

.rc-stat-label {
  font-size: var(--fs-ui);
  line-height: 1.35;
  color: var(--ink-2);
  margin-top: var(--s1);
}

.rc-map-wrap {
  position: relative;
}

.rc-map {
  width: 100%;
  height: 440px;
  border-block: var(--bw) solid var(--rule-strong);
  background: var(--paper-sunk);
}

/* "Open the full map". The link is in the page for a reader with no script;
   route-page.js moves it into the map's own control corner, where a popup
   draws over it and never under it. */
.rc-map-open {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 9px 13px;
  background: var(--paper-raised);
  color: var(--ink);
  border-radius: var(--r2);
  box-shadow: var(--sh-map);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.mapboxgl-ctrl-top-left .rc-map-open {
  position: static;
  display: block;
  margin: 10px 0 0 10px;
}

.rc-map-open:hover {
  color: var(--flag-deep);
}

.rc-map-key,
.rc-map-note {
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s3) var(--gutter) 0;
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--ink-2);
}

.rc-map-key ul {
  display: inline;
  list-style: none;
}

.rc-map-key li {
  display: inline-block;
  margin: 0 var(--s1) var(--s1) 0;
  white-space: nowrap;
}

.rc-map-key-lead {
  font-weight: 600;
  color: var(--ink);
  margin-right: var(--s2);
}

.rc-map-key-hint {
  display: block;
  color: var(--ink-3);
  margin-top: 2px;
}

.rc-key {
  font: inherit;
  color: var(--ink);
  background: var(--paper-raised);
  border: var(--bw) solid var(--rule);
  border-radius: var(--r-full);
  padding: 3px 10px 3px 8px;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--e-out);
}

.rc-key:hover {
  border-color: var(--rule-control);
}

.rc-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: -1px;
}

/* The popup of the route page map: the map app's popup. */
.mapboxgl-popup.rcp .mapboxgl-popup-content {
  background: var(--spruce);
  color: var(--on-dark);
  border-radius: var(--r2);
  padding: var(--s3) var(--s3) 10px;
  box-shadow: var(--sh-pop);
}

.mapboxgl-popup.rcp .mapboxgl-popup-tip {
  border-top-color: var(--spruce);
  border-bottom-color: var(--spruce);
}

.mapboxgl-popup.rcp .mapboxgl-popup-close-button {
  color: var(--on-dark-2);
  font-size: 18px;
  padding: 2px 6px;
}

.rcp-body {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  line-height: var(--lh-xs);
}

.rcp-name {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.25;
  color: var(--on-dark);
  margin: 0 14px 3px 0;
}

.rcp-cat,
.rcp-meta {
  color: var(--on-dark-2);
  margin-bottom: 3px;
}

.rcp-grade,
.rcp-warn {
  font-weight: 600;
  color: var(--flag-bright);
  margin-bottom: 3px;
}

.rcp-foot {
  margin-top: var(--s2);
  padding-top: 5px;
  border-top: var(--bw) solid var(--rule-dark);
  line-height: 1;
}

a.rcp-src {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--on-dark-2);
  text-decoration: none;
}

a.rcp-src:hover {
  text-decoration: underline;
}

.rc-content {
  max-width: calc(var(--read) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--s8) var(--gutter) var(--s14);
}

.rc-section {
  margin-bottom: var(--s10);
}

.rc-section > p + p,
.rc-section > p + ul,
.rc-section > ul + p {
  margin-top: var(--s3);
}

.rc-section-title {
  font-size: var(--fs-d3);
  line-height: 1.2;
  margin-bottom: var(--s4);
  padding-bottom: var(--s2);
  border-bottom: var(--bw) solid var(--rule);
}

.rc-subtitle,
.rc-faq-q {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink);
}

.rc-subtitle {
  margin: var(--s5) 0 var(--s1);
}

.rc-description {
  font-size: var(--fs-md);
  line-height: 1.75;
}

/* Small print under a section: sources, licences, caveats. */
.rc-section small,
.rc-table-note,
.rc-gauge-meta,
.rc-gauge-caveat,
.rc-gauge-note,
.rc-cond-src,
.rc-more,
.rc-grade,
.rc-profile-axis {
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--ink-3);
}

.rc-table-note {
  margin-top: var(--s2);
}

.rc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* A highlight is a quiet chip. The flag colour is the route line and the
   active state; four filled orange pills on every page spent it on labels. */
.rc-tag {
  padding: 4px 12px;
  background: var(--paper-raised);
  border: var(--bw) solid var(--rule-strong);
  border-radius: var(--r-full);
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.rc-season {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin: calc(-1 * var(--s5)) 0 var(--s10);
}

.rc-meta-label {
  font-weight: 600;
  color: var(--ink);
}

.rc-table-wrap {
  overflow-x: auto;
  margin: var(--s3) 0 var(--s2);
}

.rc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.rc-table th {
  text-align: left;
  padding: var(--s2) var(--s3);
  background: var(--paper-sunk);
  border-bottom: var(--bw) solid var(--rule-strong);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.rc-table td {
  padding: var(--s2) var(--s3);
  border-bottom: var(--bw) solid var(--rule);
  vertical-align: top;
}

.rc-td-km {
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}

/* A long table or list shows its first rows; route-page.js adds the control. */
.rc-clip .rc-extra {
  display: none;
}

.rc-show-all {
  margin-top: var(--s3);
  padding: 8px 14px;
  background: var(--paper-raised);
  border: var(--bw) solid var(--rule-control);
  border-radius: var(--r2);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.rc-show-all:hover {
  border-color: var(--ink);
  color: var(--flag-deep);
}

.rc-gauges,
.rc-cond-list,
.rc-camp-list,
.rc-nearby {
  list-style: none;
}

.rc-gauges {
  margin-top: var(--s2);
}

.rc-gauges li {
  padding: var(--s3) 0;
  border-bottom: var(--bw) solid var(--rule);
}

.rc-gauges li:last-child {
  border-bottom: 0;
}

.rc-gauge-id {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  margin-right: var(--s2);
}

.rc-gauge-meta,
.rc-gauge-note {
  display: block;
  margin-top: 2px;
}

.rc-gauge-caveat {
  margin-top: var(--s1);
}

/* The live reading: the numerals lead, in mono. */
.rc-gauge-live {
  display: block;
  margin-top: var(--s2);
}

.rc-gauge-live[hidden] {
  display: none;
}

.rc-gauge-live strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
}

.rc-refused {
  color: var(--ink-3);
  font-style: italic;
}

.rc-cond-list {
  margin-bottom: var(--s3);
}

.rc-cond-list li,
.rc-cond-fail {
  padding: 6px 0 6px var(--s3);
  margin-bottom: var(--s2);
  border-left: 3px solid var(--flag);
}

.rc-cond-fail {
  border-left: 3px dashed var(--rule-control);
}

.rc-cond-src {
  display: block;
  margin-top: 2px;
}

.rc-list {
  margin-top: var(--s2);
  padding-left: var(--s5);
}

.rc-list li {
  margin: var(--s1) 0;
}

.rc-stewards li {
  margin: 6px 0;
}

.rc-stewardship {
  scroll-margin-top: 72px;
}

.rc-profile {
  margin: var(--s3) 0 var(--s1);
}

.rc-profile svg {
  display: block;
  width: 100%;
  height: 120px;
}

.rc-profile-area {
  fill: var(--paper-sunk);
}

.rc-profile-line {
  fill: none;
  stroke: var(--hydro);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.rc-profile-axis {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s1);
}

.rc-camp-list li {
  padding: 6px 0;
  border-bottom: var(--bw) solid var(--rule);
  font-size: var(--fs-sm);
}

.rc-nearby li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s2) 0;
  border-bottom: var(--bw) solid var(--rule);
  font-size: var(--fs-sm);
}

.rc-nearby li:last-child {
  border-bottom: 0;
}

.rc-nearby a {
  text-decoration: none;
}

.rc-nearby-km {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  white-space: nowrap;
}

.rc-nearby-all {
  margin-top: var(--s3);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.rc-faq-item {
  margin-bottom: var(--s4);
}

.rc-faq-a {
  font-size: var(--fs-md);
  color: var(--ink-2);
}

.rc-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin: var(--s8) 0 var(--s10);
}

.rc-sources p,
.rc-safety,
.rc-report {
  font-size: var(--fs-ui);
  line-height: 1.6;
  color: var(--ink-3);
}

.rc-safety {
  border-top: var(--bw) solid var(--rule);
  margin-top: var(--s8);
  padding-top: var(--s4);
}

.rc-report {
  margin-top: var(--s2);
}

.rc-report a {
  font-weight: 600;
}

/* ==========================================================================
   Park page (pipeline/09_generate_pages.py, generate_park_hub)
   ========================================================================== */

.park-map {
  width: 100%;
  height: 560px;
  border-block: var(--bw) solid var(--rule-strong);
  background: var(--paper-sunk);
}

.park-legend {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s3) var(--gutter) 0;
}

.park-legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s6);
  font-size: var(--fs-sm);
}

.park-legend li {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.park-legend p,
.park-note,
.park-src,
.park-off {
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--ink-3);
}

.park-legend p {
  margin: var(--s2) 0 0;
}

.park-note {
  margin: 10px 0 0;
}

.park-key {
  display: inline-block;
  width: 28px;
  flex: none;
}

.park-key-line {
  height: 0;
  border-top: 4px solid var(--flag);
}

.park-key-line-dash {
  height: 0;
  border-top: 2px dashed var(--flag);
  opacity: 0.8;
}

.park-key-dot,
.park-key-camp {
  border-radius: 50%;
  border: 2px solid var(--paper-raised);
  box-shadow: 0 0 0 1px var(--rule-strong);
}

.park-key-dot {
  width: 12px;
  height: 12px;
  background: var(--poi-access);
  margin: 0 8px;
}

.park-key-camp {
  width: 10px;
  height: 10px;
  background: var(--poi-camp);
  margin: 0 9px;
}

.park-key-area {
  height: 14px;
  border: 2px solid var(--spruce);
  background: rgb(var(--spruce-rgb) / 0.08);
  border-radius: 2px;
}

.park-section {
  margin-bottom: var(--s10);
}

.park-section > p,
.park-section > ul,
.park-section > ol {
  max-width: 72ch;
}

.park-intro {
  margin: 0 0 var(--s4);
}

.park-facts {
  padding-left: var(--s5);
  margin: 0;
}

.park-facts li {
  margin: 0 0 var(--s2);
}

.park-table {
  width: 100%;
  max-width: 560px;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.park-table th {
  text-align: left;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--ink-2);
  padding: var(--s2) var(--s3);
  background: var(--paper-sunk);
  border-bottom: var(--bw) solid var(--rule-strong);
}

.park-table td {
  padding: var(--s2) var(--s3);
  border-bottom: var(--bw) solid var(--rule);
}

.park-num {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--ink);
  width: 48px;
}

.park-sources {
  padding-left: var(--s5);
  margin: 0;
  font-size: var(--fs-sm);
}

.park-sources li {
  margin: 6px 0;
}

.park-faq-item {
  margin-bottom: var(--s4);
  max-width: 72ch;
}

.park-faq-q {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 var(--s1);
}

.park-faq-a {
  font-size: var(--fs-md);
  color: var(--ink-2);
  margin: 0;
}

.park-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

.park-safety {
  font-size: var(--fs-ui);
  line-height: 1.6;
  color: var(--ink-3);
  border-top: var(--bw) solid var(--rule);
  margin-top: var(--s8);
  padding-top: var(--s4);
  max-width: 72ch;
}

.hub-parks {
  margin-bottom: var(--s8);
}

@media (max-width: 640px) {
  .rc-stats-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rc-stat {
    padding: var(--s3) var(--s3) var(--s3) 0;
    border-left: 0;
  }

  .rc-stat:nth-child(even) {
    padding-left: var(--s3);
    border-left: var(--bw) solid var(--rule);
  }

  .rc-stat:nth-child(n + 3) {
    border-top: var(--bw) solid var(--rule);
  }

  .rc-stat-num {
    font-size: 1.375rem;
  }

  .rc-map {
    height: 320px;
  }

  .park-map {
    height: 420px;
  }

  .rc-ctas .btn {
    width: 100%;
  }
}

.rc-nearby-section {
  margin-top: var(--s10);
}

.rc-cond-status {
  margin: 0;
}

@media print {
  .rc-clip .rc-extra {
    display: revert;
  }

  .rc-show-all,
  .topbar,
  .rc-map-open {
    display: none;
  }
}

.rc-fine {
  margin-top: var(--s3);
}

.rc-fine summary {
  display: inline-block;
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

.rc-fine summary::-webkit-details-marker {
  display: none;
}

.rc-fine summary::after {
  content: " +";
  font-family: var(--font-mono);
}

.rc-fine[open] summary::after {
  content: " −";
}

.rc-fine summary:hover {
  color: var(--flag-deep);
}

/* --------------------------------------------------------------------------
   The hand-written pages (pipeline/55_apply_site_shell.py): the words these
   pages already used for a callout, a date line and a list of figures.
   -------------------------------------------------------------------------- */

.doc .lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-lg);
  color: var(--ink-2);
  margin-bottom: var(--s8);
}

.doc .callout,
.doc .note {
  padding: var(--s4);
  margin: var(--s5) 0;
  background: var(--paper-sunk);
  border-left: 3px solid var(--flag);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-2);
}

.doc .callout strong,
.doc .note strong {
  color: var(--ink);
}

.doc .updated {
  font-size: var(--fs-ui);
  color: var(--ink-3);
  margin-top: var(--s10);
  padding-top: var(--s4);
  border-top: var(--bw) solid var(--rule);
}

.doc .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s4);
  margin: var(--s8) 0;
  padding: var(--s5) 0;
  border-block: var(--bw) solid var(--rule);
}

.doc .stat-num {
  font-family: var(--font-mono);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}

.doc .stat-label {
  font-size: var(--fs-ui);
  line-height: 1.35;
  color: var(--ink-2);
  margin-top: var(--s1);
}

.doc .cta {
  display: inline-flex;
  padding: 13px var(--s6);
  border-radius: var(--r2);
  background: var(--flag-deep);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.doc .cta:hover {
  background: var(--ink);
}

.doc .spread {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s1) var(--s4);
  list-style: none;
  margin: var(--s4) 0;
}

.doc .spread li {
  font-size: var(--fs-sm);
  font-weight: 600;
  border-bottom: var(--bw) solid var(--rule);
  padding: 2px 0;
  margin: 0;
}

/* The 404 */
.doc--notfound {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.doc .actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}
