/*
 * Site styles. There is no CSS framework and no build step — this file is
 * served exactly as written, so everything the site needs is here or in the
 * site's own additions below.
 *
 * ---------------------------------------------------------------------------
 * FLUID TYPE & SPACE SCALE
 *
 * Every size below is derived from the six anchor numbers in --u-*. Change an
 * anchor and the whole scale moves with it, in proportion. That is the point:
 * retuning a site is editing six numbers, not auditing every value in the file.
 *
 * Each step is a clamp() between its value at the minimum viewport and its
 * value at the maximum, so text and spacing scale smoothly with the viewport
 * instead of jumping at breakpoints. No media queries are needed for sizing.
 *
 * TO RETUNE FOR THIS SITE (see refs/design/DESIGN.md):
 *   --u-min-ratio / --u-max-ratio   how dramatic the jump between sizes is.
 *                                   1.2 (minor third) reads calm and even;
 *                                   1.333 (perfect fourth) reads confident;
 *                                   above ~1.4 gets shouty for a practice site.
 *   --u-min-font / --u-max-font     base body size at each end, in px.
 *   --u-min-vw / --u-max-vw         the viewport range the scale spans.
 *
 * A larger max-ratio with the same min-ratio gives a site that is restrained on
 * a phone and expressive on a desktop, which usually suits a hero-led page.
 */
:root {
    /* --- Anchors: the dial for this site ------------------------------- */
    --u-min-vw: 320;
    --u-max-vw: 1240;
    --u-min-font: 16;
    --u-max-font: 18;
    --u-min-ratio: 1.2;
    --u-max-ratio: 1.25;

    /* --- Derivation. Not usually edited by hand. ----------------------- */
    /* Slope and intercept of the line between the two anchor viewports,
     * expressed so each step can be written as clamp(min, calc(...), max). */
    --u-vw-range: calc(var(--u-max-vw) - var(--u-min-vw));

    /* Type steps, in rem at each anchor. Each step multiplies the previous
     * one by the ratio, so the relationship between sizes is fixed even as the
     * absolute values move. */
    --u-min-0: calc(var(--u-min-font) / 16);
    --u-max-0: calc(var(--u-max-font) / 16);

    --u-min--2: calc(var(--u-min-0) / var(--u-min-ratio) / var(--u-min-ratio));
    --u-max--2: calc(var(--u-max-0) / var(--u-max-ratio) / var(--u-max-ratio));
    --u-min--1: calc(var(--u-min-0) / var(--u-min-ratio));
    --u-max--1: calc(var(--u-max-0) / var(--u-max-ratio));
    --u-min-1: calc(var(--u-min-0) * var(--u-min-ratio));
    --u-max-1: calc(var(--u-max-0) * var(--u-max-ratio));
    --u-min-2: calc(var(--u-min-1) * var(--u-min-ratio));
    --u-max-2: calc(var(--u-max-1) * var(--u-max-ratio));
    --u-min-3: calc(var(--u-min-2) * var(--u-min-ratio));
    --u-max-3: calc(var(--u-max-2) * var(--u-max-ratio));
    --u-min-4: calc(var(--u-min-3) * var(--u-min-ratio));
    --u-max-4: calc(var(--u-max-3) * var(--u-max-ratio));
    --u-min-5: calc(var(--u-min-4) * var(--u-min-ratio));
    --u-max-5: calc(var(--u-max-4) * var(--u-max-ratio));

    /* --- Type scale ---------------------------------------------------- */
    /* step--2 fine print · step-0 body · step-2/3 section headings ·
     * step-4/5 hero display. Use these, not raw px. */
    --step--2: clamp(calc(var(--u-min--2) * 1rem), calc(var(--u-min--2) * 1rem + (var(--u-max--2) - var(--u-min--2)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max--2) * 1rem));
    --step--1: clamp(calc(var(--u-min--1) * 1rem), calc(var(--u-min--1) * 1rem + (var(--u-max--1) - var(--u-min--1)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max--1) * 1rem));
    --step-0: clamp(calc(var(--u-min-0) * 1rem), calc(var(--u-min-0) * 1rem + (var(--u-max-0) - var(--u-min-0)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-0) * 1rem));
    --step-1: clamp(calc(var(--u-min-1) * 1rem), calc(var(--u-min-1) * 1rem + (var(--u-max-1) - var(--u-min-1)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-1) * 1rem));
    --step-2: clamp(calc(var(--u-min-2) * 1rem), calc(var(--u-min-2) * 1rem + (var(--u-max-2) - var(--u-min-2)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-2) * 1rem));
    --step-3: clamp(calc(var(--u-min-3) * 1rem), calc(var(--u-min-3) * 1rem + (var(--u-max-3) - var(--u-min-3)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-3) * 1rem));
    --step-4: clamp(calc(var(--u-min-4) * 1rem), calc(var(--u-min-4) * 1rem + (var(--u-max-4) - var(--u-min-4)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-4) * 1rem));
    --step-5: clamp(calc(var(--u-min-5) * 1rem), calc(var(--u-min-5) * 1rem + (var(--u-max-5) - var(--u-min-5)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-5) * 1rem));

    /* --- Weight -------------------------------------------------------- */
    /* Named by the CSS value, not by a word. "bold" is a claim about how a
     * typeface renders; 700 is what you actually asked for, and two faces
     * disagree about which of their cuts reads as bold.
     *
     * THREE WEIGHTS, DELIBERATELY. Body, emphasis, headline — that is the
     * whole system, and it is expressed by which tokens exist rather than by
     * a rule asking politely. Adding --weight-800 needs a reason: the face
     * has a visibly distinct heavy cut AND 700 alone is not creating enough
     * contrast. If 700 and 800 render identically on screen, that is not one.
     * A flat hierarchy is almost always a spacing or size problem, not a
     * weight problem. */
    --weight-400: 400;  /* body */
    --weight-600: 600;  /* nav, card emphasis, eyebrows */
    --weight-700: 700;  /* headlines, CTAs */

    /* --- Leading ------------------------------------------------------- */
    /* A ladder rather than a derived scale, so it is t-shirt sized like
     * --space-* rather than numbered like --step-*. Tightest to loosest.
     *
     * The relationship worth holding: line-height falls as type size rises.
     * Display type at body leading looks unset; body copy at display leading
     * is unreadable. Pair --leading-xs with --step-4/5 and --leading-l with
     * --step-0. */
    --leading-xs: 1.05;   /* display, very large headlines */
    --leading-s: 1.18;     /* headings */
    --leading-m: 1.3;    /* subheadings, ledes, card copy */
    --leading-l: 1.5;     /* body copy */
    --leading-xl: 1.6;   /* long-form and small print, which need more air */

    /* --- Tracking ------------------------------------------------------ */
    /* Same shape: a ladder, tightest to loosest, in em so it scales with
     * whatever size it is applied to.
     *
     * The relationship: tracking tightens as size grows, and ALL-CAPS always
     * needs opening up — uppercase at 0 tracking reads cramped at any size.
     * Pair --tracking-xs with --step-4/5, --tracking-m with body, and
     * --tracking-l or --tracking-xl with any text-transform: uppercase. */
    --tracking-xs: -0.02em;  /* large display */
    --tracking-s: -0.01em;   /* headings */
    --tracking-m: 0;         /* body — the default, stated so it can be reset to */
    --tracking-l: 0.04em;    /* small caps-ish, buttons */
    --tracking-xl: 0.08em;   /* eyebrows and other all-caps runs */

    /* --- Space scale --------------------------------------------------- */
    /* Multiples of the base size rather than the type ratio, so spacing stays
     * predictable while type can be as dramatic as the site needs. */
    --space-3xs: clamp(0.25rem, calc(0.25rem + 0.1vw), 0.375rem);
    --space-2xs: clamp(0.5rem, calc(0.45rem + 0.2vw), 0.625rem);
    --space-xs: clamp(0.75rem, calc(0.68rem + 0.3vw), 0.9375rem);
    --space-s: clamp(1rem, calc(0.91rem + 0.43vw), 1.25rem);
    --space-m: clamp(1.5rem, calc(1.37rem + 0.65vw), 1.875rem);
    --space-l: clamp(2rem, calc(1.82rem + 0.87vw), 2.5rem);
    --space-xl: clamp(3rem, calc(2.73rem + 1.3vw), 3.75rem);
    --space-2xl: clamp(4rem, calc(3.64rem + 1.74vw), 5rem);
    --space-3xl: clamp(6rem, calc(5.46rem + 2.61vw), 7.5rem);

    /* --- Space pairs --------------------------------------------------- */
    /* A pair moves from the SMALLER step on a phone to the LARGER one on a
     * desktop, so the gap changes step rather than merely scaling. This is what
     * replaces per-breakpoint section padding: --space-l-2xl is roughly the old
     * "40-48px mobile, 80-96px desktop" rule, expressed once. */
    --space-2xs-xs: clamp(0.5rem, calc(0.35rem + 0.76vw), 0.9375rem);
    --space-xs-s: clamp(0.75rem, calc(0.57rem + 0.87vw), 1.25rem);
    --space-s-m: clamp(1rem, calc(0.7rem + 1.52vw), 1.875rem);
    --space-m-l: clamp(1.5rem, calc(1.13rem + 1.85vw), 2.5rem);
    --space-l-xl: clamp(2rem, calc(1.36rem + 3.15vw), 3.75rem);
    --space-xl-2xl: clamp(3rem, calc(2.27rem + 3.62vw), 5rem);
    --space-l-2xl: clamp(2rem, calc(0.91rem + 5.43vw), 5rem);
    --space-s-l: clamp(1.125rem, calc(0.72rem + 2.04vw), 2.5rem);  /* skip-a-step: grid gutter */
    --space-2xl-3xl: clamp(4rem, calc(2.55rem + 7.24vw), 7.5rem);

    /* --- Measure ------------------------------------------------------- */
    --measure: 65ch;        /* body copy */
    --measure-tight: 45ch;  /* card and caption copy */

    /* =====================================================================
     * COLOUR
     *
     * Three anchors drive the whole palette. Change them to match the
     * practice; everything else follows. See refs/design/DESIGN.md.
     *
     * That is the default path, and most sites never go past it. Underneath,
     * the palette is layered so a site can take more control WITHOUT hand-
     * writing hex values, which is what a migrated site needs:
     *
     *   1. Anchors        the three below. Tune these first.
     *   2. Per-role       --chroma-secondary, --l-tertiary and friends. A
     *                     brand's second colour is a designer's pick, not a
     *                     rotation of the first, so each role carries its own
     *                     hue, chroma and lightness, defaulting to the anchors.
     *   3. Neutrals       --hue-neutral, --chroma-ink, --chroma-ground. Greys
     *                     are their own decision -- see the block below.
     *   4. Polarity       --scheme. One number flips light/dark.
     *
     * Derive WITHIN a role, declare ACROSS roles. This is the same split
     * Bootstrap 5.3 makes (mix() generates each scale; the base of each theme
     * colour is declared) and the opposite of deriving everything from one
     * hue, which cannot express a real brand pair.
     *
     *   --palette-hue         the practice's brand hue, 0-360.
     *                         Roughly: 25 terracotta · 60 ochre · 145 green
     *                         · 195 teal · 240 blue · 275 violet · 340 rose
     *   --palette-chroma      how saturated the brand reads. OKLCH chroma is
     *                         NOT 0-1 — it runs about 0-0.37 in sRGB, and
     *                         above ~0.15 a surface colour starts to shout.
     *                         0.04 muted · 0.09 confident · 0.14 vivid
     *   --palette-secondary-shift
     *                         degrees from the primary to the secondary.
     *                         150-180 gives a complement; 30-60 an analogous
     *                         neighbour that reads calmer.
     * ===================================================================== */
    --palette-hue: 195;
    --palette-chroma: 0.09;
    --palette-secondary-shift: 150;

    --hue-primary: var(--palette-hue);
    --hue-secondary: calc(var(--palette-hue) + var(--palette-secondary-shift));

    /* Secondary and tertiary each carry their OWN chroma and lightness, not
     * the primary's. They default to it, so a site built from this template
     * still tunes with the three numbers above and renders identically.
     *
     * The override exists because a brand's second colour is often a designer's
     * choice rather than a systematic partner: on a migrated site the secondary
     * was measured at 3.6x the primary's chroma and 0.26 lighter in OKLCH
     * (deep forest green against warm terracotta). One shared chroma and one
     * shared lightness cannot express that pair, and forcing it produced a
     * washed-out grey-green beside a dusty mauve.
     *
     * This is the same concession the feedback colours below already make --
     * each of those carries its own chroma because "yellows need more to read
     * as yellow, reds less before they turn fluorescent". Brand colours want
     * the same latitude. */
    --chroma-secondary: var(--palette-chroma);
    --l-secondary: var(--l-solid);

    /* Tertiary: a third brand colour, typically doing button/CTA work, that is
     * neither a tint of the primary nor semantic. Practices routinely have one
     * ("Button Brown", "Morning Orange"). Defaults to an analogous neighbour of
     * the primary so it is harmless when unused. */
    --palette-tertiary-shift: 30;
    --hue-tertiary: calc(var(--palette-hue) + var(--palette-tertiary-shift));
    --chroma-tertiary: var(--palette-chroma);
    --l-tertiary: var(--l-solid);

    /* --- Neutrals: their own hue, not the brand's ---------------------
     *
     * --hue-neutral defaults to the brand hue, so a site that sets nothing
     * keeps the "greys feel of a piece with the accent" behaviour. But it is
     * a SEPARATE dial, because tying greys to the brand hue is not what any
     * mature system does and not what real practices choose:
     *
     *   - Tailwind ships five grey families (slate/gray/zinc/neutral/stone)
     *     precisely so the temperature of the greys is a decision.
     *   - Bootstrap keeps $gray independent of $theme-colors.
     *   - daisyUI declares base-100/200/300 per theme.
     *
     * And measured on our own migrated sites: both chose warm grounds at hue
     * 80-94 despite green brands at 145 and 166 -- roughly 80 degrees off the
     * brand. A green practice does not want green text, and at the default
     * hue 195 the old derivation gave --ink-strong an R-to-B spread of 17,
     * i.e. a visibly blue-black rather than a black.
     *
     * Set --hue-neutral to taste: the brand hue for a tinted-grey scheme, a
     * warm 70-90 for a settled off-black, or leave chroma at 0 for a true
     * neutral. --chroma-ink and --chroma-ground are separate because ink
     * carries tint better than a large ground does -- the same chroma that
     * reads as "warm grey" in a heading reads as "the wrong white" across a
     * full-bleed background. */
    /* +80 deg off the brand, which is what the previous code already did for
     * --ink-strong alone, and what both migrated practices independently
     * chose for their grounds (warm 80-94 against green brands at 145/166).
     * It defaults to the brand hue so that adding this dial changes nothing on
     * an existing site; the interesting values are elsewhere:
     *
     *   var(--palette-hue)              greys tinted toward the brand (default)
     *   calc(var(--palette-hue) + 80)   the offset real practices tend to pick
     *   70-90                           a warm, settled off-black
     *   with --chroma-ink: 0            a true neutral, no hue at all
     */
    --hue-neutral: var(--palette-hue);
    --chroma-ink: 0.012;    /* text. 0 = true grey; 0.03 = clearly tinted */
    --chroma-ground: calc(0.004 + 0.008 * (1 - var(--scheme)));  /* page background */
    --chroma-surface: calc(0.000 + 0.014 * (1 - var(--scheme))); /* raised surfaces */
    --chroma-border: calc(0.008 + 0.007 * (1 - var(--scheme)));  /* rules and outlines */
    /* Grounds carry MORE tint when dark and less when light: 0.014 across a
     * near-black reads as a warm dark, the same 0.014 across a near-white
     * reads as a colour cast. The old code expressed this by declaring the
     * light and dark neutrals separately; here it rides on --scheme. */

    /* Feedback hues are FIXED and do not follow the brand. A danger colour
     * that rotates with the practice's hue stops reading as danger — the
     * entire value of a semantic colour is that it means the same thing on
     * every site. Only the brand colours above derive from --palette-hue. */
    --hue-success: 145;
    --hue-warning: 75;
    --hue-danger: 27;
    --hue-info: 240;

    /* Lightness ramp. Dark mode overrides these below rather than declaring a
     * second palette — in OKLCH, dark mode is largely an inversion of these
     * four numbers. */
    --l-solid: 0.55;   /* solid fills: buttons, badges */
    --l-hover: 0.48;   /* one step darker for hover */
    --l-light: 0.66;   /* one step lighter: gradient partner for --primary */
    --l-muted: 0.92;   /* a touch stronger than pale, for wash gradients */
    --l-pale: 0.96;    /* tinted backgrounds */
    --l-on-solid: 0.99;/* text on a solid fill */

    /* --- Polarity -----------------------------------------------------
     *
     * --scheme is the one number that says which way round the site runs:
     * 1 = dark ink on a light ground (the norm), 0 = light ink on a dark
     * ground. Every neutral below is written as "light value, plus the
     * distance to its dark counterpart, times (1 - scheme)", so flipping the
     * one number inverts the whole set consistently.
     *
     * This is why the dark-mode block further down only sets --scheme and the
     * three brand-lightness values, instead of re-declaring eight neutrals
     * with a second set of hand-picked literals. Two hand-maintained sets
     * drift: the old block never declared --ink-strong at all, so headings
     * stayed at lightness 0.18 -- dark text on a dark ground.
     *
     * A site that should ALWAYS render dark sets --scheme: 0 here and deletes
     * the media query. A site that should never flip deletes the query alone. */
    --scheme: 1;

    /* Neutral lightness, light-mode value first, dark-mode value second.
     * Edit these to shift contrast; they are dials, not literals buried in
     * the colour definitions. */
    --l-ink-strong: calc(0.18 + 0.79 * (1 - var(--scheme)));
    --l-ink:        calc(0.25 + 0.70 * (1 - var(--scheme)));
    --l-ink-mid:    calc(0.45 + 0.35 * (1 - var(--scheme)));
    --l-ink-soft:   calc(0.54 + 0.12 * (1 - var(--scheme)));
    --l-bg:         calc(0.99 - 0.81 * (1 - var(--scheme)));
    --l-surface:    calc(1.00 - 0.78 * (1 - var(--scheme)));
    --l-border:     calc(0.90 - 0.58 * (1 - var(--scheme)));
    --l-border-strong: calc(0.82 - 0.40 * (1 - var(--scheme)));

    /* Brand */
    --primary: oklch(var(--l-solid) var(--palette-chroma) var(--hue-primary));
    --primary-hover: oklch(var(--l-hover) var(--palette-chroma) var(--hue-primary));
    --primary-light: oklch(var(--l-light) var(--palette-chroma) var(--hue-primary));
    --primary-muted: oklch(var(--l-muted) calc(var(--palette-chroma) * 0.35) var(--hue-primary));
    /* Chroma falls as lightness rises — a pale tint at full chroma reads
     * muddy rather than tinted. */
    --primary-pale: oklch(var(--l-pale) calc(var(--palette-chroma) * 0.25) var(--hue-primary));
    --on-primary: oklch(var(--l-on-solid) 0 0);

    --secondary: oklch(var(--l-secondary) var(--chroma-secondary) var(--hue-secondary));
    --secondary-hover: oklch(calc(var(--l-secondary) - 0.07) var(--chroma-secondary) var(--hue-secondary));
    --secondary-light: oklch(calc(var(--l-secondary) + 0.11) var(--chroma-secondary) var(--hue-secondary));
    --secondary-pale: oklch(var(--l-pale) calc(var(--chroma-secondary) * 0.25) var(--hue-secondary));
    --on-secondary: oklch(var(--l-on-solid) 0 0);

    /* Tertiary, same shape as the two above. */
    --tertiary: oklch(var(--l-tertiary) var(--chroma-tertiary) var(--hue-tertiary));
    --tertiary-hover: oklch(calc(var(--l-tertiary) - 0.07) var(--chroma-tertiary) var(--hue-tertiary));
    --tertiary-pale: oklch(var(--l-pale) calc(var(--chroma-tertiary) * 0.25) var(--hue-tertiary));
    --on-tertiary: oklch(var(--l-on-solid) 0 0);

    /* Aliases for the older names in DESIGN.md, so existing markup and any
     * site copied from an earlier template keep working. */
    --accent: var(--primary);
    --accent-dark: var(--primary-hover);
    --accent-pale: var(--primary-pale);

    /* Feedback. Chroma is per-hue: yellows need more to read as yellow, reds
     * less before they turn fluorescent. */
    --success: oklch(calc(var(--l-solid) - 0.03) 0.13 var(--hue-success));
    --success-pale: oklch(var(--l-pale) 0.03 var(--hue-success));
    --warning: oklch(0.75 0.14 var(--hue-warning));
    --warning-pale: oklch(var(--l-pale) 0.04 var(--hue-warning));
    --danger: oklch(var(--l-solid) 0.17 var(--hue-danger));
    --danger-pale: oklch(var(--l-pale) 0.03 var(--hue-danger));
    --info: oklch(var(--l-solid) 0.11 var(--hue-info));
    --info-pale: oklch(var(--l-pale) 0.03 var(--hue-info));

    /* Neutrals. DESIGN.md asked in prose for "a teal practice and a navy
     * practice want different --ink warmth"; --hue-neutral is that, made a
     * dial instead of a fixed derivation from the brand.
     *
     * Hue and chroma come from the --hue-neutral / --chroma-*
     * dials above, lightness from the --l-* dials, so all three are tunable
     * without editing any of these lines. Ink chroma tapers as text gets
     * lighter, and grounds use the lower --chroma-ground throughout. */
    --ink-strong: oklch(var(--l-ink-strong) calc(var(--chroma-ink) * 2.5) calc(var(--hue-neutral) + 80));  /* headings, dark surfaces */
    --ink: oklch(var(--l-ink) calc(var(--chroma-ink) * 1.25) var(--hue-neutral));
    --ink-mid: oklch(var(--l-ink-mid) var(--chroma-ink) var(--hue-neutral));
    --ink-soft: oklch(var(--l-ink-soft) calc(var(--chroma-ink) * 0.833) var(--hue-neutral));
    --bg: oklch(var(--l-bg) var(--chroma-ground) var(--hue-neutral));
    --surface: oklch(var(--l-surface) var(--chroma-surface) var(--hue-neutral));
    --border: oklch(var(--l-border) var(--chroma-border) var(--hue-neutral));
    --border-strong: oklch(var(--l-border-strong) calc(var(--chroma-border) * 1.25) var(--hue-neutral));

    /* Paired foreground for each ground, the way daisyUI's -content and
     * Bootstrap's -emphasis work. Use --on-bg rather than reaching for --ink
     * directly when the ground itself might be flipped. */
    --on-bg: var(--ink);
    --on-surface: var(--ink);

    /* --- Grid ---------------------------------------------------------- */
    /* Deliberately minimal: the container and gutter are fluid, placement is
     * left to each layout. Use .u-container and .u-grid below. */
    --grid-max-width: 77.5rem;
    --grid-gutter: var(--space-s-l);
    --grid-columns: 12;

    /* --- Radius -------------------------------------------------------- */
    /* Named by intent rather than by number, so a change of scale does not
     * mean auditing every --radius-3 in the stylesheet. */
    --radius-xs: 0.25rem;   /* tags, inline chips */
    --radius-s: 0.5rem;     /* buttons, inputs */
    --radius-m: 0.75rem;    /* cards */
    --radius-l: 1.25rem;    /* panels, modals, hero media */
    --radius-round: 50%;    /* avatars */
    --radius-pill: 999px;   /* pills, badges */

    /* --- Border widths ------------------------------------------------- */
    --border-thin: 1px;
    --border-medium: 2px;
    --border-thick: 4px;    /* accent rules, active states */

    /* --- Shadows ------------------------------------------------------- */
    /* Two knobs drive every shadow. --shadow-color takes the brand hue so a
     * raised card reads as part of this practice rather than as generic grey;
     * --shadow-strength is what dark mode adjusts, because a shadow on a dark
     * background needs MORE opacity to be seen, not less. */
    --shadow-color: var(--hue-primary, 220) 20% 15%;
    --shadow-strength: 1%;

    --shadow-s:
        0 1px 2px -1px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 9%));
    --shadow-m:
        0 3px 5px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
        0 7px 14px -5px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%));
    --shadow-l:
        0 -1px 3px 0 hsl(var(--shadow-color) / calc(var(--shadow-strength) + 2%)),
        0 6px 12px -3px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
        0 15px 30px -6px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%));

    --shadow-inner-s: inset 0 1px 2px 0 hsl(var(--shadow-color) / calc(var(--shadow-strength) + 6%));
    --shadow-inner-m: inset 0 2px 6px 0 hsl(var(--shadow-color) / calc(var(--shadow-strength) + 9%));

    /* --- Layers -------------------------------------------------------- */
    /* Six values, so z-index is never invented at the call site. */
    --layer-behind: -1;    /* decorative washes sitting behind content */
    --layer-base: 1;
    --layer-raised: 2;      /* hover cards, sticky rows */
    --layer-nav: 3;         /* sticky header */
    --layer-overlay: 4;     /* dropdowns, popovers */
    --layer-modal: 5;       /* dialogs and their backdrop */
    --layer-top: 2147483647;/* skip links, live-region alerts */

    /* --- Motion -------------------------------------------------------- */
    --duration-fast: 120ms;   /* hover, focus */
    --duration-base: 220ms;   /* most transitions */
    --duration-slow: 400ms;   /* entrances */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --reveal-distance: 1.5rem;

    /* Typefaces. Set these per site; everything else references them. */
    --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-heading: var(--font-body);   /* override for a display face */
}

