:root {
  --primary: #c8df0a;
  --secondary: #96cdcf;
  --secondary-light: #e4f2f3;
  --dark: #193838;
  --black: #051a1a;
  --body: #343434;
  --light: #f8f8f8;
  --border: #d6d6d6;
  --amber: #ffc94a;
  --red: #ff7a6b;
  --white: #fff;
  --muted: #555;
  --danger: #b3261e;
  --field-border: #6f8686;
  --font-display: "Rubik", "Rubik fallback", "Rubik fallback Roboto", sans-serif;
  --font-body: "DM Sans", "DM Sans fallback", "DM Sans fallback Roboto", ui-sans-serif, system-ui, sans-serif;
  --edge: 75px;
  /* Breakpoints are written in em (40em is 640px at the default text size), so the layout also adapts
     when someone sets a larger text size in their browser. Each one also carries its width in px as a floor,
     so a very small text size cannot switch a wide layout on in a narrow window. */
  /* Type scale. Sizes are in rem so text follows the reader's own browser text size. 1rem is 16px by default. */
  --fs-1: .8125rem;  /* 13px: capital-letter labels and tags */
  --fs-2: .875rem;   /* 14px: buttons, captions, source lines */
  --fs-3: 1rem;      /* 16px: everything people read as sentences */
  --fs-4: 1.125rem;
  --fs-5: 1.25rem;
  --fs-6: 1.375rem;
  --fs-7: 1.625rem;
  --fs-8: 1.875rem;
  --fs-9: 2.25rem;
  --fs-10: 3rem;
  --fs-11: 3.75rem;
  --fs-12: 4.5rem;
  /* Longest comfortable line of running text, about 75 characters. An em follows each element's own text size. */
  --measure: 32em;
}

/* Stand-in faces used until the web fonts arrive, scaled to the same width so lines break in the same places.
   The ratios were measured on this site's own text. Arial covers Windows, macOS and iOS; Roboto covers Android. */
/* The web fonts, served from this site (latin subset; SIL Open Font License, see /static/fonts/OFL-*.txt).
   font-display: optional means the browser never swaps fonts after the page is drawn, so nothing moves.
   If a font has not arrived in time, that page view keeps the stand-in font below. */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400 700; font-display: optional; src: url("/static/fonts/dm-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 800; font-display: optional; src: url("/static/fonts/rubik-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans fallback"; font-weight: 400 500; src: local("Arial"), local("Liberation Sans"); size-adjust: 103%; }
@font-face { font-family: "DM Sans fallback"; font-weight: 600 700; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); size-adjust: 101%; }
@font-face { font-family: "DM Sans fallback Roboto"; font-weight: 400 500; src: local("Roboto"); size-adjust: 104%; }
@font-face { font-family: "DM Sans fallback Roboto"; font-weight: 600 700; src: local("Roboto Bold"), local("Roboto-Bold"); size-adjust: 108%; }
@font-face { font-family: "Rubik fallback"; font-weight: 800; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"); size-adjust: 102%; }
@font-face { font-family: "Rubik fallback Roboto"; font-weight: 800; src: local("Roboto Bold"), local("Roboto-Bold"); size-adjust: 110%; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; box-shadow: 0 0 0 6px var(--dark); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.container { width: 100%; max-width: max(85rem, 1360px); margin-inline: auto; padding-inline: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-2); line-height: 1.43;
  text-align: center; text-transform: capitalize;
  padding: 12px 16px; border: 2px solid transparent;
  transition: transform .15s, background-color .15s, color .15s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--primary { background: var(--primary); color: var(--dark); }
.btn--secondary { background: var(--secondary); color: var(--dark); }
.btn--primary:hover, .btn--secondary:hover, .btn--outline:hover { transform: scale(1.05); }
.btn--link { padding-inline: 0; }
.btn--link svg { color: var(--primary); transition: transform .15s; }
.btn--link:hover svg { transform: translateX(4px); }
.btn--link.on-light svg { color: var(--dark); }
.btn--outline { border-color: currentColor; }
.btn--block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* ---------- Header ---------- */
.site-header { position: absolute; inset-inline: 0; top: 0; z-index: 100; }
.topbar { background: var(--primary); color: var(--dark); font-size: var(--fs-2); padding-block: 12px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-note { display: inline-flex; align-items: center; gap: 8px; }
.topbar-note svg { width: 16px; height: 16px; flex-shrink: 0; }
.topbar a:hover { text-decoration: underline; }
.topbar-source { display: none; }
.header-main {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding-block: 16px; color: var(--white);
}
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: min(1.625rem, 11vw); letter-spacing: -.03em; line-height: 1; color: var(--white); }
.logo svg { width: 40px; height: 40px; flex-shrink: 0; }
.logo em { font-style: normal; color: var(--primary); }
.menu-toggle { padding: 8px; color: var(--white); }
.menu-toggle svg { width: 32px; height: 32px; }
.site-nav {
  display: none; position: absolute; top: 100%; left: 12px; right: 12px;
  background: var(--white); color: var(--body); box-shadow: 0 10px 15px -3px rgba(0,0,0,.2); z-index: 200;
}
.site-nav.is-open { display: block; }
.site-nav a { display: block; padding: 14px 16px; font-weight: 600; border-bottom: 1px solid var(--border); }
.site-nav a:hover { background: var(--light); }
.site-nav li:last-child a { border-bottom: 0; }
.header-actions { display: none; }
.header-actions .btn { white-space: nowrap; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--dark); color: var(--white); padding-top: max(8.25rem, 132px); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::before, .hero-media::after { content: ""; position: absolute; inset-inline: 0; top: 0; z-index: 1; }
.hero-media::before { height: 50%; background: linear-gradient(to bottom, rgba(0,0,0,.8), rgba(0,0,0,0)); }
.hero-media::after { height: 100%; background: linear-gradient(to right, rgba(0,0,0,.8), rgba(0,0,0,.1)); }
.hero-inner { position: relative; z-index: 3; padding-block: 40px 130px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.75rem, 8vw, 2.25rem); line-height: .95; margin-bottom: 16px;
  text-shadow: 0 1px 2px rgba(0,0,0,.2), 0 3px 2px rgba(0,0,0,.2), 0 4px 8px rgba(0,0,0,.2);
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--primary); }
.hero-lede { max-width: var(--measure); font-weight: 600; font-size: var(--fs-4); text-wrap: pretty; text-shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3); }
.hero .btn-group { padding-top: 40px; }
.hero-features { display: grid; gap: 8px; margin-top: 44px; }
.hero-feature {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; align-content: start; height: 100%;
  padding: 16px; background: rgba(5,26,26,.8); border-top: 2px solid var(--primary);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background-color .2s;
}
.hero-feature:hover { background: rgba(5,26,26,.95); }
.hero-feature-icon { display: grid; place-items: center; width: 40px; height: 40px; background: var(--primary); color: var(--dark); }
.hero-feature-icon svg { width: 22px; height: 22px; }
.hero-feature-title {
  display: block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: var(--fs-3); line-height: 1.15; color: var(--white); transition: color .2s;
}
.hero-feature:hover .hero-feature-title { color: var(--primary); }
.hero-feature-text { display: block; margin-top: 6px; font-size: var(--fs-3); line-height: 1.45; color: rgba(255,255,255,.88); text-wrap: pretty; }

