/* Hydrofix Plumbing & Gas: one stylesheet for the whole site.
   Premium and calm: Hydrofix's own job photography set large, Inter for every word, white and pale-grey surfaces,
   hairline rules, navy from the logo, and one action colour. No illustrations, no patterns, no gradients, no shadows.
   No inline styles (the CSP forbids them). The system (tokens, grid, breakpoints, components) is described in
   docs/DESIGN-SYSTEM.md; keep the two in step.
   Breakpoints: three only, 600px, 900px and 1200px. Phone styles are the default; wider screens add to them. */

@font-face {
  font-family: "Inter";
  src: url(../fonts/inter.bdfd991308.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched stand-in while Inter loads, so text doesn't jump when it arrives. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: only light;
  /* Colour. Contrast on white / on --surface: ink 17.9 / 16.5, ink-2 8.7 / 8.0, ink-3 6.0 / 5.6, accent 5.7 / 5.3,
     control 3.4 / 3.1 (WCAG 1.4.11 needs 3 for a control's edge), brand 3.9 / 3.6 (stars are graphics: 3 needed). */
  --ink: #0F123D;            /* headings and strong text: the logo navy */
  --ink-2: #454A66;          /* body text and ledes */
  --ink-3: #5C6180;          /* meta, captions and labels only */
  --navy: #0F123D;           /* call band, footer and each page's one feature section */
  --cyan: #2BCFE9;           /* from the logo, sparingly: the mark on section labels, a few accents on navy */
  --accent: #0062D1;         /* the one action colour */
  --link: var(--accent);     /* text links and their arrows (white on navy); buttons and focus keep --accent */
  --accent-hover: #0050AD;
  --accent-press: #00428F;
  --brand: #007DFF;          /* review stars only */
  --surface: #F4F6F9;
  --hairline: #E4E7EE;       /* rules on white */
  --hairline-surface: #D5DAE4; /* rules on --surface */
  --rule: var(--hairline);   /* every component reads this; .section--surface swaps it */
  --control: #858BA2;        /* input and secondary-button edges */
  --on-dark: #FFFFFF;
  --on-dark-2: #B9C1DD;
  --err: #B3261E;
  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type: eight steps. The four large ones interpolate between the phone size at 390px and the desktop size at
     1440px; the rest step once, at 600px. */
  --fs-display: clamp(2.5rem, 1.757rem + 3.048vw, 4.5rem);      /* 40 to 72 */
  --fs-display-home: clamp(2.5rem, 1.571rem + 3.81vw, 5rem);    /* 40 to 80, home h1 only */
  --fs-title: clamp(1.875rem, 1.457rem + 1.714vw, 3rem);        /* 30 to 48 */
  --fs-number: clamp(2.125rem, 1.707rem + 1.714vw, 3.25rem);    /* 34 to 52 */
  --fs-statement: clamp(1.5rem, 1.314rem + .762vw, 2rem);       /* 24 to 32 */
  --fs-heading: 1.1875rem;   /* 19, 21 from 600 */
  --fs-lede: 1.125rem;       /* 18, 20 from 600 */
  --fs-body: 1rem;           /* 16, 17 from 600 */
  --fs-small: .875rem;       /* 14 */
  --lh-display: 1.05;        /* 1.02 from 900 */
  --lh-title: 1.1;           /* 1.08 from 900 */

  /* Space: a 4px scale. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --section: clamp(64px, 8vw, 128px);
  --pad: clamp(20px, 3vw, 32px);   /* inside a panel */

  /* Layout */
  --wrap: 1240px;
  --gutter: clamp(20px, 4.5vw, 48px);
  --grid-gap: clamp(16px, 2vw, 24px);
  --head-h: 64px;

  /* Shape */
  --r-control: 12px;   /* inputs, notes, thumbnails under 200px */
  --r-media: 20px;     /* every other photo and every panel */
  --r-pill: 999px;     /* buttons and nav pills */

  /* Motion: one easing, two durations. */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur-1: .15s;
  --dur-2: .3s;
}
@media (min-width: 600px) { :root { --fs-heading: 1.3125rem; --fs-lede: 1.25rem; --fs-body: 1.0625rem; } }
@media (min-width: 900px) { :root { --lh-display: 1.02; --lh-title: 1.08; --head-h: 76px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + var(--s4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
picture { display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #D6E6FF; color: var(--ink); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
p, li, dd, figcaption { margin: 0; text-wrap: pretty; }
p { max-width: 38em; }
ul, ol { margin: 0; padding: 0; }
dl, dd, figure, blockquote { margin: 0; }
strong { font-weight: 600; color: var(--ink); }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap, a[href^="tel:"] { white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: var(--s3); top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px var(--s4); border-radius: var(--r-control); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s3); color: #fff; }
[hidden] { display: none !important; }

/* ---------- Type scale ---------- */
.display { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -.035em; font-weight: 600; }
.title { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: -.03em; font-weight: 600; }
.number { font-size: var(--fs-number); line-height: 1; letter-spacing: -.035em; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.statement { font-size: var(--fs-statement); line-height: 1.25; letter-spacing: -.02em; font-weight: 500; color: var(--ink); }
.heading { font-size: var(--fs-heading); line-height: 1.3; letter-spacing: -.015em; font-weight: 600; color: var(--ink); }
.lede { font-size: var(--fs-lede); line-height: 1.5; letter-spacing: -.01em; color: var(--ink-2); max-width: 30em; }
.small { font-size: var(--fs-small); line-height: 1.45; }
/* One label style for eyebrows, card meta and story meta. Never two in a row. */
.meta { font-size: var(--fs-small); line-height: 1.45; font-weight: 500; color: var(--ink-3); }

/* ---------- Links and buttons ---------- */
/* Four link styles: the inline link (above), the arrow link, the row link (.rows--link) and the big number. */
.text-link { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-weight: 600; text-decoration: none; color: var(--link); }
.text-link .icon { width: 18px; height: 18px; transition: transform var(--dur-1) var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.number-link { display: inline-block; font-size: var(--fs-number); line-height: 1.1; letter-spacing: -.035em; font-weight: 600; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.number-link:hover { color: var(--link); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons: two heights (52, and 44 for the header), pill shaped, flat. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 var(--s5); border-radius: var(--r-pill); border: 1px solid transparent;
  font: inherit; font-size: var(--fs-body); font-weight: 600; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--control); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-secondary:active { background: var(--surface); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }
.btn-ghost-light:active { background: rgba(255, 255, 255, .1); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--fs-small); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
/* Phones: buttons take the full width, one to a line, so a pair never wraps unevenly. */
@media (max-width: 599.98px) { .actions .btn { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }

/* ---------- Grid ---------- */
/* One 12-column grid inside .wrap, from 600px. Two splits place every two-column block: 5/7 (text, then media or a
   list, with column 6 empty) and 7/5 (statement or heading first, column 8 empty). Odd children take the first
   column and even children the second, so a split can hold several rows. From 600 to 899px both become 6/6, except
   .split--media (photos and forms), which stays one column until 900px so photos stay sharp. */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--s5); }
.grid > * { min-width: 0; }
.split--media { align-items: start; }
/* Stacked, a split's later rows (a second heading) get a little more room than a heading gets from its text. */
@media (max-width: 599.98px) { :is(.split-5-7, .split-7-5) > :nth-child(odd):not(:first-child) { margin-top: var(--s4); } }
@media (min-width: 600px) and (max-width: 899.98px) { .split--media > :nth-child(odd):not(:first-child) { margin-top: var(--s4); } }
@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); }
  .grid > * { grid-column: 1 / -1; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  :is(.split-5-7, .split-7-5):not(.split--media) { row-gap: var(--s7); }
  :is(.split-5-7, .split-7-5):not(.split--media) > :nth-child(odd) { grid-column: 1 / span 6; }
  :is(.split-5-7, .split-7-5):not(.split--media) > :nth-child(even) { grid-column: 7 / -1; }
}
@media (min-width: 900px) {
  .split-5-7, .split-7-5 { row-gap: var(--s7); }
  .split-5-7 > :nth-child(odd) { grid-column: 1 / span 5; }
  .split-5-7 > :nth-child(even) { grid-column: 7 / -1; }
  .split-7-5 > :nth-child(odd) { grid-column: 1 / span 7; }
  .split-7-5 > :nth-child(even) { grid-column: 9 / -1; }
}
/* Photos are never shown wider than their source allows: 560px on tablets (1170px sources at 2x). */
@media (min-width: 600px) and (max-width: 899.98px) { .media-cap { max-width: 560px; } }
.media-sm { max-width: 420px; }   /* the 845px restaurant photos */

/* ---------- Header ---------- */
/* Solid navy, so it always matches the navy page header under it (a see-through bar shows lighter over white). */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--navy); border-bottom: 1px solid transparent; transition: border-color var(--dur-1) var(--ease); }
.site-head.scrolled { border-bottom-color: rgba(255, 255, 255, .12); }
.head-bar { display: flex; align-items: center; gap: var(--s4); min-height: var(--head-h); }
.brand { display: block; flex: none; line-height: 0; }
.brand img { width: 128px; height: auto; }
.head-actions { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.head-phone { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; min-width: 44px; padding: 0; border: 1px solid var(--control); border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.head-phone .icon { width: 18px; height: 18px; color: var(--cyan); }
.head-phone .num { display: none; }
.head-phone:hover { color: var(--link); }
.btn-quote { display: none; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--control); border-radius: var(--r-pill); background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: var(--fs-small); cursor: pointer; }
.menu-btn .bars { position: relative; width: 16px; height: 10px; }
.menu-btn .bars::before, .menu-btn .bars::after, .menu-btn .bars span { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease); }
.menu-btn .bars::before { top: 0; } .menu-btn .bars span { top: 4.25px; } .menu-btn .bars::after { top: 8.5px; }
.menu-btn[aria-expanded="true"] .bars::before { transform: translateY(4.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars span { opacity: 0; }
.menu-btn[aria-expanded="true"] .bars::after { transform: translateY(-4.25px) rotate(-45deg); }

/* Phones and tablets: the menu is a full-height sheet under the header, with the call and quote actions at its foot.
   It is positioned from the header (top: 100%), so it always starts exactly under it. The page behind it doesn't scroll (html.menu-open). */
@media (max-width: 899.98px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--head-h)); height: calc(100dvh - var(--head-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .12); }
  .nav.open { display: flex; flex-direction: column; }
  .nav ul { list-style: none; padding: var(--s2) var(--gutter) 0; }
  .nav li > a { display: flex; align-items: center; min-height: 64px; color: var(--ink); text-decoration: none; font-size: var(--fs-statement); font-weight: 500; letter-spacing: -.02em; border-bottom: 1px solid var(--rule); }
  .nav li > a:hover { color: var(--cyan); }
  .nav li > a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 8px; }
  .nav-foot { display: grid; gap: var(--s3); margin-top: auto; padding: var(--s6) var(--gutter) calc(var(--s6) + env(safe-area-inset-bottom)); }
  .nav-foot .btn { width: 100%; }
  .nav-foot .small { text-align: center; }
  html.menu-open, html.menu-open body { overflow: hidden; }
  .menu-open .site-head { background: var(--navy); backdrop-filter: none; border-bottom-color: rgba(255, 255, 255, .12); }
  /* While the call bar or the menu's own call button is showing, the header's phone button would be a second call
     action on screen. */
  .bar-on .head-phone, .menu-open .head-phone { display: none; }
}
@media (min-width: 900px) {
  .brand img { width: 150px; }
  .head-bar { gap: var(--s5); }
  .nav { margin-left: auto; }
  .nav ul { list-style: none; display: flex; gap: 0; }
  .nav li > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; border-radius: var(--r-pill); transition: color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease); }
  .nav li > a:hover { color: var(--ink); background: rgba(255, 255, 255, .1); }
  .nav li > a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 10px; }
  .nav-foot, .menu-btn { display: none; }
  .head-actions { margin-left: 0; }
  .btn-quote { display: inline-flex; }
}
/* A nav label can have a shorter form (`short`) for small laptops, where the six links, the phone and Get a quote
   share about 820px: "Reviews" there, "Customer reviews" from 1200 and in the phone menu (measured 21 Nov 2026). */
