/* K9 Tooth Fairy — design system
   Direction A, "Playful & rounded". Tokens and fonts come from
   design-system/tokens.css; the rules for using them are in
   design-system/rules.md, which wins over anything here. */

/* ---------- Fonts (self-hosted variable fonts, latin subset) ---------- */
@font-face {
  font-family: 'Fredoka';
  src: url('/assets/fonts/fredoka-variable-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('/assets/fonts/nunito-variable-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Caveat';
  src: url('/assets/fonts/caveat-variable-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---------- Colour: brand ---------- */
  --teal-500: #247f82;   /* Brand teal. Primary buttons, icon tiles, fills. 4.74:1 with white. */
  --teal-600: #1b6466;   /* Primary button hover. */
  --teal-700: #1f6e71;   /* Teal TEXT: eyebrows, links, icons on tints (5.27:1 on mint-100). */
  --teal-900: #163f40;   /* Deep teal. Headings, dark bands, footer, secondary buttons. */
  --teal-300: #4fbdc8;   /* Light teal. Accents on deep teal only: step numbers, dots, decor. */
  --teal-200: #8fd6dd;   /* Eyebrow text on deep teal (7.05:1). */
  --tan-500: #c1843d;    /* Brand tan. Stars and decoration ONLY — 3.16:1, never body text. */
  --tan-700: #9a6424;    /* Tan TEXT: prices on stickers, "speciality" labels (4.97:1 on white). */
  --honey-300: #f3c27d;  /* Warm highlight. Closing CTA panel, decorative circles. */

  /* ---------- Colour: surfaces ---------- */
  --white: #fff;
  --mint-100: #e6f4f3;   /* Tint band: hero, reviews, advantages. */
  --mint-50: #f4faf9;    /* Card fill on white; band behind FAQs/services. */
  --sand-100: #fbf3e8;   /* Warm card: price card, before & after band. */
  --line: #dcecea;       /* Outline cards and chips (inset box-shadow, 1.5px). */
  --line-soft: #e3efee;  /* Header rule, dividers inside cards. */
  --line-strong: #cfe6e4;/* Ghost button outline (2px). */
  --paw: #cde8e5;        /* Decorative paw-print fill on mint. */

  /* ---------- Colour: text ---------- */
  --ink: #22302f;        /* Body text on light surfaces (13.7:1). */
  --ink-soft: #35504f;   /* Lead paragraphs, quotes. */
  --ink-muted: #46605f;  /* Card body, captions (≥6:1 on every light surface). */
  --heading: #163f40;    /* = --teal-900 */
  --on-dark: #c5e2e0;    /* Body text on deep teal (8.43:1). */
  --on-honey: #3d2a12;   /* Body text on honey (8.34:1). */
  --on-sand: #5b4a33;    /* Body text on sand (7.72:1). */

  /* ---------- Typography ---------- */
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Nunito', cursive;   /* Customer quotes only. */

  --quote-ink: var(--teal-700);                            /* 5.3:1+ on white, mint-50 and mint-100 */
  --quote-card: clamp(1.625rem, 1.4rem + 0.8vw, 1.875rem); /* 26 → 30px, review cards */
  --quote-pull: clamp(2rem, 1.6rem + 1.4vw, 2.4375rem);    /* 32 → 39px, pulled quotes */
  --hand-name: clamp(1.875rem, 1.4rem + 1.6vw, 2.75rem);   /* 30 → 44px, a pet's name in the smile viewer.
                                                              30px keeps the longest name beside both arrows at 375px. */
  --hand-label: clamp(1.3125rem, 1rem + 1vw, 1.875rem);    /* 21 → 30px, names on the smile wall */
  --hand-stamp: 1.625rem;                                  /* 26px, the Before / After stamps */

  --text-xs: 0.8125rem;  /* 13px  chips on mobile, fine print */
  --text-sm: 0.875rem;   /* 14px  top bar, eyebrows on mobile */
  --text-md: 1rem;       /* 16px  card body, eyebrows, mobile body */
  --text-base: 1.125rem; /* 18px  desktop body */
  --text-lead: 1.25rem;  /* 20px  hero lead */

  --h1: clamp(2.375rem, 1.6rem + 3.6vw, 4.25rem);  /* 38 → 68px */
  --h2: clamp(1.75rem, 1.3rem + 2vw, 3rem);         /* 28 → 48px */
  --h2-sm: clamp(1.625rem, 1.4rem + 1vw, 2.25rem);  /* 26 → 36px: inside panels */
  --h3: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);      /* 18 → 24px */
  --display-price: clamp(3.75rem, 2.5rem + 4vw, 5.5rem); /* 60 → 88px */

  --weight-display: 600; /* Fredoka SemiBold for every heading */
  --weight-body: 400;
  --weight-strong: 700;
  --weight-ui: 800;      /* Nunito ExtraBold: buttons, eyebrows, labels */

  --leading-tight: 1.05; /* h1 */
  --leading-heading: 1.1;
  --leading-body: 1.6;
  --tracking-heading: -0.01em;

  /* ---------- Space (8px base) ---------- */
  --space-1: 0.25rem;  /* 4 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 3.5rem;   /* 56 */
  --section-y: clamp(2.5rem, 1.5rem + 5vw, 6.5rem); /* 40 → 104px */

  --container: 1200px;
  --gutter: clamp(1.25rem, 0.9rem + 1.2vw, 2rem);   /* 20 → 32px */

  /* ---------- Shape ---------- */
  --radius-sm: 1rem;     /* 16  small icon tiles */
  --radius-md: 1.5rem;   /* 24  FAQ items, outline cards */
  --radius-lg: 1.75rem;  /* 28  standard cards */
  --radius-xl: 2.5rem;   /* 40  panels, CTA band, framed photos */
  --radius-band: 3rem;   /* 48  top corners of a band that overlaps the one above */
  --radius-pill: 999px;  /* buttons, chips, badges */
  --radius-print: 6px;   /* a polaroid card: a photo print, not a soft card */
  --radius-photo: 2px;   /* the photo inside a polaroid */
  --blob: 48% 52% 46% 54% / 54% 46% 54% 46%;  /* hero photo mask */
  --arch: 50% 50% 48px 48px / 40% 40% 48px 48px; /* homepage hero: doorway arch */

  /* ---------- Elevation ---------- */
  --shadow-float: 0 12px 30px rgb(22 63 64 / 14%);  /* stickers, floating chips */
  --shadow-photo: 0 24px 60px rgb(22 63 64 / 18%);  /* hero photo */
  --shadow-bar: 0 12px 36px rgb(22 63 64 / 22%);    /* mobile booking bar */
  --shadow-lift: 0 14px 34px rgb(22 63 64 / 22%);   /* a polaroid under the pointer */
  --scrim: rgb(22 63 64 / 58%);                     /* dims the page behind a modal */
  --error: #c0392b;                                 /* invalid field: 5.15:1 on mint-50 */

  /* ---------- Motion ---------- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 200ms;
  --dur-fade: 500ms;     /* a cross-fade: before to after in the smile viewer */
}

/* ---------- Phase 1 compatibility aliases ----------
   The old variable names map onto the new scale so the site keeps working
   while the components are converted. Removed at the end of phase 3
   (design-system/implementation-plan.md). */
:root {
  --teal: var(--teal-500);
  --teal-text: var(--teal-700);
  --teal-dark: var(--teal-900);
  --teal-light: var(--teal-300);
  --tan: var(--tan-500);
  --grey-100: var(--mint-50);
  --grey-200: var(--mint-100);
  --grey-300: var(--line-soft);
  --radius: var(--radius-md);
  --shadow: var(--shadow-float);
  --shadow-lg: var(--shadow-photo);
  --header-h: 96px;

  /* The header logo straddles the bar's bottom border at the top of the page,
     then shrinks into the bar as you scroll. --logo-p runs 0 (straddling) to
     1 (fully contained) and is set on :root by main.js. */
  --logo-min: 78px;
  --logo-max: 156px;
  --logo-p: 0;
  --logo-w: calc(var(--logo-max) - (var(--logo-max) - var(--logo-min)) * var(--logo-p));
  --logo-drop: 0px;   /* resting-position nudge; the home page overrides it */

  /* How far the page scrolls while the logo shrinks. main.js reads this, so
     the two cannot drift apart. */
  --logo-travel: 100px;

  /* Clearance a hero needs above its breadcrumb, which sits directly beneath
     the overhanging logo. While the logo is still shrinking the breadcrumb
     rises 1px per px of scroll but the logo's bottom edge rises less, so the
     gap between them closes by (travel - overhang) px. Starting at
     overhang + (travel - overhang) + gap leaves `gap` at the tightest moment,
     and the overhang cancels out — so one value is right at every breakpoint. */
  --crumb-clear: calc(var(--logo-travel) + var(--space-5));

  /* Retired by the new system; aliased so nothing breaks mid-conversion. */
  --teal-muted: var(--teal-700);
  --near-black: var(--teal-900);
}


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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Anchor targets clear the sticky header when jumped to. */
[id] { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

@media (min-width: 641px) {
  body { font-size: var(--text-base); }
}

img,
svg,
video { max-width: 100%; display: block; }

img { height: auto; }

/* <picture> generates a box that would otherwise sit between a sized
   container and its image, leaving `height: 100%` on the image resolving
   against an auto height. display:contents takes it out of layout. */
picture { display: contents; }

/* Fredoka 600, sentence case, no uppercase and no letter-spacing anywhere.
   rules.md §4 — the single biggest change from the old site. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  color: var(--heading);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--h1); line-height: var(--leading-tight); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h3); }

p { margin: 0 0 1.25rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-700); }
a:hover { color: var(--teal-900); }

ul, ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

:focus-visible {
  outline: 3px solid var(--teal-300);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Bands. rules.md §3: bands alternate, two of the same colour never touch,
   one deep teal band and one honey panel per page, hero always mint. */
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2rem, 4vw, 3.5rem); }

.section--mint { background: var(--mint-100); }
.section--grey { background: var(--mint-50); }       /* band--light */
.section--teal { background: var(--teal-900); color: var(--on-dark); }
.section--ink { background: var(--teal-900); color: var(--on-dark); }

/* A deep band that reads as a sheet sliding over the section above. */
.section--sheet {
  border-start-start-radius: var(--radius-band);
  border-start-end-radius: var(--radius-band);
}

/* Headings and copy sit left in every band but two: the closing CTA panel and
   the "Real results" panel on /before-and-after/, which answers the wall of
   photos above it and is centred under them (rules.md §5). */
.section--centred .section-head { align-items: center; text-align: center; }
.section--centred .prose { margin-inline: auto; text-align: center; }
.section--centred .btn-row { justify-content: center; }

/* A guide page runs as one column: .reading sets a 680px measure, and this
   pulls a full-width section into the same measure, head and all, so the
   steps under a paragraph are the width of that paragraph rather than the
   width of the container. Keep the 680px here and on .reading in step. */
.section--reading > .container > * { max-width: 680px; margin-inline: auto; }

.section--teal h1, .section--teal h2, .section--teal h3, .section--teal h4,
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--white); }

.section--teal a, .section--ink a { color: var(--teal-200); }
.section--teal a:hover, .section--ink a:hover { color: var(--white); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

/* ---------- Eyebrow ----------
   Sentence case, no uppercase transform and no letter-spacing (rules.md §4). */
.eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  line-height: 1.4;
  color: var(--teal-700);
  margin-bottom: 0.75rem;
}
@media (min-width: 641px) {
  .eyebrow { font-size: var(--text-md); }
}
.section--teal .eyebrow,
.section--ink .eyebrow { color: var(--teal-200); }

/* ---------- Buttons ----------
   The hit area never moves on hover; the inner surface lifts inside the
   padding the button already reserves, so a cursor resting on the edge
   cannot flicker the hover on and off. */
.btn {
  display: inline-block;
  border: 0;
  background: none;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  /* Anchors otherwise pick up the global link colour, which makes the
     outline variant teal-on-teal inside a teal section. */
  color: inherit;
  /* Room for the pill to lift into without the hit area following it. See
     the hover rules below. */
  padding-bottom: 4px;
}

