/* =============================================================================
   Pend Oreille Public Utility District — theme.css
   The complete design system. World: New-Deal public-power engineering —
   turbine-bronze copper against granite slate and cool hydro mist, with penstock
   hydro-blue and conifer as reserved land/water semantics. Every class name
   here is a contract interior pages depend on; do not rename without checking
   who else uses it (see DESIGN-DNA.md + PAGE-AUTHORING conventions).

   Non-obvious decision: the copper ramp below is authored in OKLCH TERMS
   (one hue near 27-30°, chroma tapering at both ends so the extremes stay
   in-gamut) but SHIPPED as verified hex, matching arlington-vt's own shipped
   technique — every step that carries TEXT (accent-600/700 on paper,
   accent-300 on granite) is hand-checked against the WCAG contrast formula
   below rather than trusted to render exactly as hand-typed oklch() math
   would predict. See the accent-ramp comment for the exact ratios.
   ========================================================================== */

/* ---- Tokens ---------------------------------------------------------- */
:root {
  /* Signature accent: turbine-bronze copper. Unique across the Stoa fleet.
     Verified AA text-safe ratios (WCAG relative-luminance formula):
       --accent-600 (#874326) on --paper  : 7.0:1
       --accent-700 (#6e361e) on --paper  : 9.1:1
       --accent-300 (#e0a878) on --granite: 4.6:1
     Every other ramp step is fill/border/decoration only — never body text. */
  --accent: #874326;
  --accent-50: #fbf0e8;
  --accent-100: #f6e2d2;
  --accent-200: #edc7a8;
  --accent-300: #e0a878;
  --accent-400: #c67d4e;
  --accent-500: #a85b34;
  --accent-600: #874326; /* == --accent */
  --accent-700: #6e361e;
  --accent-800: #542818;
  --accent-900: #391b10;

  /* Neutrals: Selkirk granite + cool, river-mist canvases. */
  --ink: #191b1e;
  --paper: #f7fafc;
  --paper-2: #e9f0f4;
  --granite: #3b4650;
  --granite-ink: #14181b;
  --line: #d9e2e8;
  --line-2: #b7c4cd;

  /* Reserved semantics: water/river, and land/stewardship. Both AA-verified
     as text on --paper (hydro 6.5:1, conifer 7.6:1). */
  --hydro: #17627f;
  --conifer: #2e5a3e;

  /* Status amber — RESERVED for alert/outage status. Never reused as the
     identity accent, and never red anywhere in this theme. --amber-status
     itself is a border/icon/badge color only (3:1+ verified against paper
     and against --amber-status-bg); body text on an amber field uses the
     separate --amber-status-ink (8.8:1 on --amber-status-bg). */
  --amber-status: #b7791f;
  --amber-status-bg: #fbeed2;
  --amber-status-ink: #5c3b0a;

  /* Three-register type system (self-hosted, see fonts.css). */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Geist", system-ui, sans-serif;
  --font-mono: "Sometype Mono", ui-monospace, monospace;

  /* Fluid type scale, 320px -> 1280px. */
  --step--1: clamp(0.85rem, 0.81rem + 0.16vw, 0.95rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.64vw, 2rem);
  --step-3: clamp(1.73rem, 1.5rem + 1.05vw, 2.7rem);
  --step-4: clamp(2.07rem, 1.7rem + 1.7vw, 3.6rem);
  --step-5: clamp(2.5rem, 1.95rem + 2.5vw, 4.6rem);

  --wrap: 76rem;
  --wrap-narrow: 42rem;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.08), 0 6px 20px rgba(20, 20, 18, 0.08);
  --shadow-lg: 0 4px 10px rgba(20, 20, 18, 0.1), 0 20px 44px rgba(20, 24, 27, 0.2);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --focus: var(--hydro);

  /* The stage-gauge motif: ONE tick unit. Every tick-based rule below is a
     calc() of this single value (decc's --stub-notch discipline) so the
     whole system scales from one dial. Roles: .gauge-rule divider,
     ul.gauge-list markers, .gauge-empty/.search-empty dial, hover ticks on
     .task-tile/.service-card, and the traveling mark on .flow-scroller. */
  --gauge-tick: 8px;
}