.torn-wrap { position: absolute; inset-inline: 0; height: var(--edge); overflow: hidden; z-index: 4; pointer-events: none; }
.torn-wrap--bottom { bottom: -1px; }
.torn-wrap--top { top: calc(var(--edge) * -1 + 1px); }
.torn-wrap svg { width: max(100%, 1600px); height: 100%; max-width: none; }

/* ---------- Dark intro section ---------- */
.intro-section { background: var(--dark); color: var(--light); padding-block: 60px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
.stat { border-left: 2px solid var(--primary); padding-inline: 20px 8px; }
.stat-num { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-8); line-height: 1.1; letter-spacing: -.025em; color: var(--white); }
.stat-label { margin-top: 4px; max-width: 17em; text-transform: uppercase; font-size: var(--fs-1); font-weight: 500; letter-spacing: .05em; text-wrap: balance; }
.stats-source { margin-top: 24px; font-size: var(--fs-2); opacity: .8; }
.stats-source a { text-decoration: underline; }

.split { display: grid; gap: 40px; margin-top: 40px; }
.split-text { max-width: 35rem; }
.eyebrow {
  position: relative; padding-left: 20px; margin-bottom: 20px;
  font-size: var(--fs-2); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary);
}
.eyebrow::before, .eyebrow::after { content: ""; position: absolute; top: 50%; left: 0; transform: translateY(-50%); border-radius: 50%; }
.eyebrow::before { width: 12px; height: 12px; border: 2px solid currentColor; }
.eyebrow::after { width: 4px; height: 4px; margin-left: 4px; background: currentColor; }
.heading {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.025em;
  font-size: var(--fs-9); line-height: 1.1; margin-bottom: 16px; text-wrap: balance;
}
.lede { font-size: var(--fs-5); line-height: 1.625; margin-bottom: 16px; text-wrap: pretty; }
.split-text p { margin-bottom: 16px; }
.split-text .btn-group { padding-top: 24px; }
.split-media { display: flex; flex-direction: column; padding-block: 8% 0; }
.split-media div { overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,.5); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media .shot-a { aspect-ratio: 5 / 4; width: 75%; align-self: flex-start; }
.split-media .shot-b { aspect-ratio: 4 / 3; width: 60%; align-self: flex-end; margin-top: -18%; position: relative; }

/* ---------- Call-out ---------- */
.callout { position: relative; background: var(--secondary); color: var(--black); padding-block: 40px; overflow: hidden; }
.callout-bg { position: absolute; inset: 0; opacity: .1; pointer-events: none; }
.callout-bg img { width: 100%; height: 100%; object-fit: cover; }
.callout-inner { position: relative; max-width: 800px; margin-inline: auto; padding: 32px 12px; text-align: center; }
.callout h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; font-size: var(--fs-7); line-height: 1.15; margin-bottom: 16px; text-wrap: balance; }
.callout p { margin-bottom: 32px; text-wrap: balance; }
.callout .btn-group { justify-content: center; }

/* ---------- Water points ---------- */
.points-section { padding-block: 60px; }
.section-head { display: grid; gap: 24px; margin-bottom: 32px; }
.section-head .heading { margin-bottom: 8px; color: var(--body); }
.section-head p { max-width: var(--measure); }
.sample-note { display: inline-block; margin-bottom: 16px; padding: 4px 8px; background: var(--secondary-light); color: var(--dark); font-size: var(--fs-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.chip { min-width: 44px; min-height: 44px; border: 2px solid var(--secondary); padding: 8px 14px; font-size: var(--fs-3); font-weight: 500; transition: background-color .15s, color .15s; }
.chip:hover { background: var(--secondary); }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--white); }
.points-count { margin-left: auto; font-size: var(--fs-2); color: var(--muted); }
.explorer { display: grid; gap: 16px; align-items: start; }
.point-list { display: grid; gap: 8px; }
.point {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center;
  width: 100%; text-align: left; background: var(--dark); color: var(--white);
  padding: 16px 20px 16px 16px; border-left: 4px solid transparent; transition: background-color .15s;
}
.point:hover { background: var(--black); }
.point[aria-current="true"] { background: var(--black); border-left-color: var(--primary); }
.point-name { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-4); letter-spacing: -.02em; }
.point-meta { grid-column: 1; font-size: var(--fs-2); opacity: .8; }
.point .tag { grid-column: 2; grid-row: 1 / span 2; }
.tag { display: inline-block; padding: 4px 8px; font-size: var(--fs-1); font-weight: 700; color: var(--black); white-space: nowrap; }
.tag--safe { background: var(--primary); }
.tag--check { background: var(--amber); }
.tag--unsafe { background: var(--red); }

.detail { background: var(--dark); color: var(--white); padding: 24px 20px; scroll-margin-top: 12px; }
.detail-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.detail-time { font-size: var(--fs-1); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--primary); }
.detail h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; font-size: var(--fs-7); line-height: 1.15; }
.detail-kind { margin-top: 4px; font-size: var(--fs-3); opacity: .8; }
.detail-reason { margin-top: 16px; font-size: var(--fs-4); text-wrap: pretty; }
.readings { margin-block: 20px; border-bottom: 1px solid rgba(255,255,255,.18); }
.reading { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: baseline; padding-block: 14px; border-top: 1px solid rgba(255,255,255,.18); }
.reading dt { font-weight: 700; }
.reading-guide { grid-column: 1; font-size: var(--fs-2); opacity: .8; }
.reading-value { grid-column: 2; grid-row: 1; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); letter-spacing: -.02em; }
.reading-state { grid-column: 2; grid-row: 2; text-align: right; font-size: var(--fs-2); font-weight: 600; }
.reading-state.is-ok { color: var(--primary); }
.reading-state.is-flag { color: var(--red); }
.reading-state.is-na { opacity: .8; }
.advice { padding: 14px 16px; background: rgba(255,255,255,.08); border-left: 3px solid var(--primary); }
.advice.is-check { border-left-color: var(--amber); }
.advice.is-unsafe { border-left-color: var(--red); }
.advice strong { display: block; margin-bottom: 2px; font-size: var(--fs-1); letter-spacing: .05em; text-transform: uppercase; }
.detail-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 16px; }
.detail-checks { font-size: var(--fs-2); opacity: .85; }