.nav-short { display: none; }
@media (min-width: 900px) and (max-width: 1199.98px) {
  .nav li > a { padding: 0 var(--s2); }
  .nav-long { display: none; }
  .nav-short { display: inline; }
}
@media (min-width: 1200px) {
  .nav li > a { padding: 0 var(--s4); }
  .head-phone { border: 0; padding: 0 var(--s2); }
  .head-phone .num { display: inline; }
}

/* ---------- Phone call bar ---------- */
.actionbar { display: none; }
@media (max-width: 899.98px) {
  .actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s2);
    padding: var(--s3) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--hairline);
  }
  .actionbar--call { grid-template-columns: minmax(0, 1fr); }
  .actionbar .btn { padding: 0 var(--s3); }
  .site-foot { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .js .actionbar { transform: translateY(110%); transition: transform var(--dur-2) var(--ease); }
  .js .actionbar.show { transform: none; }
  .js.menu-open .actionbar { transform: translateY(110%); }
}
@media (max-width: 899.98px) and (prefers-reduced-motion: reduce) { .js .actionbar { transition: none; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--surface { background: var(--surface); --rule: var(--hairline-surface); }
.section--tight { padding-block: calc(var(--section) / 2); }
.section--flush-top { padding-top: 0; }
/* Two white sections in a row are told apart by a hairline (pages are built so it rarely happens). */
.section:not(.section--surface):not(.section--dark) + .section:not(.section--surface):not(.section--dark) { border-top: 1px solid var(--hairline); }

/* ---------- Section identity (AK, 20 Nov 2026: "so hard to tell what section I'm scrolling on") ---------- */
/* Every section opens with a label: a short cyan mark from the logo and a word or two. Neighbouring sections never
   share a surface: white, grey (--surface) or navy. Each page has one navy feature section for its strongest content
   (Home: our work and its readings; a service page: its recent job; About: the licence). test/site.test.mjs. */
.kicker { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-small); line-height: 1.45; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
.kicker::before { content: ""; flex: none; width: 24px; height: 3px; border-radius: 2px; background: var(--cyan); }
.kicker + :is(.title, .statement, h2) { margin-top: var(--s3); }
.section > .wrap > .kicker { margin-bottom: var(--s5); }
/* Navy (AK, 20 Nov 2026: "We should have more navy blue", then "Way too much navy now. You overdid it"): the header
   bar, each page's one feature section, the call band and the footer. Page headers are white. Inside them the text tokens turn light, so every component reads correctly
   without dark rules of its own (contrast on navy: --ink 17.9, --ink-2 14.6, --ink-3 10.0, --link 17.9). White
   surfaces inside navy (the form, quote cards) bring the light tokens back. Buttons keep the action colour. */
:is(.site-head, .section--dark) { --ink: #FFFFFF; --ink-2: #DCE1EF; --ink-3: #B9C1DD; --link: #FFFFFF; --control: rgba(255, 255, 255, .45); --rule: rgba(255, 255, 255, .16); color: var(--ink-2); }
.section--dark { background: var(--navy); }
:is(.panel, .quotes > li) { --ink: #0F123D; --ink-2: #454A66; --ink-3: #5C6180; --link: var(--accent); --control: #858BA2; --rule: var(--hairline); color: var(--ink-2); }
:is(.site-head, .section--dark) .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
:is(.site-head, .section--dark) .btn-secondary:hover { border-color: #fff; color: #fff; }
:is(.site-head, .section--dark) :focus-visible { outline-color: #fff; }
:is(.panel, .quotes > li) :focus-visible { outline-color: var(--accent); }
.section--dark :is(.text-link, .readings) .icon { color: var(--cyan); }
.section--dark .card > a:hover .card-title { color: #D6E6FF; }
.section--dark :is(.photos-pair, .photos-lead, .photos-row, .card-media) img { background: rgba(255, 255, 255, .06); }


/* Section head: the title (and an intro under it) in columns 1 to 7, the link alone bottom-right in 9 to 12. */
.section-head { margin-bottom: var(--s7); }
.section-head:last-child { margin-bottom: 0; }

.section-head .lede { margin-top: var(--s4); }
.section-head-link { align-self: end; display: grid; justify-items: start; gap: var(--s2); }
@media (min-width: 600px) {
  .section-head .lede { margin-top: var(--s5); }
  .section-head-link { justify-self: end; justify-items: end; }
}
@media (min-width: 900px) { .section-head { margin-bottom: var(--s8); } }

/* A column of text blocks with the body rhythm between them. */
.stack > * + * { margin-top: var(--s4); }

/* ---------- Hero (every page's opening) ---------- */
/* Default: a page header with a photo. Phones and tablets stack title, photo, then text, so the first screen always
   has a photo; from 900px the text takes columns 1 to 5 and the photo 7 to 12. --plain has no photo; --home is the
   home page's taller opening. */
.hero { padding-block: var(--s5) var(--section); }
.crumbs { margin-bottom: var(--s5); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-small); color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--control); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--s5); }
.hero-title { max-width: 16ch; }
.hero-body > * + * { margin-top: var(--s4); }
.hero-body > .actions { margin-top: var(--s6); }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-media); background: var(--surface); }
/* Landscape originals get a wider frame, so they keep their full width (the sharpest crop). */
.hero-media .is-wide img { aspect-ratio: 16 / 10; }
/* Phones: the header photo runs edge to edge, so every page opens on a full-width picture. */
@media (max-width: 599.98px) {
  .hero-media { margin-inline: calc(var(--gutter) * -1); }
  .hero-media img { border-radius: 0; }
  .hero-media .caption { padding-inline: var(--gutter); }
}
@media (min-width: 900px) {
  .crumbs { margin-bottom: var(--s6); }
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: 0; grid-template-rows: auto 1fr; }
  .hero-title { grid-column: 1 / span 5; grid-row: 1; }
  .hero-body { grid-column: 1 / span 5; grid-row: 2; margin-top: var(--s5); }
  .hero-media { grid-column: 7 / -1; grid-row: 1 / span 2; }
  .hero-media.media-sm { justify-self: end; width: 100%; }
  .hero--plain .hero-title, .hero--plain .hero-body { grid-column: 1 / span 8; }
  .hero--plain { padding-bottom: var(--s8); }
}

/* The home opening (AK, 20 and 21 Nov 2026: no bathroom photo; words only for now, with a marked place for a photo of
   Dan and the team). A label, the large headline, the intro and the call actions in columns 1 to 6, the photo's place
   in 7 to 12 (after the actions on phones), and the trust strip under the opening, where it stays once the photo comes. */
.hero--home { padding-block: var(--s8) var(--s9); }
.hero--home .kicker { margin-bottom: var(--s5); }
.hero--home .hero-title { font-size: var(--fs-display-home); max-width: 13ch; }
.hero--home .hero-side { margin-top: var(--s7); }
/* The home opening's photo (AK's pick, no caption): framed like a page header's photo, edge to edge on phones. */
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-media); background: var(--surface); }
@media (max-width: 599.98px) {
  .hero-photo { margin-inline: calc(var(--gutter) * -1); }
  .hero-photo img { border-radius: 0; }
}
/* The photo's marked place: pale grey with a hairline edge, its words centred. Preview only (see photoPlaceholder). */
@media (min-width: 900px) {
  .hero--home { padding-block: var(--s9) calc(var(--s9) + var(--s5)); }
  .hero--home .hero-title, .hero--home .hero-body { grid-column: 1 / span 6; }
  .hero-side { grid-column: 9 / -1; grid-row: 1 / span 2; align-self: end; }
  .hero--home .hero-side { grid-column: 7 / -1; align-self: center; margin-top: 0; }
  .hero-photo img { aspect-ratio: 6 / 5; }
}