/* Pills, min height 52px, Nunito 800, sentence case (rules.md §7).
   The outer/inner structure is what lets the pill lift on hover while .btn
   itself — the thing being pointed at — stays exactly where it is. */
.btn > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-ui);
  line-height: 1;
  text-align: center;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), translate var(--dur) var(--ease);
}
@media (min-width: 641px) {
  .btn > span { font-size: 1.0625rem; }
}

/* The same answer to the pointer that the cards give: lighten, gain a shadow,
   lift 4px. The colour change per variant is further down; this is the part
   every button shares. */
.btn:hover > span,
.btn:focus-visible > span { translate: 0 -4px; box-shadow: var(--shadow-float); }

@media (prefers-reduced-motion: reduce) {
  .btn:hover > span,
  .btn:focus-visible > span { translate: none; }
}

/* Header-sized pill. */
.btn--sm > span { min-height: 46px; padding: 0 22px; font-size: var(--text-md); }

.btn--primary > span { background: var(--teal-500); color: var(--white); }
.btn--primary:hover > span { background: var(--teal-600); color: var(--white); }

/* Secondary: deep teal. */
.btn--deep > span,
.btn--light > span { background: var(--teal-900); color: var(--white); }
.btn--deep:hover > span,
.btn--light:hover > span { background: #0f2f30; color: var(--white); }

/* Ghost: white with an inset outline. */
.btn--ghost > span,
.btn--outline > span,
.btn--accent > span {
  background: var(--white);
  color: var(--heading);
  box-shadow: inset 0 0 0 2px var(--line-strong);
}
.btn--ghost:hover > span,
.btn--outline:hover > span,
.btn--accent:hover > span,
.btn--ghost:focus-visible > span,
.btn--outline:focus-visible > span,
.btn--accent:focus-visible > span {
  background: var(--mint-50);
  color: var(--heading);
  box-shadow: inset 0 0 0 2px var(--line-strong), var(--shadow-float);
}

/* On a deep teal band the ghost inverts and the primary lightens. */
.section--teal .btn--ghost > span,
.section--ink .btn--ghost > span,
.section--teal .btn--outline > span,
.section--ink .btn--outline > span,
.section--teal .btn--accent > span,
.section--ink .btn--accent > span {
  background: transparent;
  color: var(--white);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 55%);
}
.section--teal .btn--ghost:hover > span,
.section--ink .btn--ghost:hover > span,
.section--teal .btn--outline:hover > span,
.section--ink .btn--outline:hover > span,
.section--teal .btn--accent:hover > span,
.section--ink .btn--accent:hover > span { background: rgb(255 255 255 / 12%); }

.section--teal .btn--primary > span,
.section--ink .btn--primary > span { background: var(--teal-300); color: var(--teal-900); }
.section--teal .btn--primary:hover > span,
.section--ink .btn--primary:hover > span { background: #6ccbd4; color: var(--teal-900); }

.btn .icon { width: 1.1em; height: 1.1em; flex: none; fill: currentcolor; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}
.btn-row--center { justify-content: center; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--teal-900);
  color: var(--mint-100);
  font-size: var(--text-sm);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  flex-wrap: wrap;
}
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: var(--white); }

.rating { display: flex; align-items: center; gap: 0.5rem; }
.rating__stars { color: var(--honey-300); letter-spacing: 2px; }
.rating__count { font-weight: var(--weight-strong); }
.topbar a { color: var(--mint-100); }
.topbar a:hover { color: var(--white); }

.topbar__note { font-weight: var(--weight-strong); }
@media (max-width: 640px) {
  .topbar__note { display: none; }
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* The logo sits astride the header's bottom border: half inside the bar, half
   hanging below it. The link keeps a constant slot in the row — the widest the
   logo ever gets — so the nav does not shift as the logo shrinks, and the image
   inside it is positioned against the bar's bottom edge rather than laid out,
   so a logo taller than the bar cannot stretch it.

   --logo-p runs 0 → 1 as the page scrolls (main.js): the image shrinks from
   --logo-max to --logo-min, and its centre travels from the bottom border up to
   the middle of the bar, where it is fully contained. */
/* The home page wears the logo half as large again at rest. It shrinks to the
   same --logo-min as everywhere else, so once you are past the top of the page
   every header looks identical. The override sits on :root because --logo-w is
   computed there. */
html.home { --logo-max: 234px; --logo-drop: 35px; }

.header__logo {
  position: relative;
  flex: none;
  align-self: stretch;
  width: var(--logo-max);
  z-index: 1;
}
.header__logo img {
  position: absolute;
  left: 0;
  /* --logo-drop nudges the resting position down without moving the shrunk
     one: it is scaled by (1 - p), so it is gone by the time the logo has to
     sit fully inside the bar. */
  bottom: calc(var(--logo-p) * var(--header-h) / 2 - var(--logo-drop) * (1 - var(--logo-p)));
  translate: 0 50%;
  width: var(--logo-w);
  height: auto;
}

/* Below the layout snap point the hero is a single centred column, so the logo
   starts centred over it. Its resting place is still the top left, but that is
   most of the header's width away — sliding it across reads as the logo flying
   over the page. So it crossfades instead: out quickly where it starts, in
   again where it lands.
   Everything but the fade therefore has to switch rather than travel, and it
   switches at --logo-step, which flips at the midpoint of the fade while
   nothing is on screen.
   The link moves, not just the image inside it: translating only the image
   would leave the click target behind at the left edge. `left` is a percentage
   of the header row's content box rather than a vw figure, so a scrollbar
   cannot throw the centring out. */
/* The swap: out and straight back in. Opacity touches zero for an instant
   rather than sitting there, so there is no stretch of the animation with no
   logo on screen, and no scroll position can hold it half-faded. */
@keyframes logo-swap {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 960px) {
  :root { --logo-step: 0; }
  html[data-logo-docked] { --logo-step: 1; }

  :root {
    --logo-w: calc(var(--logo-max) - (var(--logo-max) - var(--logo-min)) * var(--logo-step));
  }

  /* Nothing here reads --logo-p: the state is what moves, and it is either one
     or the other. The 150ms delays with a 0s duration mean position and size
     change in a single step at the animation's midpoint, while the logo is
     invisible — so the move is never seen, only its result. */
  .header__logo {
    left: calc((1 - var(--logo-step)) * 50%);
    translate: calc((1 - var(--logo-step)) * var(--logo-w) * -0.5) 0;
    transition: left 0s linear 150ms, translate 0s linear 150ms;
  }
  .header__logo img {
    bottom: calc(var(--logo-step) * var(--header-h) / 2 - var(--logo-drop) * (1 - var(--logo-step)));
    /* The resting state is always fully visible, so an animation cut short by
       a fast scroll can only ever leave the logo on screen. */
    opacity: 1;
    transition: width 0s linear 150ms, bottom 0s linear 150ms;
  }
  html[data-logo-swap] .header__logo img { animation: logo-swap 300ms ease; }
}

/* Reduced motion gets the state change with no fade and no delay. */
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .header__logo,
  .header__logo img { transition: none; }
  html[data-logo-swap] .header__logo img { animation: none; }
}

/* The logo takes its one-column size and resting position from here down,
   not at the 960px layout snap — asked for deliberately, so the header does
   not change twice on the way down. The nav itself collapses later, at 960.
   --header-h belongs with the logo: its resting offset is calculated from the
   bar's height, so moving one without the other would shift it. */
@media (max-width: 1060px) {
  :root {
    --header-h: 84px;
    --logo-min: 60px;
    /* The same size the one-column layout uses, not a smaller step in between.
       The nav collapses here while the hero is still two columns, and dropping
       the logo to 120px for that band made the header look like a different
       site for 100px of width. Coming down from the desktop 234/156px, this
       reads as the logo easing down as the columns run out of room. */
    --logo-max: 180px;
    /* Size and resting position are both fixed from here down: the header
       should not change again between this breakpoint and the layout one. */
    --logo-drop: 20px;
  }
  /* The home page's 234px logo and its resting nudge are desktop-only. These
     resets are required, not redundant: html.home outranks :root, so without
     them the home page would keep the desktop values all the way down. */
  html.home { --logo-max: 180px; --logo-drop: 20px; }
}

.nav { display: flex; align-items: center; gap: 2rem; }

/* Everything in the header bar stays on one line for as long as the bar
   exists. Without this the two-word items break in half over the last 30px
   before the drawer takes over, which reads as the header falling apart just
   before it changes. The gap closes up instead, which nobody notices. */
@media (min-width: 961px) {
  /* All three gaps close together as the bar narrows and open back up by
     1200px, which is the only slack available: the logo slot is fixed at
     --logo-max and the nav, phone and button are all their own text wide. */
  .header .container { gap: clamp(12px, calc(5.4vw - 40px), 24px); }
  .nav,
  .nav__list { gap: clamp(13px, calc(8.5vw - 70px), 32px); }
  .nav__link,
  .nav__phone,
  .header__cta,
  .header__cta span { white-space: nowrap; }
}
.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list > li { margin: 0; position: relative; }
.nav__link {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease);
}
.nav__link:hover,
.nav__link[aria-current='page'] { color: var(--teal-700); border-bottom-color: var(--teal-500); }

/* Phone number sits in the nav, in Nunito 800 teal. */
.nav__phone {
  font-weight: var(--weight-ui);
  font-size: var(--text-md);
  color: var(--teal-700);
  text-decoration: none;
  white-space: nowrap;
}
.nav__phone:hover { color: var(--teal-900); }

/* Dropdowns: hover/focus on desktop, a click-driven accordion in the drawer.
   The two mechanisms live in separate media queries on purpose. While they
   shared a scope, `.nav__item--has-sub:hover .nav__sub` (0,3,0) outweighed
   `.nav__sub[data-open='true']` (0,2,0), so an opened submenu stayed collapsed
   until the pointer left, appeared once it did, and shut again on re-entry —
   which made the sub-items impossible to click. */
.nav__sub {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  display: none;
}
.nav__sub[data-open='true'] { display: block; }

@media (min-width: 961px) {
  .nav__sub {
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
    /* Measured, not guessed: "Cosmetic Cat Teeth Cleaning" is the longest
       entry at 214px of text, plus 32px of link padding and 16px of panel
       padding, so it needs 262. 272 leaves a little headroom. It wrapped to
       two lines at the old 240 once the services were renamed. */
    min-width: 272px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
  }
  .nav__item--has-sub:hover > .nav__sub,
  .nav__item--has-sub:focus-within > .nav__sub { display: block; }
}

.nav__sub li { margin: 0; }
.nav__sub a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  color: var(--ink);
  text-decoration: none;
}
.nav__sub a:hover { background: var(--mint-50); color: var(--teal-700); }

/* Parent link and its disclosure button share a row in the drawer. */
.nav__row { display: contents; }

.nav__sub-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.nav__sub-toggle svg { width: 20px; height: 20px; fill: currentcolor; transition: rotate 0.2s ease; }
.nav__sub-toggle[aria-expanded='true'] svg { rotate: 180deg; }

.nav__cta { display: none; }

.nav__toggle {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--mint-100);
  cursor: pointer;
  color: var(--heading);
}
.nav__toggle svg { width: 26px; height: 26px; fill: currentcolor; }
.nav__toggle .icon--close { display: none; }
.nav__toggle[aria-expanded='true'] .icon--menu { display: none; }
.nav__toggle[aria-expanded='true'] .icon--close { display: block; }