/* ---------- What we measure ---------- */
.gradient-band { background: linear-gradient(to bottom, var(--secondary), var(--primary)); color: var(--dark); }
.measure { padding-block: 60px 20px; }
.measure .heading, .involve .heading, .ways .heading { text-align: center; margin-bottom: 32px; }
.measure .heading { margin-bottom: 16px; }
.cards-3 { display: grid; gap: 24px; }
/* On a phone each test is a row with its icon on the left. From 40em it is a centred card (see the detail-page breakpoints). */
.icon-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; align-content: start; height: 100%;
  padding: 16px; background: var(--white); color: var(--dark);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.icon-card .icon { grid-row: 1 / span 3; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; }
.icon-card .icon svg { width: 40px; height: 40px; }
.icon-card h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; font-size: var(--fs-5); }
.icon-card p { max-width: 20em; font-size: var(--fs-3); }
.icon-card .how { padding-top: 4px; font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.measure-source { margin-top: 24px; text-align: center; font-size: var(--fs-2); }
.measure-source a { text-decoration: underline; }

.quotes { position: relative; margin-top: 60px; padding-bottom: 40px; text-align: center; }
.quote-mark { width: 40px; height: 40px; margin-inline: auto; }
.quote { padding: 24px 4px 0; }
.quote-text { max-width: var(--measure); margin-inline: auto; font-size: var(--fs-5); line-height: 1.6; text-wrap: pretty; }
.quote cite { display: block; margin-top: 20px; font-style: normal; font-size: var(--fs-2); letter-spacing: .025em; text-transform: uppercase; }
.quote cite b { display: block; font-weight: 600; }
.quote cite span { opacity: .8; }
.quote-source { font-size: var(--fs-2); }
.quote-source a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.quote-controls { display: flex; justify-content: center; gap: 16px; margin-top: 24px; }
.quote-btn { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--dark); color: var(--primary); transition: background-color .15s, color .15s, transform .15s; }
.quote-btn:hover { background: var(--black); }
.quote-btn:active { transform: scale(.95); }
.quote-btn svg { width: 16px; height: 16px; }

/* ---------- Get involved ---------- */
.involve { position: relative; background: var(--primary); color: var(--body); padding-block: 40px 140px; }
.subheading { margin-bottom: 20px; text-align: center; font-size: var(--fs-2); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.cover-grid { display: grid; gap: 16px; }
.cover { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; overflow: hidden; color: var(--white); box-shadow: 0 10px 15px -3px rgba(0,0,0,.2); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,.5); transition: background-color .3s; }
.cover:hover::before { background: rgba(0,0,0,.7); }
.cover:hover img { transform: scale(1.05); }
.cover-body { position: relative; z-index: 2; padding: 16px; }
.cover h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; font-size: var(--fs-7); line-height: 1.1; text-shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3); }
.cover p { margin-top: 6px; max-width: 21em; font-size: var(--fs-3); }
.cover-icon { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--primary); color: var(--dark); }
.cover-icon svg { width: 16px; height: 16px; transform: rotate(-45deg); transition: transform .3s; }
.cover:hover .cover-icon svg { transform: rotate(0); }

.join { display: grid; gap: 24px; margin-top: 40px; padding: 24px 20px; background: var(--white); box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); scroll-margin-top: 12px; }
.join h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; font-size: var(--fs-7); line-height: 1.15; color: var(--dark); margin-bottom: 12px; }
.join-note { margin-top: 16px; padding: 12px 14px; background: var(--secondary-light); color: var(--dark); font-size: var(--fs-3); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-3); font-weight: 700; color: var(--dark); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--body);
  background: var(--white); border: 2px solid var(--field-border); border-radius: 0;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--dark); outline-offset: 2px; box-shadow: none; border-color: var(--dark); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin-top: 6px; font-size: var(--fs-3); font-weight: 600; color: var(--danger); }
.join-result { padding: 20px; background: var(--secondary-light); border-left: 4px solid var(--dark); color: var(--dark); }
.join-result h4 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); letter-spacing: -.02em; }
.join-result p { margin-bottom: 16px; }
.involve :focus-visible, .join :focus-visible, .points-section :focus-visible, .gradient-band :focus-visible, .callout :focus-visible, .topbar :focus-visible { outline-color: var(--dark); box-shadow: 0 0 0 6px var(--white); }
.points-section .point:focus-visible, .detail :focus-visible { outline-color: var(--white); box-shadow: 0 0 0 6px var(--dark); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: linear-gradient(to top, var(--black), var(--dark)); color: var(--white); padding-top: 60px; }
.footer-top { display: grid; align-items: start; gap: 24px; padding-bottom: 48px; }
.footer-tagline { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.04em; font-size: var(--fs-8); line-height: 1; }
.footer-tagline span { display: block; }
.footer-tagline .accent { color: var(--primary); }
.footer-cols { display: grid; gap: 32px; padding-bottom: 48px; }
.footer-h { margin-bottom: 14px; font-size: var(--fs-2); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.footer-cols li a, .footer-cols p { font-size: var(--fs-3); color: rgba(255,255,255,.82); }
.footer-cols li a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-block: 4px; }
.footer-cols a:hover { color: var(--white); text-decoration: underline; }
.footer-cols p { max-width: 26em; margin-bottom: 12px; }
.footer-bottom { display: grid; gap: 8px; padding-block: 16px; border-top: 1px solid rgba(255,255,255,.2); font-size: var(--fs-2); }
.footer-bottom small { display: block; font-size: var(--fs-2); opacity: .8; }
.footer-bottom a { text-decoration: underline; }