/* ---- Reset / base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.62;
  font-weight: 400; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 700; font-stretch: 92%;
  line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1rem; max-width: 64ch; }
main p, main li, figure figcaption { text-wrap: pretty; }
a { color: var(--accent-700); text-decoration-thickness: 0.06em; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-800); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.15em; }
strong, b { font-weight: 700; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.band--granite :focus-visible { outline-color: var(--accent-300); } /* hydro fails 3:1 on granite */

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.visually-hidden, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--granite-ink); color: #fff; padding: 0.75rem 1.15rem;
  font-weight: 700; text-decoration: none; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---- Type utilities ---------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-700);
}
.band--granite .eyebrow { color: var(--accent-300); }
.lead { font-size: var(--step-1); color: var(--granite); max-width: 58ch; }
.band--granite .lead { color: #e7e2d6; }
.fine { font-size: var(--step--1); color: var(--granite); }
.band--granite .fine { color: #cfc9ba; }
.ledger {
  font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: -0.01em;
  color: var(--granite);
}
.band--granite .ledger { color: var(--accent-200); }
.voice {
  font-family: var(--font-display); font-weight: 500; font-size: var(--step-2);
  line-height: 1.35; max-width: 40ch; margin: 0; padding-left: 1.5rem;
  border-left: 3px solid var(--accent-400); color: inherit;
}

/* ---- Layout: bands ------------------------------------------------------ */
.band { padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); }
.band--paper2 { background: var(--paper-2); }
.band--granite { background: var(--granite); color: var(--paper); }
.band--granite h2, .band--granite h3, .band--granite h4 { color: #fff; }
.band--granite p { color: #e7e2d6; }
.band--granite a { color: var(--accent-300); }
.band--granite a:hover { color: #fff; }

/* ---- Gauge motif: role 1, section-divider rule ------------------------- */
.gauge-rule {
  border: 0; height: calc(var(--gauge-tick) * 3); margin: clamp(2.25rem, 4vw, 3.75rem) 0;
  background:
    linear-gradient(var(--line-2), var(--line-2)) center / 100% 1px no-repeat,
    repeating-linear-gradient(to right, var(--accent-500) 0 2px, transparent 2px calc(var(--gauge-tick) * 4))
      center / 100% calc(var(--gauge-tick) * 1.6) no-repeat;
}
.gauge-rule--short { width: min(100%, 16rem); margin-inline: auto; }
.band--granite .gauge-rule {
  background:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) center / 100% 1px no-repeat,
    repeating-linear-gradient(to right, var(--accent-300) 0 2px, transparent 2px calc(var(--gauge-tick) * 4))
      center / 100% calc(var(--gauge-tick) * 1.6) no-repeat;
}

/* ---- Gauge motif: role 2, list markers --------------------------------- */
ul.gauge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: calc(var(--gauge-tick) * 1.5); }
ul.gauge-list > li { position: relative; padding-left: calc(var(--gauge-tick) * 4.5); }
ul.gauge-list > li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: calc(var(--gauge-tick) * 2.5); height: 2px; background: var(--accent-600);
}
ul.gauge-list > li::after {
  content: ""; position: absolute; left: calc(var(--gauge-tick) * 2.5 - 1px);
  top: calc(0.55em - var(--gauge-tick) * 0.6); width: 1px; height: calc(var(--gauge-tick) * 1.8);
  background: var(--accent-600);
}
.band--granite ul.gauge-list > li::before, .band--granite ul.gauge-list > li::after { background: var(--accent-300); }

/* ---- Gauge motif: role 3, empty-state / 404 dial ----------------------- */
.gauge-dial {
  width: 4.5rem; height: 4.5rem; margin: 0 auto 1.1rem; position: relative;
  border-radius: 50%; border: 3px solid var(--line-2);
}
.gauge-dial::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 32%;
  background: var(--granite); transform-origin: bottom center; transform: translate(-50%, -100%);
}
.gauge-dial::after {
  content: ""; position: absolute; left: calc(50% - var(--gauge-tick) / 2);
  top: calc(50% - var(--gauge-tick) / 2); width: var(--gauge-tick); height: var(--gauge-tick);
  border-radius: 50%; background: var(--granite);
}
.gauge-empty, .search-empty { text-align: center; padding: 2.75rem 1.25rem; color: var(--granite); }
.gauge-empty h2, .search-empty p:first-of-type { margin-top: 0; }
.gauge-empty p, .search-empty p { max-width: 40ch; margin-inline: auto; }