@media (max-width: 960px) {
  /* Sits above the open drawer so it stays reachable as the close control. */
  .nav__toggle { display: inline-flex; position: relative; z-index: 60; }
  .header__cta { display: none; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 55;
    width: min(360px, 85vw);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 5.5rem 1.5rem 2rem;
    box-shadow: var(--shadow-lg);
    translate: 100% 0;
    /* Hidden rather than merely off-screen, so the links are not tabbable
       while the drawer is shut. */
    visibility: hidden;
    overflow-y: auto;
  }

  /* The transition is attached only once JS has driven the drawer at least
     once. Without this, shrinking past the breakpoint animates the panel from
     its desktop position out to the right, which reads as the menu opening
     and closing by itself. `data-resizing` suppresses it again while the
     viewport is being dragged across the breakpoint. */
  .nav[data-open] { transition: translate 0.25s ease, visibility 0.25s; }
  html[data-resizing] .nav { transition: none; }

  .nav[data-open='true'] { translate: 0 0; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line-soft);
    flex: 1;
    font-family: var(--font-display);
    font-weight: var(--weight-display);
    font-size: 1.375rem;
  }
  .nav__link[aria-current='page'] { border-bottom-color: var(--teal-500); }
  .nav__phone { display: none; }

  /* The row becomes a real flex container so the chevron sits beside the link. */
  .nav__row { display: flex; align-items: center; gap: 0.5rem; }
  .nav__sub-toggle { display: inline-flex; }
  .nav__cta { display: block; margin-top: 1.5rem; }
  /* Indented accordion panel. Visibility is driven only by the toggle's
     data-open, so hovering never interferes. */
  .nav__sub { padding: 0 0 0.5rem 1rem; }
  .nav__backdrop {
    position: fixed;
    inset: 0;
    /* Below the sticky header (z-index 50), which is its own stacking
       context and holds both the drawer and the toggle that closes it. */
    z-index: 45;
    background: rgb(0 0 0 / 45%);
    border: 0;
    padding: 0;
    cursor: pointer;
  }
}

/* Below 400 the 85vw drawer left a useless sliver of page beside it and
   squeezed the links, so it takes the full width instead. The toggle stays at
   z-index 60 above it and remains the way out — there is no longer any
   backdrop to tap, and the shadow has nothing to fall on. */
@media (max-width: 399px) {
  .nav {
    width: 100%;
    box-shadow: none;
  }
}

/* ---------- Hero ----------
   Mint band, text first, photo carrying the page's mask (rules.md §6). */
.hero {
  background: var(--mint-100);
  padding-block: var(--crumb-clear) 104px;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--space-8);
  align-items: center;
  position: relative;
}
/* Above everything in .hero__media (circle 2, sticker and rating chip 3). As
   the viewport narrows towards the snap point the circle reaches across into
   this column, and the buttons have to stay clickable and legible. */
.hero__copy { display: flex; flex-direction: column; gap: var(--space-5); align-items: flex-start; position: relative; z-index: 4; }
.hero__copy h1 { margin: 0; }
.hero__lead { font-size: var(--text-lead); color: var(--ink-soft); max-width: 34em; margin: 0; }
.hero .btn-row { margin-top: 0; }

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  font-weight: var(--weight-strong);
  font-size: var(--text-md);
  color: var(--ink-soft);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; list-style: none; margin: 0; }
.hero__facts .icon { width: 18px; height: 18px; flex: none; fill: var(--teal-700); }

.hero__media { position: relative; width: 100%; max-width: 520px; justify-self: center; }
.hero__media img { display: block; width: 100%; object-fit: cover; }

/* One signature mask per page type. */
.hero__media--blob img {
  aspect-ratio: 1;
  border-radius: var(--blob);
  border: 10px solid var(--white);
  box-shadow: var(--shadow-photo);
}
/* The arch frame lives on <picture>, not on the <img>, so the photo can be
   scaled inside it and clipped by the frame. Putting the mask on the image
   itself would scale the mask and the white border along with the photo. */
.hero__media--arch > picture {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--arch);
  border: 10px solid var(--white);
  box-shadow: var(--shadow-photo);
}
.hero__media--arch > picture > img {
  width: 100%;
  height: 100%;
  /* Zoom into the existing framing, anchored to the bottom-left corner, so the
     crop comes off the top and the right. */
  scale: 1.15;
  transform-origin: 0% 100%;
}

/* The arch sits 30px left of its column, and the rating pill stays at the
   container's edge so it breaks out over the photo's right side by the same
   30px. The sticker and the circle travel with the photo so their overlap
   with it is unchanged. */
.hero__media--arch > picture,
.hero__media--arch > .sticker { translate: -30px 0; }

/* The circle travels with the photo like the sticker, plus a nudge that keeps
   its centre where it sat at the old 38% width. Growing a box anchored at its
   left and bottom edges moves the centre by half the growth, up and to the
   right; half of (51.3% - 38%) is 12.963% of the new width. */
.hero__media--arch > .hero__circle { translate: calc(-30px - 12.963%) 12.963%; }

.hero__media--arch > .rating-chip { right: 0; }
.hero__media--plain img { border-radius: var(--radius-xl); }

/* Homepage circle overlapping the lower-left of the arch. */
.hero__circle {
  position: absolute;
  left: -6%;
  bottom: -4%;
  width: 51.3%;   /* 35% larger than the original 38%; see the translate above */
  z-index: 2;
}
/* Same arrangement as the arch: the frame is on <picture> so the photo can be
   scaled inside it and clipped, instead of the ring scaling with the photo. */
.hero__circle > picture {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-pill);
  border: 8px solid var(--white);
  box-shadow: var(--shadow-float);
}
.hero__circle img {
  width: 100%;
  height: 100%;
  /* Zoom anchored bottom-right, so the crop comes off the top and the left.
     The circle itself does not change size. */
  scale: 1.2;
  transform-origin: 100% 100%;
}

/* One large faint paw in the top right of the mint band, flush with the
   corner rather than bleeding off it. Any further in and the hero photo covers
   it — there is only ~33px of mint right of the container. Hidden below 961px.
   Was -40px on every page but the home page; the two now match. */
.hero__paw {
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  color: var(--paw);
  fill: currentcolor;
  pointer-events: none;
  z-index: 0;
}

.sticker {
  position: absolute;
  top: 4%;
  left: -8%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 22px;
  padding: 14px 18px;
  box-shadow: var(--shadow-float);
  rotate: -4deg;
}
.sticker__label { font-size: var(--text-xs); font-weight: var(--weight-ui); color: var(--teal-700); }
.sticker__price { font-family: var(--font-display); font-weight: var(--weight-display); font-size: 2.125rem; line-height: 1.05; color: var(--tan-700); }
.sticker__note { font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--ink-soft); }

.rating-chip {
  position: absolute;
  right: 2%;
  bottom: 6%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-900);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-weight: var(--weight-ui);
  font-size: 0.9375rem;
  box-shadow: var(--shadow-float);
  white-space: nowrap;
}
.rating-chip .star { color: var(--honey-300); }

/* Location / area badge above the h1. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--teal-700);
  font-weight: var(--weight-ui);
  font-size: 0.9375rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}
.badge .icon { width: 16px; height: 16px; fill: currentcolor; }

/* Compact heroes are single-column with the copy first, so the breadcrumb sits
   under the logo exactly as it does on a full hero and needs the same clearance.
   Only the bottom is compact. */
.hero--compact { padding-block: var(--crumb-clear) 56px; }
.hero--compact .container { grid-template-columns: 1fr; }
/* A compact hero renders no photo (the macro skips .hero__media entirely), so
   there is no second column to leave room for and the h1 takes the full
   container. The lead keeps its own 34em measure from .hero__lead — a 1140px
   line of body copy is unreadable even where the heading above it is fine. */
.hero--compact .hero__copy { max-width: none; }

@media (max-width: 960px) {
  /* Single column: the copy leads and the photo wraps underneath it, with
     everything centred on the page. */
  .hero { padding-block: var(--crumb-clear) 40px; }
  .hero--compact { padding-block: var(--crumb-clear) 40px; }
  .hero .container { grid-template-columns: 1fr; gap: 28px; }
  .hero__copy { align-items: center; text-align: center; }
  .hero__copy .btn-row,
  .hero__copy .hero__facts { justify-content: center; }
  .hero__lead { margin-inline: auto; }
  .hero__media { max-width: 420px; }

  /* The 30px offsets exist to break the composition out of its column on a
     two-column layout. In one column they just pull it off centre, so the
     frame and its attachments sit square. Note this resets <picture>, which
     is what carries the translate — not the <img> inside it. */
  .hero__media--arch > picture,
  .hero__media--arch > .hero__circle,
  .hero__media--arch > .sticker { translate: none; }
  .hero__media--arch > .rating-chip { right: 2%; }
  /* Gone entirely below this point: in one centred column it has no corner to
     sit in without crowding the copy or the photo. */
  .hero__paw { display: none; }
  .sticker { left: -4%; padding: 12px 14px; }
  .sticker__price { font-size: 1.75rem; }

  /* Nothing for the logo here: size and position are both settled by the
     1060px block and carry through unchanged. */
}

/* Home page hero, desktop only. A min-width query rather than a specificity
   fight: `html.home .hero` would otherwise outrank the ≤960px rules above and
   follow the layout onto phones. */
@media (min-width: 961px) {
  /* The home page carries no breadcrumb, so it does not need --crumb-clear and
     can have an even 100px frame instead. Every other page keeps the clearance.*/
  html.home .hero { padding-block: 100px; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.9375rem; font-weight: var(--weight-strong); color: var(--ink-muted); }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumbs li { margin: 0; display: flex; gap: 0.5rem; align-items: center; }
.breadcrumbs li + li::before { content: '/'; opacity: 0.5; }
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--teal-700); }

/* ---------- Section head and prose ----------
   Left-aligned, full container width (rules.md §5) so headings set on one line
   rather than wrapping early. Centring is reserved for the closing CTA panel. */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: var(--space-7);
}
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.section-head .lead { font-size: var(--text-lead); color: var(--ink-soft); }
@media (max-width: 640px) { .section-head { margin-bottom: var(--space-6); } }

.prose { max-width: 68ch; }
/* Copy sitting between a heading block and the cards it introduces: it closes
   up on the heading and keeps the usual 48px before the cards. */
.locations-intro { margin-bottom: var(--space-7); }

/* Studio map. The frame carries the radius and clips the iframe's square
   corners; the iframe itself has no border of its own. */
.map-frame {
  /* Explicit width, or the capped height below feeds back through the ratio
     and the frame shrinks to 782px instead of filling the container. */
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--mint-50);
  box-shadow: inset 0 0 0 1.5px var(--line);
  /* 16:9 would be 642px tall in a 1140px container, which swamps the page for
     something that is orientation, not the point of it. */
  aspect-ratio: 16 / 9;
  max-height: 440px;
}
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-frame__canvas { width: 100%; height: 100%; }
.map-note { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--ink-muted); }

/* The "i" on the attribution button. Declared here rather than in tokens.css
   because it is an icon shape, not a design-system value. */
.map-frame {
  --map-info-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='6.4' r='1.6'/%3E%3Crect x='10.4' y='9.6' width='3.2' height='8.2' rx='1.6'/%3E%3C/svg%3E");
  --map-plus-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='10.6' y='4' width='2.8' height='16' rx='1.4'/%3E%3Crect x='4' y='10.6' width='16' height='2.8' rx='1.4'/%3E%3C/svg%3E");
  --map-minus-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='10.6' width='16' height='2.8' rx='1.4'/%3E%3C/svg%3E");
}

/* ---------- MapLibre controls ----------
   MapLibre ships a Mapbox-era grey chrome: square white boxes, 1px borders, a
   permanent attribution bar across the bottom. These rules restate it in the
   site's own chips — white pill, soft shadow, teal glyph — so the map's
   furniture matches the rating chip and the sticker it sits near.

   Everything is scoped to .map-frame, so nothing here can reach a future map
   that wants the stock look. */
.map-frame .maplibregl-ctrl-group {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.map-frame .maplibregl-ctrl-group button + button { border-top: 1px solid var(--line-soft); }
.map-frame .maplibregl-ctrl-group button:not(:disabled):hover { background-color: var(--mint-50); }
/* MapLibre draws + and - as #333 SVGs. Masking them lets the token supply the
   colour, so the buttons match the "i" and the rest of the page's icons. */
.map-frame .maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  background-image: none;
  background-color: var(--teal-700);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 17px 17px;
  mask-size: 17px 17px;
}
.map-frame .maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
  -webkit-mask-image: var(--map-plus-glyph);
  mask-image: var(--map-plus-glyph);
}
.map-frame .maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
  -webkit-mask-image: var(--map-minus-glyph);
  mask-image: var(--map-minus-glyph);
}