/* ---------- More ways ---------- */
.ways { padding-block: 60px 0; }
.ways .subheading { margin-bottom: 12px; }
.ways .heading { margin-bottom: 16px; }
.ways-lede, .measure-lede { max-width: var(--measure); margin: 0 auto 32px; text-align: center; font-size: var(--fs-4); text-wrap: pretty; }
.pillars { display: grid; gap: 20px; margin-bottom: 16px; }
.pillar { border-left: 2px solid var(--dark); padding-inline: 20px 8px; }
.pillar-name { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6); line-height: 1.15; letter-spacing: -.025em; }
.pillar-text { margin-top: 4px; font-size: var(--fs-3); }
.ways-source { margin-bottom: 32px; font-size: var(--fs-2); }
.ways-source a { text-decoration: underline; }
.way-grid { display: grid; gap: 24px; }
.way { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 24px 20px; background: var(--white); color: var(--body); box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); }
.tag--pillar { align-self: flex-start; background: var(--dark); color: var(--white); white-space: normal; }
.way h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6); line-height: 1.15; letter-spacing: -.025em; color: var(--dark); text-wrap: balance; }
.way-label { display: block; margin-bottom: 2px; font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.way p { font-size: var(--fs-3); }
.way-evidence { margin-top: auto; padding: 12px 14px 2px; background: var(--secondary-light); border-left: 3px solid var(--dark); color: var(--dark); }
.way-evidence p { font-size: var(--fs-3); }
.way-evidence a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-2); font-weight: 700; text-decoration: underline; }
.ways-note { max-width: var(--measure); margin: 28px auto 0; text-align: center; font-size: var(--fs-3); }
/* Home: the six options in short. */
.way-list { display: grid; gap: 12px; }
.way-mini { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; height: 100%; padding: 16px 20px 10px; background: var(--white); color: var(--body); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); }
.way-mini h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); line-height: 1.2; letter-spacing: -.02em; color: var(--dark); text-wrap: balance; }
.way-mini .way-try { margin-top: auto; }
.detail-fix { margin-top: 14px; font-size: var(--fs-3); }
.detail-fix b { color: var(--primary); }

/* ---------- Breakpoints ---------- */
@media (min-width: 40em) and (min-width: 640px) {
  .hero-features { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-features li:last-child { grid-column: 1 / -1; }
  .site-nav { left: auto; right: 20px; width: 320px; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .container { padding-inline: 20px; }
  .topbar-source { display: inline-block; padding-block: 12px; margin-block: -12px; }
  .footer-top { grid-template-columns: 1fr auto; }
  .quote-text { font-size: var(--fs-6); }
  .cover { min-height: 280px; }
  .cover-body { padding: 28px; }
  .cover-icon { top: 28px; right: 28px; }
}
@media (min-width: 48em) and (min-width: 768px) {
  .way-grid, .way-list { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: var(--fs-11); line-height: .8; }
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split-media { order: 2; margin-left: 60px; padding-block: 0; }
  .split-media .shot-a { transform: translateY(20%); }
  .split-media .shot-b { margin-top: 0; transform: translateY(-20%); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cover-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-cols { grid-template-columns: 200px 1fr 1fr; }
}
@media (min-width: 64em) and (min-width: 1024px) {
  .ways { padding-top: 80px; }
  .pillar-name { font-size: var(--fs-7); }
  .way-grid, .way-list { grid-template-columns: repeat(3, 1fr); }
  .container { padding-inline: 24px; }
  .topbar { padding-block: 16px; }
  /* From laptop width the page links sit in the header row. Below 72em there is room for one button beside them. */
  .header-main { grid-template-columns: auto 1fr auto; padding-block: 32px 16px; }
  .menu-toggle { display: none; }
  .site-nav { display: flex; justify-content: center; position: static; width: auto; background: none; color: var(--white); box-shadow: none; }
  .site-nav ul { display: flex; align-items: center; gap: 4px; }
  .site-nav a { padding: 10px 6px; border: 0; font-size: var(--fs-3); white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
  .site-nav a:hover { background: none; color: var(--primary); }
  .site-nav .nav-only-mobile { display: none; }
  .header-actions { display: flex; justify-content: flex-end; gap: 8px; }
  .header-actions .btn--secondary { display: none; }
  .hero { padding-top: max(12.5rem, 200px); }
  .hero-inner { padding-block: 40px 175px; }
  .hero-lede { font-size: var(--fs-5); }
  .hero .btn-group { padding-top: 40px; }
  .hero-features { grid-template-columns: repeat(5, 1fr); margin-top: 56px; }
  .hero-features li:last-child { grid-column: auto; }
  .hero-feature { grid-template-columns: 1fr; padding: 20px 18px; }
  .intro-section { padding-block: 120px 60px; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 40px; }
  .stat-num { font-size: var(--fs-10); }
  .split-text { padding-top: 100px; }
  .heading { font-size: var(--fs-10); line-height: 1; }
  .callout-inner { padding: 48px; }
  .callout h2 { font-size: var(--fs-9); }
  .section-head { grid-template-columns: 3fr 2fr; }
  .section-head .btn-group { justify-content: flex-end; }
  .explorer { grid-template-columns: 5fr 7fr; }
  .detail { padding: 32px; }
  .detail h3 { font-size: var(--fs-8); }
  .cards-3 { gap: 40px; }
  .quote { padding-inline: 120px; }
  .quote-controls { position: absolute; inset: 0 0 40px; justify-content: space-between; align-items: center; margin: 0; pointer-events: none; }
  .quote-btn { pointer-events: auto; }
  .cover { min-height: 340px; }
  .join { grid-template-columns: 5fr 7fr; gap: 48px; padding: 40px; }
  .site-footer { padding-top: 75px; }
  .footer-tagline { font-size: var(--fs-10); }
  .footer-top { padding-bottom: 60px; }
  .footer-cols { grid-template-columns: 200px 350px 1fr; padding-bottom: 80px; }
  .footer-bottom { padding-block: 32px; }
}
@media (min-width: 80em) and (min-width: 1280px) {
  .header-main { grid-template-columns: 1fr auto 1fr; }
  .site-nav ul { gap: 8px; }
  .site-nav a { padding: 10px 8px; }
  .logo { font-size: 2rem; }
  .logo svg { width: 48px; height: 48px; }
  .hero h1 { font-size: var(--fs-12); line-height: .83; }
}
@media (min-width: 96em) and (min-width: 1536px) {
  .stat-num { font-size: var(--fs-11); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ==========================================================================
   Detail pages (one per section) and the tools on them
   ========================================================================== */
.steps, .treat-steps, .rungs { margin: 0; padding: 0; list-style: none; }
.site-nav a[aria-current="page"] { background: var(--light); box-shadow: inset 4px 0 0 var(--dark); }

/* ---------- Page banner ---------- */
.page-hero { position: relative; background: var(--dark); color: var(--white); padding-top: max(8.25rem, 132px); overflow: hidden; }
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(5,26,26,.94), rgba(5,26,26,.74)); }
.page-hero-inner { position: relative; z-index: 3; padding-block: 16px 120px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-2); color: rgba(255,255,255,.88); }
.crumbs a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; text-decoration: underline; }
.page-hero h1 {
  max-width: 15em; margin-bottom: 16px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -.025em; font-size: clamp(1.9rem, 7vw, 3.75rem); line-height: 1; text-wrap: balance;
}
.page-lede { max-width: var(--measure); font-size: var(--fs-4); font-weight: 500; text-wrap: pretty; }
.page-hero .btn-group { padding-top: 28px; }

/* ---------- Bands ---------- */
.band { padding-block: 56px; }
.band--tint { background: var(--secondary-light); }
.band--dark { background: var(--dark); color: var(--light); }
.band .heading { color: var(--dark); }
.band--dark .heading { color: var(--white); }
.band-intro { max-width: var(--measure); margin-bottom: 32px; font-size: var(--fs-4); text-wrap: pretty; }
.band-outro { margin-block: 24px; font-size: var(--fs-3); }
.band-actions { margin-top: 32px; }
.section-more { display: flex; justify-content: center; margin-top: 24px; }
.band [id], .band[id], .measure-detail { scroll-margin-top: 16px; }

/* ---------- Numbered steps ---------- */
.num-badge {
  display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0;
  background: var(--primary); color: var(--dark); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6);
}
.num-badge--sm { width: 32px; height: 32px; font-size: var(--fs-3); }
.steps { display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 24px 20px; background: var(--dark); color: var(--white); }
.step-name { font-size: var(--fs-1); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.step h3 { margin-block: 4px 10px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6); line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
.meta { display: grid; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); }
.meta dt { font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.meta dd { font-size: var(--fs-3); }
.meta--plain { margin-top: 4px; padding-top: 0; border-top: 0; }
.meta--plain dt { color: var(--muted); }

/* ---------- Sample alerts ---------- */
.sms-grid { display: grid; gap: 24px; }
.sms { display: flex; flex-direction: column; gap: 10px; max-width: 30rem; }
.sms figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-count { font-size: var(--fs-2); color: rgba(255,255,255,.85); }
.sms-bubble { padding: 16px 18px; background: var(--white); color: var(--black); border-radius: 18px 18px 18px 4px; line-height: 1.45; }

/* ---------- Information cards ---------- */
.info-grid { display: grid; gap: 20px; }
.info-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 24px 20px; background: var(--white); color: var(--body); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); }
.info-card h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); line-height: 1.2; letter-spacing: -.02em; color: var(--dark); text-wrap: balance; }
.info-card--tint { background: var(--secondary-light); box-shadow: none; border-left: 3px solid var(--dark); }
.info-card--dark { background: rgba(255,255,255,.08); color: var(--white); box-shadow: none; border-top: 2px solid var(--primary); }
.info-card--dark h3 { color: var(--white); }
.examples { margin-top: 32px; padding: 20px; background: var(--white); border-left: 4px solid var(--dark); }
.examples p { margin-bottom: 16px; }