/* ---- Buttons / chips / fields ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  padding: 0.65rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  font-family: var(--font-body); transition: none;
}
.btn-primary { background: var(--accent-600); color: #fff; }
.btn-primary:hover { background: var(--accent-700); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent-700); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent-600); background: var(--accent-50); }
.band--granite .btn-ghost { color: var(--accent-300); border-color: rgba(255, 255, 255, 0.35); }
.band--granite .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--accent-300); }

.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1rem;
  border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff;
  font-size: 0.9rem; cursor: pointer; font-family: var(--font-body); color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--granite); border-color: var(--granite); color: #fff; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 0.65rem 0.85rem; border: 1.5px solid var(--line-2);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 1rem;
  background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-100);
}
.field-help { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--granite); }
.field-error { margin: 0.35rem 0 0; font-size: var(--step--1); color: var(--amber-status-ink); font-weight: 700; }
.field-error::before { content: "\26A0 "; } /* warning triangle, amber register — never red */

/* ---- Photos: figure.photo (duotone scrim, guaranteed-AA overlay text) -- */
figure.photo { margin: 0; }
figure.photo .photo-frame {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--granite-ink);
}
figure.photo .photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
figure.photo figcaption {
  margin-top: 0.6rem; font-size: var(--step--1); color: var(--granite); font-family: var(--font-mono);
}
/* Valley duotone: the "from the river to your meter" journey photos carry a copper-and-
   granite tint, unifying the sequence and setting it apart from the plain service
   portraits — the photo system's second, deliberate treatment. */
.flow-photo .photo-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(155deg, rgba(135, 67, 38, 0.4), rgba(59, 70, 80, 0.32) 70%);
  mix-blend-mode: multiply;
}
/* Overlay variant: caption/label text sits ON the photo. The scrim
   guarantees AA contrast regardless of what the photo contains underneath
   (tontitown mechanism) — never a white box over a photo. */
figure.photo--overlay .photo-frame { position: relative; }
figure.photo--overlay .photo-frame::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(175deg, rgba(20, 24, 27, 0.05) 0%, rgba(20, 24, 27, 0.22) 55%, rgba(15, 12, 10, 0.85) 100%);
}
figure.photo--overlay figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; margin: 0; color: #fff;
  padding: 0.9rem 1.05rem; font-family: var(--font-body);
}

/* =============================================================================
   Chrome
   ========================================================================== */

.proto-banner {
  background: var(--granite-ink); color: var(--paper); font-family: var(--font-mono);
  font-size: var(--step--1); text-align: center; padding: 0.5rem 1rem;
}
.proto-banner strong { color: #fff; }
.proto-banner a { color: #fff; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead {
  display: flex; align-items: center; gap: 1.25rem; padding-block: 0.85rem; flex-wrap: wrap;
}
.brand-lockup {
  display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink);
  view-transition-name: pud-lockup;
}
.brand-lockup img { display: block; flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--font-display); }
.brand-line-1 { font-weight: 700; font-size: var(--step-1); font-stretch: 92%; }
.brand-line-2 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--granite);
}

/* Omnibox: two independent instances share this vocabulary (see header.php).
   Desktop/mobile visibility is settled purely by viewport width below, not by
   the nav-disclosure open state, so exactly one is exposed to the a11y tree
   at any given width (TENM/psrkwaray precedent — avoids a duplicate
   unlabeled role="search" landmark). */
.omnibox { flex: 1 1 20rem; max-width: 34rem; position: relative; margin-inline: auto; }
.omnibox-field { display: flex; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; overflow: hidden; }
.omnibox-field input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0.7rem 1.1rem;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); min-height: 44px;
}
.omnibox-field input:focus { outline: none; }
/* The pill clips an outset ring (overflow:hidden), and the :focus-within ring
   lives on the parent, so the input itself needs its own detectable inset ring. */