/* Photo captions sit under the photo, never over it. One style everywhere. */
.caption { margin-top: var(--s3); font-size: var(--fs-small); line-height: 1.45; color: var(--ink-3); }

/* Trust strip: rating, membership, licence, under the home opening. Three equal row links on the grid's columns
   (1, 5 and 9) between two full-width rules, with the dividing rules in the gaps. */
.trust { margin-top: var(--s7); }
@media (min-width: 600px) {
  .trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--grid-gap); border-bottom: 1px solid var(--rule); }
  /* .rows.trust: ".rows > li" comes later with the same weight and drew a second, broken rule under each item. */
  .rows.trust > li { position: relative; border-bottom: 0; }
  .trust > li + li::before { content: ""; position: absolute; top: var(--s4); bottom: var(--s4); left: calc(var(--grid-gap) / -2); border-left: 1px solid var(--rule); }
}
.stars { display: inline-flex; gap: 2px; color: var(--brand); }
.stars svg { width: 16px; height: 16px; fill: currentColor; }
.stars svg.half .empty { fill: none; stroke: currentColor; stroke-width: 1.4; }
.score { display: inline-flex; align-items: center; gap: var(--s2); }

/* ---------- Rows: every hairline list ---------- */
/* Plain rows (lists of points), --dl (label and value), --link (a row you tap, with an arrow), --faq (a question
   that opens), and --cols (rows in two, three or four columns, on the grid's columns). */