/* ═══════════════════════════════════════════════════════════════════════
 * EASTGARDENS MEDICAL CENTRE — site palette
 *
 * Transcribed from the practice's brand kit. The three blues span 26.2 deg
 * of hue, so a single --palette-hue cannot reproduce them: each brand role
 * carries its own hue offset off the navy base, and the red accent (hue
 * 31.7) is a separate family declared independently rather than derived.
 *
 * Source hex, for the record (documentation only — no raw hex is used):
 *   primary   #040030  oklch(0.1452 0.0935 272.1)   navy
 *   secondary #84A2C5  oklch(0.7022 0.0615 252.6)   light blue
 *   tertiary  #6084A4  oklch(0.5988 0.0637 245.9)   mid blue
 *   accent    #C1341E  oklch(0.5388 0.1812  31.7)   red
 *   text      #3D3A3A  oklch(0.3515 0.0042  17.4)   warm near-black
 *   gray BG   #D9D9D9  oklch(0.8853 0      —    )
 *   white BG  #FFFFFF  oklch(1      0      —    )
 * ═══════════════════════════════════════════════════════════════════════ */
:root {
    /* --- Type anchors -------------------------------------------------
     * Root font-size stays a normal 16px; fluidity lives in --step-*,
     * which is what the scale is for. The max ratio stays restrained so
     * headings do not run away from body copy at desktop widths. */
    --u-min-vw: 320;
    --u-max-vw: 1440;
    --u-min-font: 16;
    --u-max-font: 17;
    --u-min-ratio: 1.2;
    --u-max-ratio: 1.27;

    /* --- Brand hues ---------------------------------------------------
     * Base is the navy. Each blue declares its distance from it, because
     * 272.1 -> 252.6 -> 245.9 is not one hue at three lightnesses. */
    --palette-hue: 272.1;                 /* navy, the base bearing */
    --palette-chroma: 0.0935;
    --palette-secondary-shift: -19.5;     /* 272.1 -> 252.6, the light blue */
    --palette-tertiary-shift: -26.2;      /* 272.1 -> 245.9, the mid blue */

    /* Each blue's own chroma and lightness — a designer's picks, not a
     * rotation of the navy. */
    --chroma-secondary: 0.0615;
    --l-secondary: 0.7022;
    --chroma-tertiary: 0.0637;
    --l-tertiary: 0.5988;

    /* --- Red accent, its own hue family -------------------------------
     * Declared, not derived: 31.7 deg is 240 deg off the navy and carries
     * roughly twice its chroma. Nothing about it follows from the blues. */
    --hue-red: 31.7;
    --chroma-red: 0.1812;
    --l-red: 0.5388;

    --red: oklch(var(--l-red) var(--chroma-red) var(--hue-red));
    --red-hover: oklch(calc(var(--l-red) - 0.06) var(--chroma-red) var(--hue-red));
    --red-pale: oklch(0.96 calc(var(--chroma-red) * 0.16) var(--hue-red));
    --on-red: oklch(0.99 0 0);

    /* --- Navy surfaces ------------------------------------------------
     * The header, footer and the dark cards all sit on the same navy.
     * --l-solid drives --primary, so it is the navy's own lightness. */
    --l-solid: 0.1452;
    --l-hover: 0.22;    /* navy is already near-black: hover LIGHTENS */
    --l-light: 0.28;
    --l-muted: 0.94;
    --l-pale: 0.965;
    --l-on-solid: 0.99;

    --navy: var(--primary);
    --navy-soft: oklch(0.22 var(--palette-chroma) var(--hue-primary));

    /* --- Neutrals -----------------------------------------------------
     * The body text is a warm near-black (#3D3A3A, hue 17.4) — a red-side
     * warmth, not the navy's. Grounds are near-neutral: the site's flat
     * greys (#F5F5F5 section bands, #D9D9D9) carry no visible cast. */
    --hue-neutral: 17.4;
    --chroma-ink: 0.0034;
    --chroma-ground: 0.0015;
    --chroma-surface: 0;
    --chroma-border: 0.003;

    --l-ink-strong: 0.1452;  /* headings take the navy's lightness */
    --l-ink: 0.3515;         /* body text, from the kit */
    --l-ink-mid: 0.47;
    /* 0.58 measured 4.26:1 on white - just under the 4.5 WCAG AA needs for
     * body text. 0.55 clears it while staying visibly muted. */
    --l-ink-soft: 0.55;
    --l-bg: 1;               /* white page ground */
    --l-surface: 1;
    --l-border: 0.885;       /* the kit's #D9D9D9 */
    --l-border-strong: 0.80;

    /* Headings are navy, not a warm near-black: override the base layer's
     * +80 deg hue rotation for --ink-strong. */
    --ink-strong: oklch(var(--l-ink-strong) var(--palette-chroma) var(--hue-primary));

    /* The alternating section band. #F5F5F5 in the original. */
    --band: oklch(0.9612 0 0);
    --band-strong: oklch(0.8853 0 0);   /* the kit's #D9D9D9 */

    /* --- Accent aliases -----------------------------------------------
     * The red is this site's accent — eyebrows, CTAs, the strip band. The
     * navy is the primary. DESIGN.md's --accent trio points at the red so
     * .eyebrow and friends pick it up without per-call overrides. */
    --accent: var(--red);
    --accent-dark: var(--red-hover);
    --accent-pale: var(--red-pale);

    /* --- Typefaces ----------------------------------------------------- */
    --font-heading: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Figtree', 'Helvetica Neue', Arial, sans-serif;
    --font-accent: 'Roboto', 'Helvetica Neue', Arial, sans-serif;

    --weight-heading: 600;   /* Roboto 600 — the kit's heading weight, on the accent face */

    /* --- Grid ---------------------------------------------------------- */
    /* 1290px, measured from the live site: every band on every page uses this
     * container width. It is not a taste choice - the previous 75rem/1200px
     * capped each two-column photo at 530px where the source renders up to
     * 1290px, and halved the column counts. Structural dimensions transfer
     * from the source; only their expression is ours. */
    --grid-max-width: 80.625rem;

    --shadow-color: var(--hue-primary) 30% 12%;
}