.omnibox-field input:focus-visible { box-shadow: inset 0 0 0 2.5px var(--accent-600); }
.omnibox-field:focus-within { border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-100); }
.omnibox-field button {
  border: 0; background: var(--accent-600); color: #fff; padding: 0 1.15rem; font-weight: 700;
  cursor: pointer; min-height: 44px; min-width: 44px; font-family: var(--font-body);
}
.omnibox-field button:hover { background: var(--accent-700); }

.omni-suggestions {
  list-style: none; margin: 0; padding: 0; position: absolute; top: calc(100% + 0.4rem);
  left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 60; max-height: 22rem; overflow-y: auto;
}
.omni-suggestions:empty { display: none; border: 0; box-shadow: none; }
.omni-group-label {
  font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--granite); padding: 0.55rem 0.9rem 0;
}
.omni-option {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.65rem 0.9rem; cursor: pointer;
  min-height: 44px; justify-content: center;
}
.omni-option:hover, .omni-option[aria-selected="true"] { background: var(--accent-50); }
.omni-option-title { font-weight: 600; color: var(--ink); }
.omni-option-meta { font-size: var(--step--1); color: var(--granite); font-family: var(--font-mono); }
.omni-option.omni-ask { background: var(--accent-100); }
.omni-option.omni-ask:hover, .omni-option.omni-ask[aria-selected="true"] { background: var(--accent-200); }
.omni-option.omni-ask .omni-option-title { color: var(--accent-800); }
.omni-empty { padding: 0.8rem 0.9rem; color: var(--granite); font-size: var(--step--1); }

/* Nav disclosure: native <details>/<summary>, open by default so every
   destination is reachable with zero JS (never a JS-only .open class). */
.nav-disclosure { display: contents; }
.nav-disclosure > summary { list-style: none; cursor: pointer; }
.nav-disclosure > summary::marker { content: ""; }
.nav-disclosure > summary::-webkit-details-marker { display: none; }
.menu-btn {
  display: none; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  padding: 0.5rem 1.1rem; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff;
  font-weight: 700; font-family: var(--font-body);
}
.menu-btn:hover { border-color: var(--accent-600); }

.primary-nav { flex-basis: 100%; width: 100%; }
.primary-nav .nav-list {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.1rem; margin: 0;
  padding: 0.6rem 0 0; border-top: 1px solid var(--line);
}
.primary-nav a {
  display: block; padding: 0.6rem 0.85rem; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 0.94rem; border-bottom: 3px solid transparent;
}
.primary-nav a:hover { color: var(--accent-700); }
.primary-nav a[aria-current="page"] { color: var(--accent-700); border-bottom-color: var(--accent-600); }

@media (max-width: 61rem) {
  .menu-btn { display: inline-flex; }
  .nav-disclosure:not([open]) .primary-nav { display: none; }
  .primary-nav .nav-list { flex-direction: column; gap: 0; }
  .primary-nav a { border-bottom: 1px solid var(--line); padding: 0.85rem 0.2rem; }
  .primary-nav a[aria-current="page"] { border-left: 4px solid var(--accent-600); padding-left: 0.6rem; border-bottom-color: var(--line); }
  .omnibox--desktop { display: none; }
  .primary-nav .omnibox { margin: 0.9rem 0 0.4rem; max-width: none; }
}
@media (min-width: 61.01rem) {
  .omnibox--mobile { display: none; }
}