.rows { list-style: none; border-top: 1px solid var(--rule); }
.rows > li, .rows > div { padding-block: var(--s4); border-bottom: 1px solid var(--rule); color: var(--ink); }
.rows--dl > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
.rows--dl dt { font-size: var(--fs-small); color: var(--ink-3); }
.rows--dl dd { color: var(--ink); }
@media (min-width: 600px) { .rows--dl > div { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s4); } .rows--dl dt { padding-top: 2px; } }

.rows--link > li { padding: 0; }
.rows--link a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s4); min-height: 56px; padding-block: var(--s4); color: var(--ink); text-decoration: none; }
.row-name { font-weight: 600; color: var(--ink); line-height: 1.35; }
.row-text { grid-column: 1; margin-top: 2px; font-size: var(--fs-small); line-height: 1.45; color: var(--ink-3); }
.rows--link .icon { grid-column: 2; grid-row: 1 / span 2; color: var(--link); transition: transform var(--dur-1) var(--ease); }
.rows--link a:hover .row-name { color: var(--link); }
.rows--link a:hover .icon { transform: translateX(3px); }
.row-name .stars { margin-left: var(--s2); vertical-align: -1px; }
/* A row with a mark: the credential's own mark in a fixed 68px slot (the PGDB badges' width at 40px tall), so the
   words line up down the list whichever mark sits beside them. */
.rows--link a.has-mark { grid-template-columns: 68px minmax(0, 1fr) auto; }
.has-mark .row-mark { grid-column: 1; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; height: 44px; }
.has-mark :is(.row-name, .row-text) { grid-column: 2; }
.has-mark .icon { grid-column: 3; }
.row-mark img { width: auto; height: 40px; }
.row-score { font-size: var(--fs-statement); line-height: 1; letter-spacing: -.03em; font-weight: 600; color: var(--ink); }
.has-mark .row-name > .stars:only-child { margin-left: 0; display: inline-flex; }
.has-mark .row-name .stars svg { width: 18px; height: 18px; }
/* A photo as the mark (the other services): the service's own photo, a 64px square. */
.rows--link a.has-thumb { grid-template-columns: 64px minmax(0, 1fr) auto; }
.has-thumb .row-mark { height: 64px; }
.has-thumb .row-mark :is(picture, img) { width: 64px; height: 64px; }
.has-thumb .row-mark img { object-fit: cover; border-radius: var(--r-control); background: var(--surface); }
/* Three across (600 to 899), a column is too narrow for a mark beside the words: the mark sits above them. */
@media (min-width: 600px) and (max-width: 899.98px) {
  .trust a.has-mark { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .trust .has-mark .row-mark { grid-row: 1; justify-content: flex-start; margin-bottom: var(--s3); }
  .trust .has-mark .row-name { grid-column: 1; grid-row: 2; }
  .trust .has-mark .row-text { grid-column: 1; grid-row: 3; }
  .trust .has-mark .icon { grid-column: 2; grid-row: 1; align-self: center; }
}

.rows--faq > details { border-bottom: 1px solid var(--rule); }
.rows--faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: 64px; padding-block: var(--s4); cursor: pointer; list-style: none; font-size: var(--fs-heading); line-height: 1.3; letter-spacing: -.015em; font-weight: 600; color: var(--ink); }
.rows--faq summary::-webkit-details-marker { display: none; }
.rows--faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--dur-1) var(--ease); }
.rows--faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.rows--faq summary:hover { color: var(--link); }
.rows--faq .answer { padding-bottom: var(--s5); }