/* The attribution is a <details>: the ⓘ summary is always there and the
   credits appear beside it only once it is opened. MapLibre's own CSS does the
   showing and hiding; this is only how the two states look. */
/* .maplibregl-compact is the state class MapLibre puts on the <details>, and it
   carries its own white box with a 12px radius. Left alone that box sits behind
   the button as an empty white slab, so it is cleared here and the button below
   is the only chip on screen. */
.map-frame .maplibregl-ctrl-attrib,
.map-frame .maplibregl-ctrl-attrib.maplibregl-compact {
  background: none;
  margin: 0 10px 10px 0;
  padding: 0;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: var(--text-xs);
}
.map-frame .maplibregl-ctrl-attrib-button {
  width: 28px;
  height: 28px;
  background-color: var(--white);
  background-image: none;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  position: relative;
}
/* An "i" drawn as a mask rather than a coloured SVG, so the colour stays
   var(--teal-700) instead of a second copy of the teal hex living inside a
   data URI where no token can reach it. */
.map-frame .maplibregl-ctrl-attrib-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--teal-700);
  -webkit-mask: var(--map-info-glyph) center / 15px 15px no-repeat;
  mask: var(--map-info-glyph) center / 15px 15px no-repeat;
}
.map-frame .maplibregl-ctrl-attrib-button:focus-visible {
  box-shadow: var(--shadow-float), 0 0 0 3px var(--line-strong);
}
.map-frame .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
  background: var(--white);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  padding: 6px 14px;
  margin-right: 6px;
  color: var(--ink-muted);
}
.map-frame .maplibregl-ctrl-attrib a { color: var(--teal-700); }

/* Two fingers pan, one finger scrolls the page. The stock overlay is a black
   scrim with system type. */
.map-frame .maplibregl-cooperative-gesture-screen {
  background: rgb(22 63 64 / 55%);
  font-family: var(--font-body);
  font-weight: var(--weight-ui);
}

/* The studio itself: the same teal dot the step numbers and icon tiles use. */
.map-pin { display: block; width: 22px; height: 22px; }
.map-pin__inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--teal-500);
  box-shadow: 0 0 0 4px var(--white), var(--shadow-float);
}
@media (max-width: 640px) {
  .map-frame { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
}
.section-head:has(+ .locations-intro) { margin-bottom: var(--space-5); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-bottom: 0; }

/* The old centred variant is retained only so pages that still pass it do not
   break; it no longer centres text (rules.md §5). Removed once phase 4 is done. */
.prose--center { margin-inline: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.split__media img { border-radius: var(--radius-xl); width: 100%; }

/* Stacked, a portrait photo here runs the full column width and towers over
   the copy beside it — 350x525 on a phone before this. 3/2 is the ratio the
   landscape photos in these panels already have, so they are untouched and
   only the portrait ones are cropped. The framed portrait is excluded: its
   4/5 shape is the point of it. */
@media (max-width: 960px) {
  .split__media:not(.split__media--framed) img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: 50% 45%;
  }
}

/* The FAQ panel's photo. Four of the five used here are portrait, and at the
   desktop column width they ran to 813px beside a list of about 500 — the
   photo set the height of the whole panel. Capped at 600 and cropped evenly
   top and bottom; the one landscape photo is 361px and never reaches the cap. */
.split__media--faq img { max-height: 600px; object-fit: cover; object-position: 50% 50%; }

/* Stacked, the photo only pushes the questions down the page — it is there to
   balance the list beside it, and with nothing beside it there is nothing to
   balance. Gone below the snap point, on every page this panel appears on. */
@media (max-width: 960px) {
  .split__media--faq { display: none; }
}

/* Framed photo: the image sits on a tinted rectangle offset down and right. */
.split__media--framed { position: relative; }
.split__media--framed::before {
  content: '';
  position: absolute;
  inset: 24px -24px -24px 24px;
  border-radius: var(--radius-xl);
  background: var(--mint-100);
}
.split__media--framed img { position: relative; aspect-ratio: 4 / 5; object-fit: cover; }

/* Meet Avery: the photo sits at the top of its column rather than floating
   against the middle of a much taller story. The heading is a separate grid
   item from the rest of the copy so that one column can lay it over the photo.
   Row gap is set apart from column gap: --space-8 between the columns is right,
   but that much between the h2 and the paragraphs below it is not. */
.split--avery {
  align-items: start;
  grid-template-areas: 'media head' 'media body';
  grid-template-rows: auto 1fr;
  column-gap: var(--space-8);
  row-gap: var(--space-4);
}
.split--avery > .split__media { grid-area: media; }
.split--avery > .avery__head { grid-area: head; }
.split--avery > .avery__body { grid-area: body; }

/* Every split stacks at 960px except Meet Avery, which holds two columns down
   to the 640px snap point — hence the :not() here and its own block below,
   rather than one rule with two breakpoints. */
@media (max-width: 960px) {
  .split:not(.split--avery) { grid-template-columns: 1fr; gap: 40px; }
  .split--media-first > :first-child { order: 0; }
  .split:not(.split--avery) .split__media { order: -1; }
  .split:not(.split--avery) .split__media--framed::before { inset: 16px -16px -16px 16px; }
}

@media (max-width: 640px) {
  /* One column, and the heading moves into the photo's grid area so it reads
     over the picture instead of above the story. */
  .split--avery {
    grid-template-columns: 1fr;
    grid-template-areas: 'media' 'body';
    gap: 40px;
  }
  .split--avery .split__media--framed::before { inset: 16px -16px -16px 16px; }

  /* A gradient behind the words, because white type over an uncontrolled
     photograph is a contrast failure waiting for the wrong image. */
  .split--avery > .split__media--framed::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background: linear-gradient(to top, var(--scrim), transparent);
    z-index: 1;
  }

  .split--avery > .avery__head {
    grid-area: media;
    align-self: end;
    position: relative;
    z-index: 2;
    text-align: center;
    /* 60px clear of the bottom at 640px, easing to 30px at 320px: 9.375vw is
       exactly that line, and the clamp holds it either side of the range. */
    padding: 0 20px clamp(30px, 9.375vw, 60px);
  }
  .split--avery > .avery__head h2 {
    color: var(--white);
    /* Without this the h2's own bottom margin adds ~17px and the offset above
       stops meaning what it says. */
    margin-bottom: 0;
    /* Twice the normal h2 where it first lands on the photo, easing back to
       the normal size by 320px. --h2 is clamp(1.75rem, 1.3rem + 2vw, 3rem),
       so it computes to 33.6px at 640 and hits its 28px floor at 320: this
       line runs 67.2px -> 28px across exactly that range. */
    font-size: clamp(1.75rem, -0.7rem + 12.25vw, 4.2rem);
    line-height: 1.05;
  }
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

@media (max-width: 960px) {
  .grid, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid, .grid--4, .grid--2 { grid-template-columns: 1fr; gap: var(--space-3); }
  .span-2 { grid-column: auto; }
}

/* ---------- Icon tiles ---------- */
.icon-tile {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--teal-500);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-tile .icon, .icon-tile svg { width: 26px; height: 26px; fill: currentcolor; }
.icon-tile--soft {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--mint-100);
  color: var(--teal-700);
}
@media (max-width: 640px) { .icon-tile { width: 40px; height: 40px; border-radius: var(--radius-sm); } }

/* ---------- Cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 28px;
  height: 100%;
}
.card h3 { margin: 0; }
.card p { font-size: var(--text-md); color: var(--ink-muted); margin: 0; }

/* Feature card: no container of its own. The icon tile and the text sit
   straight on whatever band the section is, on any background — only the
   icon tile carries a fill. */
.card--feature {
  background: transparent;
  /* No side padding, and only 12px top and bottom, at every width. */
  padding: 12px 0;
}
/* Keeps the h3/p spacing identical to when they were siblings of the icon. */
.card--feature .card__text { display: flex; flex-direction: column; gap: 12px; }

/* The feature grid holds two columns further down than the other grids: it
   drops to one at 540px rather than at 640px. */
@media (max-width: 640px) and (min-width: 541px) {
  .grid--features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* One column: the icon moves beside the text rather than sitting above it. */
@media (max-width: 540px) {
  .card--feature { flex-direction: row; align-items: flex-start; gap: 14px; }
}

/* Service card: white, inset outline, photo on top, price pinned to the foot. */
.card--service {
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

/* Same answer to the pointer as every other whole-card link: lighten, gain a
   shadow, lift 4px. It was background-only because the card was itself the
   anchor, and lifting the hit area would have slid it out from under a cursor
   on its bottom edge. The .card-link wrapper is the hit area now, so the lift
   is safe. The border is an inset shadow, so the float shadow is added to it
   rather than replacing it. */
.card-link:hover > .card--service,
.card-link:focus-visible > .card--service {
  background: var(--mint-50);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-float);
}
.card--service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card--service .card__body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card__price {
  margin-top: auto;
  padding-top: 8px;
  font-weight: var(--weight-ui);
  color: var(--heading);
  font-size: var(--text-md);
}

/* Featured service: spans two columns, mint fill, photo right. */
.card--service-wide {
  background: var(--mint-100);
  box-shadow: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
/* The featured card has no border to preserve, so it takes the float shadow
   on its own. */
.card-link:hover > .card--service-wide,
.card-link:focus-visible > .card--service-wide {
  background: #dbefed;
  box-shadow: var(--shadow-float);
}
/* Focal points come from services.json via the picture shortcode, so each
   photo stays on its subject whatever ratio a card crops it to. */
.card--service-wide img { height: 100%; min-height: 320px; aspect-ratio: auto; }
.card--service-wide .card__body { padding: 36px; gap: 16px; }
/* Full width on the two-column grid, where the portrait photo laid out at its
   own ratio made the panel ~576px tall for ~214px of copy. A landscape ratio
   roughly halves it and crops the photo top and bottom instead; object-position
   above keeps the dog's face in the frame. */
@media (max-width: 960px) and (min-width: 641px) {
  /* The other photos match the speciality card's image height. They are not
     the same ratio as it, because they are one grid column wide while its
     image is half a full-width card — wider by the column gap. 1.46 against
     its 3/2 is what lands the two heights together across this band.
     This rule comes first on purpose: it has the same specificity as the
     --wide rules below, so whichever is written last wins. */
  .card--service img { aspect-ratio: 1.46; }

  /* The 3/2 goes on <picture>, not the image, and as padding rather than
     aspect-ratio. `picture { display: contents }` normally makes the image
     itself the grid item, and an aspect-ratio makes a grid item's height
     definite — which means it will not stretch, so once the copy grew taller
     than the photo the photo stopped short and left a gap beneath it. Padding
     sets the same ratio while leaving height auto, so the row still gets the
     3/2 figure and the picture still stretches past it when the copy is
     taller. The image is then positioned to fill whatever that comes to. */
  .card--service-wide > picture { display: block; position: relative; overflow: hidden; }
  .card--service-wide > picture::before { content: ''; display: block; padding-top: 66.667%; }
  .card--service-wide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 0;
  }
}

/* Stacks with every other card at 640px, not at the 960px grid change. At 960
   the grid drops to two columns and this card, spanning both, gets a full row
   to itself — more than enough to keep the photo and copy side by side. */
/* One card per row. Rather than stack photo over copy — which at this width
   makes the photo as wide as the screen and very tall — every card takes the
   speciality card's shape: photo left, copy right. The photo fills its half,
   using the same padding-ratio trick so it can stretch when the copy is the
   taller of the two. */
@media (max-width: 640px) and (min-width: 451px) {
  .card--service {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .card--service > picture { display: block; position: relative; overflow: hidden; }
  .card--service > picture::before { content: ''; display: block; padding-top: 66.667%; }
  .card--service img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 0;
  }
  /* The speciality card is already this shape; it only needs its photo back on
     the left, since the stacked rule below puts it first. */
  .card--service-wide img { order: 0; }
}

/* Too narrow for two columns: photo above copy, and the copy loses some of
   its padding to leave room for the words. */
@media (max-width: 450px) {
  /* The heights settled on earlier: a ratio here would tie the photo to the
     full screen width and make it tower over the copy again. */
  .card--service img {
    aspect-ratio: auto;
    height: clamp(210px, calc(202px + 2.5vw), 218px);
    object-fit: cover;
  }
  .card--service .card__body { padding: 24px; }
  .card--service-wide { grid-template-columns: 1fr; }
  .card--service-wide > picture { display: contents; aspect-ratio: auto; }
  .card--service-wide .card__body { padding: 24px; }
  .card--service-wide img {
    min-height: 0;
    height: clamp(175px, calc(168px + 2.2vw), 182px);
    order: -1;
  }
}

/* Outline card: no fill, inset line, icon beside the text. */
.card--outline {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}
.section--teal .card--outline,
.section--ink .card--outline { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 22%); }