/* ---- Status / alert band ------------------------------------------------ */
.status-band { border-bottom: 1px solid var(--line); }
.alert { background: var(--amber-status-bg); border-bottom: 1px solid var(--amber-status); }
.alert[hidden] { display: none; }
.alert .wrap { display: flex; gap: 1rem; align-items: flex-start; padding-block: 0.85rem; flex-wrap: wrap; }
.alert-icon {
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; border: 2px solid var(--amber-status);
  position: relative; margin-top: 0.2rem;
}
.alert-icon::before {
  content: ""; position: absolute; left: 50%; top: 20%; width: 2px; height: 38%;
  background: var(--amber-status); transform: translateX(-50%);
}
.alert-icon::after {
  content: ""; position: absolute; left: 50%; bottom: 20%; width: 2px; height: 2px;
  background: var(--amber-status); transform: translateX(-50%);
}
.alert-copy { flex: 1 1 20rem; }
.alert-title { margin: 0 0 0.2rem; font-weight: 700; color: var(--amber-status-ink); font-family: var(--font-display); }
.alert-body { margin: 0; color: var(--amber-status-ink); font-size: var(--step--1); }
.alert-body a { color: var(--amber-status-ink); }
.alert-dismiss {
  flex: none; min-height: 44px; min-width: 44px; padding: 0.4rem 0.9rem; border: 1.5px solid var(--amber-status);
  border-radius: 999px; background: transparent; color: var(--amber-status-ink); font-weight: 700; cursor: pointer;
}
.alert-dismiss:hover { background: var(--amber-status); color: #fff; }

.system-status { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; padding-block: 0.6rem; font-size: var(--step--1); }
.system-pill { display: inline-flex; align-items: center; gap: 0.4rem; }
.system-name { font-family: var(--font-mono); color: var(--granite); }
.system-state { font-weight: 700; }
.system-state.is-normal { color: var(--conifer); }
.system-state.is-watch { color: var(--amber-status); }
.system-asof { margin-left: auto; color: var(--granite); }

/* =============================================================================
   Homepage components
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; background: var(--granite-ink); color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(175deg, rgba(20, 24, 27, 0.35) 0%, rgba(20, 24, 27, 0.58) 45%, rgba(15, 12, 10, 0.92) 100%);
}
/* A slow "current" glint, standing in for the optional Paper Shaders hook —
   pure CSS, no canvas/WebGL/runtime dependency, gated behind reduced-motion. */
.hero-current { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(3rem, 2rem + 6vw, 6.5rem); }
.hero h1 { color: #fff; max-width: 19ch; font-size: var(--step-5); }
.hero .lead { color: var(--paper); max-width: 48ch; }
.hero .eyebrow { color: var(--accent-300); }
.hero-status {
  margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center;
  background: rgba(10, 14, 16, 0.84); border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-lg); padding: 1rem 1.25rem; max-width: 52rem;
}
.hero-status .system-name { color: #f7f9fa; }
.hero-status .system-state.is-normal { color: #a9e8bf; }
.hero-status .system-asof {
  flex: 1 0 100%; margin: 0.25rem 0 0; padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22); color: #e2e8eb;
}

/* ---- Core task row -------------------------------------------------------- */
.task-board { display: grid; gap: clamp(1.25rem, 2vw, 1.75rem); }
.task-board-heading .eyebrow { margin-bottom: 0.25rem; }
.task-board-heading h2 { margin-bottom: 0; }
.task-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 0; }
@media (min-width: 42rem) { .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.task-tile {
  position: relative; display: flex; gap: 0.9rem; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-top: 3px solid var(--accent-600); border-radius: var(--radius-lg);
  padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); overflow: hidden;
}
.task-tile:hover { border-top-color: var(--accent-700); }
.task-tile::after { /* gauge-tick hover mark, role 4 */
  content: ""; position: absolute; top: -3px; left: 1.1rem; width: var(--gauge-tick); height: 3px;
  background: var(--accent-700); opacity: 0;
}
.task-tile:hover::after { opacity: 1; width: calc(var(--gauge-tick) * 3); }
.task-copy { display: flex; flex-direction: column; gap: 0.2rem; }
.task-tile h3 { margin: 0; font-size: var(--step-0); }
.task-tile p { margin: 0; color: var(--granite); font-size: var(--step--1); max-width: none; }

.task-icon { position: relative; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent-100); }
.task-icon::before, .task-icon::after { content: ""; position: absolute; }
.task-icon[data-icon="bill"]::before {
  left: calc(50% - 0.55rem); top: calc(50% - 0.7rem); width: 1.1rem; height: 1.4rem;
  border: 2px solid var(--accent-700); border-radius: 2px; background: transparent;
}
.task-icon[data-icon="bill"]::after {
  left: calc(50% - 0.3rem); top: calc(50% - 0.12rem); width: 0.6rem; height: 2px; background: var(--accent-700);
  box-shadow: 0 0.3rem 0 var(--accent-700);
}
.task-icon[data-icon="bolt"]::before {
  left: calc(50% - 0.45rem); top: calc(50% - 0.75rem); width: 0.9rem; height: 1.5rem; background: var(--accent-700);
  clip-path: polygon(60% 0, 8% 58%, 46% 58%, 34% 100%, 92% 40%, 54% 40%);
}
.task-icon[data-icon="service"]::before {
  left: calc(50% - 0.75rem); top: calc(50% - 0.5rem); width: 1rem; height: 1rem; border-radius: 50%;
  border: 2px solid var(--accent-700);
}
.task-icon[data-icon="service"]::after {
  left: calc(50% + 0.05rem); top: calc(50% - 0.5rem); width: 1rem; height: 1rem; border-radius: 50%;
  border: 2px solid var(--accent-700); background: var(--accent-100);
}
.task-icon[data-icon="gauge"]::before {
  left: calc(50% - 0.75rem); top: calc(50% - 0.75rem); width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: conic-gradient(var(--accent-700) 0deg 250deg, var(--accent-200) 250deg 360deg);
  mask: radial-gradient(circle, transparent 54%, black 56%);
  -webkit-mask: radial-gradient(circle, transparent 54%, black 56%);
}
.task-icon[data-icon="gauge"]::after {
  left: calc(50% - 1px); top: calc(50% - 0.5rem); width: 2px; height: 0.5rem; background: var(--granite-ink);
  transform-origin: bottom center; transform: rotate(35deg);
}