/* Rows in columns: the first row carries the top rule, so every rule breaks at the same column gaps. */
.rows--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); border-top: 0; }
.rows--cols > li:nth-child(-n + 2) { border-top: 1px solid var(--rule); }
.rows--cols.rows--2 { grid-template-columns: minmax(0, 1fr); }
.rows--cols.rows--2 > li:nth-child(2) { border-top: 0; }
@media (min-width: 600px) {
  .rows--cols.rows--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rows--cols.rows--2 > li:nth-child(2) { border-top: 1px solid var(--rule); }
  .rows--cols.rows--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rows--cols.rows--4 > li:nth-child(3) { border-top: 1px solid var(--rule); }
}
@media (min-width: 900px) {
  .rows--cols.rows--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rows--cols.rows--4 > li:nth-child(4) { border-top: 1px solid var(--rule); }
}

/* ---------- Panel ---------- */
/* The one boxed surface: white, ruled, for the enquiry form. Everything else sits on rules, not in boxes. */
.panel { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-media); padding: var(--pad); --rule: var(--hairline); }
/* A note beside text (the toby, the scald risk): a rule down its side, never a box that reads as a field. */
.note { padding-left: var(--s4); border-left: 2px solid var(--rule); font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); }

/* ---------- Cards ---------- */
/* A whole card is one link: photo, title, a line, and an arrow link. Service cards are 4:5 (3:2 on phones), job
   cards 3:2. Titles, lines and links line up across a row through subgrid, so a one-line title never leaves a hole. */