/*
 * Dark mode is deliberately absent. Eastgardens Medical Centre is a
 * navy-and-red brand rendered on white, and DESIGN.md says to delete this
 * block for a site that should only ever render light. Inverting the ramp
 * would put the navy — which is this site's DARK surface, at lightness
 * 0.1452 — on a dark ground, where the header and footer stop reading as
 * surfaces at all.
 */

/* ═══════════════════════════════════════════════════════════════════════
 * RESET
 *
 * Josh Comeau's Custom CSS Reset (joshwcomeau.com/css/custom-css-reset/),
 * lightly adapted. Normalises browser defaults so the base layer below is
 * building on the same ground in every browser. Leave this alone; make
 * design decisions in the base layer and the tokens above it.
 * ═══════════════════════════════════════════════════════════════════════ */

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

* { margin: 0; }

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

body {
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Media is block-level and never overflows its container. */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* Form controls inherit typography rather than using browser chrome. */
input, button, textarea, select { font: inherit; }

/* Long words and URLs wrap instead of forcing a horizontal scrollbar. */
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* A new stacking context on the root, so app-level layers cannot escape. */
#root, #__next { isolation: isolate; }

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

/* ═══════════════════════════════════════════════════════════════════════
 * ELEMENT BASE LAYER
 *
 * Bare elements are styled here so a page is correct with no classes at
 * all. Without this, an unclassed <h2> falls back to the browser default
 * and whoever writes the page patches it with an inline style — which is
 * how a site ends up with a different heading treatment per page.
 *
 * Every heading has a matching .h1-.h6 class. Use the ELEMENT for document
 * structure (SEO, screen readers, outline) and the CLASS for appearance,
 * so an <h1> can look like an eyebrow without lying about the hierarchy:
 *
 *     <h1 class="h4">Still the page's real heading, just smaller</h1>
 *
 * Sites override these; they are a floor, not a straitjacket.
 * ═══════════════════════════════════════════════════════════════════════ */

body {
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: var(--weight-400);
    line-height: var(--leading-l);
    color: var(--ink);
    background: var(--bg);
}

/* Headings ─────────────────────────────────────────────────────────────
 * Margins are top-heavy on purpose: a heading belongs to what follows it,
 * so the space above is larger than the space below. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    margin: var(--space-l) 0 var(--space-s);
    font-family: var(--font-heading);
    font-weight: var(--weight-700);
    line-height: var(--leading-s);
    letter-spacing: var(--tracking-xs);
    color: var(--ink-strong);
    text-wrap: balance;
}

:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) + * {
    margin-top: 0;
}

/* A heading opening its container needs no space above it. */
:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6):first-child {
    margin-top: 0;
}

h1, .h1 { font-size: var(--step-5); }
h2, .h2 { font-size: var(--step-4); }
h3, .h3 { font-size: var(--step-3); }
h4, .h4 { font-size: var(--step-2); }
h5, .h5 { font-size: var(--step-1); line-height: var(--leading-m); }
h6, .h6 {
    font-size: var(--step-0);
    line-height: var(--leading-m);
    letter-spacing: var(--tracking-m);
    text-transform: uppercase;
}

/* A highlighted phrase inside a heading. One mechanism, not three. */
:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) em {
    font-style: italic;
    color: var(--primary);
}

/* Text ─────────────────────────────────────────────────────────────── */
p, ul, ol, dl, blockquote, figure, table, pre {
    margin: 0 0 var(--space-m);
}

/*
 * Line length is a container's job, not every paragraph's — capping each <p>
 * leaves text hugging the left of any column already sized for reading.
 * Use .measure (or set a width on the container) where prose needs it.
 */
.measure { max-width: var(--measure); }
.measure-tight { max-width: var(--measure-tight); }

/* Opening paragraph: larger and looser than body copy. */
.lede {
    font-size: var(--step-1);
    line-height: var(--leading-m);
    color: var(--ink-mid);
}

/* Small label above a heading. */
.eyebrow {
    display: block;
    margin-bottom: var(--space-2xs);
    /* --step-1 (21.6px) against the source's 20.6px; --step--1 rendered it at
     * 13.4px, a third too small. */
    font-size: var(--step-1);
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    color: var(--primary);
}

small, .text-small { font-size: var(--step--1); }

strong, b { font-weight: var(--weight-700); }

a {
    color: var(--primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--primary-hover); }

/* A visible focus ring on every interactive element, always. */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

ul, ol { padding-left: var(--space-m); }

/*
 * List spacing applies to PROSE lists only. Navigation, button groups and
 * card grids are lists too, and flow margins on those knock flex/grid items
 * out of alignment (the site header) or balloon the spacing (the footer).
 *
 * Presence of a class is not the test — a footer nav is a nav whether or not
 * anyone put a class on it — so navigation context opts out explicitly.
 */
:where(ul, ol) > li { margin-bottom: var(--space-2xs); }
:where(ul, ol) > li:last-child { margin-bottom: 0; }

nav ul, nav ol,
header ul, header ol,
footer ul, footer ol,
menu {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

nav li, header li, footer li, menu li {
    margin-bottom: 0;
}

/* A list explicitly used for layout carries no bullets, indent or margin. */
:where(ul, ol)[class] {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

:where(ul, ol)[class] > li { margin-bottom: 0; }

blockquote {
    padding-left: var(--space-m);
    border-left: var(--border-thick) solid var(--primary-pale);
    color: var(--ink-mid);
    font-style: italic;
}

hr {
    height: 0;
    margin: var(--space-l) 0;
    border: 0;
    border-top: var(--border-thin) solid var(--border);
}

code, kbd, samp, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}

/* Media ────────────────────────────────────────────────────────────────
 * Images are rounded by default. The square-photo bug on Wellbrook was an
 * <img> with no radius sitting beside cards that had one. */
img, picture, video, canvas, svg {
    height: auto;
}

img {
    border-radius: var(--radius-m);
    /* No background plate. The source renders every photo on a transparent
     * ground; a --surface fill behind them reads as a card the source does
     * not have, and is the same trap that hides transparent SVG logos. */
}

/*
 * Logos, icons and inline SVG are not photographs — a background plate and a
 * radius are wrong for them, and show up as a white box on a dark footer.
 */
img[class*="logo"], img[class*="icon"], .logo img, svg {
    border-radius: 0;
    background: none;
}

/* Opt out where a radius is wrong: full-bleed art, decorative crops. */
img.is-flush, .is-flush img { border-radius: 0; background: none; }

figure { margin-inline: 0; }

figcaption {
    margin-top: var(--space-2xs);
    font-size: var(--step--1);
    color: var(--ink-soft);
}

/* Tables ───────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: var(--space-2xs) var(--space-xs);
    border-bottom: var(--border-thin) solid var(--border);
    vertical-align: top;
}

th {
    font-weight: var(--weight-600);
    color: var(--ink-strong);
}

tbody tr:last-child :where(th, td) { border-bottom: 0; }

/* Forms ────────────────────────────────────────────────────────────── */
label {
    display: block;
    margin-bottom: var(--space-3xs);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
}

input, select, textarea {
    width: 100%;
    padding: var(--space-2xs) var(--space-xs);
    font-family: inherit;
    font-size: var(--step-0);
    color: var(--ink);
    background: var(--surface);
    border: var(--border-thin) solid var(--border-strong);
    border-radius: var(--radius-s);
    transition: border-color var(--duration-fast) var(--ease-out);
}

input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }

textarea { min-height: 8rem; resize: vertical; }

input[type="checkbox"], input[type="radio"] {
    width: auto;
    accent-color: var(--primary);
}

/* Buttons size to their content, not to the form-control full width. */
input[type="submit"], input[type="button"] { width: auto; }

/*
 * A bare <button> is usually a UI affordance — a menu toggle, a dropdown
 * trigger — not a visual button, so it gets a reset rather than a look.
 * Add .btn when you want one that looks like a button.
 */
button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

::placeholder { color: var(--ink-soft); opacity: 1; }

fieldset { margin: 0 0 var(--space-m); padding: 0; border: 0; }

/* Buttons ──────────────────────────────────────────────────────────────
 * .btn is opt-in — put it on a <button> or an <a> that should look like a
 * button. Variants change colour, sizes change scale. A bare <button> is
 * reset above, not styled, because most of them are menu and dropdown
 * triggers rather than visual buttons. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xs);
    padding: var(--space-2xs) var(--space-s);
    font-family: inherit;
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    line-height: var(--leading-s);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: var(--border-thin) solid transparent;
    border-radius: var(--radius-s);
    transition: background var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.btn--primary {
    background: var(--primary);
    color: var(--on-primary);
}
.btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }

.btn--secondary {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn--secondary:hover { background: var(--primary-pale); color: var(--primary-hover); }

.btn--ghost {
    background: transparent;
    color: var(--ink-mid);
}
.btn--ghost:hover { background: var(--primary-pale); color: var(--primary); }

.btn--sm { padding: var(--space-3xs) var(--space-xs); font-size: var(--step--2); }
.btn--lg { padding: var(--space-xs) var(--space-m); font-size: var(--step-0); }

/*
 * ON A DARK GROUND
 *
 * Variants above assume a light background. On a dark or brand-coloured
 * section they invert: the solid button goes white, the outline picks up a
 * translucent white edge. Put .on-dark on the button or any ancestor.
 */
.on-dark .btn--primary,
.btn--primary.on-dark {
    background: var(--surface);
    color: var(--primary);
}

.on-dark .btn--primary:hover,
.btn--primary.on-dark:hover {
    background: var(--surface);
    color: var(--primary-hover);
}

.on-dark .btn--secondary,
.btn--secondary.on-dark {
    color: var(--on-primary);
    border-color: color-mix(in oklab, var(--on-primary) 40%, transparent);
}

.on-dark .btn--secondary:hover,
.btn--secondary.on-dark:hover {
    background: color-mix(in oklab, var(--on-primary) 12%, transparent);
    color: var(--on-primary);
}

.btn[disabled], .btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Media frames ────────────────────────────────────────────────────────
 * A frame for an embed — map, video or photo — so the child fills a box of
 * known proportion instead of the element's natural size.
 *
 * The ratio, radius and any framing are DEFAULTS. Change them in this file
 * to suit the design; they are here so a frame is never unstyled, not to
 * fix how it should look. */
.media-frame {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-m);
    background: var(--surface);
}

.media-frame > :where(iframe, img, video) {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
    border-radius: 0;
}

.media-frame--square { aspect-ratio: 1; }
.media-frame--wide { aspect-ratio: 16 / 9; }

/* Cards ────────────────────────────────────────────────────────────────
 * Deliberately minimal — a surface with a radius. Sites compose their own
 * card variants on top; modelling every one here would be guesswork. */
.card {
    padding: var(--space-m);
    background: var(--surface);
    border: var(--border-thin) solid var(--border);
    border-radius: var(--radius-m);
}

/* Utility ──────────────────────────────────────────────────────────── */
.visually-hidden, .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/*
 * Grid utilities. .u-container centres and pads; .u-grid lays out. Placement
 * within the grid is each layout's business — see refs/design/layouts.md.
 */
/* The gutter goes OUTSIDE the max-width, matching how the source is built.
 *
 * --grid-max-width is transcribed as the width of the container ITSELF: the live
 * site's inner container is max-width:1290px with zero padding, and its gutter
 * sits on an outer wrapper. Putting the gutter on the same element (border-box)
 * left only 1210px of content and shrank every photo and grid track by ~6%;
 * switching that element to content-box instead made it 1370px wide, wider than
 * the source. Margin-inline gives the gutter without touching the width, so the
 * container is 1290 at wide viewports and shrinks with the gutter below that. */
.u-container {
    width: 100%;
    max-width: var(--grid-max-width);
    margin-inline: auto;
    padding-inline: 0;
}

/* Below 48rem the footer stacks into one column, and left-aligned blocks
 * under a left-aligned logo read as a ragged pile. Centre the lot - logo,
 * contact, address, hours - and the legal bar with them. */
@media (max-width: 47.999rem) {
    .site-footer__inner,
    .site-footer__inner section,
    .site-footer__inner address,
    .site-footer__logo { text-align: center; }
    .site-footer__logo img { margin-inline: auto; }
    .site-footer__legal-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-2xs);
    }
    .site-footer__legal-links { justify-content: center; }
    /* The hours table is a day/rule/time row; centring the block would leave
     * the rows lopsided, so keep it aligned but centre the block itself. */
    .site-footer__inner .hours-table { max-width: 20rem; margin-inline: auto; }
}

/* The gutter, applied as an outer margin so it never eats the container width.
 * min() keeps it from consuming the viewport on a phone. */
@media (max-width: 86.625rem) {
    .u-container {
        max-width: calc(100% - 2 * var(--grid-gutter));
    }
}

.u-grid {
    display: grid;
    gap: var(--grid-gutter);
}

/*
 * Scroll entrance.
 *
 * Native scroll-driven animation — no library, no IntersectionObserver, no
 * JS. Add .reveal for a plain fade, or one of the directional modifiers.
 *
 * WHY THE WHOLE BLOCK IS INSIDE prefers-reduced-motion: a reveal implemented
 * as `opacity: 0` plus an animation leaves reduced-motion users staring at
 * invisible content when the animation never runs. Scoping the rule means
 * they simply get the content, with no trap to fall into.
 *
 * Safari and Firefox do not support animation-timeline yet, so content there
 * is simply visible. That is the correct failure for a practice site: no
 * entrance effect is always better than content that never arrives.
 */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }

    .reveal--up { --reveal-from: translateY(var(--reveal-distance)); }
    .reveal--down { --reveal-from: translateY(calc(var(--reveal-distance) * -1)); }
    .reveal--left { --reveal-from: translateX(var(--reveal-distance)); }
    .reveal--right { --reveal-from: translateX(calc(var(--reveal-distance) * -1)); }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: var(--reveal-from, none);
    }
}

/*
 * Doctor avatar fallback
 * Shows a gradient + person silhouette when no photo exists.
 * The <img> has onerror="this.style.display='none'" which hides
 * the broken image, revealing this CSS background underneath.
 *
 * Derived from the site's own --accent so a missing photo reads as part of
 * this practice rather than as a stray swatch. Define --accent in :root above.
 */