/* ---- "How do I...?" quick links ------------------------------------------ */
.howdoi-panel { padding-top: 1.5rem; border-top: 1px solid var(--line-2); }
.howdoi-title {
  margin: 0 0 0.65rem; font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-700);
}
.howdoi { display: grid; grid-template-columns: 1fr; gap: 0 1.5rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 42rem) { .howdoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.howdoi a {
  display: flex; align-items: center; gap: 0.7rem; min-height: 48px; padding: 0.65rem 0.2rem;
  border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  font-size: var(--step--1);
}
.howdoi a::before {
  content: ""; flex: 0 0 calc(var(--gauge-tick) * 2.5); height: 2px; background: var(--accent-600);
}
.howdoi a:hover { color: var(--accent-700); border-color: var(--accent-400); }

/* ---- Follow-your-power-home scroller (signature interaction) ------------- */
/* Fully static + complete with JS off, no motion support, or narrow viewport:
   the spine and every stop render unconditionally. The rise-in reveal and the
   traveling current mark are additive, gated behind BOTH reduced-motion and
   @supports, ported mechanism from psrkwaray's ray-line (named view-timeline
   + per-stop animation-timeline: view()). */
.flow-scroller { position: relative; margin-block: 1.5rem; padding-left: 2.75rem; }
.flow-scroller::before {
  content: ""; position: absolute; left: 1.15rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: var(--line-2);
}
.flow-stop { position: relative; padding-block: 1.5rem; display: grid; gap: 0.9rem; }
.flow-stop + .flow-stop { border-top: 1px dashed var(--line); }
.flow-stop::before { /* per-stop tick on the spine */
  content: ""; position: absolute; left: calc(-2.75rem + 1.15rem - var(--gauge-tick) / 2); top: 2rem;
  width: var(--gauge-tick); height: var(--gauge-tick); border-radius: 50%; background: var(--accent-600);
  border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line-2);
}
.flow-stop .eyebrow { color: var(--accent-700); }
.flow-stop h3 { margin: 0.2rem 0 0.5rem; }
.flow-stop p { margin: 0; }
.flow-photo { margin-top: 0.75rem; }
.flow-photo .photo-frame { aspect-ratio: 16 / 9; }
@media (min-width: 48rem) {
  .flow-stop { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 2rem; }
  .flow-photo { margin-top: 0; }
  .flow-photo .photo-frame { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .flow-stop { animation: gauge-rise 1ms ease both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
    /* Reveal by movement only, never opacity: axe reads below-the-fold stops at
       animation start, and a faded start state would fail AA contrast there. */
    @keyframes gauge-rise { from { transform: translateY(18px); } to { transform: none; } }
    .flow-scroller { view-timeline: --gauge-current block; }
    .flow-scroller::after { /* the traveling current, gauge motif's animated variant */
      content: ""; position: absolute; left: calc(1.15rem - var(--gauge-tick) / 2 + 1px); top: 0;
      width: var(--gauge-tick); height: var(--gauge-tick); border-radius: 50%; background: var(--hydro);
      box-shadow: 0 0 0 4px rgba(23, 98, 127, 0.22);
      animation: gauge-travel 1ms linear both; animation-timeline: --gauge-current; animation-range: cover 4% cover 96%;
    }
    @keyframes gauge-travel { from { top: 0; } to { top: calc(100% - var(--gauge-tick)); } }
  }
}

/* ---- Three service worlds ------------------------------------------------- */
.service-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; }
.service-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.service-card .photo-frame { aspect-ratio: 16 / 10; border-radius: 0; }
.service-card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.service-card h3 { margin: 0; }
.service-card .gauge-list { margin-top: 0.15rem; }
.service-card .btn { margin-top: auto; align-self: flex-start; }