/* The h3 and p inside an outline card are both margin-zeroed by .card, which
   left them touching. Every outline card, not just the two in the locations
   row — the same pair appears in the steps, FAQ and price panels. */
.card--outline > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
/* These two cards carry more text than the other .grid--2 pairs, so they go to
   one column earlier than the 640px the shared class uses. */
@media (max-width: 740px) {
  .grid--locations { grid-template-columns: 1fr; }
}

/* Prompt card: deep teal, used once at the end of a grid. */
.card--prompt {
  background: var(--teal-900);
  color: var(--on-dark);
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  /* The card is as tall as whatever service card shares its row, which has a
     photo, so it usually has height to spare. Once the button wraps onto its
     own line, the default align-content stretches the two lines apart and
     strands the button at the bottom; centring packs them back together with
     only the row gap between, in the middle of the card. */
  align-content: center;
  gap: 20px;
  padding: 32px 36px;
}
.card--prompt h3 { color: var(--white); }
.card--prompt p { color: var(--on-dark); }

/* The question and the answer are separate thoughts; .card zeroes the margins
   on both, which left them touching. Applies at every width. */
.card--prompt > div { display: flex; flex-direction: column; gap: var(--space-2); }

/* One cell wide at every width, deliberately. Six services and a two-cell
   feature card leave the three-column grid one cell short of a full last row;
   stretching this card across the gap was tried and read as a banner rather
   than a card, so the empty cell stays empty. */

.label-sand {
  align-self: flex-start;
  background: var(--white);
  color: var(--tan-700);
  font-weight: var(--weight-ui);
  font-size: var(--text-sm);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

/* Whole-card links. These sit beside outline cards that are *not* links and
   look identical at rest, so they answer the pointer: the card lightens,
   gains a shadow and lifts 4px.

   The anchor is the hit area and never moves — only the card inside it does.
   The 4px of padding below gives the lift somewhere to go that the hit area
   already covers, so a pointer resting on the bottom edge cannot fall off the
   card, end the hover, and start it flickering. */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  padding-bottom: 4px;
}
.card-link > .card {
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              translate var(--dur) var(--ease);
}
.card-link:hover > .card,
.card-link:focus-visible > .card { translate: 0 -4px; }

.card-link:hover > .card--feature,
.card-link:focus-visible > .card--feature { background: var(--mint-100); box-shadow: var(--shadow-float); }
.section--mint .card-link:hover > .card--feature { background: var(--mint-50); }

/* The outline card draws its border with an inset shadow, so the lift shadow
   has to be added to it rather than replace it. */
.card-link:hover > .card--outline,
.card-link:focus-visible > .card--outline {
  background: var(--mint-50);
  box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--shadow-float);
}
.section--mint .card-link:hover > .card--outline,
.section--mint .card-link:focus-visible > .card--outline { background: var(--white); }

/* Nothing hovers on a touchscreen, so the heading carries the signal that the
   card goes somewhere. */
@media (hover: none) {
  .card-link .card h3 { text-decoration: underline; text-underline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-link:hover > .card,
  .card-link:focus-visible > .card { translate: none; }
}

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li {
  background: rgb(255 255 255 / 6%);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  gap: 20px;
  margin: 0;
}
.steps__num {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: var(--teal-300);
  color: var(--teal-900);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { color: var(--white); margin: 0 0 4px; }
.steps p { font-size: var(--text-md); color: var(--on-dark); margin: 0; }
@media (max-width: 640px) { .steps li { padding: 20px; gap: 14px; } }

/* ---------- How a visit goes: the photo answers to the steps ----------
   In all three arrangements the photo is positioned absolutely inside its
   wrapper, so it contributes no height of its own: the row is sized by what
   sits beside it, and the photo then fills that height and crops top and
   bottom to fit. max-height caps it at the wrapper, and height:auto keeps it
   at its natural size when there is more room than it needs — so it stretches
   past neither the steps nor itself. */
.steps-head { margin-bottom: var(--space-5); }

.split--steps .steps-media img {
  position: absolute;
  inset: 0 0 auto;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* Two columns: the copy at the top of the left column, the photo taking
   exactly what the steps leave underneath it. */
@media (min-width: 961px) {
  .split--steps { align-items: stretch; }
  .steps-copy { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .split--steps .steps-media { position: relative; min-height: 0; }
}

/* One column, but still a wide enough screen to put the photo beside the copy
   at a third of the width rather than full width underneath it. It is never
   taller than the heading and paragraph it sits next to. */
@media (min-width: 691px) and (max-width: 960px) {
  .steps-copy { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-5); align-items: stretch; }
  .steps-head { margin-bottom: 0; grid-area: 1 / 1; }
  /* The stacked rule above sends every .split__media to order: -1, which in a
     grid puts the photo in the first column. Both are placed explicitly. */
  .split--steps .steps-media { position: relative; grid-area: 1 / 2; order: 0; }
  .split--steps .steps-media img { aspect-ratio: auto; }
}

/* Narrow: the photo drops below the copy at full width, cropped to 3/2 by the
   stacked rule the other split panels use. */
@media (max-width: 690px) {
  .split--steps .steps-media img { position: static; max-height: none; }
}

/* ---------- Price card and scope note ---------- */
.price-card {
  background: var(--sand-100);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.price-card .eyebrow { color: var(--tan-700); margin: 0; }
.price-card__amount { display: flex; align-items: baseline; gap: 12px; }
.price-card__amount strong {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--display-price);
  line-height: 1;
  color: var(--heading);
}
.price-card p { color: var(--ink-muted); margin: 0; }
@media (max-width: 640px) { .price-card { padding: 28px 24px; } }

.note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--mint-50);
  border-radius: 20px;
  padding: 18px 20px;
  font-size: var(--text-md);
  color: var(--ink-soft);
}
.note .icon { flex: 0 0 auto; width: 22px; height: 22px; fill: var(--teal-700); margin-top: 2px; }

.note--scope p { margin: 0; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { margin: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  background: var(--mint-100);
  color: var(--heading);
  font-weight: var(--weight-strong);
  font-size: 0.9375rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.section--mint .chip, .section--grey .chip { background: var(--white); }
a.chip {
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: var(--weight-ui);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease);
}
a.chip:hover { background: var(--mint-50); color: var(--heading); }

/* ---------- Promise strip ----------
   Static. The marquee is gone: it animated indefinitely, and the words are a
   list, not motion (rules.md §7). */
.strip { background: var(--teal-900); padding-block: 22px; }
.strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.375rem;
  line-height: 1.2;
}
.strip li { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.strip li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--teal-300);
}
.strip li:nth-child(even)::before { background: var(--honey-300); }
@media (max-width: 730px) {
  .strip ul { justify-content: center; font-size: 1rem; gap: 10px 18px; }
}

/* ---------- Stat ---------- */
.stat { text-align: left; }
.stat__value {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--display-price);
  line-height: 1;
  color: var(--teal-700);
}
.stat__label { font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--ink-muted); }

/* Review score circle. */
.score {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-pill);
  background: var(--sand-100);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
}
.score strong {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--heading);
}
.score span { font-size: var(--text-sm); color: var(--ink-muted); }

/* ---------- FAQ ---------- */
/* The stacked FAQ, used when there is no photo to sit beside the list. 760
   rather than the 540 of the column it replaces — clearly wider, and well
   short of the 1136 of the full container, which would strand the question
   text across the whole page. */
.faq-stack { max-width: 760px; margin-inline: auto; }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq {
  background: var(--mint-50);
  border-radius: var(--radius-md);
  padding: 4px 24px;
  border: 0;
}
.section--grey .faq, .section--mint .faq { background: var(--white); }
.section--teal .faq, .section--ink .faq { background: rgb(255 255 255 / 6%); }

.faq > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  /* min-height sets the height of a one-line pill; padding sets the space
     above and below the text. Previously only min-height did both, so a
     question that wrapped grew past it and ended up against the edges. */
  min-height: 64px;
  padding-block: 16px;
  font-family: var(--font-body);
  font-weight: var(--weight-ui);
  font-size: var(--text-base);
  /* Tighter than body copy: these are short headings, not prose. */
  line-height: 1.3;
  color: var(--heading);
}
.section--teal .faq > summary,
.section--ink .faq > summary { color: var(--white); }
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary::after {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  margin-right: 4px;
  border-right: 2.4px solid currentcolor;
  border-bottom: 2.4px solid currentcolor;
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate var(--dur) var(--ease);
}
.faq[open] > summary::after { rotate: -135deg; translate: 0 3px; }

.faq__answer { padding-bottom: 22px; font-size: var(--text-md); color: var(--ink-muted); }
.faq__answer p { margin: 0; }
.section--teal .faq__answer,
.section--ink .faq__answer { color: var(--on-dark); }

/* ---------- Before & after: smile viewer and smile wall ----------
   The viewer works without JavaScript (the hash picks the pet, both photos
   show side by side); [data-enhanced] is set by the script. */

/* Hero layout: copy on the left, viewer on the right. */
.smiles-hero .smiles-hero__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-8);
  align-items: center;
}
.smiles-hero__copy { display: flex; flex-direction: column; gap: var(--space-5); align-items: flex-start; }
/* Matches .hero__copy: once this hero is one column, its copy centres too. */
@media (max-width: 960px) {
  .smiles-hero__copy { align-items: center; text-align: center; }
  .smiles-hero__copy .btn-row,
  .smiles-hero__copy .hero__facts { justify-content: center; }
}
/* Key phrase in the h1, per rules.md §4: <em>wide awake</em>. */
.smiles-hero h1 em { font-style: normal; color: var(--teal-500); }
.smiles-hero__grid > * { min-width: 0; }   /* let the viewer shrink to the column */
@media (max-width: 960px) {
  .smiles-hero .smiles-hero__grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ---------- Viewer ---------- */
.smile-viewer { position: relative; }

/* Without the script: show the dog named in the URL hash, else the first. */
.smile-viewer:not([data-enhanced]) .smile { display: none; }
.smile-viewer:not([data-enhanced]) .smile:target,
.smile-viewer:not([data-enhanced]):not(:has(.smile:target)) .smile:first-child { display: flex; }

.smile {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 28px 0 0 28px;              /* room for the portrait to overlap the corner */
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-photo);
  position: relative;
  /* Clear the sticky header and the portrait that overlaps the top corner. */
  scroll-margin-top: calc(var(--header-h) + var(--space-5) + 28px);
}
.smile[hidden] { display: none; }

.smile__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding-left: 92px; }
.smile__portrait {
  position: absolute;
  left: -28px;
  top: -28px;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-pill);
  border: 6px solid var(--white);
  box-sizing: border-box;
  box-shadow: var(--shadow-float);
}
.smile__title { display: flex; flex-direction: column; align-items: flex-start; margin-right: auto; text-align: left; }
.smile__name {
  margin: 0;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: var(--hand-name);
  line-height: 0.95;
  color: var(--heading);
}
.smile__name:focus { outline: none; }
.smile__count { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-ui); color: var(--ink-muted); }