.doctor-avatar {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 0.5rem;
    background: linear-gradient(135deg,
        color-mix(in oklab, var(--primary) 85%, black),
        var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.doctor-avatar::after {
    content: "";
    position: absolute;
    width: 40%;
    height: 40%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.doctor-avatar img {
    position: relative;
    z-index: var(--layer-base);
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/*
 * Mediflare footer logo — dark/light variants.
 * Default: inverted (white text) for dark footers.
 * Add .footer-light to <footer> for light backgrounds.
 */
.mf-logo-light { display: none; }
.mf-logo-dark { display: inline; }
.footer-light .mf-logo-light { display: inline; }
.footer-light .mf-logo-dark { display: none; }

/* Hours: prevent time strings from breaking between number and am/pm */
.hours-table td:last-child,
.footer__hours-row span {
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════
 * EASTGARDENS MEDICAL CENTRE — site layer
 *
 * Everything below composes on the tokens and the base layer above. No raw
 * hex, no bespoke clamp(): sizes come from --step-*, spacing from
 * --space-*, and raw px appears only for genuinely fixed dimensions
 * (hairlines, icon boxes, the 44px touch floor).
 * ═══════════════════════════════════════════════════════════════════════ */

/* Headings are Roboto 600 — the same face as buttons, eyebrows and nav
 * labels, so the site runs on two families rather than three, and the same
 * weight the brand kit set on Poppins. Roboto is a variable font, so 600 is
 * a real face here rather than the old static family's 500/700 jump. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: var(--weight-heading);
}

/* The hero display line, a step above the section headings. */
.display {
    font-size: var(--step-5);
    line-height: var(--leading-xs);
    letter-spacing: var(--tracking-xs);
}

/* Eyebrows are red, uppercase and tracked — the site's most repeated
 * signal, above nearly every section heading. */
.eyebrow {
    font-family: var(--font-accent);
    /* 600, as the source: 500 read too light once the size went up. */
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-xl);
    color: var(--red);
}
/* The source sets 21px between an eyebrow and its heading; ours ran to 40px
 * because the heading's own top margin stacked on the eyebrow's bottom one. */
.eyebrow + h1, .eyebrow + h2, .eyebrow + h3,
.eyebrow + .h1, .eyebrow + .h2, .eyebrow + .h3 { margin-top: 0; }

.lede { color: var(--ink-mid); }

/* Buttons ────────────────────────────────────────────────────────────
 * The site's CTA is a red pill in Roboto 500 caps. .btn--primary is
 * repointed at the red because on this site the red IS the call to
 * action; the navy is a surface colour, not a button. */
.btn {
    font-family: var(--font-accent);
    font-weight: 500;
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    /* The source pads its button 15px top and bottom; the base .btn's 10px
     * read cramped. Site-wide, so every CTA picks it up. */
    padding-block: var(--space-xs);
    /* 44px touch floor, applied to every button on the site. */
    min-height: 44px;
    padding-inline: var(--space-m);
}

.btn--primary {
    background: var(--red);
    color: var(--on-red);
}
.btn--primary:hover { background: var(--red-hover); color: var(--on-red); }

.btn--secondary {
    border-color: var(--red);
    color: var(--red);
}
.btn--secondary:hover { background: var(--red-pale); color: var(--red-hover); }

/* On a navy ground the solid button stays red — it is the accent, and
 * inverting it to white would lose the one signal the section carries. */
.on-dark .btn--primary,
.btn--primary.on-dark {
    background: var(--red);
    color: var(--on-red);
}
.on-dark .btn--primary:hover,
.btn--primary.on-dark:hover { background: var(--red-hover); color: var(--on-red); }

.on-dark .btn--secondary,
.btn--secondary.on-dark {
    color: var(--on-primary);
    border-color: color-mix(in oklab, var(--on-primary) 45%, transparent);
}

/* Sections ───────────────────────────────────────────────────────────
 * One rhythm token for every band, so the vertical spacing is a single
 * decision rather than a per-section guess. */
.section { padding-block: var(--space-l-2xl); }
.section--tight { padding-block: var(--space-xl-2xl); }
.section--band { background: var(--band); }
.section--navy {
    background: var(--navy);
    color: var(--on-primary);
}
.section--navy :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
    color: var(--on-primary);
}
.section--navy .lede { color: color-mix(in oklab, var(--on-primary) 80%, transparent); }

.section__head { max-width: var(--measure); margin-bottom: var(--space-l); }
.section__head--centre {
    margin-inline: auto;
    text-align: center;
}

/* Layout helpers ─────────────────────────────────────────────────────
 * auto-fit grids rather than fixed column counts, so a row reflows on its
 * own instead of needing a media query per breakpoint. */
.grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: var(--grid-gutter);
    /* Single column is the floor. A grid that can always reach one full-width
     * track can never overflow, whatever its content's intrinsic width. */
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48rem) {
    .grid-2 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
    .grid-3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
    .grid-4 { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
}

/* A content column beside a media column. The media side is given a
 * slightly smaller share so the prose keeps a comfortable measure. */
.split {
    display: grid;
    gap: var(--space-l-xl);
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 60rem) {
    .split { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
}
.split--media-first > :first-child { order: -1; }

.stack > * + * { margin-top: var(--space-s); }
.flow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-m);
}

/* Header ─────────────────────────────────────────────────────────────
 * Navy bar, logo left, nav right, red CTA last. Sticky so the booking
 * button stays reachable; the navy is opaque, so no blur is needed. */
.skip-link {
    position: absolute;
    display: inline-flex;
    align-items: center;
    /* 44px touch floor — it is off-screen until focused, but a keyboard
     * user who tabs to it gets a target the same size as every other. */
    min-height: 44px;
    left: var(--space-s);
    top: var(--space-s);
    z-index: var(--layer-top);
    padding: var(--space-2xs) var(--space-s);
    background: var(--red);
    color: var(--on-red);
    border-radius: var(--radius-s);
    text-decoration: none;
    transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); color: var(--on-red); }

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--layer-nav);
    background: var(--navy);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    min-height: 88px;
    /* A step up from --space-2xs: the bar read tight against the logo. */
    padding-block: var(--space-xs);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    /* 44px touch floor. */
    min-height: 44px;
    margin-right: auto;
    color: var(--on-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    font-size: var(--step-1);
    letter-spacing: var(--tracking-s);
}
.site-logo:hover { color: var(--on-primary); }
/* The source header renders the mark at 216x85 (a 600x300 SVG). 40px was
   sized for the text placeholder this replaced; 54px matches the source's
   proportion against the header height without crowding the nav.

   background:none and radius 0 are REQUIRED, not tidiness: the global
   `img { background: var(--surface); border-radius: var(--radius-m) }`
   placeholder-tint for photos paints a white rounded box behind this
   transparent SVG, and since the logo's lettering is itself white, the
   wordmark vanishes and only the red cross survives. */
.site-logo img { height: 64px; width: auto; display: block;
                 background: none; border-radius: 0; }
@media (max-width: 767px) { .site-logo img { height: 52px; } }

.nav { display: flex; align-items: center; gap: var(--space-s); }

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-3xs);
}

.nav__list a,
.nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3xs);
    /* 44px touch floor on every nav item. */
    min-height: 44px;
    padding: var(--space-2xs) var(--space-xs);
    font-family: var(--font-accent);
    font-size: var(--step--1);
    font-weight: 500;
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--on-primary);
    border-radius: var(--radius-s);
    white-space: nowrap;
    transition: background var(--duration-fast) var(--ease-out);
}

.nav__list a:hover,
.nav__toggle:hover { background: var(--navy-soft); color: var(--on-primary); }

/* The active page gets ONE signal — the red fill — not a fill plus a rule. */
.nav__list a.active { background: var(--red); color: var(--on-red); }

.nav__item { position: relative; }

.nav__toggle svg { width: 12px; height: 12px; }
.nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: var(--layer-overlay);
    min-width: 14rem;
    padding: var(--space-2xs);
    background: var(--surface);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-l);
    display: none;
}
.nav__item:where(:hover, :focus-within) .nav__menu,
.nav__menu[data-open] { display: block; }

.nav__menu a {
    display: flex;
    width: 100%;
    color: var(--ink);
    text-transform: none;
    letter-spacing: var(--tracking-m);
    font-size: var(--step--1);
}
.nav__menu a:hover { background: var(--red-pale); color: var(--red); }
.nav__menu a.active { background: var(--red); color: var(--on-red); }

.nav__burger {
    display: none;
    align-items: center;
    justify-content: center;
    /* 44px touch floor. */
    width: 44px;
    height: 44px;
    color: var(--on-primary);
    border-radius: var(--radius-s);
}
.nav__burger:hover { background: var(--navy-soft); }
.nav__burger svg { width: 24px; height: 24px; }

/* Must stay ABOVE the mobile query: same specificity, so whichever comes last
 * wins, and below it this hid the in-menu CTA at every width. */
.nav__cta-mobile { display: none; }

@media (max-width: 62rem) {
    .nav__burger { display: inline-flex; }
    .nav > .btn { display: none; }

    .nav__list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: var(--layer-overlay);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-s) var(--grid-gutter) var(--space-m);
        background: var(--navy);
        border-top: var(--border-thin) solid var(--navy-soft);
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
    }
    .nav__list[data-open] { display: flex; }

    .nav__list > li > a,
    .nav__toggle { width: 100%; }

    .nav__menu {
        position: static;
        display: none;
        min-width: 0;
        padding: 0 0 var(--space-2xs) var(--space-s);
        background: none;
        box-shadow: none;
    }
    .nav__item:where(:hover, :focus-within) .nav__menu { display: none; }
    .nav__menu[data-open] { display: block; }
    .nav__menu a { color: var(--on-primary); }
    .nav__menu a:hover { background: var(--navy-soft); color: var(--on-primary); }

    /* Full-width CTA closing the menu, separated from the links above it. */
    .nav__cta-mobile {
        display: flex;
        margin-top: var(--space-s);
        padding-top: var(--space-s);
        border-top: var(--border-thin) solid var(--navy-soft);
    }
    .nav__cta-mobile .btn { width: 100%; justify-content: center; }
}

/* Hero ───────────────────────────────────────────────────────────────
 * A photo ground with a light wash over it so the navy headline holds
 * contrast wherever the image happens to be bright. */
.hero {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 30rem;
    background: var(--band-strong) center / cover no-repeat;
    isolation: isolate;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: var(--layer-behind);
    /* The source carries NO overlay - the hero photo runs clean. Ours was
     * 92%/78% white and left the subjects washed out and opaque. This keeps
     * just enough scrim behind the copy on the left for legibility and clears
     * to nothing well before the subjects. */
    background: linear-gradient(
        100deg,
        color-mix(in oklab, var(--surface) 62%, transparent) 0%,
        color-mix(in oklab, var(--surface) 30%, transparent) 30%,
        color-mix(in oklab, var(--surface) 0%, transparent) 62%);
}

.hero__inner { padding-block: var(--space-2xl-3xl); }
.hero__content { max-width: 34rem; }
/* :not(.eyebrow) - the eyebrow is a <p>, so .hero__content p (0,1,1) beat the
 * .eyebrow rule (0,1,0) and painted it --ink instead of the brand red. */
.hero__content p:not(.eyebrow) { color: var(--ink); }

/* The inner-page hero carries no photo — a plain band with the eyebrow,
 * heading and lede, matching the original's inner pages. */
.hero--plain {
    min-height: 0;
    background: var(--surface);
}
.hero--plain::after { display: none; }

/* Contact bar ────────────────────────────────────────────────────────
 * The navy card that overlaps the hero on the homepage: phone, blurb,
 * CTA. It lifts into the section above by a negative margin, which is the
 * one place this site uses one. */
.contact-bar {
    position: relative;
    z-index: var(--layer-raised);
    margin-top: calc(var(--space-xl) * -1);
    /* A step up on the block padding: --space-m read tight around the phone
     * number and the button. Inline padding unchanged. */
    padding: var(--space-l) var(--space-l);
    background: var(--navy);
    color: var(--on-primary);
    border-radius: var(--radius-l);
    display: grid;
    gap: var(--space-m);
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48rem) {
    .contact-bar { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
    /* The CTA sits hard right of the bar once the row is multi-column, so it
     * anchors the navy panel's right edge instead of floating at the left of
     * its track. Only above the breakpoint - stacked on a phone it stays
     * left-aligned with the copy above it. */
    .contact-bar > :last-child { justify-self: end; }
}

.contact-bar__phone {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    text-decoration: none;
    color: var(--on-primary);
    /* 44px touch floor on the tel: link. */
    min-height: 44px;
}
.contact-bar__phone:hover { color: var(--on-primary); }

.contact-bar__icon {
    display: grid;
    place-items: center;
    /* Fixed icon box. */
    width: 48px;
    height: 48px;
    flex: none;
    background: var(--red);
    border-radius: var(--radius-round);
}
.contact-bar__icon svg { width: 22px; height: 22px; }

.contact-bar__label {
    display: block;
    font-family: var(--font-accent);
    font-size: var(--step--1);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: color-mix(in oklab, var(--on-primary) 72%, transparent);
}
.contact-bar__number {
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    font-size: var(--step-1);
    /* The light blue reads as a link against the navy card, where the white
     * of the label beside it does not. Set on the number rather than the
     * whole .contact-bar__phone so the "Call us now" label stays white.
     * --secondary-light, not --secondary-pale: the pale tints deliberately
     * drop to 25% chroma, which against navy reads as off-white rather than
     * blue and so fails to differentiate at all. */
    color: var(--secondary-light);
}
.contact-bar__phone:hover .contact-bar__number,
.contact-bar__phone:focus-visible .contact-bar__number { color: var(--on-primary); }

/* Pillars ────────────────────────────────────────────────────────────
 * The four brand promises. Rendered as a card row on the homepage and as
 * a red strip on the inner pages — same content, two treatments. */
.pillar {
    text-align: center;
    padding: var(--space-m) var(--space-s);
}

/* Hairline dividers between pillars rather than four boxed cards: the
 * original separates them with a rule, and boxing them would add three
 * competing elevations to a row that carries no interaction. */
/* Vertical rules only - no top or bottom on the row - and a rule on the far
 * left and right as well as between, so the four read as a bounded set of
 * columns rather than a floating group. */
.pillars {
    border-block: 0;
}
.pillars .pillar {
    border-right: var(--border-thin) solid var(--border);
}
.pillars .pillar:first-child {
    border-left: var(--border-thin) solid var(--border);
}

@media (max-width: 62rem) {
    /* Stacked: the verticals become meaningless, so rule between rows instead
     * and drop the outer edges. :first-child too - .pillars .pillar:first-child
     * (0,2,1) beats .pillars .pillar (0,2,0), so clearing the generic rule
     * alone left a stray left border on the first item. */
    .pillars .pillar,
    .pillars .pillar:first-child { border-right: 0; border-left: 0; }
    .pillars .pillar:not(:first-child) { border-top: var(--border-thin) solid var(--border); }
}

.pillar__icon {
    display: grid;
    place-items: center;
    /* Fixed icon box. */
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-s);
    /* Dark blue disc, lighter blue glyph. */
    background: var(--secondary);
    border-radius: var(--radius-round);
    color: var(--secondary-pale);
}
.pillar__icon svg { width: 26px; height: 26px; }

.pillar h3 {
    font-size: var(--step-0);
    color: var(--red);
    margin-bottom: var(--space-2xs);
}
.pillar p { font-size: var(--step-0); margin: 0; }

/* The red strip variant used on inner pages. */
/* 135px on the source, every page it appears on; ours came out at 60px because
 * the height was left to the items. min-height rather than padding so the
 * homepage's stacked variant, which is taller again, is unaffected. */
.strip {
    background: var(--red);
    color: var(--on-red);
}
/* 135px on the source, every page it appears on; ours came out 60px because
 * the height was left to the items. Above 48rem only, so the phone stack and
 * the homepage's taller variant are unaffected. */
@media (min-width: 48rem) {
    .strip__list { min-height: 135px; align-items: center; }
}
@media (min-width: 48rem) {
    .strip__list { min-height: 135px; align-items: center; }
}
.strip__list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

/* Four across / 2x2 / one column, matching the contact page's navy strip -
 * auto-fit produced an awkward 3+1 in between. */