.cards { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
.card > a { display: grid; color: var(--ink); text-decoration: none; }
.card-media { display: block; overflow: hidden; border-radius: var(--r-media); background: var(--surface); }
.card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card .meta { margin-top: var(--s4); }
.card-title { margin-top: var(--s4); font-size: var(--fs-heading); line-height: 1.3; letter-spacing: -.015em; font-weight: 600; color: var(--ink); }
.card .meta + .card-title { margin-top: var(--s1); }
.card-text { margin-top: var(--s2); color: var(--ink-2); }
.card-more { margin-top: var(--s3); display: inline-flex; align-items: center; gap: var(--s2); color: var(--link); font-weight: 600; font-size: var(--fs-small); }
.card-more .icon { width: 16px; height: 16px; transition: transform var(--dur-1) var(--ease); }
.card > a:hover .card-title { color: var(--link); }
.card > a:hover .card-more .icon { transform: translateX(3px); }
@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: 0; margin-bottom: calc(var(--s7) * -1); }
  .cards > .card { display: grid; grid-template-rows: subgrid; margin-bottom: var(--s7); }
  .cards > .card > a { grid-template-rows: subgrid; grid-row: 1 / -1; }
  .cards--svc > .card { grid-row: span 4; }
  .cards--svc .card-media img { aspect-ratio: 4 / 5; }
  .cards--jobs > .card { grid-row: span 3; }
}
@media (min-width: 1200px) { .cards--svc { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cards--jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Tablets: three job cards as one large (photo beside its words) over two small, so none sits alone. */
@media (min-width: 600px) and (max-width: 899.98px) {
  .cards--jobs > .card:first-child { grid-column: 1 / -1; grid-row: span 1; }
  .cards--jobs > .card:first-child > a { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; column-gap: var(--grid-gap); }
  .cards--jobs > .card:first-child .card-media { grid-row: 1 / -1; }
  .cards--jobs > .card:first-child .meta { margin-top: 0; }
}
/* Phones: job cards in a row you swipe, large 4:5 photos with the next one peeking in, edge to edge. The row scrolls
   inside itself, so the page never scrolls sideways. */
@media (max-width: 599.98px) {
  .cards--rail { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .cards--rail::-webkit-scrollbar { display: none; }
  .cards--rail > .card { flex: 0 0 80%; scroll-snap-align: start; }
  .cards--rail .card-media img { aspect-ratio: 4 / 5; }
}
/* Home page on phones: the services as compact rows (a square thumbnail, the title, a line, an arrow). */
@media (max-width: 599.98px) {
  .cards--compact { gap: 0; border-top: 1px solid var(--rule); }
  .cards--compact > .card { border-bottom: 1px solid var(--rule); }
  .cards--compact > .card > a { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: var(--s4); align-items: center; padding-block: var(--s4); }
  .cards--compact .card-media { grid-column: 1; grid-row: 1 / span 2; border-radius: var(--r-control); }
  .cards--compact :is(.meta, .card-title, .card-text) { grid-column: 2; }
  .cards--compact .card-media img { aspect-ratio: 1; }
  .cards--compact .card-title { margin-top: 0; align-self: end; }
  .cards--compact .meta { margin-top: 0; align-self: end; }
  .cards--compact .meta + .card-title { align-self: start; }
  .cards--compact .card-text { margin-top: 2px; align-self: start; font-size: var(--fs-small); line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .cards--compact .card-more { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
  .cards--compact .card-more span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cards--compact .card-more .icon { width: 20px; height: 20px; }
}

/* ---------- Photos of a job ---------- */
/* Three layouts. pair: before and after, equal and side by side (4:5, or 3:2 when both are landscape), labelled
   above each. lead: one 3:2 photo. row: the rest, equal squares. Labels and photos in a pair share tracks through
   subgrid, so a label that wraps never pushes one photo lower than the other. */
.photos { display: grid; gap: var(--s5); align-content: start; }
/* Every photo layout crops to its frame (never stretches), wherever it sits: the Our work index uses the layouts
   outside a .photos group. */
.photos img, .photos-pair img, .photos-lead img, .photos-row img { width: 100%; object-fit: cover; border-radius: var(--r-media); background: var(--surface); }
.photos-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: var(--s4); row-gap: var(--s3); }
.photos-pair > figure { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.photos-pair img { aspect-ratio: 4 / 5; }
.photos-pair.is-wide img { aspect-ratio: 3 / 2; }
.photos-pair .caption { margin-top: 0; }
.photos-lead img { aspect-ratio: 3 / 2; }
/* A hot water install is shown whole inside its frame, on the pale surface, so the whole cylinder and its valve train
   are in view (Dan, 1 Dec 2026). Only photos marked `whole` in site/data/jobs.mjs; every other photo fills its frame. */
.photos-lead.is-whole img { object-fit: contain; }
.photos-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.photos-row img { aspect-ratio: 1; border-radius: var(--r-control); }
@media (min-width: 600px) { .photos-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* A row of one or two: half-width landscape tiles, so the row is never left a third or two-thirds empty. */
.photos-row:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photos-row:not(:has(> :nth-child(3))) img { aspect-ratio: 3 / 2; }

/* A job told in full (service pages and the home page): its words in columns 1 to 5, held in view beside its photos. */
.story-text > * + * { margin-top: var(--s4); }
.story-text > .meta + * { margin-top: var(--s3); }
.story-text > .text-link { margin-top: var(--s3); }
@media (min-width: 900px) { .story-text { align-self: start; position: sticky; top: calc(var(--head-h) + var(--s6)); } }
.readings { display: flex; align-items: center; gap: var(--s5); padding-block: var(--s5); border-block: 1px solid var(--rule); }
.reading { display: grid; gap: var(--s2); }
.reading .small { color: var(--ink-3); }
.readings > .icon { width: 28px; height: 28px; color: var(--ink-3); }
.story-text > .readings { margin-top: var(--s6); }
.story-text > .readings + * { margin-top: var(--s5); }

/* Home: three more jobs under the lead job. */
.more-work { margin-top: var(--s8); }
@media (min-width: 900px) { .more-work { margin-top: var(--s9); } }

/* ---------- Our work: the job index ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s7); }
/* The filter row keeps its room until site.js reveals it, so the jobs never jump down after the page appears
   (not the hidden attribute: the global [hidden] rule would take the room away). */
.filters.is-pending { visibility: hidden; }
.filter { min-height: 44px; padding: 0 var(--s4); border: 1px solid var(--control); border-radius: var(--r-pill); background: #fff; color: var(--ink-2); font: inherit; font-size: var(--fs-small); font-weight: 500; cursor: pointer; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.jobs { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s8); }
/* Every card's photos are the same height (two-thirds of the card's width, a 3:2 frame), a pair or a single alike. */
.job-media { container-type: inline-size; }
.job-media img { aspect-ratio: auto; height: calc(100cqw / 1.5); }
/* On phones (one job to a row, nothing beside it to line up with) a whole photo takes its own shape, with no pale bars,
   and never more than three quarters of the screen's height. */
@media (max-width: 599.98px) { .job-media > .photos-lead.is-whole img { height: auto; max-height: 75svh; } }
.job-text { margin-top: var(--s4); }
.job-text > * + * { margin-top: var(--s3); }
.job-text > .meta + * { margin-top: var(--s1); }
.job-more { margin-top: var(--s4); }
.job-more summary { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; list-style: none; cursor: pointer; font-weight: 600; color: var(--link); }
.job-more summary::-webkit-details-marker { display: none; }
.job-more summary::after { content: ""; width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--dur-1) var(--ease); }
.job-more[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.job-more summary:hover { color: var(--accent-hover); }
.job-more-body { display: grid; gap: var(--s5); padding-top: var(--s4); }
.on-the-job { margin-top: var(--s9); padding-top: var(--s8); border-top: 1px solid var(--rule); }
/* Below 900 the story stacks and its two small photos (680 and 472 px wide files) would run the full width, past what
   the files hold; they keep the 560 px media width of this band, two 272 px tiles (SIZES.half). */
@media (min-width: 600px) and (max-width: 899.98px) { .on-the-job .photos-row { max-width: 560px; } }
@media (min-width: 600px) {
  .jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); row-gap: var(--s8); align-items: start; }
  /* A single photo leaves room for the before and after labels its neighbour has, so photos start level. */
  .job-media > .photos-lead { padding-top: calc(var(--fs-small) * 1.45 + var(--s3)); }
}

/* ---------- Reviews ---------- */
.quote blockquote { margin-top: var(--s3); }
.quote blockquote p { color: var(--ink-2); }
.quote figcaption { margin-top: var(--s3); font-size: var(--fs-small); color: var(--ink-3); }
.quote-feature blockquote p { font-size: var(--fs-statement); line-height: 1.25; letter-spacing: -.02em; font-weight: 500; color: var(--ink); }
/* The leading review's stars are larger, the anchor of the reviews section. */
.quote-feature .stars svg { width: 22px; height: 22px; }
/* The rest sit in white cards with a hairline edge, so they read as separate voices. */
.quotes { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: var(--s7); }
.quotes > li { padding: var(--pad); border: 1px solid var(--rule); border-radius: var(--r-media); background: #fff; }
.reviews-note { margin-top: var(--s6); }
.reviews-head-side { display: grid; gap: var(--s1); justify-items: inherit; }
/* The Reviews page: each source's reviews as a wall of cards, each as tall as its words (columns, not rows, so a long
   review never leaves its neighbours half empty), then the way on to Google. */
.quotes--wall { display: block; margin-top: 0; columns: 1; column-gap: var(--grid-gap); }
.quotes--wall > li { break-inside: avoid; margin-bottom: var(--s4); }
.reviews-more { margin-top: var(--s6); }
.hero--plain .hero-side { margin-top: var(--s6); }
.hero .reviews-head-side { text-align: left; justify-items: start; }
@media (min-width: 600px) {
  .reviews-head-side { text-align: right; }
  .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--grid-gap); }
}
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .reviews-body > .quote-feature { grid-column: 1 / span 7; } }
@media (min-width: 600px) { .quotes--wall { columns: 2; } }
@media (min-width: 900px) {
  .quotes--wall { columns: 3; }
  .hero--plain .hero-side { margin-top: 0; }
  .hero .reviews-head-side { text-align: right; justify-items: end; }
}

/* ---------- Enquiry: words, the form, then more (Contact and every service page) ---------- */
/* Phones and tablets: intro, form, then the rest, so the number and the form both come early. From 900px the intro
   and the rest share columns 1 to 5 and the form takes 7 to 12, top-aligned with the heading. */
.enquiry-intro > * + * { margin-top: var(--s4); }
.enquiry-intro > .number-link { margin-top: var(--s5); }
.enquiry-intro > .number-link + .small { margin-top: var(--s2); }
.enquiry-more > * + * { margin-top: var(--s5); }
@media (min-width: 900px) {
  .enquiry { grid-template-rows: auto 1fr; row-gap: 0; }
  .enquiry-intro { grid-column: 1 / span 5; grid-row: 1; }
  .enquiry-more { grid-column: 1 / span 5; grid-row: 2; margin-top: var(--s7); }
  .enquiry-form { grid-column: 7 / -1; grid-row: 1 / span 2; }
}
.enquiry-more .quote { padding-top: var(--s5); border-top: 1px solid var(--rule); }

/* ---------- Form ---------- */
.form-intro { margin-top: var(--s2); margin-bottom: var(--s5); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s4); }
@media (min-width: 600px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { margin-bottom: var(--s5); min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { display: block; font-weight: 500; font-size: var(--fs-small); margin-bottom: var(--s2); color: var(--ink); }
.field-help { margin: calc(var(--s1) * -1) 0 var(--s2); color: var(--ink-3); }
/* Two parts, "The job" and "Your details", each under a small label on a rule. */
.form-part { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-part + .form-part { padding-top: var(--s5); border-top: 1px solid var(--rule); }
/* The legend floats so it sits under the rule like any label, not inside the fieldset's border. */
.form-part > legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s4); }
.form-part > legend + * { clear: both; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: var(--fs-body); color: var(--ink); background: #fff;
  min-height: 52px; padding: 12px 14px; border: 1px solid var(--control); border-radius: var(--r-control);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.field textarea { min-height: 136px; resize: vertical; line-height: 1.5; }
/* The drop-down draws its own chevron (a turned border, like the questions' disclosure), not the browser's. */
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg); pointer-events: none; }
/* Home or business: one control in two halves, like a switch, as tall as the boxes beside it. The real radio button
   covers its half (invisible), so the whole half is the target and keyboard and screen readers work as for any radio
   group. Chosen: navy. (Rows of option pills went in 0.27.0, AK: "So many buttons everywhere".) */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 3px; border: 1px solid var(--control); border-radius: var(--r-control); background: #fff; }
.segmented > .segment { position: relative; display: flex; margin: 0; }
.segment input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.segment span { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: calc(var(--r-control) - 3px); color: var(--ink-2); font-size: var(--fs-body); font-weight: 500; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.segment:hover span { color: var(--ink); background: var(--surface); }
.segment input:checked + span { background: var(--ink); color: #fff; }
.segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.segmented[aria-invalid="true"] { border-color: var(--err); }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-2); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 98, 209, .14); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field [aria-invalid="true"]:focus { border-color: var(--err); box-shadow: 0 0 0 4px rgba(179, 38, 30, .14); }
.field label .optional { font-weight: 400; color: var(--ink-3); }
.err { display: none; align-items: flex-start; gap: 6px; margin-top: 6px; color: var(--err); font-size: var(--fs-small); font-weight: 500; line-height: 1.4; }
.err.on { display: flex; }
.err .icon { width: 16px; height: 16px; margin-top: 2px; stroke-width: 2; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-bottom: var(--s4); font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--err); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.form-foot .btn { flex: 1 1 100%; }
.form-alt, .form-privacy { color: var(--ink-3); }
.form-privacy { margin-top: var(--s4); }
@media (min-width: 600px) { .form-foot .btn { flex: 0 0 auto; } }
/* The enquiry shown as sent, in the form's place (formDone in site/lib/components.mjs): what was sent, row by row on
   hairlines, then "Send another enquiry", which waits until it has gone. */
.form-done:focus { outline: none; }
.form-done .heading { margin-top: var(--s3); }
.form-done-lede { margin-top: var(--s3); color: var(--ink-2); }
.form-done-summary { margin: var(--s5) 0 0; border-top: 1px solid var(--rule); }
.form-done-summary > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding-block: var(--s3); border-bottom: 1px solid var(--rule); }
.form-done-summary dt { font-size: var(--fs-small); font-weight: 500; color: var(--ink-3); }
.form-done-summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (min-width: 600px) { .form-done-summary > div { grid-template-columns: 7rem minmax(0, 1fr); column-gap: var(--s4); } }
.form-done-foot { margin-top: var(--s5); }
.form-done[data-state="sending"] .form-done-foot { display: none; }

/* ---------- About: licensed, insured and experienced ---------- */
.licence { align-items: start; }
.licence-number > * + * { margin-top: var(--s4); }
.licence-number .text-link { margin-top: var(--s3); }
.licence-proof { display: grid; gap: var(--s6); }
.licence-marks { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5) var(--s6); }
.licence-marks > img { width: 168px; flex: none; }
.licence-marks .rows { flex: 1 1 16em; }