.smile__nav { display: flex; gap: var(--space-2); }
.smile__arrow {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--heading);
  box-shadow: inset 0 0 0 2px var(--line-strong);
  transition: background-color var(--dur) var(--ease);
}
.smile__arrow:hover { background: var(--mint-50); color: var(--heading); }
.smile__arrow .icon { width: 20px; height: 20px; }
.smile__arrow--prev .icon { scale: -1 1; }

/* Photos: side by side without the script, one at a time with it. */
.smile__frame { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.smile__shot { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--teal-900); }
.smile__shot img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

/* With the script: the two photos sit on top of each other so Before and
   After cross-fade, and every panel shares one grid cell so one pup can
   cross-fade into the next. A panel out of play is [hidden], which keeps it
   out of the grid and its photos off the network until it is wanted. */
.smile-viewer[data-enhanced] { display: grid; grid-template-columns: minmax(0, 1fr); }
[data-enhanced] .smile { grid-area: 1 / 1; }
[data-enhanced] .smile[data-fade] { opacity: 0; }
/* Only one panel is live; the one fading out, or waiting its turn at opacity
   0, is inert. Letting the pointer through it means a hover still reaches the
   live panel underneath, and still stops the cycle, mid-fade. */
[data-enhanced] .smile[inert] { pointer-events: none; }

[data-enhanced] .smile__frame { display: block; position: relative; aspect-ratio: 2 / 1; }
[data-enhanced] .smile__shot { position: absolute; inset: 0; opacity: 0; }
[data-enhanced] .smile__shot img { height: 100%; }
[data-enhanced] .smile[data-view='before'] .smile__shot--before,
[data-enhanced] .smile[data-view='after'] .smile__shot--after { opacity: 1; }

/* The script adds data-ready once the first pup is sitting at Before, so
   taking over from the no-script layout is a cut rather than a half-second
   fade of the second photo vanishing. Everything after that cross-fades. */
.smile-viewer[data-ready] .smile,
.smile-viewer[data-ready] .smile__shot { transition: opacity var(--dur-fade) linear; }

@media (prefers-reduced-motion: reduce) {
  .smile-viewer[data-ready] .smile,
  .smile-viewer[data-ready] .smile__shot { transition: none; }
}

.smile__stamp {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 1;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font: 700 var(--hand-stamp)/1.1 var(--font-hand);
  rotate: -4deg;
  background: var(--honey-300);
  color: var(--on-honey);
  box-shadow: var(--shadow-float);
}
.smile__stamp--after { background: var(--white); color: var(--teal-700); }

/* Before / After toggle */
.smile__toggle { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--mint-50); }
.smile__toggle[hidden] { display: none; }
.smile__toggle button {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--heading);
  font: var(--weight-ui) var(--text-md)/1 var(--font-body);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.smile__toggle [data-show='before'][aria-pressed='true'] { background: var(--honey-300); color: var(--on-honey); }
.smile__toggle [data-show='after'][aria-pressed='true'] { background: var(--teal-500); color: var(--white); }

@media (max-width: 640px) {
  .smile { margin: 22px 0 0 14px; padding: 16px; gap: 14px; border-radius: var(--radius-lg); }
  .smile__head { padding-left: 50px; min-height: 48px; gap: var(--space-2); }
  /* The portrait sits 12px lower than it does on a wide screen, so at 84px it
     reads as resting on the corner rather than flung out of it, and the name
     keeps a 12px gap from its edge rather than the 32px it had. */
  .smile__portrait { left: -14px; top: -10px; width: 84px; height: 84px; border-width: 5px; }
  .smile__nav { gap: 6px; }
  .smile__arrow { width: 44px; height: 44px; }
  .smile__frame { grid-template-columns: 1fr; }   /* no-JS: stack the pair */
}

/* Below 420px the name and the arrows stop sharing a row — the name wins the
   width and the arrows drop to the bottom, beside the Before / After pill, so
   every control sits on one line. The head stops laying anything out
   (display: contents) and the panel places its grandchildren itself; the
   portrait is still positioned against .smile, so it does not move. */
@media (max-width: 420px) {
  /* The no-JS rules above set display: flex on the panel with four classes'
     worth of specificity, so they are restated here or they would keep the
     arrows in the head row with no room for them. */
  .smile,
  .smile-viewer:not([data-enhanced]) .smile:target,
  .smile-viewer:not([data-enhanced]):not(:has(.smile:target)) .smile:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px;
  }
  .smile__head { display: contents; }
  .smile__head > picture,
  .smile__title { grid-area: 1 / 1 / 2 / 3; }
  .smile__title { padding-left: 66px; }   /* clears the portrait by the same 12px */
  .smile__frame { grid-area: 2 / 1 / 3 / 3; }
  .smile__toggle { grid-area: 3 / 1; }
  .smile__nav { grid-area: 3 / 2; align-self: center; }

  /* The pill takes whatever the arrows leave, and its two buttons share that
     evenly, so the row fits at 320px without the arrows dropping below 44px. */
  .smile__toggle { align-self: center; }
  .smile__toggle button { flex: 1; min-width: 0; padding: 0 6px; font-size: var(--text-sm); }
}

/* ---------- Smile wall ---------- */
.smile-wall__head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-5); flex-wrap: wrap; margin-bottom: var(--space-7); }
.smile-wall__head .section-head { margin-bottom: 0; }

.smile-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 36px;
}
.smile-wall li { margin: 0; }
@media (max-width: 960px) { .smile-wall { gap: 28px 20px; } }
@media (max-width: 640px) { .smile-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; } }

/* The link is the still hit area; only the card inside it tilts and lifts its
   shadow, so the hover can never flicker at the edge. */
.polaroid { display: block; padding-bottom: 4px; text-decoration: none; color: inherit; text-align: center; }
.polaroid__card {
  display: block;
  padding: 12px 12px 6px;
  border-radius: var(--radius-print);
  background: var(--white);
  box-shadow: var(--shadow-float);
  transition: box-shadow var(--dur) var(--ease);
}
.polaroid:hover .polaroid__card { box-shadow: var(--shadow-lift); }
.polaroid[aria-current='true'] .polaroid__card { box-shadow: 0 0 0 4px var(--teal-500), var(--shadow-float); }
.polaroid__card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-photo); }
.polaroid__name {
  display: block;
  font: 700 var(--hand-label)/1.3 var(--font-hand);
  color: var(--heading);
}
@media (max-width: 640px) { .polaroid__card { padding: 8px 8px 2px; } }

/* Each card in a row of four leans its own way. */
.smile-wall li:nth-child(4n + 1) .polaroid__card { rotate: -2.5deg; }
.smile-wall li:nth-child(4n + 2) .polaroid__card { rotate: 1.8deg; }
.smile-wall li:nth-child(4n + 3) .polaroid__card { rotate: -1deg; }
.smile-wall li:nth-child(4n) .polaroid__card     { rotate: 2.2deg; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reviews-grid { grid-template-columns: 1fr; gap: var(--space-3); } }

/* The "leave us a review" line under every reviews panel. Deliberately quiet:
   muted body with a teal-700 link, which is what rules.md §3 allows on mint. */
.reviews-cta {
  margin: var(--space-6) 0 0;
  text-align: center;
  font-size: var(--text-md);
  color: var(--ink-muted);
}
.reviews-cta a { color: var(--teal-700); font-weight: var(--weight-strong); }

/* Every review block renders four. Three columns and one column both divide
   three cleanly, so the fourth is hidden and shown only on the two-column
   layout, where three would leave a hole in the second row.
   :last-child confines this to blocks of exactly four, leaving the twelve on
   /about-us/reviews/ alone — twelve divides by three, two and one. */
.reviews-grid > .review:nth-child(4):last-child { display: none; }
@media (max-width: 960px) and (min-width: 641px) {
  .reviews-grid > .review:nth-child(4):last-child { display: block; }
}

/* The card is two elements: .review is the hit area and never moves, and
   .review__inner is the surface that tilts and lifts inside it. The 8px of
   padding below gives the lift somewhere to go that the hit area already
   covers, so a pointer resting on the bottom edge cannot fall off the card
   and start it flickering. */
.review {
  position: relative;
  margin: 0;
  padding-bottom: 8px;
}

.review__inner {
  margin: 0;
  height: 100%;
  background: var(--mint-50);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  transition: translate var(--dur) var(--ease), scale var(--dur) var(--ease),
              rotate var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

/* On the narrowest phones 32px of padding costs more than it gives back. */
@media (max-width: 420px) {
  .review__inner { padding: 20px; gap: 12px; }
}
.section--mint .review__inner, .section--grey .review__inner { background: var(--white); }

/* The whole card opens the full quote (script adds the button), so the whole
   card answers the pointer: it straightens up, lifts and gains a shadow. */
.review__open {
  position: absolute;
  inset: 0;
  background: none;
  border: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.review:has(.review__open):hover .review__inner,
.review:has(.review__open:focus-visible) .review__inner {
  rotate: 0deg;
  translate: 0 -8px;
  scale: 1.015;
  box-shadow: var(--shadow-photo);
}
/* Lift the hovered card clear of the ones tilted towards it. */
.review:has(.review__open):hover { z-index: 1; }

.review__stars { color: var(--tan-500); letter-spacing: 2px; font-size: 1.125rem; }
/* Customer quotes are handwritten; everything around them stays in Nunito. */
.review__body {
  font-family: var(--font-hand);
  font-size: var(--quote-card);
  font-weight: 600;
  line-height: 1.2;
  color: var(--quote-ink);
  margin: 0;
}
.review__author { margin-top: auto; font-weight: var(--weight-ui); color: var(--heading); font-size: var(--text-md); }

/* A hint, not a control: the card's own button handles the click. */
.review__more {
  align-self: flex-start;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  color: var(--teal-700);
  text-decoration: underline;
}
.review__body[data-clamped='true'] {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A slight alternating tilt, as though the cards were laid down by hand. It
   sits on the inner surface, not the hit area, so hover can straighten it. */
.reviews-grid > .review:nth-child(3n+1) .review__inner { rotate: -1.2deg; }
.reviews-grid > .review:nth-child(3n+2) .review__inner { rotate: 0.9deg; }
.reviews-grid > .review:nth-child(3n)   .review__inner { rotate: -0.5deg; }

@media (max-width: 640px) {
  .reviews-grid > .review:nth-child(odd)  .review__inner { rotate: -0.8deg; }
  .reviews-grid > .review:nth-child(even) .review__inner { rotate: 0.8deg; }
}

/* ---------- Review modal ----------
   One dialog per page, built by script from the cards already on it. Opening
   a card shows that quote in full and turns the set into a carousel. The
   panel is sized by its content, so the height changes as you page through
   it; it is animated rather than snapped, and capped so a long quote scrolls
   inside the panel instead of running off the screen. */
.review-modal {
  margin: auto;
  width: min(680px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}
.review-modal::backdrop { background: var(--scrim); }

.review-modal__panel {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-photo);
  overflow: hidden;
}

/* Controls keep the same place at the top whichever quote is showing. */
.review-modal__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1.5px solid var(--line-soft);
}
.review-modal__steps { display: flex; gap: var(--space-2); }

.review-modal__btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--mint-50);
  color: var(--teal-700);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.review-modal__btn .icon { width: 20px; height: 20px; fill: currentcolor; }
.review-modal__btn:hover { background: var(--mint-100); color: var(--teal-900); }
.review-modal__btn[data-step='-1'] .icon { scale: -1 1; }

.review-modal__count {
  margin: 0;
  text-align: center;
  font-size: var(--text-md);
  font-weight: var(--weight-ui);
  color: var(--ink-muted);
}

/* The animated box. Its height is set in script; the quote scrolls inside.
   When there is more below, the last line fades out rather than being sliced
   through, so it reads as "keep going" instead of as a rendering fault. */
.review-modal__body {
  overflow: hidden;
  transition: height var(--dur) var(--ease);
}
.review-modal__body[data-more='true'] {
  mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent);
}
.review-modal__scroll {
  max-height: 100%;
  overflow-y: auto;
  padding: var(--space-6);
  transition: opacity var(--dur) var(--ease);
}
.review-modal__scroll[data-swapping='true'] { opacity: 0; }