/* ---- Public-power heritage (granite register) ---------------------------- */
.heritage-quote { margin: 1.5rem 0; }
.heritage-quote .ledger { display: block; margin-top: 0.6rem; }

/* ---- Notices / updates ---------------------------------------------------- */
.notice-row { display: flex; gap: 1rem; padding-block: 1rem; border-top: 1px solid var(--line); align-items: baseline; flex-wrap: wrap; }
.notice-row:first-child { border-top: 0; }
.notice-date { flex: none; width: 7.5rem; font-family: var(--font-mono); font-size: var(--step--1); color: var(--granite); }
.notice-body { flex: 1 1 18rem; }
.notice-body h3 { margin: 0 0 0.25rem; font-size: var(--step-0); }
.notice-body h3 a { color: var(--ink); text-decoration: none; }
.notice-body h3 a:hover { color: var(--accent-700); text-decoration: underline; }
.notice-body p { margin: 0; color: var(--granite); font-size: var(--step--1); }

/* ---- Next-step / contact band ---------------------------------------------- */
.next-step-band { background: var(--accent-600); color: #fff; }
.next-step-band h2 { color: #fff; }
.next-step-band .lead { color: var(--accent-50); }
.next-step-band a:not(.btn) { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.5); }
.next-step-band .btn-primary { background: #fff; color: var(--accent-700); }
.next-step-band .btn-primary:hover { background: var(--accent-50); }
/* .fine and .btn-ghost default to dark ink/copper, which vanish on the copper
   band, so both are lightened here (same light-on-copper family as .lead). */
.next-step-band .fine { color: var(--accent-50); }
.next-step-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.next-step-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.next-step-band .contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.next-step-band .contact-item b { display: block; font-family: var(--font-display); margin-bottom: 0.2rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.6rem, 3vw, 2.25rem); }
.contact-actions .btn { white-space: nowrap; }

/* =============================================================================
   Shared vocabulary for future interior pages (rates, documents, commission)
   ========================================================================== */

.rate-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.rate-card h3 { margin: 0 0 0.3rem; }
.rate-card .rate-figure { font-family: var(--font-mono); font-size: var(--step-2); color: var(--accent-700); font-weight: 700; }
.rate-card .rate-unit { font-size: var(--step--1); color: var(--granite); }
.rate-card .rate-effective { font-family: var(--font-mono); font-size: var(--step--1); color: var(--granite); margin-top: 0.5rem; }

.doc-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 0.75rem 1rem; align-items: center;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.doc-row + .doc-row { margin-top: 0.5rem; }
.doc-row .doc-title { font-weight: 600; }
.doc-row .doc-title a { color: var(--ink); text-decoration: none; }
.doc-row .doc-title a:hover { color: var(--accent-700); text-decoration: underline; }
.doc-row .doc-type {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--accent-100); color: var(--accent-800); white-space: nowrap;
}
.doc-row .doc-date { font-family: var(--font-mono); font-size: var(--step--1); color: var(--granite); white-space: nowrap; }
@media (max-width: 36rem) { .doc-row { grid-template-columns: 1fr; } }

.commissioner-card { display: flex; gap: 1rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem; }
.commissioner-card img { width: 5rem; height: auto; border-radius: var(--radius); flex: none; }
.commissioner-card h3 { margin: 0 0 0.15rem; font-size: var(--step-0); }
.commissioner-card .role { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-700); }
.commissioner-card .contact { margin-top: 0.4rem; font-size: var(--step--1); }

/* =============================================================================
   /search/ destination surface (page-search.php is a later page; these
   selectors match the exact contract search-page.js drives — see its header).
   ========================================================================== */