/* ---------- Centred pages (thank-you, 404) and prose ---------- */
.center-page { padding-block: clamp(72px, 12vw, 160px); }
.center-page .display { margin-top: var(--s3); max-width: 14ch; }
.center-page .lede { margin-top: var(--s5); }
.center-page .actions { margin-top: var(--s6); }
.prose { max-width: 42em; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; font-size: var(--fs-heading); line-height: 1.3; letter-spacing: -.015em; }
.prose > h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }

/* ---------- Call band ---------- */
.cta { background: var(--navy); color: var(--on-dark); }
.cta .title { color: #fff; max-width: 15ch; }
.cta p { color: var(--on-dark-2); }
.cta-text { margin-top: var(--s4); max-width: 32em; }
.cta .number-link { color: #fff; }
.cta .number-link:hover { color: #D6E6FF; }
.cta .small { margin-top: var(--s2); }
.cta .actions { margin-top: var(--s5); }
.cta-grid { padding-block: var(--section); align-items: end; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy); color: var(--on-dark-2); font-size: var(--fs-small); border-top: 1px solid rgba(255, 255, 255, .12); }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6) var(--s5); padding-block: var(--s8) var(--s7); }
.foot-brand, .foot-contact { grid-column: 1 / -1; }
.foot-brand .brand img { width: 160px; }
.foot-about { margin-top: var(--s5); max-width: 24em; line-height: 1.6; color: var(--on-dark-2); }
/* The credentials' own marks under the line that names them, and Facebook and Instagram as their glyphs. */
.foot-marks { display: flex; align-items: center; gap: var(--s5); margin-top: var(--s4); }
.foot-marks a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-marks img { width: auto; height: 36px; }
.foot-social { display: flex; gap: var(--s1); margin-left: -11px; }
.foot-top .foot-social > a { justify-content: center; min-width: 44px; }
.foot-social a:hover { color: var(--cyan); text-decoration: none; }
.glyph { width: 22px; height: 22px; fill: currentColor; }
/* Share this page: the four apps' marks in white like Facebook and Instagram, each a 44px target; WeChat's panel opens
   under them with the code to scan (site/layout.mjs, shareRow). */
