/* Substituted Google Fonts — see readme.md "Type substitutions". Pure Way has no
   licensed font files on hand: Playfair Display stands in for the PURE WAY serif
   wordmark, Poppins for the geometric locality lockup, Lato for UI + body copy. */

html,body{margin:0;padding:0}
[data-ab] :focus-visible{outline:2px solid #0191cf;outline-offset:3px;border-radius:4px}
[data-ab] button{cursor:pointer}
[data-ab] input::placeholder,[data-ab] textarea::placeholder{color:#8FA5B0}
@media (max-width:640px){[data-formrow]{grid-template-columns:1fr!important}}
[data-ab] a{color:#01529c}
[data-ab] a:hover{color:#04305a}
[data-btn]{transition:transform .18s cubic-bezier(.2,.8,.3,1),box-shadow .18s ease,background .18s ease,border-color .18s ease}
[data-btn]:hover{transform:translateY(-2px)}
[data-btn]:active{transform:translateY(0)}
[data-btn="navy"]:hover{box-shadow:0 16px 30px -14px rgba(2,27,51,.8)}
[data-hdr]{transition:box-shadow .24s ease}
[data-hdr="stuck"]{box-shadow:0 10px 30px -18px rgba(2,27,51,.3)}
[data-mbar]{display:none}
@media (max-width:980px){[data-nav]{display:none!important}}
@media (max-width:600px){[data-tel]{display:none!important}}
@media (max-width:940px){[data-two]{grid-template-columns:1fr!important}[data-portrait]{max-width:420px}[data-bar2]{flex-direction:column!important;align-items:flex-start!important}}
@media (max-width:780px){[data-ftgrid]{grid-template-columns:1fr!important}}
@media (max-width:767px){[data-mbar]{display:grid!important}[data-ab]{padding-bottom:84px}}
@media (prefers-reduced-motion:reduce){[data-ab] *{animation:none!important;transition:none!important}}

/* interaction states, lifted from style-hover / style-focus */
.pw-hdbb4f5e:hover{color:#04305a}
.pw-h86071e0:hover{color:#01529c}
.pw-f0191564:focus{border-color:#0191cf;box-shadow:0 0 0 3px rgba(1,145,207,.15);outline:none}
.pw-hae64c6c:hover{color:#ffffff}
.pw-h4e59180:hover{color:#7ce6ff}

/* ---- mobile navigation ------------------------------------------------
   The design hides the nav below 980px and offers nothing in its place.
   This is the menu site-map-and-pages.md asks for, drawn with the design's
   own tokens: the hero gradient, the aqua accent, Poppins at display size. */

[data-pwnav-toggle]{display:none;position:relative;width:44px;height:44px;flex:none;
  align-items:center;justify-content:center;padding:0;margin:0 -6px 0 0;border:0;border-radius:13px;
  background:transparent;color:#04305a;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:background .25s ease}
[data-pwnav-toggle]:hover{background:rgba(4,48,90,.06)}
[data-pwnav-toggle]:focus-visible{outline:2px solid #01529c;outline-offset:2px}

[data-pwnav-bars]{position:relative;display:block;width:21px;height:15px}
[data-pwnav-bars] i{position:absolute;left:0;width:100%;height:2px;border-radius:2px;
  background:currentColor;
  transition:transform .42s cubic-bezier(.2,.8,.2,1),opacity .2s ease .06s,width .42s cubic-bezier(.2,.8,.2,1)}
[data-pwnav-bars] i:nth-child(1){top:0}
[data-pwnav-bars] i:nth-child(2){top:6.5px;width:15px}
[data-pwnav-bars] i:nth-child(3){top:13px;width:18px}
[aria-expanded="true"] [data-pwnav-bars] i:nth-child(1){transform:translateY(6.5px) rotate(45deg)}
[aria-expanded="true"] [data-pwnav-bars] i:nth-child(2){opacity:0;transform:translateX(-8px)}
[aria-expanded="true"] [data-pwnav-bars] i:nth-child(3){width:100%;transform:translateY(-6.5px) rotate(-45deg)}

[data-pwnav-panel]{position:fixed;inset:0;z-index:70;
  /* sits under the sticky header (z-80) so the logo and the X stay visible */
  visibility:hidden;pointer-events:none}
[data-pwnav-panel][data-open]{visibility:visible;pointer-events:auto}

[data-pwnav-sheet]{position:absolute;inset:0;padding:78px clamp(20px,5vw,44px) 0;
  display:flex;flex-direction:column;overflow-y:auto;-webkit-overflow-scrolling:touch;
  background:
    radial-gradient(70% 42% at 88% 6%,rgba(1,211,254,.20) 0%,rgba(1,211,254,0) 62%),
    radial-gradient(52% 30% at 6% 96%,rgba(1,211,254,.14) 0%,rgba(1,211,254,0) 70%),
    linear-gradient(168deg,#04305a 0%,#032647 46%,#021b33 100%);
  opacity:0;transform:translateY(-12px);
  transition:opacity .34s ease,transform .44s cubic-bezier(.2,.8,.2,1)}
[data-open] [data-pwnav-sheet]{opacity:1;transform:none}

[data-pwnav-links]{display:flex;flex-direction:column;margin-block:auto;
  padding:clamp(6px,2vh,20px) 0 8px}
[data-pwnav-links] a{position:relative;display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:clamp(15px,2.4vh,20px) 6px;text-decoration:none;color:#ffffff;
  font:500 clamp(23px,6.6vw,30px)/1.16 var(--head,'Poppins',system-ui,sans-serif);
  letter-spacing:-.018em;border-bottom:1px solid rgba(255,255,255,.10);
  opacity:0;transform:translateY(16px);
  transition:opacity .42s ease,transform .5s cubic-bezier(.2,.8,.2,1),color .22s ease;
  transition-delay:calc(var(--i) * 55ms + 90ms)}
[data-open] [data-pwnav-links] a{opacity:1;transform:none}
[data-pwnav-links] a:active [data-pwnav-label]{color:#01d3fe}
[data-pwnav-links] a:focus-visible{outline:2px solid #01d3fe;outline-offset:4px;border-radius:6px}

/* the page you are on, marked the way the rest of the site marks state */
[data-pwnav-links] a[aria-current="page"]{color:#01d3fe}
[data-pwnav-links] a[aria-current="page"]::before{content:"";position:absolute;left:-14px;top:50%;
  width:4px;height:26px;margin-top:-13px;border-radius:3px;background:#01d3fe;
  box-shadow:0 0 16px rgba(1,211,254,.6)}

[data-pwnav-arrow]{width:23px;height:23px;flex:none;color:rgba(1,211,254,.55);
  transition:transform .34s cubic-bezier(.2,.8,.2,1),color .22s ease}
[data-pwnav-links] a:active [data-pwnav-arrow]{transform:translateX(5px);color:#01d3fe}

[data-pwnav-foot]{padding:20px 0 max(24px,env(safe-area-inset-bottom));
  display:flex;flex-direction:column;gap:15px;
  opacity:0;transform:translateY(14px);
  transition:opacity .42s ease,transform .5s cubic-bezier(.2,.8,.2,1);transition-delay:.40s}
[data-open] [data-pwnav-foot]{opacity:1;transform:none}

/* The footer line already on every page, reused so the panel's lower half
   says something rather than sitting empty. Full width above the actions. */
[data-pwnav-foot] [data-pwnav-tagline]{margin:0 0 6px;font:600 clamp(22px,6vw,28px)/1.15 var(--head,'Poppins',system-ui,sans-serif);letter-spacing:-.02em;color:#ffffff}
[data-pwnav-foot] [data-pwnav-note]{margin:0;
  font:400 14.5px/1.55 var(--body,'Lato',system-ui,sans-serif);color:rgba(198,228,243,.58)}
[data-pwnav-foot] [data-pwnav-fn]{display:block;margin-top:6px;font-size:11.5px;line-height:1.45;opacity:.78}

/* Same shape as the design's own sticky bar: an auto-width Call beside a
   flexible Book, so the two read as one control rather than a stack. */
[data-pwnav-actions]{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:stretch}

[data-pwnav-foot] [data-pwnav-tel]{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:56px;padding:0 22px;border-radius:100px;white-space:nowrap;
  border:1.5px solid rgba(255,255,255,.28);background:rgba(255,255,255,.05);
  font:600 15px var(--head,'Poppins',system-ui,sans-serif);color:#ffffff;text-decoration:none;
  transition:background .2s ease,border-color .2s ease}
[data-pwnav-foot] [data-pwnav-tel] svg{flex:none;color:#01d3fe}
[data-pwnav-foot] [data-pwnav-tel]:active{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.42)}
[data-pwnav-foot] [data-pwnav-tel]:focus-visible{outline:2px solid #01d3fe;outline-offset:3px}

[data-pwnav-foot] [data-pwnav-cta]{display:flex;align-items:center;justify-content:center;min-height:56px;
  padding:0 16px;font:600 15px var(--head,'Poppins',system-ui,sans-serif);border-radius:100px;
  background:#01d3fe;color:#02223e;text-decoration:none;letter-spacing:-.005em;white-space:nowrap;
  box-shadow:0 16px 34px -18px rgba(1,211,254,.9);transition:transform .2s ease,filter .2s ease}
[data-pwnav-foot] [data-pwnav-cta]:active{transform:translateY(1px);filter:brightness(.96)}
[data-pwnav-foot] [data-pwnav-cta]:focus-visible{outline:2px solid #ffffff;outline-offset:3px}

/* Below 360 the row cannot hold "Call" and the full CTA label side by side, so
   Call becomes a 56px icon button. The tap target and the aria-label are
   unchanged; only the visible word goes. */
@media (max-width:359px){
  [data-pwnav-actions] [data-pwnav-tel]{padding:0;width:56px;gap:0}
  [data-pwnav-actions] [data-pwnav-calltext]{display:none}
}

/* The header is 92% white over a backdrop blur, so with the navy panel behind
   it the bar turned grey and the logo's white plate showed as a patch. While
   the menu is open it goes fully opaque and drops the blur. */
html[data-pwnav-lock] header[data-hdr]{background:#ffffff!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  box-shadow:none!important}

html[data-pwnav-lock],html[data-pwnav-lock] body{overflow:hidden}

@media (max-width:980px){
  [data-pwnav-toggle]{display:inline-flex}
}

/* Below 768 the design's own sticky bar carries Call and Book at all times, so
   the header's button stands down rather than being squeezed past the edge by
   the toggle. Above 768 the bar is gone and the header keeps its button. */
@media (max-width:767px){
  header [data-btn="navy"]{display:none!important}
}

/* The sticky bar is fixed at z-90 and would sit on top of the open menu. */
html[data-pwnav-lock] [data-mbar]{display:none!important}
@media (min-width:981px){
  [data-pwnav-panel]{display:none}
}
@media (prefers-reduced-motion:reduce){
  [data-pwnav-sheet],[data-pwnav-links] a,[data-pwnav-foot],
  [data-pwnav-bars] i,[data-pwnav-arrow]{transition:none!important}
}


/* ---- phone corrections (build/mobilefix.py) ---------------------------- */

/* The report lead gate. Every child is placed with grid-area, which sets a row
   AND a column: the two labels on row 1 in columns 1 and 2, the two inputs and
   the submit button on row 2 in columns 1, 2 and 3.

   The rule shipped on 18 September rewrote grid-column and left the row alone.
   Every child kept its original row, so in one column both labels drew on top
   of each other and both inputs drew on top of each other and of the button.
   The page rendered as "ENRASTL NAME" with a button covering two fields.

   Each element still measured inside the viewport, at full width, with text at
   a normal size, so the off-screen, field-width and collapsed-text checks all
   passed it. An overlap check was added to tools/verify_layout.py at the same
   time as this fix; it reports the broken build as 96 findings.

   Clearing the row as well as the column is not enough on its own: source
   order is label, label, input, input, button, so auto-placement would stack
   both labels above both fields. The rows are reassigned explicitly instead.
   Measured at 360px and 390px: five rows, nothing overlapping. */
@media (max-width:700px){
  [data-gate] form[data-pw-unlock]{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:none!important;
    align-items:stretch!important;
  }
  [data-gate] form[data-pw-unlock] > *{grid-area:auto!important}
  [data-gate] form[data-pw-unlock] > label[for="pw-gate-first"]{grid-area:1 / 1!important}
  [data-gate] form[data-pw-unlock] > #pw-gate-first{grid-area:2 / 1!important}
  [data-gate] form[data-pw-unlock] > label[for="pw-gate-email"]{grid-area:3 / 1!important}
  [data-gate] form[data-pw-unlock] > #pw-gate-email{grid-area:4 / 1!important}
  [data-gate] form[data-pw-unlock] > button{grid-area:5 / 1!important}
  [data-gate] form[data-pw-unlock] > input:not([type=checkbox]):not([type=radio]),
  [data-gate] form[data-pw-unlock] > button{width:100%!important;min-width:0!important}
}

/* The booking forms on /free-water-test/ and /system/well-water/. min-width:0
   lets the form shrink below its own min-content as a grid item, so its track
   stops blowing out past the 350px container: the well form measured 490px
   wide inside it, with the ZIP field 93px off the right edge. The
   first-and-last-name row is what made min-content that wide, so it stacks.
   Checkboxes are excluded from width:100% on purpose. Including them made one
   296px wide, which ate the whole flex row and left the consent text at 0px
   wide and 1053px tall, a worse fault than the one being fixed. */
@media (max-width:700px){
  [data-bookform]{min-width:0!important}
  [data-bookform] [data-step] > div{grid-template-columns:minmax(0,1fr)!important}
  [data-bookform] input:not([type=checkbox]):not([type=radio]),
  [data-bookform] select,[data-bookform] textarea{width:100%!important;min-width:0!important}
}

/* Consent checkboxes in both forms. The label is a flex row of a checkbox and
   a span, and the span carries flex:0 1 auto, so it shrinks to its content
   rather than filling the row and becomes a word ladder in a narrow column.
   flex-basis stays auto: with 0 the span measured 0px wide and 1053px tall. */
@media (max-width:700px){
  [data-gate] form[data-pw-unlock] > label,
  [data-bookform] label{align-items:flex-start!important}
  [data-gate] form[data-pw-unlock] > label > span,
  [data-bookform] label > span{flex:1 1 auto!important;min-width:0!important}
}

/* Standalone call-to-action links. These are the text-style links the site
   uses as secondary buttons: "See what is in your water", "See the county
   map", "How it works", "What happens on the way to you". They carry
   data-link and render as inline-flex, and measured at 390px they were 17px
   to 23px tall. Apple asks for 44px and Google for 48px, and a 20px target on
   a phone is a target you miss.

   min-height rather than padding because these are already inline-flex with
   align-items:center, so the text stays optically where it was and only the
   hit area grows. The filled buttons (data-btn) already carry 12px to 14px of
   padding and measured over 44px, so they are left alone.

   Telephone links get the same treatment through padding instead: several are
   plain inline elements inside a paragraph, where min-height does nothing,
   and padding on an inline element grows the clickable area without moving
   anything around it. Calling is the highest-value tap on a phone. */
@media (max-width:700px){
  a[data-link]{min-height:44px!important}
  a[href^="tel:"]:not([data-btn]){padding-top:11px!important;padding-bottom:11px!important}
}

/* Four more tap targets the data-link rule above does not reach, each found by
   measuring rather than by reading the markup:

   The nearby-town chips at the foot of every report page carry padding:7px,
   which made them 36px tall. 48 of them across the report set. 11px takes
   them to 44 without changing the pill shape.

   The water-source dropdown on /water/request/ carries no styling at all, so
   it rendered at the browser's default height of 21px. That is under the 24px
   floor WCAG 2.5.8 sets, never mind the 44px guideline, and it is the one
   control on that page a visitor has to use.

   "See the county map" is the only inline-block link in the footer and
   measured 20px. "Back to the report" on the print sheet measured 19px.

   Left alone on purpose: the 18px consent and water-source inputs, which sit
   inside labels 296px wide, so a finger already hits them; and the 50 points
   on the hardness chart, which sit 10 to 12px apart and already overlap, where
   a bigger hit area would land the tap on the wrong town. */
@media (max-width:700px){
  a[style*="border-radius:999px"]{padding-top:11px!important;padding-bottom:11px!important}
  select{min-height:44px!important;padding:10px 12px!important}
  a[href="/service-area/"][style*="inline-block"]{min-height:44px!important}
  [data-printbar] a{min-height:44px!important;display:inline-flex!important;align-items:center!important}
}

/* The print sheet is a fixed 816px page, US Letter at 96dpi, so on a 390px
   phone it is 426px wider than the screen. Its bar is sticky, which sticks
   vertically and does nothing horizontally, so "Back to the report" sat 276px
   past the right edge and the Print button 359px past: both reachable only by
   scrolling sideways on a page most people will not think to scroll sideways.

   This was invisible until 18 September because the layout gate rendered this
   page with no stylesheet at all. tools/render-check.php now inlines
   report-print.css the way it inlines the others, and the fault appeared on
   the first honest run.

   Pinning the bar to the viewport puts both controls on screen at any scroll
   position. The sheet itself stays 816px, because it is a page. The bar is
   already display:none inside @media print, so nothing here reaches paper,
   and the padding that clears the fixed bar is undone there as well.

   max-width:100vw is load-bearing. left:0 with right:0 alone left the bar
   816px wide and the button 414px off screen, worse than before the rule;
   four candidates were measured in the browser and this is the one that
   constrains it. */
@media (max-width:700px){
  [data-printbar]{position:fixed!important;top:0!important;left:0!important;right:0!important;
    max-width:100vw!important;margin:0!important;padding:8px 12px!important;
    justify-content:space-between!important;box-sizing:border-box!important;z-index:50!important}
  [data-printbar] button{min-height:44px!important}
  [data-print-doc]{padding-top:62px!important}
}
@media print{
  [data-print-doc]{padding-top:0!important}
}

/* The sticky bottom bar. Its grid is "auto 1fr", and 1fr is minmax(auto,1fr),
   so the track will not shrink below the call to action's min-content width.
   The label is white-space:nowrap, so on the well page "Book a free well
   consultation" measured 250px and pushed 7px past the right edge at 360px.
   Every other page's label is shorter and fits, which is why this showed up on
   one page out of nine.

   This is the same trap as the lead gate: a 1fr track respecting min-content.
   minmax(0,1fr) with min-width:0 lets the track shrink, and allowing the label
   to wrap means it uses a second line only when it actually has to, so nothing
   changes at 390px and wider. */
@media (max-width:700px){
  [data-mbar]{grid-template-columns:auto minmax(0,1fr)!important}
  [data-mbar] > *{min-width:0!important}
  [data-mbar] a[data-btn]{white-space:normal!important;text-align:center!important}
}

/* iOS Safari zooms the viewport when a focused field is under 16px and does
   not zoom back out. The ZIP inputs on /service-area/ were 15px, and so was
   the search on /water-quality/. One pixel is the whole fix. */
@media (max-width:700px){
  input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important}
}

/* The header row on the record pages. The nav is meant to be hidden below
   1160px and on /water/request/ it was not: it measured 401px and pushed the
   phone number 363px and the call-to-action 575px off the right edge. The
   burger is already showing there, so the nav is redundant.
   The phone number and the call-to-action go too, and nothing is lost by it:
   measured at 390px, both are already hidden on the report pages and on the
   home page, and the sticky bottom bar carries Call and Book a free water
   test on every one. This makes /water/request/ behave like the rest rather
   than leaving its header CTA 965px off the right edge. */
@media (max-width:700px){
  [data-hdr] [data-nav],
  [data-hdr] [data-tel],
  [data-hdr] [data-btn]{display:none!important}
}

/* The footer grid. report-page.css collapses [data-ftgrid] below 780px, but
   the ZIP, landing and request pages load record.css and never got the rule.
   On /water/request/ the first footer column was 86px wide and 521px tall,
   with "See the county map" 44px off the right edge. */
@media (max-width:780px){
  [data-ftgrid]{grid-template-columns:1fr!important}
}

[data-nav] > a,
[data-nav] > [data-pwsub] > a{white-space:nowrap}
/* The header lockup only. The same 42px image is also in the mobile menu
   panel, where there is room for it, so this is scoped to the header row
   rather than done by editing the shared inline style. */
[data-hdr] > div > a > img{height:34px}
[data-nav]{gap:18px!important}
[data-hdr] [data-tel]{white-space:nowrap}
@media (max-width:1280px){[data-tel]{display:none!important}}
@media (max-width:1160px){[data-nav]{display:none!important}
  [data-pwnav-toggle]{display:inline-flex!important}}
@media (min-width:1161px){[data-pwnav-panel]{display:none}}