/* ---------- Checklists ---------- */
.checklist { max-width: 56rem; }
.checks { display: grid; gap: 12px; }
.check { display: grid; gap: 12px; padding: 16px; background: var(--secondary-light); border-left: 3px solid var(--dark); }
.check-q { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-weight: 600; color: var(--dark); }
.check-q span:last-child { padding-top: 4px; }
.yn { display: flex; gap: 8px; }
.yn label { position: relative; cursor: pointer; }
.yn input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.yn span { display: inline-block; min-width: 72px; padding: 9px 16px; text-align: center; font-size: var(--fs-3); font-weight: 700; background: var(--white); color: var(--dark); border: 2px solid var(--dark); }
.yn input:checked + span { background: var(--dark); color: var(--white); }
.yn input:focus-visible + span { outline: 2px solid var(--dark); outline-offset: 2px; }
.check-fix { grid-column: 1 / -1; padding: 12px 14px; background: var(--white); border-left: 3px solid var(--danger); font-size: var(--fs-3); color: var(--black); }
.check-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 16px; }
.check-summary { font-weight: 700; color: var(--dark); }
.tool-note { max-width: var(--measure); margin-top: 24px; font-size: var(--fs-3); color: var(--muted); }
.tool-note a, .src a, .note-box a { text-decoration: underline; }
.tool-text { max-width: var(--measure); margin-top: 20px; }
.warn-box { max-width: var(--measure); margin-top: 20px; padding: 14px 16px; background: var(--white); border-left: 4px solid var(--danger); color: var(--black); }
.warn-box strong { display: block; margin-bottom: 2px; font-size: var(--fs-1); letter-spacing: .05em; text-transform: uppercase; }
.treat-steps { display: grid; gap: 12px; max-width: 38rem; }
.treat-step { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px; background: var(--white); color: var(--black); }
.treat-step p { padding-top: 4px; }

/* ---------- What we measure ---------- */
.cards-4 { display: grid; gap: 24px; }
.jump-grid { display: grid; gap: 12px; }
.jump-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 20px; background: var(--dark); color: var(--white); border-left: 4px solid var(--primary); transition: background-color .15s; }
.jump-card:hover { background: var(--black); }
.jump-card b { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); letter-spacing: -.02em; }
.jump-card span { font-size: var(--fs-3); color: rgba(255,255,255,.9); }
.jump-card .jump-how { margin-top: auto; padding-top: 8px; font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.measure-list { display: grid; gap: 24px; }
.measure-detail { max-width: 58rem; padding: 24px 20px; background: var(--white); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); }
.measure-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.measure-head .icon { display: grid; place-items: center; width: 56px; height: 56px; flex-shrink: 0; background: var(--primary); color: var(--dark); }
.measure-head .icon svg { width: 32px; height: 32px; }
.measure-head h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-7); line-height: 1.1; letter-spacing: -.025em; color: var(--dark); }
.measure-head p { margin-top: 4px; font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts > div { display: grid; gap: 4px; padding-block: 14px; border-top: 1px solid var(--border); }
.facts dt { font-size: var(--fs-1); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.facts .is-key { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); line-height: 1.2; letter-spacing: -.02em; color: var(--dark); }
.src { margin-top: 12px; font-size: var(--fs-3); color: var(--muted); }
.note-box { margin-top: 16px; padding: 14px 16px; background: var(--secondary-light); border-left: 3px solid var(--dark); font-size: var(--fs-3); color: var(--dark); }
.table-wrap { margin-top: 20px; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--fs-3); }
.data-table caption { margin-bottom: 8px; text-align: left; font-weight: 700; color: var(--dark); }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table thead th { background: var(--dark); color: var(--white); font-size: var(--fs-1); letter-spacing: .05em; text-transform: uppercase; }