.foot-share { margin-top: var(--s5); }
.foot-top .foot-share-list { display: flex; flex-wrap: wrap; gap: var(--s1); margin-left: -11px; }
.share-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-control); background: none; color: #fff; cursor: pointer; }
.share-link:hover, .share-link[aria-expanded="true"] { color: var(--cyan); }
.foot-share-panel { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s3); }
.foot-share-panel[hidden], .foot-share-qr[hidden] { display: none; }
.foot-share-qr { flex: none; padding: 6px; background: #fff; border-radius: var(--r-control); }
.share-code { display: block; width: 132px; height: 132px; }
.foot-share-panel p { flex: 1 1 12rem; line-height: 1.55; color: var(--on-dark-2); }
.foot-share-status { margin-top: var(--s2); line-height: 1.55; overflow-wrap: anywhere; color: var(--on-dark-2); }
.foot-share-status:empty { display: none; }
/* For WeChat's card only: first in the page, off screen (never display:none, which WeChat skips). */
/* From 600 to 899 the contact column runs the footer's full width, so the share row sits beside the contact details
   rather than under them, and the footer stays no taller. */
@media (min-width: 600px) and (max-width: 899.98px) {
  .foot-contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); align-items: start; }
  .foot-contact > :not(.foot-share) { grid-column: 1; }
  .foot-contact .foot-share { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
.share-thumb { position: absolute; top: 0; left: -10000px; width: 480px; height: 480px; overflow: hidden; pointer-events: none; }
.foot-top h2 { font-size: var(--fs-small); font-weight: 500; color: var(--on-dark-2); margin-bottom: var(--s3); }
.foot-top ul { list-style: none; display: grid; }
/* Every footer item is a full 44px row, links and the hours alike. */
.foot-top li > a, .foot-top li > span { display: inline-flex; align-items: center; min-height: 44px; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 var(--s5); padding-block: var(--s4) var(--s6); border-top: 1px solid rgba(255, 255, 255, .12); font-size: var(--fs-small); }
.foot-legal > span { display: inline-flex; align-items: center; min-height: 44px; }
/* Lovain's credit, as on its other sites (AK, 1 Dec 2026: "Look at my lovain footer on lillianbai.co.nz. Replicate
   something like this"): its mark and small spaced capitals in Lovain's gold, the only gold on the site, under a rule. */
.foot-by { padding-block: var(--s3) var(--s5); border-top: 1px solid rgba(255, 255, 255, .12); }
.site-foot .lovain-credit { display: inline-flex; align-items: center; gap: var(--s3); min-height: 44px; color: #C9A84C; font-size: .75rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.site-foot .lovain-credit:hover { color: #C9A84C; text-decoration: none; }
.site-foot .lovain-credit:hover span { text-decoration: underline; text-underline-offset: 4px; }
.lovain-mark { flex: none; width: 20px; height: 20px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-contact { grid-column: auto; }
}
@media (min-width: 1200px) {
  .foot-top { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gap); padding-block: var(--s9) var(--s7); }
  .foot-brand { grid-column: 1 / span 4; }
  .foot-col:nth-child(2) { grid-column: 6 / span 2; }
  .foot-col:nth-child(3) { grid-column: 8 / span 2; }
  .foot-contact { grid-column: 10 / -1; }
}
/* On navy the blue focus ring is lost; white instead. */
.cta :focus-visible, .site-foot :focus-visible { outline-color: #fff; }

@media print {
  .site-head, .actionbar, .cta, .menu-btn { display: none !important; }
  .site-foot { padding-bottom: 0; }
}

/* ---------- Focal points (set per photo in site/lib/components.mjs) ---------- */
img.fp-y10 { object-position: 50% 10%; }
img.fp-y15 { object-position: 50% 15%; }
img.fp-y30 { object-position: 50% 30%; }
img.fp-y60 { object-position: 50% 62%; }
img.fp-x40 { object-position: 40% 50%; }
img.fp-x0 { object-position: 0% 50%; }
/* The gasfitter photo: the top edge in a wide frame and the right side in a square one keep the shirt's logo, which
   the photo itself cuts off, wholly out of view. */
img.fp-x70y0 { object-position: 70% 0%; }