@media (min-width: 36rem) {
    .strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62rem) {
    .strip__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* In the 2x2 band the rules follow the GRID, not the source order: left of the
 * right-hand column, above the second row. */
@media (min-width: 36rem) and (max-width: 61.999rem) {
    .strip__item + .strip__item { border-left: 0; }
    .strip__item:nth-child(2n) {
        border-left: var(--border-thin) solid color-mix(in oklab, var(--on-red) 25%, transparent);
    }
    .strip__item:nth-child(n + 3) {
        border-top: var(--border-thin) solid color-mix(in oklab, var(--on-red) 25%, transparent);
    }
}
.strip__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    padding: var(--space-s) var(--space-xs);
    font-family: var(--font-accent);
    font-weight: 500;
    /* 17px against the source's 16.5px; --step--1 rendered 13.4px. */
    font-size: var(--step-0);
    text-align: center;
}
.strip__item + .strip__item {
    border-left: var(--border-thin) solid color-mix(in oklab, var(--on-red) 25%, transparent);
}
/* 30px on the source. */
.strip__item svg { width: 30px; height: 30px; flex: none; }

@media (max-width: 48rem) {
    .strip__item + .strip__item {
        border-left: 0;
        border-top: var(--border-thin) solid color-mix(in oklab, var(--on-red) 25%, transparent);
    }
}

/* Cards ──────────────────────────────────────────────────────────────
 * One card shape for the whole site. Shadow on hover only — depth means
 * "this is interactive", not "this is a box". */
.card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border: var(--border-thin) solid var(--border);
    transition: box-shadow var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out);
}
.card__body { padding: var(--space-m); }
.card__body > :last-child { margin-bottom: 0; }
.card img { border-radius: 0; }

.card--link:hover {
    box-shadow: var(--shadow-m);
    transform: translateY(-2px);
}

.card h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }

/* Service and feature cards lead with a red heading, matching the site's
 * treatment of every card title. */
.card--service h3 { color: var(--red); }
.card--service h3 a {
    display: inline-flex;
    align-items: center;
    /* 44px touch floor. */
    min-height: 44px;
    color: inherit;
}
.card--service h3 a:hover { color: var(--red-hover); }
.card--service p { font-size: var(--step-0); margin-bottom: 0; }

/* A media card: image on top, body below, image at a fixed ratio so a row
 * of them lines up regardless of the source photo's proportions. */
.card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--band);
}
.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Doctor cards ───────────────────────────────────────────────────── */
.doctor-card {
    padding: var(--space-m);
    text-align: center;
    background: var(--surface);
    border: var(--border-thin) solid var(--border);
    border-radius: var(--radius-m);
}
.doctor-card h3 {
    font-size: var(--step-0);
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: var(--tracking-l);
    margin-bottom: var(--space-2xs);
}
.doctor-card p { margin-bottom: var(--space-3xs); font-size: var(--step-0); }
.doctor-card p:last-child { margin-bottom: 0; color: var(--ink-soft); }

/* Feature list ───────────────────────────────────────────────────────
 * The icon-plus-text pairs beside the services image on the homepage. */
.feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-xs);
    align-items: start;
}
.feature__icon {
    display: grid;
    place-items: center;
    /* Fixed icon box. */
    width: 44px;
    height: 44px;
    /* Same treatment as .pillar__icon: dark blue disc, lighter blue glyph.
     * Not the accent - these are informational icons, not calls to action. */
    background: var(--secondary);
    border-radius: var(--radius-round);
    color: var(--secondary-pale);
}
.feature__icon svg { width: 20px; height: 20px; }
.feature h3 {
    font-size: var(--step-0);
    color: var(--red);
    margin: 0 0 var(--space-3xs);
}
.feature p { font-size: var(--step-0); margin: 0; }

/* Hours panel ────────────────────────────────────────────────────────
 * The navy hours card. The dotted leader between day and time is a
 * border on a flex spacer, which keeps it out of the text content. */
.hours-panel {
    padding: var(--space-m);
    background: var(--navy);
    color: var(--on-primary);
    border-radius: var(--radius-m);
}
.hours-panel h2, .hours-panel h3 { color: var(--on-primary); }

/* The times are painted --ink-strong by the generic .hours-table rule, which
 * is the same navy as this card's ground - they rendered invisible. Recolour
 * both cells and the connector rule for the dark panel, the same treatment
 * .contact-cards__hours already carries. */
.hours-panel .hours-table td:first-child,
.hours-panel .hours-table td:last-child {
    color: var(--on-primary);
}
.hours-panel .hours-table td:first-child::after {
    border-top-color: color-mix(in oklab, var(--on-primary) 45%, transparent);
}

.hours-panel .hours-table { margin: 0; }
.hours-panel .hours-table :where(th, td) {
    border-bottom-color: color-mix(in oklab, var(--on-primary) 18%, transparent);
    color: var(--on-primary);
    padding-inline: 0;
}
.hours-panel .hours-table td:last-child {
    text-align: right;
    font-weight: var(--weight-600);
}

/* The same table on a light ground. */
.hours-table td:last-child {
    text-align: right;
    font-weight: var(--weight-600);
    color: var(--ink-strong);
}

/* Definition rows ────────────────────────────────────────────────────
 * The fees and appointment-type lists: a label, an optional note, and a
 * value pinned right. Used wherever the original shows a priced row. */
.deflist { display: grid; gap: var(--space-xs); }

.defrow {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-xs);
    align-items: baseline;
    padding-bottom: var(--space-xs);
    border-bottom: var(--border-thin) solid var(--border);
}
.defrow:last-child { border-bottom: 0; padding-bottom: 0; }

.defrow__label {
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    color: var(--ink-strong);
}
.defrow__note {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--step-0);
    color: var(--ink-mid);
    font-family: var(--font-body);
    font-weight: var(--weight-400);
}
.defrow__value {
    font-family: var(--font-accent);
    font-weight: 500;
    color: var(--red);
    white-space: nowrap;
}

/* Accordion (FAQ) ────────────────────────────────────────────────────
 * Native <details>, so it is keyboard-operable and searchable with no JS. */
.faq { display: grid; gap: var(--space-2xs); }

.faq details {
    background: var(--surface);
    border: var(--border-thin) solid var(--border);
    border-radius: var(--radius-m);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    /* 44px touch floor on the summary row. */
    min-height: 44px;
    padding: var(--space-s) var(--space-m);
    font-family: var(--font-heading);
    font-weight: var(--weight-heading);
    color: var(--ink-strong);
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "";
    flex: none;
    /* Fixed chevron box. */
    width: 10px;
    height: 10px;
    border-right: var(--border-medium) solid var(--red);
    border-bottom: var(--border-medium) solid var(--red);
    transform: rotate(45deg) translate(-25%, -25%);
    transition: transform var(--duration-base) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }

.faq details > :not(summary) {
    padding: 0 var(--space-m) var(--space-m);
    margin: 0;
}

/* Policy list ────────────────────────────────────────────────────────
 * The practice-policies and legal pages: a heading and prose per item,
 * no card chrome, separated by a rule. */
.policy + .policy {
    margin-top: var(--space-l);
    padding-top: var(--space-l);
    border-top: var(--border-thin) solid var(--border);
}
/* Brand red, matching the fees-page note headings and the doctor cards. */
.policy h3 { margin-top: 0; font-size: var(--step-1); color: var(--red); }
.policy > :last-child { margin-bottom: 0; }

/* Inline links in long-form prose are tap targets too. inline-flex with a
 * min-height keeps them in the text flow while meeting the 44px floor. */
.prose p a,
.policy p a,
.policy li a,
.prose li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* Legal pages hold long prose — cap the measure so it stays readable. */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); }
.prose h3 { font-size: var(--step-1); }

/* Contact ────────────────────────────────────────────────────────────
 * The navy detail strip under the contact hero: four labelled facts. */
/* The four facts run wider than the site container. At 1290 the columns
 * land around 300px each and "Phone Number" / "Fax" crowd their dividers;
 * 1350 is enough to unpick that without the strip reading as a different
 * width from the bands above and below - it sits on its own full-bleed
 * navy ground, so nothing else has to move. Below 1350 + gutters the
 * .u-container rule clamps it to the viewport as before. */
.detail-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 84.375rem;   /* 1350px */
}

/* Four across when there is room; a 2x2 grid in between, which is where
 * auto-fit previously produced an awkward 3+1; one column on a phone. */
@media (min-width: 36rem) {
    .detail-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62rem) {
    .detail-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.detail {
    padding: var(--space-m) var(--space-s);
    text-align: center;
}
.detail + .detail {
    border-left: var(--border-thin) solid color-mix(in oklab, var(--on-primary) 20%, transparent);
}
/* In the 2x2 band the borders have to follow the grid, not the source order:
 * a rule to the LEFT of the right-hand column, and above the second row. */
@media (min-width: 36rem) and (max-width: 61.999rem) {
    .detail + .detail { border-left: 0; border-top: 0; }
    .detail:nth-child(2n) {
        border-left: var(--border-thin) solid color-mix(in oklab, var(--on-primary) 20%, transparent);
    }
    .detail:nth-child(n + 3) {
        border-top: var(--border-thin) solid color-mix(in oklab, var(--on-primary) 20%, transparent);
    }
}
@media (max-width: 35.999rem) {
    .detail + .detail {
        border-left: 0;
        border-top: var(--border-thin) solid color-mix(in oklab, var(--on-primary) 20%, transparent);
    }
}
.detail h3 {
    font-size: var(--step-0);
    color: var(--on-primary);
    margin: 0 0 var(--space-2xs);
}
.detail p, .detail address {
    margin: 0;
    font-style: normal;
    font-size: var(--step-0);
    color: color-mix(in oklab, var(--on-primary) 85%, transparent);
}
.detail a { color: var(--on-primary); }
.detail a:hover { color: var(--secondary); }

/* Form ───────────────────────────────────────────────────────────── */
.form { display: grid; gap: var(--space-s); }

.form label { font-family: var(--font-accent); }

/* Inputs must stay at least 16px — below that iOS zooms the page on
 * focus. --step-0 never falls below 16px, so it is the floor here. */
.form :where(input, select, textarea) {
    font-size: var(--step-0);
    /* 44px touch floor on every control. */
    min-height: 44px;
    padding: var(--space-2xs) var(--space-s);
}
.form textarea { min-height: 9rem; }

.form .required { color: var(--red); }

[data-mf-feedback] {
    margin-top: var(--space-s);
    padding: var(--space-s);
    border-radius: var(--radius-s);
    background: var(--success-pale);
}

/* A red panel used for the feedback callout on the contact page. */
.panel-red {
    padding: var(--space-l);
    background: var(--red);
    color: var(--on-red);
    border-radius: var(--radius-m);
}
.panel-red h2, .panel-red h3 { color: var(--on-red); }
.panel-red p { color: color-mix(in oklab, var(--on-red) 88%, transparent); }
.panel-red .btn--primary {
    background: var(--surface);
    color: var(--red);
}
.panel-red .btn--primary:hover { background: var(--surface); color: var(--red-hover); }

/* A navy panel, same shape. */
.panel-navy {
    padding: var(--space-l);
    background: var(--navy);
    color: var(--on-primary);
    border-radius: var(--radius-m);
}
.panel-navy h2, .panel-navy h3 { color: var(--on-primary); }
.panel-navy p { color: color-mix(in oklab, var(--on-primary) 85%, transparent); }
.panel-navy a { color: var(--secondary); }

/* Footer ─────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--navy);
    color: var(--on-primary);
}
.site-footer__inner {
    display: grid;
    gap: var(--space-l);
    padding-block: var(--space-xl);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 48rem) {
    .site-footer__inner { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}
.site-footer h2 {
    margin: 0 0 var(--space-s);
    font-size: var(--step-0);
    color: var(--on-primary);
}
/* Tappable contact links in the footer and contact strip. A phone number
 * is the single most-tapped thing on a practice site; it gets the floor
 * even though it sits inside a paragraph. */
.site-footer a,
.detail a,
.contact-bar__phone,
a[href^="tel:"],
a[href^="mailto:"],
.mf-email {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.site-footer p, .site-footer address {
    font-style: normal;
    font-size: var(--step-0);
    color: color-mix(in oklab, var(--on-primary) 85%, transparent);
    margin-bottom: var(--space-2xs);
}
.site-footer a { color: var(--on-primary); }
.site-footer a:hover { color: var(--secondary); }

.site-footer .hours-table :where(th, td) {
    padding-inline: 0;
    font-size: var(--step-0);
    color: color-mix(in oklab, var(--on-primary) 85%, transparent);
    border-bottom-color: color-mix(in oklab, var(--on-primary) 15%, transparent);
}
.site-footer .hours-table td:last-child { color: var(--on-primary); }

/* The footer uses a DIFFERENT asset on the source: a wider horizontal
   lockup (262x75) rather than the header's stacked 600x300 mark. Both are
   the white-lettering variant, which is why both sit on the navy ground. */
/* The source's footer logo box is 280x80. Ours is an SVG with more internal
 * padding than that raster, so the visible mark sits smaller inside the same
 * box height - 96px matches it by eye. */
.site-footer__logo img { height: 96px; width: auto; display: block;
                         background: none; border-radius: 0; }

/* The red legal bar across the bottom, as on the original. */
.site-footer__legal {
    background: var(--red);
    color: var(--on-red);
}
.site-footer__legal-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-m);
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-2xs);
}
/* 14px on the source; --step-0 (17px) read too large in the red band. */
.site-footer__legal p { margin: 0; font-size: var(--step--1); color: var(--on-red); }
.site-footer__legal a { color: var(--on-red); }
.site-footer__legal a:hover { color: var(--on-red); }

.site-footer__legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-m);
}
.site-footer__legal-links a {
    /* 14px on the source; --step-0 read too large in the red band. */
    font-size: var(--step--1);
    /* 44px touch floor on the legal links. */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xs);
    padding-block: var(--space-2xs);
    margin: 0;
    font-size: var(--step-0);
    color: var(--ink-soft);
}
/* 12.4px on the source. .site-footer p (0,1,1) sets --step-0 and beats a bare
 * .powered-by (0,1,0), so this has to match that specificity to win - the
 * child anchor was picking up the smaller size while the <p> itself stayed
 * 17px, which is the tell for a specificity miss rather than a cascade one. */
.site-footer p.powered-by,
.powered-by a,
.powered-by span { font-size: var(--step--1); }
/* .site-footer p also sets a bottom margin, which escaped past the footer and
 * left 10px of blank page below it. Needs the same specificity to clear. */
.site-footer p.powered-by { margin-bottom: 0; }

/* An inline tel: link INSIDE a paragraph must not carry the 44px tap-target
 * floor - it makes the anchor a tall box mid-sentence and pushes the line
 * apart. The floor is for standalone links (the footer's contact rows, a card
 * action), not for a phone number quoted in running copy. */
p a[href^="tel:"],
li a[href^="tel:"],
address a[href^="tel:"] {
    min-height: 0;
    padding-block: 0;
    display: inline;
}

/* The contact links carry the 44px minimum tap target, which stacks into very
 * airy rows in the footer's narrow column. Keep the full target on touch
 * pointers, where it matters, and let the rows close up on a mouse. */
@media (pointer: fine) {
    .site-footer__inner a[href^="tel:"] { min-height: 0; padding-block: 0; }
    /* A step of air between the contact rows: the 44px tap target made them
     * far too airy, and removing it entirely closed them up too far. */
    .site-footer__inner section p { margin-block: 0 var(--space-2xs); }
}
/* The Mediflare mark scales with the label beside it; 20px left it tiny once
 * the text came down from 17px. */
.powered-by img { height: 28px; width: auto; }
.powered-by a {
    display: inline-flex;
    align-items: center;
    /* No 44px floor here. It is a small logo credit, not a primary action, and
     * the floor inflated a 20px line into a 64px block of mostly blank space.
     * The 28px mark is still an easy target. */
    min-height: 0;
}

/* Map ────────────────────────────────────────────────────────────── */
.map-frame { aspect-ratio: 16 / 10; }
@media (max-width: 48rem) { .map-frame { aspect-ratio: 4 / 3; } }