.review-modal__stars { color: var(--tan-500); letter-spacing: 2px; font-size: 1.125rem; }
.review-modal__quote {
  margin: var(--space-4) 0 0;
  font-family: var(--font-hand);
  font-size: var(--quote-card);
  font-weight: 600;
  line-height: 1.2;
  color: var(--quote-ink);
}
.review-modal__author {
  margin: var(--space-5) 0 0;
  font-weight: var(--weight-ui);
  color: var(--heading);
  font-size: var(--text-md);
}

@media (max-width: 640px) {
  .review-modal__scroll { padding: var(--space-5); }
}

/* Score beside the section heading. */
.reviews-head { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; justify-content: space-between; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; }
}
/* Stacked, the gap between the details and the form is doing the work a whole
   column of white space used to do, so it needs more than the side-by-side
   gap. Still scaling with the viewport, just from a higher floor. */
@media (max-width: 899px) {
  .contact-grid { row-gap: clamp(3rem, 8vw, 4.5rem); }
}

/* Space between the intro paragraph and the list of ways to get in touch. */
#contact-details > p { margin-bottom: 40px; }

/* ---------- Contact slots ----------
   The number and the address arrive after an invisible Turnstile check, so
   until they do each slot shows a mask the same shape as the value. It is
   inline so it sits inside a sentence or a button label, and dimmed so it does
   not read as a real number for the half-second it is there. */
.contact-value { display: inline; }
.contact-value__mask { opacity: 0.5; }

/* Nunito's figures are tabular, so any phone number is exactly as wide as any
   other — but a bullet is not as wide as a digit, and without this the bar
   jumped 12px the moment the number arrived. Measured at the header and footer
   sizes: 0.05em leaves the mask within 1px of the real number at both, because
   em scales with whatever type it lands in. The email mask is handled by being
   four characters longer than the address instead. */
[data-contact='phone'] .contact-value__mask { letter-spacing: 0.05em; }

/* Invisible mode draws nothing, but the widget still needs a box. Positioned
   off-screen rather than display:none, which a challenge may refuse to run in. */
.turnstile-host { position: absolute; left: -9999px; top: 0; width: 0; height: 0; overflow: hidden; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.contact-list li { display: flex; gap: 1rem; margin: 0; }
.contact-list .icon {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--teal-light);
  fill: currentcolor;
  margin-top: 0.2rem;
}
.contact-list a { color: inherit; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* No font-size of its own: the opening times are one entry in .contact-list and
   read as a different, smaller thing when they are set 1px smaller than the
   phone number and address beside them. */
.hours { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1.5rem; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; }

/* Once the panel stacks at 899 the details sit in a full-width column with a
   lot of empty space to their right, so they pair up: phone, email and address
   on the left, opening hours and the appointment note on the right.
   grid-auto-flow: column with three explicit rows places them deterministically
   — column-count would let the browser balance by height, and the tall hours
   list would drag the split somewhere arbitrary. Back to one column at 600,
   where half of the width is no longer enough for an email address. */
@media (min-width: 600px) and (max-width: 899px) {
  /* Multi-column rather than a two-column grid: grid rows are shared across
     both columns, so the three-line opening hours set the height of row one
     and left a gap under the phone number. Columns flow independently, so each
     side packs tight. break-after on the address keeps the split deterministic
     instead of letting the browser balance by height. */
  .contact-list {
    display: block;
    columns: 2;
    column-gap: var(--space-6);
  }
  .contact-list > li { break-inside: avoid; margin-bottom: 1.5rem; }
  .contact-list > li:nth-child(3) { break-after: column; }
  .contact-list > li:last-child { margin-bottom: 0; }
}

/* ---------- Form ---------- */
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .form__row--2 { grid-template-columns: 1fr 1fr; }
}
/* align-content keeps the control at its own height: when a neighbour in the
   row grows to fit an error message, this field's input must not stretch with
   it. */
.field { display: grid; gap: 0.4rem; align-content: start; }
.field > label { font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--heading); }
.field .hint { font-size: var(--text-sm); color: var(--ink-muted); }

/* 52px tall, radius 16, 1.5px line, 3px teal-300 focus ring (rules.md §7). */
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  font-size: var(--text-md);
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px var(--teal-300);
}

.field input[aria-invalid='true'],
.field select[aria-invalid='true'],
.field textarea[aria-invalid='true'] { border-color: var(--error); }

/* Why a field is refusing, under the field, rather than in a browser bubble
   that vanishes on the next click. */
.field .error,
fieldset > .error {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  color: var(--error);
}
.error[hidden] { display: none; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: var(--text-md); font-weight: var(--weight-strong); color: var(--heading); padding: 0 0 0.6rem; }

.checks { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: var(--text-md);
}
.check input { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: var(--teal-500); }

/* ---------- Split switch: an either/or answer, shown as one control ----------
   Two radios painted as a segmented pill. 4 + 44 + 4 makes 52px, so it lines
   up with the inputs beside it. */
.switch-field legend { padding-bottom: 0.4rem; }
.switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--mint-50);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.switch__opt { position: relative; margin: 0; }
.switch__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-md);
  font-weight: var(--weight-ui);
  color: var(--heading);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.switch__opt:hover input:not(:checked) + span { background: var(--mint-100); }
.switch__opt input:checked + span { background: var(--teal-500); color: var(--white); }
.switch__opt input:focus-visible + span { outline: 3px solid var(--teal-300); outline-offset: 3px; }

/* ---------- Time field ----------
   The border moves from the input to the wrapper so the controls sit inside
   the field. Left to right: the digits, the AM/PM press (12-hour only), the
   clock that opens the picker, then the button that flips between clocks. */
.time-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.time-field:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-300); }
.time-field[data-invalid='true'] { border-color: var(--error); }

.field .time-field input {
  flex: 1;
  min-width: 3.5rem;
  border: 0;
  background: none;
}
.field .time-field input:focus-visible { box-shadow: none; }

/* The native picker button would sit to the right of our own controls and
   open a picker we cannot reformat, so it goes. */
/* Only hidden once main.js has taken the field over for typing. On a coarse
   pointer the takeover does not happen and the native picker is the whole
   interaction, so its indicator has to stay. */
.time-field[data-enhanced] input::-webkit-calendar-picker-indicator { display: none; }

.time-field__btn {
  flex: none;
  min-height: 44px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--mint-50);
  color: var(--heading);
  font: var(--weight-ui) var(--text-sm)/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.time-field__btn:hover { background: var(--mint-100); }
.time-field__btn[hidden] { display: none; }

/* The AM/PM press carries the half-day, so it is the loudest of the three. */
.time-field__half { background: var(--teal-500); color: var(--white); min-width: 48px; }
.time-field__half:hover { background: var(--teal-600, var(--teal-500)); color: var(--white); }


/* ---------- Time picker ---------- */


@media (max-width: 400px) {
  .time-field { gap: 2px; }
  .time-field__btn { padding: 0 0.5rem; }
  .field .time-field input { min-width: 2.75rem; padding-inline: 0.6rem; }
}