/* ---------- More ways ---------- */
.ways--solo { padding-bottom: 60px; }
.way-try { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 10px 0 8px; font-size: var(--fs-3); font-weight: 700; color: var(--dark); border-bottom: 2px solid var(--primary); }
.way-try svg { width: 16px; height: 16px; transition: transform .15s; }
.way-try:hover svg { transform: translateX(4px); }
.ladder-grid { display: grid; gap: 32px; }
.field-hint { margin-top: 6px; font-size: var(--fs-3); color: var(--muted); }
.rungs { display: grid; gap: 6px; }
.rung { display: grid; gap: 2px; padding: 12px 16px; background: var(--secondary-light); color: var(--dark); border-left: 4px solid transparent; }
.rung[aria-current="true"] { background: var(--dark); color: var(--white); border-left-color: var(--primary); }
.rung-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rung-top b { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-4); letter-spacing: -.02em; }
.rung-you { background: var(--primary); }
.rung-text { font-size: var(--fs-3); }
.ladder-result { margin-top: 16px; padding: 16px; background: var(--secondary-light); border-left: 4px solid var(--dark); color: var(--dark); }
.ladder-result p + p { margin-top: 6px; }

/* ---------- Get involved ---------- */
.part-grid { display: grid; gap: 20px; }
.part { display: flex; flex-direction: column; gap: 12px; padding: 24px 20px; background: var(--white); border-top: 4px solid var(--dark); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); }
.part h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6); line-height: 1.15; letter-spacing: -.025em; color: var(--dark); text-wrap: balance; }
.part .meta { margin-bottom: 8px; }
.part .btn { align-self: flex-start; margin-top: auto; }
.involve--page { padding-block: 56px 60px; }
.involve--page .join { margin-top: 0; }