/* Utilities ──────────────────────────────────────────────────────── */
.text-centre { text-align: center; }
.mb-0 { margin-bottom: 0; }

/* Specialist panel ───────────────────────────────────────────────────
 * The source pairs a white copy panel with a photo and two solid-red
 * cards in the opposite column. The red cards are FILLED, not outlined:
 * white icon, white heading, white body. Transcribed from the live DOM
 * (630x747 white panel r20px; 300x358 red cards r20px, 50px padding). */
.panel {
    background: var(--surface);
    border-radius: var(--radius-l);
    padding: var(--space-xl);
}
.panel > :last-child { margin-bottom: 0; }

.card-solid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-l);
    background: var(--red);
    color: var(--on-red);
    border-radius: var(--radius-l);
}
.card-solid h3 {
    color: var(--on-red);
    font-size: var(--step-2);
    margin: 0;
}
.card-solid p {
    color: var(--on-red);
    margin: 0;
    font-size: var(--step-0);
}
.card-solid__icon {
    width: 50px;
    height: 50px;
    color: var(--on-red);
}
.card-solid__icon svg {
    width: 100%;
    height: 100%;
    display: block;
    /* The icons are filled glyphs on the source, not strokes. */
    fill: currentColor;
    stroke: none;
    /* Defeat the global img/svg surface paint. */
    background: none;
}

/* A media block that fills its grid cell at a fixed ratio, matching the
 * source's 630x358 photo above the two red cards. */
.media-fill {
    border-radius: var(--radius-l);
    overflow: hidden;
    /* No placeholder tint: the source frames its photos with a radius and
     * nothing behind them, so a band-coloured ground reads as a card. */
    background: none;
}
.media-fill img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    background: none;
}

/* The visiting-specialists band. Source at 1440: two 630px columns, the
 * white panel left; right column stacks a 630x358 photo over two 300x358
 * red cards. Single column below 60rem so nothing is forced narrow. */
.specialists {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}
.specialists__aside {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
}
.specialists__media { aspect-ratio: 16 / 9; }
.specialists__cards {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 60rem) {
    .specialists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .specialists__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Appointment hero ───────────────────────────────────────────────────
 * The source leads with copy beside a wide reception photo (1290x450 at
 * 1440), not a bare text block. */
.hero--split .hero__inner { display: grid; gap: var(--space-l-xl); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 60rem) {
    .hero--split .hero__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hero__lead > :last-child { margin-bottom: 0; }
.hero__media { aspect-ratio: 16 / 9; }

/* A list whose markers are the site's red tick rather than a disc. */
.ticklist { list-style: none; padding-left: 0; margin-bottom: var(--space-m); }
.ticklist li {
    position: relative;
    padding-left: var(--space-l);
    margin-bottom: var(--space-s);
}
.ticklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 0.7em;
    height: 0.35em;
    border-left: 2px solid var(--red);
    border-bottom: 2px solid var(--red);
    transform: rotate(-45deg);
}
.ticklist li:last-child { margin-bottom: 0; }

/* Services hero ──────────────────────────────────────────────────────
 * The source splits eyebrow+H1 from lede+CTA across two columns, then
 * runs a full-width 1290x700 photo beneath (not beside) them. */
.hero__split {
    display: grid;
    gap: var(--space-l-xl);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    margin-bottom: var(--space-xl);
}
@media (min-width: 60rem) {
    .hero__split { grid-template-columns: 1.4fr 1fr; }
}
.hero__aside > :last-child { margin-bottom: 0; }
.hero__banner { aspect-ratio: 1290 / 700; }

/* Service cards ──────────────────────────────────────────────────────
 * The source does NOT box these. Each is a rounded 410x308 photo, then
 * a RED PILL holding the white title, then body copy on the page ground
 * — no border, no card surface. Transcribed from the live DOM
 * (img r20px; title wrapper bg #c1341e r100px, 20px vertical padding). */
/* The row gap must exceed the gap between a card's pill and its own body text,
 * or the description reads as belonging to the card BELOW it - which is what
 * happened once the pill was pulled up to straddle its photo. Column gap stays
 * on the grid gutter; only the rows need the extra air. */
.svc-grid {
    display: grid;
    column-gap: var(--grid-gutter);
    row-gap: var(--space-3xl);
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
    .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 64rem) {
    .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.svc { display: flex; flex-direction: column; text-align: center; }
/* No bottom margin: the title pill is pulled up to straddle this edge, so
 * the gap below the photo is the pill's own overhang instead. */
.svc__media { aspect-ratio: 410 / 308; margin-bottom: 0; }
.svc__title {
    background: var(--red);
    color: var(--on-red);
    border-radius: var(--radius-pill);
    padding: var(--space-xs) var(--space-m);
    /* Straddle the photo's bottom edge - the top half of the pill sits over the
     * image, the bottom half below it. -50% of the pill's own height keeps that
     * true whatever the label wraps to, where a fixed px offset would not.
     * position:relative so it paints above the photo. */
    position: relative;
    transform: translateY(-50%);
    /* The pill is pulled up by half its height, so the flow below needs that
     * height back plus the gap the layout had. NOT a percentage: a percentage
     * margin resolves against the CONTAINER'S WIDTH, not the element's height,
     * which pulled the body text 154px up over the pill. 0.5lh is half a line
     * box, which is what half this single-line pill actually is. */
    margin: 0 auto calc(0.5lh + var(--space-3xs));
    font-size: var(--step-1);
    /* The pill hugs its label on the source rather than filling the column. */
    width: fit-content;
    max-width: 100%;
}
/* Below 48rem the panel stacks, so the eyebrow, heading, copy and button sit
 * left-aligned under a full-width photo and read as a ragged column. Centre
 * the block there; the two-column desktop layout is unaffected. */
@media (max-width: 47.999rem) {
    .feature-panel__body { text-align: center; }
    .feature-panel__body .btn { margin-inline: auto; }
}

.svc__body {
    margin: 0;
    padding-inline: var(--space-s);
    font-size: var(--step-0);
}

/* Feature panel ──────────────────────────────────────────────────────
 * The source's closing band is a single white r15px card holding a tall
 * photo beside the copy — not a bare split on the page ground.
 * Live: card 1290x673, photo 520x573, copy column 520 wide. */
.feature-panel {
    display: grid;
    gap: var(--space-l-xl);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-l);
    padding: var(--space-xl);
    box-shadow: var(--shadow-s);
}
@media (min-width: 60rem) {
    .feature-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.feature-panel__media { aspect-ratio: 520 / 573; }
.feature-panel__body > :last-child { margin-bottom: 0; }

/* The source sets its lead-in labels in the accent red. */
.text-red { color: var(--red); }

/* Fees panels ────────────────────────────────────────────────────────
 * The source holds the fee tables in two white r15px cards side by side
 * (516 and 774 wide at 1440), not loose on the band. */
.fees-panels {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .fees-panels { grid-template-columns: 2fr 3fr; }
}

/* Practice policies ──────────────────────────────────────────────────
 * The source presents each policy as a white r15px card in a two-column
 * grid (630px each at 1440), not as a divider-separated list, and opens
 * with a row of three square photos. */
.policy-gallery {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: minmax(0, 1fr);
    margin-top: var(--space-xl);
}
@media (min-width: 48rem) {
    .policy-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.policy-gallery .media-fill { aspect-ratio: 1; }

.policy-grid {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Inside the grid each policy is its own card, so the divider rule that
 * separated them as a single column no longer applies. */
.policy-grid .policy {
    background: var(--surface);
    border-radius: var(--radius-l);
    padding: var(--space-l);
    height: 100%;
}
.policy-grid .policy + .policy {
    margin-top: 0;
    padding-top: var(--space-l);
    border-top: 0;
}

/* The source's article feed sits in one white r15px card. We do not
 * reproduce that feed (it is third-party syndicated content hosted on
 * yourhealth.net.au), but the substitute links keep its single-card
 * shape rather than reading as six competing cards. */
.resources-panel .card {
    border: 0;
    background: none;
}
.resources-panel .card__body { padding: 0; }

/* Homepage tiles ─────────────────────────────────────────────────────
 * The source's first two columns in this row are NOT boxed: photo, then
 * text and button directly on the band. Only the third (practice hours)
 * is a filled navy card. */
.home-tile { display: flex; flex-direction: column; }
.home-tile__media { aspect-ratio: 410 / 277; margin-bottom: var(--space-m); }
.home-tile__body > :last-child { margin-bottom: 0; }
.home-tile h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }

/* ═══════════════════════════════════════════════════════════════════════
 * APPOINTMENT PAGE
 *
 * Transcribed from the source's five bands at 1440px, not re-authored. The
 * source's track widths are what these rules reproduce; the colours, type
 * and spacing come from the tokens above. Measured source geometry:
 *
 *   band 0  2 cols  645 + 645, gap 0     + a full-width 1290x450 photo below
 *   band 1  the rust strip (.strip), no content
 *   band 2  3 cols  383 + 383 + 383, gap 70    photo in col 3 at 383x431
 *   band 3  2 cols  595 + 595, gap 100   left column empty, content right
 *   band 4  2 cols  595 + 595, gap 100   accordion left, 595x669 photo right
 *
 * The gaps are expressed as tokens where one lands close (70px ~ --space-xl
 * at its 60px ceiling is not close enough, so band 2 and 3/4 carry their
 * measured gap). Single column below 60rem so nothing is forced narrow.
 * ═══════════════════════════════════════════════════════════════════════ */

/* The source measures every band on this page at x=75 w=1290 - that is 1290px
 * of CONTENT, not a 1290px border box with a gutter inside it. .u-container
 * pads by --grid-gutter, which would leave each track 40px short and shrink
 * every photo with it, so on this page the container carries its padding
 * OUTSIDE the max-width once the viewport can afford the full 1290 + gutters.
 * Below that the normal padded behaviour returns and nothing can overflow. */
/* Band 0. The two columns are equal on the source (645/645) and the photo
 * is NOT beside them — it runs the full 1290 container beneath. */
.appt-hero__row {
    display: grid;
    gap: var(--space-l-xl);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    margin-bottom: var(--space-xl);
}
@media (min-width: 60rem) {
    .appt-hero__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        /* The source sets no gap between these two columns; the eye reads
         * them as one spread. Keep a gutter so the measure does not run
         * into the second column on our fluid container. */
        gap: var(--grid-gutter);
    }
}
.appt-hero__lead > :last-child,
.appt-hero__aside > :last-child { margin-bottom: 0; }

/* The source pads this band 119px top and 120px bottom; ours had none, so the
 * hero ran into the header above and the strip below. --space-3xl is 120px. */
.appt-hero { padding-block: var(--space-3xl); }

/* The navy detail strip's icons: 62px rust circles with a white glyph, as the
 * source has. Ours shipped without them. */
.detail__icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto var(--space-s);
    border-radius: 50%;
    background: var(--red);
    color: var(--on-red);
}
.detail__icon svg { width: 26px; height: 26px; }

/* The email address is one long unbroken token and overflowed its column at
 * 1024, where the strip is four narrow tracks. Break it at a sensible point
 * rather than letting it push past the container. */
/* The span AND the <a> the mf-email script builds inside it at runtime - the
 * anchor is what actually carries the text and overflowed. */
.detail .mf-email,
.detail .mf-email a,
.detail p a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Every page's hero gets the same 120px band padding. /contact, /services and
 * /practice-policies had none at all, so their heroes ran straight into the
 * header and into whatever followed, while /about and /appointment had 120px -
 * the inconsistency read as a mistake rather than a variation. Applied to the
 * shared .hero--plain so a new page inherits it; the pages that already set
 * their own (.about-hero, .appt-hero, the /fees hero) are unaffected because
 * their own rule follows this one. */
.hero--plain { padding-block: var(--space-3xl); }
/* ...except where a lead image follows immediately: there the copy and the
 * image belong together, and a full band's padding between them reads as two
 * unrelated blocks. */
.hero--plain:has(+ .resources-lead) { padding-block: var(--space-xl) 0; }
/* .hero__inner carries its own 120px of block padding on top of the hero's,
 * which is where most of the gap actually came from - the hero's own padding
 * was less than half of it. */
.hero--plain:has(+ .resources-lead) .hero__inner { padding-bottom: 0; }

/* "Appointments Made Simple" is 24.7px w500 in the brand red on the source - a
 * lead-in to the list, not a section heading. As an <h2> it was inheriting the
 * 44.2px navy heading treatment. */
.appt-hero__aside h2 {
    margin-top: 0;
    font-size: var(--step-2);
    font-weight: var(--weight-600);
    color: var(--red);
}

/* A 1px rule between the two hero columns, as the source has (a right border
 * on its first 645px column). Only once the row is genuinely two columns. */
@media (min-width: 60rem) {
    .appt-hero__lead {
        border-right: var(--border-thin) solid var(--border);
        padding-right: var(--grid-gutter);
    }
    /* The aside sits against the title, not the eyebrow above it. A fixed
     * offset was wrong: it assumed the H1 wraps to two lines as it does on the
     * source, where "Appointments Made Simple" lands near the middle of a
     * 119px two-line title. Our H1 fits on one line at this width, so the same
     * offset left the aside riding high. Centring the two columns against each
     * other holds however the title wraps. */
    .appt-hero__row { align-items: end; }
}

/* 1290 x 450 on the source — a 2.87:1 crop of a 3:2 original. */
.appt-hero__banner { aspect-ratio: 1290 / 450; }

/* Band 2. Three equal columns with the source's 70px gutter; the photo is
 * the third column, not a full-width banner. */
.appt-reminders {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 48rem) {
    .appt-reminders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
    .appt-reminders {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 70px;
    }
}
.appt-reminders > * > :last-child { margin-bottom: 0; }

/* 383 x 431 on the source. */
.appt-reminders__media { aspect-ratio: 383 / 431; }

/* Below 60rem the photo has no third column to sit in, so it spans the row
 * rather than being squeezed to half width beside a text column. */
@media (min-width: 48rem) and (max-width: 59.999rem) {
    .appt-reminders__media { grid-column: 1 / -1; aspect-ratio: 1290 / 431; }
}

/* The hours block inside column two. The source runs it as plain lines on
 * the band, not as the navy panel used elsewhere on the site. */
.appt-hours { margin-bottom: var(--space-m); }

/* Day ———— time: a rule connecting the pair, spanning exactly the gap between
 * them so it grows and shrinks with the labels either side.
 *
 * The platform emits {{opening_hours_html}} as <table class="hours-table"> with
 * a day cell and an hours cell per row (verified against the live
 * wellbrook-medical and victoria-road-medical-centre tag files - our own tag
 * file had a hand-written <p><strong>+<br> blob, which Rails would overwrite).
 *
 * Each row is a flex line. The day cell grows and lays its text out beside the
 * rule, so the rule takes exactly the space the text leaves; a border on either
 * cell would underline its own text rather than connect the two. */
.appt-hours .hours-table,
.appt-hours .hours-table tbody { display: block; width: 100%; }

.appt-hours .hours-table tr {
    display: flex;
    align-items: center;
    padding-block: var(--space-xs);
}

/* The base .hours-table underlines each row; here the connector is the rule,
 * so the inherited border has to go or every row gets two. */
.appt-hours .hours-table td { padding: 0; border: 0; }

.appt-hours .hours-table td:first-child {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--space-s);
    color: var(--ink-strong);
    font-weight: var(--weight-700);
    white-space: nowrap;
}

.appt-hours .hours-table td:first-child::after {
    content: "";
    flex: 1;
    min-width: var(--space-l);
    border-top: var(--border-thin) solid var(--ink-strong);
}