.search-page-form { display: flex; gap: 0.6rem; max-width: 38rem; margin: 0 0 1.75rem; }
#search-q {
  flex: 1; min-height: 44px; padding: 0.7rem 1rem; border: 1.5px solid var(--line-2);
  border-radius: 999px; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
}
#search-q:focus { outline: none; border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-100); }
.search-page-form button {
  min-height: 44px; padding: 0 1.3rem; border-radius: 999px; border: 0; background: var(--accent-600);
  color: #fff; font-weight: 700; cursor: pointer;
}
.search-page-form button:hover { background: var(--accent-700); }

[data-answer-panel] { background: var(--accent-50); border: 1px solid var(--accent-200); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; margin-bottom: 2rem; }
[data-answer-hedge] { font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-700); margin: 0 0 0.5rem; }
[data-answer-hedge][hidden] { display: none; }
[data-answer-text] { font-size: var(--step-1); line-height: 1.55; margin: 0 0 1rem; max-width: none; }
[data-answer-sources] { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
[data-answer-sources] a {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.8rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--ink); font-size: var(--step--1);
}
[data-answer-sources] a:hover { border-color: var(--accent-600); color: var(--accent-700); }

[data-search-results] .result-group-title {
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--granite); margin: 1.25rem 0 0.25rem;
}
[data-search-results] .result-list { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.1rem; }
[data-search-results] .result-list li { border-top: 1px solid var(--line); }
[data-search-results] .result-list li:first-child { border-top: 0; }
[data-search-results] .result-list a { display: block; padding: 0.9rem 0; text-decoration: none; color: var(--ink); }
[data-search-results] .result-list a:hover .result-title { color: var(--accent-700); text-decoration: underline; }
.result-title { display: block; font-weight: 700; font-family: var(--font-display); }
.result-title .result-type { display: inline-block; margin-left: 0.5rem; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; color: var(--granite); font-weight: 400; }
.result-body { margin: 0.2rem 0 0; color: var(--granite); font-size: var(--step--1); }
.search-empty { padding-block: 2.5rem 1rem; }

/* =============================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--granite-ink); color: var(--paper); padding-block: 3rem 1.75rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent-300); }
.site-footer .fine { color: #b9b3a2; } /* .fine's default (--granite) would be near-invisible on this dark bg */
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid > * { font-size: var(--step--1); color: #cfc9ba; }
.footer-heading { color: #fff; font-family: var(--font-mono); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.6rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-office { margin-bottom: 1.1rem; }
.footer-office b { display: block; color: #fff; }
.contact-lines { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.contact-lines .contact-label { display: inline-block; min-width: 8.5rem; color: #cfc9ba; font-size: var(--step--1); }
.footer-a11y { max-width: 34ch; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.15); margin-top: 2.25rem; padding-top: 1.2rem; font-size: 0.8rem; color: #cfc9ba; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 56rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { .footer-grid { grid-template-columns: 1fr; } }

/* =============================================================================
   Motion — reduced-motion is the default; every animation below opts in.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .task-tile, .service-card, .task-tile::after {
    transition: transform 0.16s var(--ease), box-shadow 0.16s, border-color 0.16s, opacity 0.16s, width 0.16s;
  }
  .task-tile:hover, .service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

  /* Bounded to 3 cycles (not infinite) so it settles and stops on its own —
     genuinely "bounded" motion, not an unbounded auto-updater WCAG 2.2.2
     would want a pause control for. */
  .hero-current {
    background: linear-gradient(100deg, transparent 30%, rgba(224, 168, 120, 0.16) 45%, transparent 60%);
    background-size: 220% 100%; animation: hero-current-flow 16s ease-in-out 3;
  }
  @keyframes hero-current-flow { 0% { background-position: 120% 0; } 50% { background-position: -20% 0; } 100% { background-position: 120% 0; } }

  @view-transition { navigation: auto; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---- Print --------------------------------------------------------------- */
@media print {
  .proto-banner, .site-header, .site-footer, .next-step-band, .alert-dismiss { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { background: #fff; color: #000; }
  .hero-bg, .hero::after, .hero-current { display: none; }
  .hero h1, .hero .lead { color: #000; }
  a { color: #000; text-decoration: underline; }
}