/* ---------- Monitor's round (sample screen) ---------- */
.visits { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.visit { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 20px; background: var(--white); color: var(--body); border-left: 4px solid var(--dark); box-shadow: 0 10px 15px -3px rgba(0,0,0,.12); }
.visit-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.visit h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6); line-height: 1.15; letter-spacing: -.025em; color: var(--dark); }
.visit-kind, .visit-last { margin-top: 4px; font-size: var(--fs-2); color: var(--muted); }
.visit-why, .visit-last { margin-top: 10px; }
.todo { margin-top: 10px; padding-left: 1.2em; list-style: disc; }
.todo li + li { margin-top: 4px; }
.visit .btn-group { margin-top: 12px; }
.kit { max-width: 40rem; }
.choice { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.choice legend { margin-bottom: 6px; padding: 0; font-size: var(--fs-3); font-weight: 700; color: var(--dark); }
.kit-result { margin-bottom: 32px; padding: 20px; background: var(--secondary-light); border-left: 4px solid var(--dark); color: var(--dark); scroll-margin-top: 16px; }
.kit-result h3 { margin-bottom: 12px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); line-height: 1.2; letter-spacing: -.02em; }
.kit-result .tag { margin-right: 8px; }
.kit-saved { margin-top: 16px; font-size: var(--fs-2); color: var(--muted); }
.visit p, .todo li, .kit-result p, .kit-saved { max-width: var(--measure); }
@media (min-width: 64em) and (min-width: 1024px) {
  .visits { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- The sensor unit (hardware concept) ---------- */
.mock { display: grid; gap: 24px; align-items: start; margin-bottom: 40px; }
.mock-art { padding: 16px; background: var(--secondary-light); border-left: 4px solid var(--dark); }
.mock-svg { display: block; width: min(100%, 26rem); height: auto; margin-inline: auto; }
.mock-h { margin-bottom: 12px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6); line-height: 1.15; letter-spacing: -.025em; color: var(--dark); }
.parts { display: grid; gap: 10px; margin: 0; padding-left: 1.6em; list-style: decimal; }
.parts li { max-width: var(--measure); padding-left: 4px; }
.parts li::marker { font-weight: 700; color: var(--dark); }
.known-src { font-size: var(--fs-2); }
.known-src a { text-decoration: underline; }
#reads .info-grid { margin-bottom: 8px; }
/* Drawing colours. Every fill and stroke comes from the colour tokens. */
.d-case { fill: var(--dark); }
.d-black { fill: var(--black); }
.d-white { fill: var(--white); }
.d-post { fill: var(--border); }
.d-safe { fill: var(--primary); }
.d-amber { fill: var(--amber); }
.d-red { fill: var(--red); }
.d-water { fill: var(--secondary); }
.d-edge { stroke: var(--dark); stroke-width: 2; }
.d-mark { fill: none; stroke: var(--black); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.d-grid { fill: none; stroke: var(--secondary); stroke-width: 1.5; }
.d-door { fill: none; stroke: var(--secondary); stroke-width: 2; }
.d-lock { fill: var(--secondary); }
.d-text { fill: none; stroke: var(--dark); stroke-width: 3; stroke-linecap: round; }
.d-pipe { fill: none; stroke: var(--secondary); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.d-addon { fill: var(--white); stroke: var(--dark); stroke-width: 2; stroke-dasharray: 6 4; }
.d-arrow { fill: none; stroke: var(--dark); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.d-drop { fill: var(--secondary); }
.d-lead { fill: none; stroke: var(--dark); stroke-width: 1.5; }
.d-wall { fill: var(--white); stroke: var(--black); stroke-width: 14; }
.d-beam { fill: var(--amber); opacity: .6; }
.d-ray { fill: none; stroke: var(--dark); stroke-width: 1.5; stroke-dasharray: 4 4; }
.d-speck { fill: var(--dark); }
.d-faint { opacity: .35; }
.d-probe { fill: none; stroke: var(--dark); stroke-width: 6; stroke-linecap: round; }
.d-note { font-family: var(--font-body); font-weight: 700; fill: var(--dark); }
.d-pin circle { fill: var(--primary); stroke: var(--dark); stroke-width: 2; }
.d-pin text { font-family: var(--font-display); font-weight: 800; fill: var(--dark); text-anchor: middle; }
@media (min-width: 64em) and (min-width: 1024px) {
  .mock { grid-template-columns: minmax(0, 28rem) 1fr; gap: 48px; }
}

/* ---------- Previous and next page ---------- */
.page-next { position: relative; background: var(--primary); padding-block: 40px 130px; }
.page-next-inner { display: grid; gap: 12px; }
.page-next-link { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--dark); color: var(--white); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-5); line-height: 1.2; letter-spacing: -.02em; transition: background-color .15s; }
.page-next-link:hover { background: var(--black); }
.page-next-link svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--primary); }
.page-next-link small { display: block; font-family: var(--font-body); font-size: var(--fs-1); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.page-next-link.is-next { justify-content: flex-end; text-align: right; }

.band :focus-visible, .page-next :focus-visible { outline-color: var(--dark); box-shadow: 0 0 0 6px var(--white); }
.band--dark :focus-visible { outline-color: var(--white); box-shadow: 0 0 0 6px var(--dark); }

@media (min-width: 40em) and (min-width: 640px) {
  .cards-4, .jump-grid { grid-template-columns: repeat(2, 1fr); }
  .icon-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 20px; text-align: center; }
  .icon-card .how { margin-top: auto; }
  .info-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .page-next-inner { grid-template-columns: 1fr 1fr; }
  .meta:not(.meta--plain) { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 48em) and (min-width: 768px) {
  .info-grid--2, .part-grid { grid-template-columns: repeat(2, 1fr); }
  .sms-grid { grid-template-columns: repeat(3, 1fr); }
  .check { grid-template-columns: 1fr auto; align-items: center; }
  .facts > div { grid-template-columns: 220px 1fr; gap: 24px; }
  .measure-detail { padding: 32px; }
}
@media (min-width: 64em) and (min-width: 1024px) {
  .page-hero { padding-top: max(12.5rem, 200px); }
  .page-hero-inner { padding-block: 16px 150px; }
  .page-lede { font-size: var(--fs-5); }
  .band { padding-block: 80px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .step { padding: 32px 28px; }
  .cards-4, .jump-grid { grid-template-columns: repeat(4, 1fr); }
  .info-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .ladder-grid { grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
  .ways--solo { padding-bottom: 80px; }
  .involve--page { padding-block: 80px; }
}
@media (min-width: 64em) and (min-width: 1024px) {
  .site-nav a[aria-current="page"] { background: none; color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
}
@media (min-width: 80em) and (min-width: 1280px) {
  .part-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Skip link, new-tab mark, line length
   ========================================================================== */
.skip-link {
  position: absolute; top: 8px; left: 12px; z-index: 300; padding: 12px 16px;
  background: var(--white); color: var(--dark); font-weight: 700; transform: translateY(-300%);
}
.skip-link:focus { transform: none; }
/* The skip link moves focus to the main content. It is not a control, so it shows no ring. */
#main-content:focus, #main-content:focus-visible { outline: none; box-shadow: none; }

/* The small arrow on links that open a new tab. */
.ext-icon { display: inline-block; flex-shrink: 0; width: .7em; height: .7em; margin-left: .3em; }

/* While the phone menu is open the page behind it is dimmed, so nothing underneath is half covered.
   A tap on the dimmed area closes the menu. The menu button stays above it. */
.nav-scrim { position: fixed; inset: 0; z-index: 150; background: rgba(5,26,26,.6); }
.menu-toggle { position: relative; z-index: 201; }
@media (min-width: 64em) and (min-width: 1024px) { .nav-scrim { display: none; } }

/* Both header buttons fit beside the page links from 72em (1152px at the default text size). */
@media (min-width: 72em) and (min-width: 1152px) {
  .header-actions .btn--secondary { display: inline-flex; }
}

/* ==========================================================================
   Header that stays on screen
   Once the header has scrolled away, app.js adds "is-stuck" and it comes back as a slim bar fixed to the top.
   Without the script the header simply scrolls with the page.
   ========================================================================== */
.site-header.is-stuck { position: fixed; background: var(--dark); border-bottom: 1px solid rgba(255,255,255,.18); animation: header-in .15s ease-out; }
.site-header.is-stuck .topbar { display: none; }
.site-header.is-stuck .header-main { padding-block: 8px; }
/* On a short screen the open menu scrolls inside itself, because the bar it hangs from no longer moves. */
.site-header.is-stuck .site-nav.is-open { max-height: calc(100vh - var(--bar-h, 60px) - 8px); max-height: calc(100dvh - var(--bar-h, 60px) - 8px); overflow-y: auto; }
@keyframes header-in { from { opacity: 0; } }
/* Jumps to a part of the page, and keyboard focus, stop below the bar instead of under it. app.js sets --bar-h. */
html.js { scroll-padding-top: calc(var(--bar-h, max(60px, 2rem + 32px)) + 4px); }
@media (prefers-reduced-motion: reduce) { .site-header.is-stuck { animation: none; } }

/* Running text stops at about 75 characters a line. */
.lede, .split-text p, .band-outro, .facts dd, .meta dd, .info-card p, .step p, .way p, .examples p, .src, .note-box,
.detail-reason, .detail-fix, .advice p, .check-q span:last-child, .check-fix, .rung-text, .field-hint, .ladder-result p { max-width: var(--measure); }
.measure-source, .callout p { max-width: var(--measure); margin-inline: auto; }

/* With a mouse, footer links do not need a touch-sized row. */
@media (min-width: 64em) and (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .footer-cols li a { min-height: 32px; }
}

/* ==========================================================================
   Without the script (JavaScript off, or app.js did not load)
   layout.tsx puts class "js" on <html> and takes it off again if app.js fails to load.
   ========================================================================== */
html.js .nojs-only, html:not(.js) .js-only { display: none !important; }
/* Water points, quotes and checklist advice: show everything instead of one at a time. */
html:not(.js) .detail [data-panel][hidden], html:not(.js) .quote[hidden], html:not(.js) .check-fix[hidden] { display: block !important; }
html:not(.js) .explorer, html:not(.js) .ladder-grid { display: block; }
html:not(.js) .detail article + article { margin-top: 32px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.18); }
/* Menu: below the width where it sits in the header row, list the links under the logo. */
@media (max-width: 63.99em), (max-width: 1023.98px) {
  html:not(.js) .site-header { position: static; background: var(--dark); }
  html:not(.js) .header-main { grid-template-columns: 1fr; }
  html:not(.js) .site-nav { display: block; position: static; width: auto; background: none; color: inherit; box-shadow: none; }
  html:not(.js) .site-nav ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
  html:not(.js) .site-nav a { padding: 12px 0; border: 0; }
  html:not(.js) .site-nav a:hover { background: none; text-decoration: underline; }
  html:not(.js) .site-nav a[aria-current="page"] { background: none; box-shadow: inset 0 -2px 0 var(--primary); }
  html:not(.js) .hero, html:not(.js) .page-hero { padding-top: 0; }
}

/* ==========================================================================
   Print
   Paper has no buttons, menus or dark backgrounds. Everything that is shown one at a time on screen
   (water points, quotes, checklist advice) is printed in full, in black on white, and links to other
   sites are followed by their address.
   ========================================================================== */
.print-only { display: none; }
@media print {
  @page { margin: 14mm 12mm; }
  html { font-size: 11pt; }
  *, *::before, *::after {
    color: var(--black) !important; background: none !important; box-shadow: none !important; text-shadow: none !important;
    border-color: var(--muted) !important; animation: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  body { overflow: visible; }
  .print-only { display: block; }

  /* Things that only work on a screen. */
  .skip-link, .topbar-source, .menu-toggle, .site-nav, .header-actions, .nav-scrim, .torn-wrap, .hero-media, .page-hero-media,
  .callout, .split-media, .cover img, .cover-icon, .crumbs, .btn, .btn-group, .section-more, .chips, .point-list, .yn, .check-foot,
  .quote-controls, .quote-mark, .way-try, .join, .involve--page, #ladder-form, .ladder-result, .rung-you, .page-next,
  .site-footer nav, .footer-top, .ext-icon, a[target="_blank"] .sr-only, #rate-supply .nojs-only, .kit-form { display: none !important; }

  /* Header: once, at the top of the first sheet, not fixed to every sheet. */
  .site-header, .site-header.is-stuck { position: static !important; margin-bottom: 12pt; border: 0 !important; border-bottom: 1pt solid var(--muted) !important; }
  .site-header .topbar, .site-header.is-stuck .topbar { display: block !important; padding: 0 0 4pt; }
  .header-main, .site-header.is-stuck .header-main { display: block; padding: 0 0 8pt; }
  .container { max-width: none; padding-inline: 0 !important; }

  /* Less empty space between sections. */
  .hero, .page-hero { padding-top: 0 !important; overflow: visible; }
  .hero-inner, .page-hero-inner { padding-block: 0 10pt !important; }
  .hero h1, .page-hero h1 { font-size: 22pt; line-height: 1.1; }
  .hero-features { margin-top: 12pt; gap: 6pt; }
  .hero-feature { padding: 8pt; }
  .intro-section, .points-section, .measure, .ways, .ways--solo, .involve, .band, .site-footer { padding-block: 10pt !important; }
  .quotes { margin-top: 10pt; padding-bottom: 0; text-align: left; }
  .quote { padding: 8pt 0 0 !important; }
  .quote-text { margin-inline: 0; font-size: var(--fs-3); }
  .split { display: block; margin-top: 12pt; }
  .split-text { max-width: none; padding-top: 0 !important; }
  .heading { font-size: 16pt !important; margin-bottom: 8pt !important; }
  .stat-num { font-size: 16pt !important; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 8pt; }
  .way-list, .steps, .info-grid, .part-grid, .sms-grid, .cover-grid, .jump-grid { grid-template-columns: 1fr 1fr !important; gap: 8pt !important; }
  .way-grid { display: block; }
  .way { height: auto; margin-bottom: 8pt; padding: 8pt 10pt; gap: 6pt; }
  .way p, .way-evidence p { max-width: none; }
  .footer-cols { display: block; padding-bottom: 0; }
  .site-footer { border-top: 1pt solid var(--muted) !important; }
  .table-wrap { overflow: visible; }
  .cover { display: block; min-height: 0 !important; padding: 8pt; }
  .cover-body { padding: 0; }
  .cover h3 { font-size: var(--fs-5); }

  /* Print what the screen shows one at a time: every water point, both quotes, all checklist advice. */
  html .detail [data-panel][hidden], html .quote[hidden], html .check-fix[hidden] { display: block !important; }
  html .explorer, html .ladder-grid { display: block; }
  .detail { padding: 0 !important; }
  .detail article { padding-block: 8pt; border-top: 1pt solid var(--muted); }
  .detail h3 { font-size: 14pt !important; }
  .detail-reason { margin-top: 6pt; font-size: var(--fs-3); }
  .readings { margin-block: 8pt; }
  .reading { padding-block: 5pt; }
  .advice { padding: 6pt 8pt; }
  .detail-fix, .detail-foot { margin-top: 6pt; }
  html.js .check-fix .js-only { display: none !important; }
  html.js .check-fix .nojs-only { display: inline !important; }

  /* Outlines stand in for the coloured backgrounds. */
  .hero-feature, .icon-card, .way, .way-mini, .step, .info-card, .check, .check-fix, .measure-detail, .part, .rung, .treat-step,
  .sms-bubble, .jump-card, .advice, .warn-box, .note-box, .examples, .way-evidence, .cover, .tag, .num-badge, .join-note, .visit, .kit-result, .mock-art { border: 1pt solid var(--muted) !important; }

  /* Links to other sites carry their address. */
  a { min-width: 0 !important; min-height: 0 !important; }
  .footer-cols li a, .way-evidence a, .quote-source a { display: inline !important; }
  a[target="_blank"]::after { content: " (" attr(href) ")"; font-size: .85em; font-weight: 400; word-break: break-all; }

  /* Keep headings with their text and do not split small blocks across sheets.
     A paragraph that runs over a sheet edge takes at least three lines with it, so no line is left on its own. */
  p, li, dd { orphans: 3; widows: 3; }
  .band-intro, .ways-lede, .measure-lede, .tool-text, .tool-note, .lede, .page-lede, .hero-lede, .band-outro { break-inside: avoid; }
  h1, h2, h3, h4, .eyebrow, .subheading, .measure-head, .way-label, .band-intro, .ways-lede, .measure-lede, .section-head, .detail-top, .detail-kind { break-after: avoid; }
  .stat, .hero-feature, .icon-card, .way, .way-mini, .step, .info-card, .check, .part, .rung, .treat-step, .sms, .jump-card, .reading,
  .advice, .pillar, .cover, .quote, .facts > div, .warn-box, .note-box, .detail-fix, .visit, .kit-result, .mock-art, .parts li, tr { break-inside: avoid; }
}