.appt-hours .hours-table td:last-child {
    flex: none;
    padding-left: var(--space-s);
    text-align: right;
    color: var(--red);
    font-weight: var(--weight-700);
    white-space: nowrap;
}

/* Band 3. Two equal columns, 100px gutter, content in the RIGHT one — the
 * source leaves the left column empty and we reproduce that rather than
 * filling it with a photo the source does not have. */
.appt-types {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    /* stretch, not start: the source's empty left column is a real 595x874
     * box holding the track open to the row's full height, and a zero-height
     * spacer would not reproduce that. */
    align-items: stretch;
}
@media (min-width: 60rem) {
    .appt-types {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 100px;
    }
}
/* The empty left column exists only to hold the track open on wide
 * viewports; below 60rem it would be a blank row, so it is removed. */
/* The left column carries a 595x874 photo, cover-cropped with a 15px radius.
 * The source sets it as a CSS background-image on the column container rather
 * than an <img>, which is why an <img>-only sweep reported this column empty -
 * measure background-image too, or a photo like this goes missing. */
.appt-types__media { display: none; }
@media (min-width: 60rem) {
    .appt-types__media { display: block; aspect-ratio: 595 / 874; }
}
.appt-types h2 { margin-top: 0; }

/* Band 3's rows deliberately keep the shared .defrow treatment rather than the
 * source's heavier 20.6px w700 pair: the lighter label with the value on the
 * baseline reads better here. Reverted on request after the rebuild. */

/* Band 4. Accordion left, photo right, heading left-aligned — the source
 * does not centre it. */
.appt-faq {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .appt-faq {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 100px;
    }
}
/* The source left-aligns this heading; ours would inherit the same, but
 * .section__head--centre is the site's habit for a lone FAQ heading and it
 * is explicitly NOT wanted here. "start" rather than "left" so the rule
 * stays direction-agnostic and matches the computed value elsewhere. */
.appt-faq h2 { margin-top: 0; text-align: start; }

/* 595 x 669 on the source. */
.appt-faq__media { aspect-ratio: 595 / 669; }

/* Flat accordion ─────────────────────────────────────────────────────
 * The source's FAQ rows are NOT cards: no fill, no radius, no shadow, and
 * no gap between items. Each row is a hairline rule with a +/- glyph, and
 * an open row turns rust. .faq keeps its card treatment for the homepage;
 * this modifier is the appointment page's flat variant. */
.faq--flat { gap: 0; }

.faq--flat details {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.faq--flat summary {
    padding: var(--space-s) 0;
    border-bottom: var(--border-thin) solid var(--band-strong);
    font-family: var(--font-body);
    /* A step above the source's 16.5px, and 600 not 400: the questions are the
     * scannable part of the band and read too quiet at body weight. */
    font-size: var(--step-1);
    font-weight: var(--weight-600);
    color: var(--ink-strong);
}
.faq--flat details[open] summary { color: var(--red); }

/* A plus that becomes a minus, as the source does, rather than a chevron
 * that rotates. Two bars: the vertical one is hidden when open. */
.faq--flat summary::after {
    content: "";
    width: 0.75em;
    height: 0.75em;
    border: 0;
    transform: none;
    background:
        linear-gradient(currentColor, currentColor) center / 100% var(--border-medium) no-repeat,
        linear-gradient(currentColor, currentColor) center / var(--border-medium) 100% no-repeat;
}
.faq--flat details[open] summary::after {
    transform: none;
    background: linear-gradient(currentColor, currentColor) center / 100% var(--border-medium) no-repeat;
}

.faq--flat details > :not(summary) {
    padding: var(--space-s) 0;
    color: var(--ink);
}

/* The eyebrow is rust site-wide; band 2's is navy on the source. */
.eyebrow--navy { color: var(--ink-strong); }



/* ═══════════════════════════════════════════════════════════════════════
 * /about ─────────────────────────────────────────────────────────────
 * Source at 1440 (container 1290) band by band:
 *   0 hero    793 + 397, gap 100; the copy column splits 347 + 347, gap 100
 *   2 doctors head 379 + 632 + 278 — THREE tracks, the CTA is its own
 *   3-5 doctor cards three-up, white r10, 50px padding, 30px gap
 *   6 closing 619 + 621, gap 50; left stacks copy over a 599x399 photo,
 *     right is one 541x766 photo
 * ═══════════════════════════════════════════════════════════════════════ */

/* Hero. 793/397 is 2fr/1fr to within 3px at 1290, so the ratio is the
 * token rather than two magic widths. */
.about-hero { padding-block: var(--space-3xl); }

.about-hero__row {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .about-hero__row {
        grid-template-columns: 2fr 1fr;
        gap: 100px;
    }
}

/* The two prose columns inside the copy track. One column below 48rem so
 * the measure never collapses to something unreadable. */
.about-hero__cols {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr);
    margin-top: var(--space-l);
}
@media (min-width: 48rem) {
    .about-hero__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 100px; }
}
.about-hero__cols > * > :last-child { margin-bottom: 0; }

/* 397 x 645 on the source. */
.about-hero__media { aspect-ratio: 397 / 645; }

/* Doctors intro. The third track holds only the CTA and is sized to it,
 * which is what the source's 278px column amounts to. */
.about-doctors__head {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .about-doctors__head {
        grid-template-columns: minmax(0, 379fr) minmax(0, 632fr) auto;
        gap: var(--space-l);
        align-items: center;
    }
    /* The source's three columns are each 112px tall — the eyebrow+heading
     * stack sets the height and the other two centre against it. Stretching
     * all three to that common height is what makes this read as one row
     * rather than three loose blocks. */
    .about-doctors__head > * {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 112px;
    }
}
/* The CTA sits to the right of its track on the source. */
@media (min-width: 60rem) {
    .about-doctors__cta { justify-self: end; }
}

/* The source keeps the doctors heading in its own band, separate from the
 * cards, so the padding lives per band rather than on one section. Its
 * three card bands are a single grid here, so that grid's row carries the
 * run-out below the last card. */
.about-doctors--head { padding-block: var(--space-3xl); }
/* 120px of run-out below the last doctor card, before the closing band.
 * This sits on the class, NOT on :last-of-type - the row is the 4th of five
 * <section>s on the page, so :last-of-type never matched it and the padding
 * silently did nothing. */
.about-doctors--row  { padding-block: 0 var(--space-3xl); }

/* Doctor cards, three-up. .grid-3 is auto-fit and lands on four tracks at
 * 1290; the source holds three, so this band states the count. The last row
 * carries a single card, which stays in the first track as the source does. */
.doctor-grid {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
    .doctor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
    .doctor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
}

/* The source's cards carry 50px of padding and no border — the white sits
 * on the band's grey, which is the whole separation. Ours keeps a hairline
 * for the case where a card lands on white. */
.about-doctors .doctor-card {
    padding: var(--space-xl);
    /* centre, not start: the base .doctor-card centres and this was overriding
     * it. Names and qualifications read better centred in a card this wide. */
    text-align: center;
}

/* The cards stretch to a common height per row, as the source's do. */
.doctor-grid > .doctor-card { height: 100%; }



/* Closing band. 619/621 is even, so 1fr/1fr. */
.about-close__row {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .about-close__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; }
}
.about-close__lead > :last-child { margin-bottom: 0; }
.about-close__lead h2 { margin-top: 0; }

/* The source puts a full-width hairline between the heading and the copy —
 * an Elementor divider widget, not a border on the heading. */
.rule {
    height: 0;
    margin: var(--space-m) 0;
    border: 0;
    /* Brand red, not the neutral border token: this divider is a deliberate
     * accent under the closing heading, not a structural hairline. */
    border-top: var(--border-thin) solid var(--red);
}

/* 599 x 399 on the source. */
.about-close__media {
    aspect-ratio: 599 / 399;
    margin-top: var(--space-m);
}
/* 541 x 766 on the source. */
.about-close__survey { aspect-ratio: 541 / 766; }


/* ═══════════════════════════════════════════════════════════════════════
 * /contact ───────────────────────────────────────────────────────────
 * Source at 1440 (container 1290), band by band:
 *   1 hero   784 + 436, gap 70; copy centred against a 436x871 photo (r15)
 *   2 navy detail strip, four 360px tracks, 20px icons
 *   3 centred head, then a 700x700 photo centred full-width, then a
 *     3x430 row: navy Open Hours card | spacer | rust feedback card,
 *     both cards r15 with 70px padding
 * ═══════════════════════════════════════════════════════════════════ */

.contact-hero {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}
@media (min-width: 60rem) {
    .contact-hero {
        /* 784/436 at 1290 with a 70px gap. */
        grid-template-columns: 784fr 436fr;
        column-gap: var(--space-xl);
    }
}
.contact-hero__lead > :last-child { margin-bottom: 0; }
/* 436 x 871 on the source. */
.contact-hero__media { aspect-ratio: 436 / 871; }

/* The 700x700 photo is centred on the page, not stretched to the
 * container — the source caps it at 700 and centres. */
.contact-photo {
    width: min(100%, 700px);
    margin-inline: auto;
    aspect-ratio: 1;
}

/* The card row. Source is three 430px tracks with the middle one empty and
 * the rust card raised 240px so it overlaps the photo above. We put the
 * form in the middle track (the source's form is the same fields, behind a
 * popup) so the row reads as three columns as the source does. */
.contact-cards {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    margin-top: var(--space-xl);
    align-items: start;
}
@media (min-width: 60rem) {
    /* Two 430px cards flanking the photo, both raised over it as the source
     * has them: the rust feedback card starts 26% down the 700px photo on the
     * right, the navy hours card 60% down on the left - so they sit at
     * different heights rather than as a tidy pair. The negative top margin is
     * what lifts the row over the photo above it. */
    .contact-cards {
        /* Widened from the source's 430 against a 580 photo: at laptop
         * widths that left the hours card ~370px, where the intro copy
         * wrapped to four lines and the day/time rows ran out of room
         * between the day and the time. The photo gives up the difference -
         * it is a soft background element behind both cards, so losing a
         * little width costs nothing, and the cards stop reading cramped. */
        grid-template-columns: minmax(0, 520fr) minmax(0, 400fr) minmax(0, 520fr);
        align-items: start;
        position: relative;
        /* Lift the whole row so the FEEDBACK card starts 26% down the photo,
         * as measured on the source. The photo is square and capped at 700px,
         * so 74% of its height is what has to be pulled back - expressed
         * against the photo's own width so it tracks if the cap changes. */
        margin-top: calc(-0.74 * min(100%, 700px));
    }
    /* The two cards sit at DIFFERENT heights on the source rather than as a
     * tidy pair: feedback 26% down the photo, hours 60% down. The 34%
     * difference is this offset. */
    .contact-cards__hours    { grid-column: 1; margin-top: calc(0.58 * min(100%, 700px)); }
    .contact-cards__feedback { grid-column: 3; margin-top: 0; }
}

/* A hairline under the feedback copy, above its button - the source has an
 * Elementor divider there. On the rust ground it needs its own colour rather
 * than the neutral --border. */
.rule--on-red {
    border-top-color: color-mix(in oklab, var(--on-red) 45%, transparent);
    margin-block: var(--space-m);
}

/* The source's button on the rust card is inverted: white ground, rust label. */
.btn--on-red {
    background: var(--on-red);
    color: var(--red);
}
.btn--on-red:hover {
    background: var(--on-red);
    color: var(--red-hover);
}

/* Both cards carry 70px of padding and a 15px radius on the source. */
.contact-cards__hours,
.contact-cards__feedback {
    border-radius: var(--radius-l);
    padding: var(--space-xl);
    /* No height:100% - the two cards are staggered over the photo, so
     * stretching them to the grid row made both run far past their content
     * and past the photo's bottom edge. They size to their own copy, as the
     * source's 420px and 461px cards do. */
    align-self: start;
}
.contact-cards__hours > :last-child,
.contact-cards__feedback > :last-child { margin-bottom: 0; }

/* The hours read as day ———— time on the source, the same connector
 * treatment /appointment already uses. .appt-hours supplies it; these two
 * rules only recolour it for the navy ground it sits on here. */
.contact-cards__hours .appt-hours .hours-table td:first-child,
.contact-cards__hours .appt-hours .hours-table td:last-child {
    color: var(--on-primary);
}
.contact-cards__hours .appt-hours .hours-table td:first-child::after {
    border-top-color: color-mix(in oklab, var(--on-primary) 45%, transparent);
}

.contact-cards__form > :last-child { margin-bottom: 0; }

/* Hero. The source stretches both tracks to the band height (copy centred
 * inside its own column against the 871px photo); we were centring the
 * COLUMNS, which left the two tops 356px apart at 1440 and read as one
 * column to a top-alignment probe. Same correction as /services' panel. */
@media (min-width: 60rem) {
    .contact-hero { align-items: stretch; }
    .contact-hero__lead {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
 * /fees ──────────────────────────────────────────────────────────────
 * Source at 1440 (container 1290) band by band:
 *   0 hero + billing summary IN ONE BAND — top row 486 + 729, gap 75,
 *     photo right at 729x547 r20; below it three 363px tracks, gap 100
 *   1 rust strip
 *   2 fee tables: two white r15 panels, 516 + 774, gap 30. The NARROW
 *     panel holds Private Patients AND Other Fees; the wide one holds
 *     Medical Examinations. (.fees-panels is already 2fr/3fr = 516/774.)
 *   3 three billing notes, 363px tracks, gap 100, 50px left inset
 * ═══════════════════════════════════════════════════════════════════════ */

/* The hero and the billing summary are one band on the source, so the
 * padding belongs to the section and the two rows sit inside it. */
.fees-hero { padding-block: var(--space-3xl) var(--space-2xl); }

.fees-hero__row {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}
@media (min-width: 60rem) {
    /* 486 + 729 at a 75px gap. */
    .fees-hero__row { grid-template-columns: minmax(0, 486fr) minmax(0, 729fr); gap: 75px; }
}
.fees-hero__lead > :last-child { margin-bottom: 0; }

/* 729 x 547 on the source. */
.fees-hero__media { aspect-ratio: 729 / 547; }

/* Legal pages (privacy, terms) ───────────────────────────────────────
 * Same shape as the fees hero: a copy track beside an image, so the two
 * legal pages open on something other than a wall of text. Their bodies
 * are long .prose blocks, so the hero carries the only image on the page
 * and the row is sized to a landscape crop rather than the fees ratio. */
.legal-hero { padding-block: var(--space-3xl) var(--space-2xl); }

.legal-hero__row {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}
@media (min-width: 60rem) {
    .legal-hero__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 75px; }
}
.legal-hero__lead > :last-child { margin-bottom: 0; }
.legal-hero__media { aspect-ratio: 3 / 2; }

/* The three summary tracks below the hero row. */
.fees-summary {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr);
    margin-top: var(--space-xl);
}
@media (min-width: 48rem) {
    .fees-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
    .fees-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 100px; }
}
.fees-summary > * > :last-child { margin-bottom: 0; }

/* The hero summary's ticklists ran with the default list rhythm, which is set
 * for running copy; these are short scannable qualifiers and read tighter. */
.fees-summary .ticklist li { margin-bottom: var(--space-3xs); }
.fees-summary .ticklist li:last-child { margin-bottom: 0; }

/* The second heading inside a panel needs air above it — the source runs
 * Private Patients and Other Fees down one panel with 40px between. */
.fees-tables .panel h2 + .deflist { margin-top: var(--space-m); }
.fees-tables .panel .deflist + h2 { margin-top: var(--space-l); }

/* The billing notes. Three tracks with the source's left inset; plain
 * blocks, not cards. */