.form__status { font-size: var(--text-md); border-radius: var(--radius-sm); padding: 0.9rem 1rem; }
.form__status[data-state='ok'] { background: #e7f5ec; color: #1d6b38; }
.form__status[data-state='error'] { background: #fdecea; color: #a4281b; }
.form__status[hidden] { display: none; }
/* Quiet reassurance above the submit button: what happens about money, and
   that none of it happens here. Muted so it informs without competing with
   the button under it. */
.form__note {
  margin: var(--space-4) 0 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--ink-muted);
}
/* The form links offered after a successful enquiry. Inherits the panel's own
   colour so the pair reads as one message rather than a link bolted on. */
.form__status-forms { margin: var(--space-3) 0 0; }
.form__status-forms a { color: inherit; }

/* Honeypot: off-screen rather than display:none so bots still fill it */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Closing CTA panel ----------
   Honey, radius 40, split with a full-bleed photo. One per page (rules.md §3). */
.cta-panel {
  background: var(--honey-300);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.cta-panel__copy {
  padding: 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}
/* The copy column is a flex column with its own gap, so the heading's default
   0.5em bottom margin was stacking on top of it. Same reason .section-head h2
   and .hero__copy h1 are zeroed. */
.cta-panel__copy h2 { color: var(--heading); margin-bottom: 0; }
.cta-panel__copy p { color: var(--on-honey); font-size: 1.1875rem; margin: 0; }
/* The photo fills whatever height the copy sets, rather than its intrinsic
   aspect ratio driving the row and leaving the copy stranded in a tall panel. */
.cta-panel__media { position: relative; min-height: 380px; }
.cta-panel__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The panel is already a colour block, so the ghost button drops its outline. */
.cta-panel .btn--ghost > span,
.cta-panel .btn--accent > span { box-shadow: none; }

/* The two columns hold together well below the site's usual 960 stack point,
   so this panel keeps them to 680 — just with less padding and a shorter photo
   once there is no longer room for the full 56px and 380px. */
@media (max-width: 960px) and (min-width: 681px) {
  .cta-panel__copy { padding: 32px; }
  .cta-panel__media { min-height: 300px; }
}

@media (max-width: 680px) {
  .cta-panel { grid-template-columns: 1fr; }
  /* Capped at 275px so the photo stays a band above the copy rather than a
     half-screen slab. object-fit: cover is already set above; the image is
     centred and crops as the panel narrows. */
  /* width: 100% is load-bearing. aspect-ratio with max-height feeds back
     through the ratio and shrinks the box's WIDTH to match the capped height,
     leaving the photo as a narrow panel floating in the column. */
  .cta-panel__media { min-height: 0; width: 100%; aspect-ratio: 4 / 3; max-height: 275px; order: -1; }
  .cta-panel__media img { object-position: 50% 50%; }
  .cta-panel__copy { padding: 28px 24px; }
}

/* Sand panel: before & after band, and other warm callouts. */
.panel-sand {
  background: var(--sand-100);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.panel-sand p { color: var(--on-sand); }
@media (max-width: 960px) { .panel-sand { padding: 28px 24px; } }

/* ---------- Mobile booking bar ---------- */
.book-bar { display: none; }
/* Matches the nav breakpoint: .header__cta is hidden when the drawer takes
   over, so the bar has to replace it at the same width. */
@media (max-width: 960px) {
  .book-bar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 16px;
    z-index: 40;
    background: var(--white);
    border-radius: var(--radius-pill);
    padding: 8px;
    box-shadow: var(--shadow-bar);
  }
  .book-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: var(--radius-pill);
    font-weight: var(--weight-ui);
    text-decoration: none;
  }
  .book-bar a:first-child { flex: 1; background: var(--mint-100); color: var(--heading); }
  .book-bar a:last-child { flex: 2; background: var(--teal-500); color: var(--white); }
  .book-bar .icon { width: 18px; height: 18px; fill: currentcolor; }
  /* Keeps the bar clear of the footer. */
  body { padding-bottom: 88px; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--teal-900);
  color: var(--on-dark);
  padding-block: 4.5rem 2.5rem;
  font-size: var(--text-md);
}
.footer a { color: var(--white); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Four columns, the first wider for the logo and blurb (rules.md §7).
   Its floor is the width of the Call us + socials row (263.5px): at 1.3fr
   alone that column drops to 238px by 961, which wrapped the circles under
   the button. Above about 1046px the fr share already exceeds the floor, so
   the proportions there are untouched. */
.footer__grid {
  display: grid;
  gap: 2.5rem;
  /* Not three equal nav columns. Quick links holds short labels ("Guides",
     "Contact us", longest is "Before & after" at about 110px) while Services
     holds "Cosmetic Dog Teeth Cleaning" at about 210px. Equal tracks therefore
     left roughly 115px of dead space after Quick links and about 25px after
     Services, so the first gap read as more than twice the second even though
     both were the same 2.5rem.

     The ratios below keep the same total and the same masthead width, and move
     Services about 50px left: at the 1136px content width of a 1200 container
     the nav columns go 236/236/236 -> 187/261/261. The two wider tracks also
     stop "Cosmetic Dog Teeth Cleaning" wrapping as early as it did. */
  grid-template-columns: minmax(268px, 1.3fr) 0.79fr 1.105fr 1.105fr;
  align-items: start;
}

/* Contact sits in its own row under the columns, set on one line. It used to
   be a fifth child of a four-column grid, which wrapped it beneath the logo. */
.footer__contact {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
}
.footer__contact h2 { margin-bottom: 0; }
.footer__contact ul { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer__contact li { margin-bottom: 0; }
@media (max-width: 960px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Half of a two-column grid is narrower than the Call us + socials row from
   about 608px down (170px of column against 259px of row), so the masthead
   takes a full-width row of its own and the link columns carry on in two.
   Harmless once the grid is one column below 420px. */
@media (max-width: 610px) {
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
/* Two columns hold until 420px. Below that the columns are narrower than the
   logo and there is no room left to split. */
@media (max-width: 420px) {
  .footer__grid { grid-template-columns: 1fr; }

  /* One column, so the masthead block reads better centred than ranged left.
     The logo needs its own margin: images are display:block here, which
     text-align cannot centre. */
  .footer__grid > :first-child { text-align: center; }
  .footer__grid > :first-child .footer__logo img { margin-inline: auto; }
  .footer__grid > :first-child .footer__actions { justify-content: center; }
}

.footer h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-heading);
  color: var(--white);
  margin-bottom: 0.75rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.6rem; }
/* Capped at 192px but never wider than its column: at 420px the two columns
   are about 170px across, and a fixed width would spill out of one. */
.footer__logo img { width: min(192px, 100%); height: auto; margin-bottom: 1.25rem; }

/* Call us and the social circles on one row. It wraps rather than overflow:
   in the two-column grid below about 560px the row is wider than its column,
   and the circles then drop underneath on their own line. */
.footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.social { display: flex; gap: 0.75rem; }
.social a {
  display: grid;
  place-items: center;
  /* 52px is .btn > span's min-height, so the circles stand exactly as tall as
     the Call us pill beside them. That min-height does not change with width,
     so one value is right at every breakpoint. */
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
}
.social a:hover { background: var(--teal-500); }
.social svg { width: 18px; height: 18px; fill: var(--white); }

/* The same wording as the service pages, in small print on every page. Sits
   above the copyright row and shares its rule. */
.footer__disclaimer {
  /* 15px, not the 3rem the other footer rows use: the contact row above
     already ends in a rule, and a full gap on top of that left an obvious
     hole under it. */
  margin-top: 15px;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  font-size: var(--text-sm);
  color: var(--on-dark);
  opacity: 0.85;
}
/* Full container width — no measure cap. It is small print, and setting it
   across the whole width keeps it to two lines instead of four. */
.footer__disclaimer p { margin: 0; }

.footer__legal {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  display: flex;
  /* wrap-reverse, so that when these two no longer fit on one line the links
     take the first line and the copyright drops beneath them. On one line it
     changes nothing. */
  flex-wrap: wrap-reverse;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: var(--text-sm);
}
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.footer__legal li { margin: 0; font-size: inherit; }

/* ---------- Article / reading column ----------
   Guides and legal pages: a single 680px column (rules.md, phase 4 step 5). */
.reading {
  max-width: 680px;
  margin-inline: auto;
}
.reading > * + * { margin-top: 1.15em; }
.reading h2 {
  margin-top: 2.2em;
  margin-bottom: 0.4em;
  font-size: var(--h2-sm);
}
.reading h2:first-child { margin-top: 0; }
/* An eyebrow belongs to the heading under it. h2's 2.2em is the space that
   separates it from the paragraph above; between the pair, use the same 14px
   .section-head puts there, so the two kinds of section head read alike. */
.reading .eyebrow { margin-bottom: 0; }
.reading .eyebrow + h2 { margin-top: 14px; }
.reading h3 { margin-top: 1.8em; margin-bottom: 0.3em; }
.reading ul, .reading ol { padding-left: 1.3rem; }
.reading li { margin-bottom: 0.5rem; }
.reading .note { margin-top: 1.5em; }

/* Long legal documents get a rule above each heading to break up the wall. */
.reading--legal h2 {
  padding-top: 1.6em;
  border-top: 1px solid var(--line-soft);
}
.reading--legal h2:first-child { padding-top: 0; border-top: 0; }
.reading--legal p, .reading--legal li { color: var(--ink-muted); }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Price table ---------- */
.table-wrap { overflow-x: auto; }
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-size: var(--text-md);
  /* Fixed, so the three columns keep their proportions and shrink together as
     the page narrows. On the default auto layout the service and price cells
     were sized by their own content, which left "What it covers" absorbing
     every pixel of change on its own. */
  table-layout: fixed;
}
/* 33% keeps the longest service name ("Cosmetic Dog Teeth Cleaning") on one
   line all the way down to 850px, where the table becomes cards. 31% did too,
   but with five pixels to spare, so a fallback font would have wrapped it. The
   price column is deliberately narrower than its longest string: those are
   lists like "Small $55 · Medium $65 · Large $85-$100", which wrap tidily at
   the separators, whereas a wrapped heading just looks broken. */
.price-table tr > *:nth-child(1) { width: 33%; }
.price-table tr > *:nth-child(2) { width: 25%; }
.price-table tr > *:nth-child(3) { width: 42%; }
.price-table caption { text-align: left; }
.price-table thead th {
  text-align: left;
  padding: 0 24px 4px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  color: var(--ink-muted);
}
.price-table tbody tr { background: var(--sand-100); }
.price-table tbody th,
.price-table tbody td {
  padding: 22px 24px;
  text-align: left;
  vertical-align: top;
  border: 0;
}
.price-table tbody tr th:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.price-table tbody tr td:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.price-table tbody th {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--h3);
}
.price-table tbody th a { color: var(--heading); text-decoration: none; }
.price-table tbody th a:hover { color: var(--teal-700); }
.price-table__price { font-weight: var(--weight-ui); color: var(--tan-700); }
.price-table td { color: var(--on-sand); }

/* Below 850 the three columns are too narrow to read, so each service becomes
   its own card with the three fields stacked as rows inside it. The header row
   goes with them — the fields read fine unlabelled, and a sighted user no
   longer has a header to line up against. Screen readers still get it from the
   scope="row" heading and the caption. */
@media (max-width: 849px) {
  .price-table { table-layout: auto; }
  /* border-spacing only separates real table rows, and these are grid
     containers now, so the cards sat flush against each other. Spacing them
     as a card grid instead, at the same gap the site's other card grids use. */
  .price-table { display: block; }
  .price-table tbody { display: grid; gap: var(--space-5); }
  .price-table tr > *:nth-child(1),
  .price-table tr > *:nth-child(2),
  .price-table tr > *:nth-child(3) { width: auto; }
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .price-table tbody tr { display: grid; gap: 4px; border-radius: var(--radius-md); }
  .price-table tbody th,
  .price-table tbody td { padding: 4px 20px; }
  .price-table tbody tr th:first-child { padding-top: 20px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
  .price-table tbody tr td:last-child { padding-bottom: 20px; border-radius: 0 0 var(--radius-md) var(--radius-md); }
}

/* ---------- Pulled quote ---------- */
/* Area pages: local copy at two thirds, a local review at one. Stacks at 960
   like every other two-column block on the site, the quote going underneath. */
.area-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}
/* Two columns only when there is a quote to put in the second one. An area
   whose reviewAuthor matches nothing renders no <aside>, and without this the
   copy would sit at two thirds with a third of the row empty beside it. */
@media (min-width: 961px) {
  .area-intro:has(> .area-intro__quote) { grid-template-columns: 2fr 1fr; }
}
@media (max-width: 960px) {
  .area-intro { gap: 40px; }
}

/* Side by side, the quote started level with the heading, so its first line
   sat well above the first line of the copy it belongs beside. This drops it
   by the height of the eyebrow and heading block — 88px against the 87px that
   block measures at every width where there are two columns. Only an
   approximation: a heading that wraps would need more. */
@media (min-width: 961px) {
  .area-intro:has(> .area-intro__quote) .area-intro__quote {
    margin-top: calc(var(--space-8) + var(--space-6));
  }
}

.pull-quote { max-width: 62ch; margin: 0; text-align: left; }
.pull-quote__stars { color: var(--tan-500); letter-spacing: 2px; font-size: 1.25rem; }
.pull-quote blockquote {
  margin: 1rem 0 0;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: var(--quote-pull);
  line-height: 1.2;
  color: var(--quote-ink);
  white-space: pre-line;
}
.pull-quote figcaption {
  margin-top: 1rem;
  font-weight: var(--weight-ui);
  font-size: var(--text-md);
  color: var(--ink-muted);
}

/* Area pages: a review long enough to double the section's height gets clamped,
   with a button to open it out. The quote column is a third of the row and set
   in 39px Caveat, so Alliston's 481-character review ran to 21 lines and
   finished 668px below the copy it is meant to sit beside. Nine lines is the
   most that still lands within about 100px of that copy's own height, and it
   leaves the quotes already short enough untouched.

   Stacked below 961px the quote is full width, where its length costs nothing,
   so both the clamp and the button belong to the two-column layout. Same idiom
   as .review__body[data-clamped] on the review cards. */
@media (min-width: 961px) {
  .area-intro__quote .pull-quote blockquote[data-clamped='true'] {
    display: -webkit-box;
    -webkit-line-clamp: 9;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Unlike .review__more, which only hints at a card that is itself clickable,
   this is the control: a pull quote has no hit area of its own. Added by
   script, so a blocked main.js leaves the quote whole rather than cropped.
   Hover changes colour only, so the button never moves under the cursor. */
.pull-quote__more {
  display: none;
  margin-top: var(--space-4);
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-strong);
  color: var(--teal-700);
  text-decoration: underline;
  cursor: pointer;
}
.pull-quote__more:hover { color: var(--teal-900); }
/* :not([hidden]) because an author display: block would otherwise beat the UA
   stylesheet's [hidden] rule, and the script hides the button by that attribute. */
@media (min-width: 961px) {
  .area-intro__quote .pull-quote__more:not([hidden]) { display: block; }
}

/* ---------- Nearby areas list ---------- */
/* The list below is 48rem and centred, so its heading block is too. Left at
   the container's full width, the eyebrow and heading started a long way
   outside the first column of the list they introduce. */
.area-nearby .section-head { max-width: 48rem; margin-inline: auto; }

.area-list {
  list-style: none;
  margin: 2.5rem auto 0;
  padding: 0;
  max-width: 48rem;
  border-top: 1px solid var(--grey-300);
}
.area-list li { margin: 0; }

.area-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.5rem;
  border-bottom: 1px solid var(--grey-300);
  color: var(--ink);
  text-decoration: none;
  /* No transform on hover: the row is the hit area, so moving it would slide
     it out from under a cursor resting on its edge. Colour only. */
  transition: background-color 0.15s ease, padding-left 0.15s ease;
}
.area-list a:hover,
.area-list a:focus-visible {
  background: var(--white);
  padding-left: 1rem;
}

.area-list .icon { width: 20px; height: 20px; flex: none; fill: var(--teal-text); }

.area-list__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  flex: none;
}
.area-list__mode {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-left: auto;
  text-align: right;
}

/* The chevron sits after the mode text as an affordance. */
.area-list a::after {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: 0.25rem;
  border-right: 2px solid var(--teal-text);
  border-bottom: 2px solid var(--teal-text);
  rotate: -45deg;
}

@media (max-width: 560px) {
  .area-list a { flex-wrap: wrap; gap: 0.5rem 0.75rem; }
  .area-list__mode { margin-left: 0; width: 100%; text-align: left; order: 3; }
  .area-list a::after { margin-left: auto; }
}

/* Unresolved policy decisions on a legal page. Deliberately loud: these must
   not reach production unnoticed. Remove the class once the text is written. */
.legal-todo {
  border-left: 4px solid #c0392b;
  background: #fdecea;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9375rem;
  color: #7d2119;
}
.legal-todo strong { color: #a4281b; }