.fees-notes__grid {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 60rem) {
    .fees-notes__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 100px; }
    /* 50px of left padding on each track, as the source sets. */
    .fees-notes__grid > * { padding-left: var(--space-xl); }
}
/* Brand red, as the other section headings on this page carry. */
.fees-notes__grid h3 {
    margin-top: 0;
    font-size: var(--step-1);
    color: var(--red);
}

/* A rule between the three notes. Drawn as a left border on the 2nd and 3rd
 * tracks rather than a divider element, so it appears only where two columns
 * actually sit side by side - below 60rem the blocks stack and a vertical
 * rule would be meaningless, so it becomes a horizontal one between them. */
@media (min-width: 60rem) {
    .fees-notes__grid > * + * {
        border-left: var(--border-thin) solid var(--border);
        /* The 100px gap plus the track's own 50px inset would leave the rule
         * hard against the text; split the gap so it sits centred. */
        margin-left: -50px;
        padding-left: calc(var(--space-xl) + 50px);
    }
}
@media (max-width: 59.999rem) {
    .fees-notes__grid > * + * {
        border-top: var(--border-thin) solid var(--border);
        padding-top: var(--space-l);
    }
}

/* The source sets 30px between the two fee panels, not the 40px grid
 * gutter; at 1290 that is what makes the tracks 516 + 774 rather than
 * 500 + 750. Scoped to this page so .fees-panels stays reusable. */
@media (min-width: 60rem) {
    .fees-tables .fees-panels { gap: 30px; }
}



/* ═══════════════════════════════════════════════════════════════════════
 * /practice-policies ─────────────────────────────────────────────────
 * Source at 1440 (container 1290) band by band:
 *   0 hero: stacked eyebrow/H1/lede/CTA, then three 410px photos r20 in a
 *     row at a 30px gap (the middle one 410x359, the outer two square)
 *   1 rust strip
 *   2 eleven policy cards, white r15, 50px padding, two 630px columns,
 *     30px gap — masonry-ish: 6 cards left, 5 right
 *   3 HCCC: a 774 + 516 heading row, then four 323px contact tracks
 * ═══════════════════════════════════════════════════════════════════════ */

/* The source CENTRES the hero block — eyebrow, H1, lede and CTA all sit on
 * the container's centre line, unlike the other inner pages which start
 * them. Scoped to this page so .section__head stays start-aligned. */
.pp-hero .section__head {
    max-width: none;
    text-align: center;
}
.pp-hero .section__head .btn { margin-inline: auto; }

/* The source sets 30px between the three hero photos and between the
 * policy cards, not the 40px grid gutter. */
@media (min-width: 48rem) {
    .policy-gallery { gap: 30px; }
}
@media (min-width: 60rem) {
    .policy-grid { gap: 30px; }
}

/* 50px of padding on the source's cards. */
@media (min-width: 60rem) {
    .policy-grid .policy { padding: var(--space-xl); }
}

/* The HCCC heading row: the title takes 774 and the note 516, side by
 * side, rather than stacking as a section head. */
.hccc__head {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    margin-bottom: var(--space-xl);
}
@media (min-width: 60rem) {
    .hccc__head { grid-template-columns: minmax(0, 774fr) minmax(0, 516fr); }
}

/* Four contact facts, 323px each on the source. Ours keeps the site's
 * .feature icon-and-text pair — the source has no icon, but adding one is
 * an enhancement to the row rather than a loss of content, and .feature is
 * the established treatment for a labelled fact elsewhere on this site. */
.hccc__facts {
    display: grid;
    gap: var(--space-m);
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
    .hccc__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 60rem) {
    .hccc__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    /* The source insets the first track by 50px and leaves the rest flush. */
    .hccc__facts > :first-child { padding-left: var(--space-xl); }
}
/* The source gives each fact 20px of vertical padding, which is what makes
 * these read as a row of blocks rather than four cramped lines. */
.hccc__facts > * { padding-block: var(--space-s); }
/* .feature h3 (0,1,1) already sets --step-0 and the red; restating it here
 * would be a second rule doing the same job. Only the top margin needs
 * clearing, which .feature h3 does not set. */
.hccc__facts .feature h3 { margin-top: 0; }

/* The icon sits centred ABOVE its heading at every width here, not beside it -
 * these are four short contact facts, and the stacked form reads as a row of
 * equal items rather than a ragged list. */
.hccc__facts .feature {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: var(--space-2xs);
}

@media (max-width: 47.999rem) {
    .hccc__facts > * + * {
        border-top: var(--border-thin) solid var(--border);
        padding-top: var(--space-m);
    }
    /* The first-track inset is a wide-viewport rule; centred blocks must not
     * carry it or they sit off-centre. */
    .hccc__facts > :first-child { padding-left: 0; }
}


/* ═══════════════════════════════════════════════════════════════════════
 * / (homepage) ───────────────────────────────────────────────────────
 * Re-measured 2026-09-03. The source has EIGHT top-level content bands,
 * not one tall band: the earlier reading collapsed them because this page
 * (like /services) uses Elementor's canvas template and emits no <main>,
 * so a `querySelector('main') || body` sweep saw header/content/footer.
 * Source geometry at 1440 (container 1290):
 *   1 hero      full-bleed bg photo 1440x798, navy bar INSIDE the band
 *               (369 + 493 + 308, r15) overlapping its lower edge
 *   2 pillars   four 263px tracks
 *   3 tiles     two 410x277 photos + a navy Practice Hours panel
 *   4 about     283x283 imgs + a 283x595 bg photo
 *   5 services  595x967 photo beside a 2x2 service grid
 *   6 safety    595 + 595, gap 100
 *   7 FAQ       297 + 893, gap 100 - photo LEFT of heading + accordion
 *   8 visit     397 + 793, gap 100; the 793x445 "photo" on the source is a
 *               flat grey placeholder PNG (1-bit, 543 bytes), so our navy
 *               panel is the faithful equivalent - there is no photo to keep
 * ═══════════════════════════════════════════════════════════════════════ */

/* The navy bar belongs to the hero band on the source, not to a band of its
 * own. .hero is already a grid, so this is simply its second row; the bar's
 * own negative margin still lifts it over the photo. */
/* The navy call-us bar straddles the hero's bottom edge: half of it over the
 * photo, half below. translateY(50%) puts its own midpoint on the edge, and
 * the hero gains that half back as padding so the bar does not collide with
 * whatever follows. */
.hero__bar { align-self: end; position: relative; z-index: 1; }
@media (min-width: 48rem) {
    /* Half the BAR's height, not the wrapper's: .contact-bar carries a -60px
     * top margin of its own, so translating the wrapper by 50% left the split
     * at 108/48 rather than even. Adding that margin back centres it. */
    .hero__bar { transform: translateY(calc(50% + var(--space-m))); }
    /* A little more room above the copy than the band had; the source runs
     * taller here. padding-bottom stays 0 because the bar straddles the edge
     * and supplies its own space below. */
    .hero { padding-top: var(--space-2xl); padding-bottom: 0; }
    .hero + * { margin-top: var(--space-2xl); }
}

/* The third about-section image is a TALL 283x595 on the source (set there as
 * a CSS background, which is why an <img>-only sweep missed it). Spanning both
 * grid columns would make it landscape, so it takes the full height beside the
 * two square photos. */
.home-about__media { align-items: start; }
.home-about__tall {
    grid-column: 1 / -1;
    width: min(100%, 283px);
    aspect-ratio: 283 / 595;
    object-fit: cover;
    border-radius: var(--radius-l);
    justify-self: center;
}
@media (min-width: 48rem) {
    /* Beside the pair rather than under it: two squares stacked left, the tall
     * photo spanning both rows on the right, as the source lays it out. */
    .home-about__media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-about__tall {
        grid-column: 2;
        grid-row: 1 / span 2;
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
    }
}

/* Visit us: the map fills the right column at the source's 793x445, with the
 * navy Find Us card overlapping its bottom edge and offset to the left, rather
 * than sitting as a plain panel. */
.home-visit__map { position: relative; }
.home-visit__map .media-frame {
    aspect-ratio: 793 / 445;
    border-radius: var(--radius-l);
    overflow: hidden;
}
.home-visit__map .media-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.home-visit__card { border-radius: var(--radius-l); }
@media (min-width: 60rem) {
    .home-visit__card {
        position: relative;
        z-index: 1;
        /* Overlap the map's bottom edge, inset equally on both sides so the
         * card is centred on the map rather than hanging off its left. */
        margin-top: calc(-1 * var(--space-2xl));
        margin-inline: var(--space-l);
    }
}

/* The resources lead image sat a full section's padding below the hero copy
 * and carried .is-flush, which explicitly zeroes the radius. It now takes the
 * site's image radius and sits close under the copy it belongs to. */
/* Close under the hero copy rather than a full section's padding below it.
 * The hero's own 120px bottom padding is what actually held the image away;
 * that is overridden below, next to the rule that sets it, so source order
 * does not undo this. */
.resources-lead { margin-top: 0; padding-block: 0 var(--space-xl); }
.resources-lead .section__head { margin-bottom: var(--space-s); }

/* Two-line headings otherwise push their accent rule and body copy down, so
 * the six cards read as ragged. Reserve two lines for every heading. */
.resources-panel .card--link h3 { min-height: calc(2 * 1.25em); }
.resources-lead .u-container { padding-top: 0; }
.resources-lead__media {
    /* Taller than the 1290x350 strip it was - the band reads as a token
     * gesture at that height and the photo has room to be a real image. */
    aspect-ratio: 1290 / 480;
    border-radius: var(--radius-l);
    overflow: hidden;
}

/* Trusted health information: six items read better as a balanced 3x2 than as
 * a 3-wide grid that reflows unevenly, and the cards needed some weight - a
 * surface, a hairline, and an accent rule that fills in on hover so the row
 * reads as a set of links rather than plain text. */
@media (min-width: 62rem) {
    .resources-panel .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.resources-panel .card--link {
    position: relative;
    /* Equal heights across the row, and real padding - the cards inherited
     * none, so the copy sat hard against all four edges. */
    height: 100%;
    background: var(--surface);
    border: var(--border-thin) solid var(--border);
    border-radius: var(--radius-m);
    overflow: hidden;
    transition: border-color 120ms ease, transform 120ms ease;
}
.resources-panel .card--link .card__body { padding: var(--space-l); }
.resources-panel .card--link p:last-child { margin-bottom: 0; }
/* An accent rule UNDER the heading rather than in the card's top-left corner,
 * where a square-ended bar sat awkwardly inside the border radius. It grows on
 * hover or keyboard focus. */
.resources-panel .card--link h3::after {
    content: "";
    display: block;
    height: 3px;
    width: var(--space-2xl);
    margin-top: var(--space-2xs);
    border-radius: 2px;
    background: var(--red);
    transition: width 160ms ease;
}
.resources-panel .card--link:hover,
.resources-panel .card--link:focus-within {
    border-color: var(--red);
    transform: translateY(-2px);
}
.resources-panel .card--link:hover h3::after,
.resources-panel .card--link:focus-within h3::after { width: 100%; }
.resources-panel .card--link h3 { margin-top: 0; }
.resources-panel .card--link h3 a {
    color: var(--ink-strong);
    text-decoration: none;
}
.resources-panel .card--link:hover h3 a { color: var(--red); }
/* The whole card is the target, not just the heading text. */
.resources-panel .card--link h3 a::after { content: ""; position: absolute; inset: 0; }

/* Red bullets in the safety list - the marker is the one part of a list that
 * can carry the accent without shouting. */
.home-safety ul li::marker { color: var(--red); }

/* Safety band. 595 + 595 with a 100px gap, and both columns stretched — the
 * generic .split centres them, which offsets the two tops far enough that a
 * top-alignment probe reads one column. */
@media (min-width: 60rem) {
    .home-safety {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--space-2xl);
        align-items: stretch;
    }
    .home-safety > * { align-self: center; }
}

/* FAQ band. 297 + 893, gap 100. The photo is a column of its own. */
.home-faq {
    display: grid;
    gap: var(--space-l);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
@media (min-width: 60rem) {
    .home-faq {
        grid-template-columns: minmax(0, 297fr) minmax(0, 893fr);
        column-gap: var(--space-2xl);
    }
}
/* 297 x 397 on the source. */
.home-faq__media { aspect-ratio: 297 / 397; }
.home-faq__body > :first-child { margin-top: 0; }

/* Visit band. 397 + 793, gap 100, both columns stretched for the same
 * reason as the safety band above. */
@media (min-width: 60rem) {
    .home-visit {
        grid-template-columns: minmax(0, 397fr) minmax(0, 793fr);
        column-gap: var(--space-2xl);
        align-items: stretch;
    }
    .home-visit > * { align-self: center; }
}

/* Scroll entrance animations ──────────────────────────────────────────
 * A fade with a small directional offset, matching the live site's
 * restraint: it is almost entirely a plain fade there, with two
 * slide-ups, so the travel here is deliberately short (18px, 26px for
 * the up/down pair) rather than the 40-100px a stock library uses.
 *
 * Elements are hidden by [data-reveal] and shown when the observer adds
 * [data-revealed]. The hiding rule is gated on .js so that a visitor
 * without JavaScript - or if the script fails - sees the page fully,
 * rather than a blank one. Same reason the observer falls back to
 * revealing everything if IntersectionObserver is missing.
 */
.js [data-reveal] {
    opacity: 0;
    transition:
        opacity 760ms cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 760ms cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.js [data-reveal="up"]    { transform: translateY(26px); }
.js [data-reveal="down"]  { transform: translateY(-26px); }
.js [data-reveal="left"]  { transform: translateX(-18px); }
.js [data-reveal="right"] { transform: translateX(18px); }
.js [data-reveal="fade"]  { transform: none; }

.js [data-reveal][data-revealed] {
    opacity: 1;
    transform: none;
}

/* Once it has played, drop the compositor hint and the transform so the
 * element cannot interfere with position:fixed or sticky descendants. */
.js [data-reveal][data-reveal-done] {
    will-change: auto;
    transition: none;
}

/* Motion is decoration here - honour the OS setting exactly. */
@media (prefers-reduced-motion: reduce) {
    .js [data-reveal],
    .js [data-reveal="up"],
    .js [data-reveal="down"],
    .js [data-reveal="left"],
    .js [data-reveal="right"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── 404 ──────────────────────────────────────────────────────────────
 * Served for any unmatched path, so it stands alone: say what happened, then
 * offer the way back rather than leaving a dead end.
 *
 * Deliberately written against fallbacks rather than this site's own token
 * names - every site in the fleet has a different vocabulary, and a 404 that
 * silently loses its layout because one variable is spelt differently is
 * worse than one that is slightly plainer. */
.notfound {
    padding-block: clamp(6rem, 14vw, 11rem) clamp(4rem, 9vw, 7rem);
    text-align: center;
}
.notfound__inner { max-width: 46rem; margin-inline: auto; }

/* Decorative, aria-hidden in the markup - the <h1> carries the meaning. Sized
 * large but kept at a legible contrast: a very pale numeral fails WCAG even
 * when it is ornamental. */
.notfound__code {
    font-size: clamp(4.5rem, 18vw, 9rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 0 0 0.25em;
    opacity: 0.55;
}
.notfound h1 { margin-top: 0; }
.notfound__lede { font-size: 1.125rem; line-height: 1.5; margin-inline: auto; max-width: 40rem; }

.notfound__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.notfound__links {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid currentColor;
    /* The rule is a hairline of the surrounding ink rather than a named border
     * token, so it works whatever the site's palette is. */
    border-color: color-mix(in oklab, currentColor 22%, transparent);
}
.notfound__links-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}
.notfound__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    justify-content: center;
}
.notfound__links a {
    display: inline-block;
    /* WCAG 2.2 target size. */
    min-height: 24px;
    line-height: 24px;
    font-weight: 600;
}
