/*
 * 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;
    /* Space unit (rem) at each end. Every --space-* step and pair is a fixed
     * multiple of it, so these two knobs move the whole spacing rhythm at once. */
    --u-space-min: 1;
    --u-space-max: 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));
    /* Display extensions, still the same geometric chain: a site never needs
     * to invent a bigger heading step. */
    --u-min-6: calc(var(--u-min-5) * var(--u-min-ratio));
    --u-max-6: calc(var(--u-max-5) * var(--u-max-ratio));
    --u-min-7: calc(var(--u-min-6) * var(--u-min-ratio));
    --u-max-7: calc(var(--u-max-6) * var(--u-max-ratio));
    --u-min-8: calc(var(--u-min-7) * var(--u-min-ratio));
    --u-max-8: calc(var(--u-max-7) * 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));
    --step-6: clamp(calc(var(--u-min-6) * 1rem), calc(var(--u-min-6) * 1rem + (var(--u-max-6) - var(--u-min-6)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-6) * 1rem));
    --step-7: clamp(calc(var(--u-min-7) * 1rem), calc(var(--u-min-7) * 1rem + (var(--u-max-7) - var(--u-min-7)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-7) * 1rem));
    --step-8: clamp(calc(var(--u-min-8) * 1rem), calc(var(--u-min-8) * 1rem + (var(--u-max-8) - var(--u-min-8)) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-max-8) * 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 space unit (--u-space-min / --u-space-max) rather than
     * the type ratio, so spacing stays predictable while type can be as
     * dramatic as the site needs. DO NOT redeclare these per site: tune the
     * --u-* knobs above and every step and pair follows. */
    --space-3xs: clamp(calc(var(--u-space-min) * 0.25rem), calc(var(--u-space-min) * 0.25rem + (var(--u-space-max) * 0.3 - var(--u-space-min) * 0.25) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 0.3rem));
    --space-2xs: clamp(calc(var(--u-space-min) * 0.5rem), calc(var(--u-space-min) * 0.5rem + (var(--u-space-max) * 0.5 - var(--u-space-min) * 0.5) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 0.5rem));
    --space-xs: clamp(calc(var(--u-space-min) * 0.75rem), calc(var(--u-space-min) * 0.75rem + (var(--u-space-max) * 0.75 - var(--u-space-min) * 0.75) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 0.75rem));
    --space-s: clamp(calc(var(--u-space-min) * 1rem), calc(var(--u-space-min) * 1rem + (var(--u-space-max) * 1 - var(--u-space-min) * 1) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 1rem));
    --space-m: clamp(calc(var(--u-space-min) * 1.5rem), calc(var(--u-space-min) * 1.5rem + (var(--u-space-max) * 1.5 - var(--u-space-min) * 1.5) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 1.5rem));
    --space-l: clamp(calc(var(--u-space-min) * 2rem), calc(var(--u-space-min) * 2rem + (var(--u-space-max) * 2 - var(--u-space-min) * 2) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 2rem));
    --space-xl: clamp(calc(var(--u-space-min) * 3rem), calc(var(--u-space-min) * 3rem + (var(--u-space-max) * 3 - var(--u-space-min) * 3) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 3rem));
    --space-2xl: clamp(calc(var(--u-space-min) * 4rem), calc(var(--u-space-min) * 4rem + (var(--u-space-max) * 4 - var(--u-space-min) * 4) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 4rem));
    --space-3xl: clamp(calc(var(--u-space-min) * 6rem), calc(var(--u-space-min) * 6rem + (var(--u-space-max) * 6 - var(--u-space-min) * 6) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 6rem));
    --space-4xl: clamp(calc(var(--u-space-min) * 8rem), calc(var(--u-space-min) * 8rem + (var(--u-space-max) * 8 - var(--u-space-min) * 8) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 8rem));

    /* --- 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(calc(var(--u-space-min) * 0.5rem), calc(var(--u-space-min) * 0.5rem + (var(--u-space-max) * 0.75 - var(--u-space-min) * 0.5) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 0.75rem));
    --space-xs-s: clamp(calc(var(--u-space-min) * 0.75rem), calc(var(--u-space-min) * 0.75rem + (var(--u-space-max) * 1 - var(--u-space-min) * 0.75) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 1rem));
    --space-s-m: clamp(calc(var(--u-space-min) * 1rem), calc(var(--u-space-min) * 1rem + (var(--u-space-max) * 1.5 - var(--u-space-min) * 1) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 1.5rem));
    --space-m-l: clamp(calc(var(--u-space-min) * 1.5rem), calc(var(--u-space-min) * 1.5rem + (var(--u-space-max) * 2 - var(--u-space-min) * 1.5) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 2rem));
    --space-l-xl: clamp(calc(var(--u-space-min) * 2rem), calc(var(--u-space-min) * 2rem + (var(--u-space-max) * 3 - var(--u-space-min) * 2) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 3rem));
    --space-xl-2xl: clamp(calc(var(--u-space-min) * 3rem), calc(var(--u-space-min) * 3rem + (var(--u-space-max) * 4 - var(--u-space-min) * 3) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 4rem));
    --space-l-2xl: clamp(calc(var(--u-space-min) * 2rem), calc(var(--u-space-min) * 2rem + (var(--u-space-max) * 4 - var(--u-space-min) * 2) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 4rem));
    --space-s-l: clamp(calc(var(--u-space-min) * 1.125rem), calc(var(--u-space-min) * 1.125rem + (var(--u-space-max) * 2 - var(--u-space-min) * 1.125) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 2rem));  /* skip-a-step: grid gutter */
    --space-2xl-3xl: clamp(calc(var(--u-space-min) * 4rem), calc(var(--u-space-min) * 4rem + (var(--u-space-max) * 6 - var(--u-space-min) * 4) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 6rem));
    --space-3xl-4xl: clamp(calc(var(--u-space-min) * 6rem), calc(var(--u-space-min) * 6rem + (var(--u-space-max) * 8 - var(--u-space-min) * 6) * (100vw - var(--u-min-vw) * 1px) / var(--u-vw-range) * 16), calc(var(--u-space-max) * 8rem));

    /* --- 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.
     * ===================================================================== */
    /* Kareela Family Practice, measured from the live Duda site 2026-09-28.
     * Primary  #1F3054 navy  -> oklch(0.3141 0.0686 263.8)
     * Secondary #E3BA3D gold -> oklch(0.8040 0.1443  90.0)
     * The gold is +186.2 deg, 2.1x chroma and +0.49 lightness from the navy,
     * so it CANNOT be derived from the primary -- all three secondary dials
     * below are set explicitly. See .claude/DESIGN-KIT.md. */
    --palette-hue: 264;
    --palette-chroma: 0.069;
    --palette-secondary-shift: 186;

    --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. */
    /* The PRIMARY needs its own lightness here too, for the same reason the
     * secondary does. --l-solid is 0.55 and also drives success/danger/info,
     * so it cannot simply be lowered: Kareela's navy is oklch L=0.3141, and
     * left on --l-solid it renders #5D719A -- a washed slate, not the navy.
     * Measured, not guessed: the default produced exactly that before this
     * dial was added. Defaults to --l-solid so other sites are unaffected. */
    --l-primary: 0.314;

    --chroma-secondary: 0.144;
    --l-secondary: 0.804;

    /* 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. */
    /* Kareela: the About panel's warmer gold, #E2B855 = oklch(0.801 0.126 86.2). */
    --palette-tertiary-shift: 182.2;
    --hue-tertiary: calc(var(--palette-hue) + var(--palette-tertiary-shift));
    --chroma-tertiary: 0.1262;
    --l-tertiary: 0.801;

    /* --- 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;        /* Kareela: live's greys are pure (#595959, #646464) */    /* text. 0 = true grey; 0.03 = clearly tinted */
    --chroma-ground: calc(0.000 + 0.008 * (1 - var(--scheme)));  /* Kareela: pure white ground */  /* page background */
    --chroma-surface: calc(0.000 + 0.014 * (1 - var(--scheme))); /* raised surfaces */
    --chroma-border: calc(0.000 + 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.289;  /* Kareela: live's copyright strip #1B2A49, one step darker than the 0.314 navy */
    --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;

    /* Tell the UA too, or form controls and scrollbars still render dark for a
     * visitor whose OS is set to dark while the page around them is light. */
    color-scheme: light;

    /* 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.00 + 0.97 * (1 - var(--scheme)));  /* Kareela: live's black headings are #000 */
    --l-ink:        calc(0.25 + 0.70 * (1 - var(--scheme)));
    --l-ink-mid:    calc(0.464 + 0.336 * (1 - var(--scheme)));  /* Kareela: body #595959 */
    --l-ink-soft:   calc(0.503 + 0.157 * (1 - var(--scheme)));  /* Kareela: nav #646464 */
    --l-bg:         calc(1.00 - 0.82 * (1 - var(--scheme)));  /* Kareela: live is #FFFFFF */
    --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-primary, 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));
    /* Kareela: live's grey card ground (#F2F2F2), the neutral twin of --primary-pale. */
    --neutral-pale: oklch(var(--l-pale) var(--chroma-surface) 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: 79rem;   /* Kareela: live's 1200px content column + 2 x 32px gutter */
    --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. */
    /* Kareela, measured on live's text-owning elements (not the heading
     * wrapper, which reports a different family than the span inside it):
     * headings and body copy are Amiko; the nav and the copyright line
     * are Helvetica (--font-utility). */
    --font-body: 'Amiko', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-heading: 'Amiko', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-utility: 'Helvetica Neue', Helvetica, Arial, sans-serif;  /* live's nav and copyright line */
}

/*
 * Dark mode. In OKLCH this is mostly an inversion of the lightness ramp
 * rather than a second palette — the hues and chroma above are unchanged.
 *
 * Two things are not simple inversions and are set explicitly:
 *   - the accent gets LIGHTER (0.68, not 0.55), because a mid-lightness
 *     accent loses contrast against a dark background;
 *   - --shadow-strength rises, because a shadow on a dark surface needs more
 *     opacity to be visible at all.
 *
 * Delete this block for a site that should only ever render light.
 */
/* Kareela renders LIGHT ONLY.
 *
 * The live Duda site has no dark mode, the practice has not asked for one,
 * and supporting it properly needs assets we do not have: their logo is a
 * JPEG with a baked-in white background, so on a dark header it floats as a
 * white box. The template's own guidance for this case is "a site that
 * should never flip deletes the query alone" -- the dark-mode media query
 * that stood here has been removed.
 *
 * To restore it: reinstate the @media (prefers-color-scheme: dark) block
 * from _template/assets/css/style.css, and supply a transparent-background
 * logo first. */

/* ═══════════════════════════════════════════════════════════════════════
 * 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; }

/* Skip link. craft.md requires one as the first element in <body>; without a
 * rule here it renders as a visible link above the header on every site. It is
 * off-screen until focused, then a real control with a visible focus ring. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: var(--layer-top, 2147483647);
    padding: var(--space-xs) var(--space-s);
    background: var(--primary);
    color: var(--on-primary);
    text-decoration: none;
    border-radius: 0 0 0.25rem 0;
}
.skip-link:focus, .skip-link:focus-visible {
    left: 0;
}

* { 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. */
:where(input, button, textarea, select) { font: inherit; }   /* zero specificity: "Form controls" below must win */

/* 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);
    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); }

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 carry NO radius and NO background plate by default.
 *
 * They used to. `img { border-radius: var(--radius-m); background: var(--surface) }`
 * was added to fix one square photo on Wellbrook, and it cost far more than it
 * saved: every migration since has had to undo it, because a faithful clone of a
 * customer's live site decides its own corners, and the background plate fills
 * the transparent areas of every PNG and SVG — a logo on a dark footer renders
 * as a solid block. Ten of the thirteen sites on this box carried an override
 * for it before it was removed.
 *
 * A radius is a design decision belonging to the site's own stylesheet, next to
 * the cards it should match. Use .is-rounded (below) or a site-layer rule; do
 * not put it back here. */
img, picture, video, canvas, svg {
    height: auto;
}

/* Opt in where a photo should match the radius of the cards around it. */
img.is-rounded, .is-rounded img { border-radius: var(--radius-m); }

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 ────────────────────────────────────────────────────────────── */
/* ═══ Form controls & focus ═══ form-controls:begin ══════════════════════
 * A text field's look, and every focus ring on the site, are set ONCE,
 * here: by the --field-* and --focus-ring* tokens and a few base rules.
 * Every text-like control on the site (contact, search, careers, booking,
 * anything mediflare.js or Connect writes) inherits it, so they match by
 * construction.
 *
 * - This section is copied VERBATIM from _template and never edited in a
 *   site: check-system.sh fails the site if its copy differs by a character.
 *   A site differs only in TOKEN VALUES, set in the site layer's own :root,
 *   below this section (a later :root wins over the defaults here).
 * - Never restyle a control inside a component. A component rule may place
 *   a field (grid, margin, width) but never sets its border, radius,
 *   background or height -- check-system.sh fails the site if one does.
 * - Fields and buttons share ONE corner, --control-radius: set it in the
 *   site layer's :root and both follow. Never set --field-radius
 *   (check-system.sh fails it), except to 0 in underline mode below;
 *   pill buttons mean pill fields.
 * - The base rules are at zero specificity (:where), so any token change
 *   reaches every field and nothing here outranks a deliberate override.
 * - ONE focus ring per site, on links, buttons and fields alike: an outline
 *   in --focus-ring at --focus-ring-w. No other rule sets a focus outline,
 *   colour or box-shadow (check-system.sh fails one); outline-offset may be
 *   adjusted where a ring would be clipped.
 * - Underline-only fields: set --field-border-w: 0,
 *   --field-border-bottom: var(--border-thin) solid <colour> and
 *   --field-radius: 0 (an underline has no corners to share; a rounded one
 *   curves at its ends, and buttons keep --control-radius); optionally
 *   --field-focus-border-bottom: var(--focus-ring-w) solid var(--focus-ring)
 *   so the underline thickens with the ring. No extra rules. Underline
 *   mode is the only time a site sets --field-radius, and check-system.sh
 *   then requires the 0.
 * - Dark panels and bands: the container re-sets the tokens for its
 *   descendants, never the rules. Tokens defined here are resolved on :root,
 *   so re-set the leaf values, not the ones they derive from:
 *     .band--dark {
 *         --focus-ring: var(--surface);
 *         --field-bg: transparent;
 *         --field-ink: var(--on-primary);
 *         --field-border: var(--on-primary);
 *         --field-placeholder: color-mix(in oklab, var(--on-primary) 70%, transparent);
 *     }
 *   --focus-ring must reach >= 3:1 against every ground it is drawn on.
 * The guard finds this section by the begin/end markers; keep both.
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
    --field-h: var(--target-min);                 /* the single-line height: exact, never below the 44px target */
    --field-textarea-h: calc(var(--field-h) * 3); /* the textarea's minimum height */
    --field-pad-block: var(--space-2xs);          /* textarea only; a one-line field centres its text in --field-h */
    --field-pad-inline: var(--space-xs);
    --field-font-size: max(var(--step-0), 1rem);  /* never below 16px, or iOS zooms the page on focus */
    --field-leading: var(--leading-m);
    --field-weight: var(--weight-400);            /* one weight wherever the field sits */
    --field-radius: var(--control-radius);        /* = the .btn radius, by construction; never set it */
    --field-textarea-radius: min(var(--field-radius), var(--radius-l));   /* a pill textarea is a capsule; cap it */
    --field-bg: var(--surface);
    --field-ink: var(--ink);
    --field-border-w: var(--border-thin);
    --field-border: var(--border-strong);
    --field-border-hover: var(--ink-soft);
    --field-placeholder: var(--ink-soft);
    /* Unset by default, so they follow --field-border-w/--field-border:
     * --field-border-bottom          the resting bottom edge (underline mode)
     * --field-focus-border-bottom    the bottom edge while focused
     * --field-focus-outline          the field's ring; leave it to the default */
    --focus-ring: var(--primary);                 /* >= 3:1 against --bg, --field-bg and every ground it lands on */
    --focus-ring-w: var(--border-medium);         /* >= --field-border-w, so the ring covers the border */
}

/* THE focus ring: every interactive element, always. Fields refine the
 * offset and radius below; nothing else sets a focus outline. */
:focus-visible {
    outline: var(--focus-ring-w) solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

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

/* THE base rule. Every text-like control: text, email, tel, search, number,
 * date, url, password, select and textarea -- not checkboxes, radios,
 * ranges, files or button-type inputs. */
:where(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=submit],[type=button],[type=reset],[type=image],[type=hidden]), select, textarea) {
    --_field-radius: var(--field-radius);
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    height: var(--field-h);
    min-height: var(--field-h);
    padding: 0 var(--field-pad-inline);
    font: inherit;
    font-size: var(--field-font-size);
    font-weight: var(--field-weight);
    line-height: var(--field-leading);
    color: var(--field-ink);
    background-color: var(--field-bg);
    border: var(--field-border-w) solid var(--field-border);
    border-bottom: var(--field-border-bottom, var(--field-border-w) solid var(--field-border));
    border-radius: var(--_field-radius);
    box-shadow: none;
    transition: border-color var(--duration-fast) var(--ease-out);
}

:where(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=submit],[type=button],[type=reset],[type=image],[type=hidden]), select, textarea):hover {
    border-color: var(--field-border-hover);
}

/* One edge on focus. The offset pulls the ring in by the border's width, so
 * it is drawn ON the border (covering it) rather than outside it; the border
 * and shadow are held at rest so nothing draws a second edge. Specificity
 * 0,1,0 and later than the global :focus-visible, so it wins over that one
 * (whose offset and radius suit links, not fields). In underline mode the
 * bottom edge may take --field-focus-border-bottom as well. */
:where(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=submit],[type=button],[type=reset],[type=image],[type=hidden]), select, textarea):focus {
    border-color: var(--field-border);
    border-bottom: var(--field-border-bottom, var(--field-border-w) solid var(--field-border));
    box-shadow: none;
    outline: none;
}
:where(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=submit],[type=button],[type=reset],[type=image],[type=hidden]), select, textarea):focus-visible {
    outline: var(--field-focus-outline, var(--focus-ring-w) solid var(--focus-ring));
    outline-offset: calc(var(--field-border-w) * -1);
    border-bottom: var(--field-focus-border-bottom, var(--field-border-bottom, var(--field-border-w) solid var(--field-border)));
    border-radius: var(--_field-radius);
}

:where(textarea) {
    --_field-radius: var(--field-textarea-radius);
    height: auto;
    min-height: var(--field-textarea-h);
    padding-block: var(--field-pad-block);
    resize: vertical;
}

/* The chevron is one conic-gradient wedge in --field-ink: tokens only, no
 * image, so it recolours with the palette and the scheme. (Two half-square
 * linear gradients leave a seam where they meet.) */
:where(select) {
    padding-inline-end: calc(var(--field-pad-inline) * 2 + var(--space-xs));
    background-image: conic-gradient(from -45deg at 50% 100%, var(--field-ink) 90deg, transparent 0);
    background-position: calc(100% - var(--field-pad-inline)) 50%;
    background-size: calc(var(--space-3xs) * 2.5) calc(var(--space-3xs) * 1.25);
    background-repeat: no-repeat;
    cursor: pointer;
}
:where(select[multiple], select[size]) { height: auto; padding-block: var(--field-pad-block); padding-inline-end: var(--field-pad-inline); background-image: none; }

:where(input, textarea)::placeholder { color: var(--field-placeholder); opacity: 1; }

/* The browser's own clear (x) in a search box, redrawn as a mask so it takes
 * --field-ink instead of the browser's grey. */
:where(input[type=search])::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    inline-size: 1em;
    block-size: 1em;
    cursor: pointer;
    background-color: var(--field-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

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

/* ═══ form-controls:end (Form controls & focus) ═════════════════════════ */

/*
 * 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;
}

/* 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,
.mf-search__submit,
.mf-search-overlay__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: var(--target-min);   /* the 44px tap target, every size and variant */
    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(--control-radius);   /* shared with every field; set --control-radius, not this */
    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.
 */
.u-container {
    max-width: var(--grid-max-width);
    margin-inline: auto;
    padding-inline: var(--grid-gutter);
}

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

/*
 * Section rhythm. EVERY band on a page should be a .section — this is what
 * gives a page its vertical breathing room, and it is the single most
 * repeated review comment when it is missed ("this section is lacking top
 * and bottom padding", raised three separate times on one site).
 *
 * It is a class rather than a bare `section` selector because bands are not
 * always <section> elements, and because a band that deliberately runs flush
 * to its neighbour needs to say so out loud via --flush.
 *
 * Do not hand-roll the padding. --space-l-2xl is the site-wide "40px phone /
 * 80px desktop" step, already a clamp; a bespoke value breaks the rhythm.
 *
 * Verify with bandpad.mjs, which measures the real rendered ink gap between
 * adjacent bands and fails under 40px.
 */
.section { padding-block: var(--space-l-2xl); }
.section--tight { padding-block: var(--space-l); }
.section--flush { padding-block: 0; }

/* A centred intro (eyebrow + heading + standfirst) above a band's content. */
.section__head {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

/*
 * 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;
}
/* ── 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: var(--space-3xl) var(--space-2xl);
    text-align: center;
}
.notfound__inner { max-width: 46rem; margin-inline: auto; }
.notfound__code {
    font-size: var(--step-6);   /* this site's display step: live's 60px titles */
    font-weight: var(--weight-700);
    line-height: var(--leading-xs);
    margin: 0 0 var(--space-2xs);
    opacity: 0.55;
}
.notfound h1 { margin-top: 0; }
.notfound__lede { font-size: var(--step-1); line-height: var(--leading-l); margin-inline: auto; max-width: 40rem; }
.notfound__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    justify-content: center;
    margin-top: var(--space-l);
}
.notfound__links {
    margin-top: var(--space-xl);
    padding-top: var(--space-l);
    border-top: var(--border-thin) solid currentColor;
    border-color: color-mix(in oklab, currentColor 22%, transparent);
}
.notfound__links-title {
    font-size: var(--step-0);
    text-transform: uppercase;
    letter-spacing: var(--tracking-xl);
    margin: 0 0 var(--space-s);
}
.notfound__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-l);
    justify-content: center;
}
.notfound__links a {
    display: inline-block;
    min-height: 24px;   /* WCAG 2.5.8 target size */
    line-height: var(--leading-l);
    font-weight: var(--weight-600);
}

/* ===================================================================
 * Kareela Family Practice — site layer
 *
 * Built on the template's fluid scale (--space-*, --step-*), never on
 * literal px: the last three migrations hard-coded type and spacing and
 * broke at awkward widths. Colours come from the dials in :root.
 * =================================================================== */

/* --- Scale: the eight knobs -------------------------------------------
 * The type and space ladders above are the template's, untouched; this
 * site tunes them ONLY here. Range fixed fleet-wide at 390-1440 (sizes hold
 * their 1440 values on wider screens).
 *
 * TYPE -- live (Duda) does not scale type at all: the same px at 390 and
 * 1440. Measured: body 16, headings 24 / 30 / 48, display titles 60,
 * copyright line 13. Body is live's 16 at both ends (which also keeps iOS
 * from zooming form fields). The desktop ratio is the least-squares fit of
 * those sizes on their steps (1.243); the phone ratio steps the display
 * titles down to ~45px so a long service name still fits a 390 screen.
 *     live    step      1440            390
 *     13   -> step--1   13.45  +3.5%    13.45   (held, see below)
 *     16   -> step-0    16.00   0       16.00
 *     24   -> step-2    24.72  +3.0%    22.66
 *     30   -> step-3    30.73  +2.4%    26.96
 *     48   -> step-5    47.48  -1.1%    38.18
 *     60   -> step-6    59.02  -1.6%    45.44
 * step--1 and step--2 come out LARGER at 390 than at 1440 (a gentler phone
 * ratio over the same body), so clamp() holds them at their phone value at
 * every width: 13.45 and 11.30.
 *
 * SPACE -- live's rhythm is 16-based: one blank 16/32 line, 32px groups,
 * 64px footer padding, so --u-space-max 1 (a 16px unit) lands s 16, l 32,
 * xl 48, 2xl 64, 3xl 96 exactly at 1440. --u-space-min 0.8 makes a phone
 * 20% tighter (owner decision 2026-10-03: spacing scales). Live's two
 * off-ladder rhythms: the 80px band padding is a composition below, and the
 * 120-130px hero / card-row / pre-footer gaps take --space-3xl-4xl (128). */
:root {
    --u-min-vw: 390;
    --u-max-vw: 1440;
    --u-min-font: 16;
    --u-max-font: 16;
    --u-min-ratio: 1.19;
    --u-max-ratio: 1.243;
    --u-space-min: 0.8;
    --u-space-max: 1;

    /* Named composition, a sum of steps: live pads its bands 80px at
     * desktop, a step past --space-l-2xl's 64. px at 390 / 1440: 38 / 80. */
    --space-band: calc(var(--space-l-2xl) + var(--space-s));

    /* Leading extensions: live sets body copy on a 2.0 line (16/32) and list
     * items on 1.75 (16/28) -- looser than any template step. Duda sets
     * leading per paragraph; these are measured, not fitted. */
    --leading-2xl: 1.75;
    --leading-3xl: 2;

    /* Touch target for icon-only controls (the search icons), 44px. */
    --target-min: 2.75rem;

    /* Buttons AND fields: one corner, the buttons' radius-s (8px). The
     * search box takes it by construction; see Form controls & focus. */
    --control-radius: var(--radius-s);
    /* THE focus ring, on links, buttons and fields alike: navy, 13:1 on the
     * white page and header. The navy grounds re-set it below. */
    --focus-ring: var(--primary);
}
/* Navy grounds (the footer and its darker copyright bar, the photo heroes
 * under their navy scrim): a navy ring would vanish, so it is white there. */
.site-footer, .hero--home, .page-hero { --focus-ring: var(--on-primary); }
/* Every band takes live's 80px rhythm. :where() keeps this at the template
 * rule's specificity, so the per-band rules below still win, and leaves
 * .section--tight / --flush alone. */
.section:where(:not(.section--tight, .section--flush)) { padding-block: var(--space-band); }

/* Alternating band ground. The template has .section (rhythm only) but no
 * ground modifier, and an undefined class paints nothing -- which read as a
 * black band, because the element then inherits. Defined here rather than
 * assumed. */
.section--alt { background: var(--surface); }

/* --- Type, as measured on live --------------------------------------
 * Body copy #595959 on a 2.0 line height (16/32), list items 1.75 (16/28);
 * headings Amiko in the navy. These override the template's darker ink and
 * tighter leading, which is most of why pages read "denser" than live. */
body { color: var(--ink-mid); }
main p { line-height: var(--leading-3xl); }
main li { line-height: var(--leading-3xl); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--primary); }

/* --- Announcement strip ------------------------------------------- */
.alertbar {
    background: var(--secondary);
    color: var(--primary);          /* live: navy 16px bold on a 32px line */
    font-size: var(--step-0); font-weight: var(--weight-700);
}
.alertbar__inner { padding-block: var(--space-2xs); display: grid; gap: 0; text-align: center; }
.alertbar p { margin: 0; line-height: var(--leading-3xl); }
.alertbar a { color: inherit; text-decoration: underline; }
/* Hidden on phones, where three lines of notices push the page below the fold. */
@media (max-width: 600px) { .alertbar { display: none; } }

/* --- Header ------------------------------------------------------- */
.site-header { background: var(--bg); border-bottom: var(--border-thin) solid var(--border); }
/* Logo left, Book Appointment hard right, nav between them. When the nav
 * needs more room than the row has it wraps to its own full-width line and
 * centres there -- the button stays up on the logo's row rather than being
 * pushed down, because `order` puts it before the nav in the flex flow while
 * `margin-inline-start: auto` on the brand's sibling holds it to the right. */
/* space-between spreads logo | nav | button across the row without any
 * auto margin. An auto margin on the CTA claimed every spare pixel, which
 * left no room for the button itself and wrapped it onto its own line --
 * twice, in two different arrangements, before this was the actual cause. */
/* Logo | menu | button, ALWAYS one row at desktop. When space runs short it
 * is the menu ITEMS that wrap onto a second line inside the middle column --
 * the menu block itself never drops below the logo and button. */
.site-header__inner {
    display: flex; align-items: center; gap: var(--space-s);
    padding-block: var(--space-2xs); flex-wrap: nowrap;
}
.brand { flex: 0 0 auto; line-height: 0; }
.brand img { height: 9rem; width: auto; }   /* live: 188x144; smaller in the mobile block */
/* Last on the row and hard right. `order: 3` keeps it after the nav
 * visually even though it comes before it in the markup -- the markup order
 * is what guarantees it stays on the FIRST flex line when the nav wraps. */
/* Live: 282x48, 18px gold caps. Two classes, so it outranks .btn--kfp's size. */
.nav-cta { flex: 0 0 auto; order: 3; }
/* Header CTA: the one button that should be noticed on every page, so a
 * touch larger than the rest and lifted off the white header by a shadow. */
.btn--kfp.nav-cta { font-size: var(--step-0); letter-spacing: var(--tracking-xl); padding: var(--space-xs) var(--space-m); min-height: 3rem; box-shadow: var(--shadow-s); }
.btn--kfp.nav-cta:hover { box-shadow: var(--shadow-m); }
/* Nav sits between the logo and the button while it fits, then takes a full
 * row of its own and centres. `order: 2` puts it BEFORE the button in the
 * flow, so when it wraps it is the nav that moves, not the CTA.
 *
 * flex: 0 1 auto, never 1 1 auto: growing it to fill the row made it 1160px
 * in a 1240px container and forced a wrap at every width, including ones
 * where the three items genuinely fit (90 + 193 + 846 = 1129). */
/* Inline between the logo and the button while there is room. `flex-basis:
 * auto` so it sizes to its content and stays on the row; it only wraps when
 * the three genuinely do not fit, and the rule below centres it when that
 * happens. Not `flex: 1 1 100%`, which forced its own row at every width. */
/* flex: 1 1 0 + min-width: 0 lets the middle column shrink below its
 * content width, which is what makes the list inside it wrap. */
.primary-nav {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
}
/* The nav centres on its own row only ONCE IT HAS WRAPPED. `margin-inline:
 * auto` unconditionally would eat all the free space on the shared row and
 * push the CTA off it -- which is exactly what happened. Giving the wrapped
 * state its own breakpoint keeps the three items together while they fit,
 * and centres the nav only when it genuinely needs the full width.
 *
 * 1200px is measured, not guessed: brand 90 + nav 846 + cta 193 + two 20px
 * gaps = 1169 inside a container that is viewport minus 2x40 gutters. */

/* Measured: logo 90 + nav 846 + button 193 + 2x20 gap = 1169 in a 1160
 * content box -- 9px over, which is why all three could not share the row.
 * Tightening the nav's own gap and item padding recovers ~60px. */
.nav-list { font-family: var(--font-utility); display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--space-3xs); list-style: none; margin: 0; padding: 0; align-items: center; }
/* Top level, as measured on live: uppercase 16px bold, 0.03em tracking,
 * grey #646464. Parents are real links; the chevron beside them is a
 * separate button that opens the submenu for touch and keyboard users. */
.nav-list > li { display: flex; align-items: center; }
.nav-list > li > a {
    display: block; padding: var(--space-3xs) var(--space-3xs) var(--space-3xs) var(--space-2xs);
    color: var(--ink-soft); text-decoration: none;
    font-size: var(--step-0); font-weight: var(--weight-700); letter-spacing: var(--tracking-l); text-transform: uppercase;
}
.nav-list > li:not(.has-sub) > a { padding-inline-end: var(--space-2xs); }
.nav-list > li > a:hover { color: var(--primary); }
.nav-list a[aria-current="page"] { color: var(--primary); }
.nav-sub-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    /* 44px tall for the tap target; the negative block margins give the
     * extra height back, so the nav row is no taller than it was. */
    width: 1.5rem; min-block-size: var(--target-min); margin-block: calc(var(--target-min) / -4);
    padding: 0; margin-inline-end: var(--space-3xs);
    background: none; border: 0; cursor: pointer; color: var(--ink-soft);
}
.nav-sub-toggle svg { width: 0.75rem; height: 0.75rem; transition: transform var(--duration-fast); }
.nav-sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Dropdowns, as on live: plain white square panel, uppercase items at
 * weight 400, 15px 60px 15px 15px padding, navy highlight on hover. Opened
 * by hover/focus at desktop and by the chevron button on touch. Only the
 * DIRECT child submenu opens (the > matters: without it, hovering Services
 * would also open Women's Health). display:none while closed, never a
 * transform, which would still add to scroll width. */
.has-sub { position: relative; }
.nav-sub {
    display: none; position: absolute; top: 100%; inset-inline-start: 0;
    min-width: 17rem; background: var(--surface); border: var(--border-thin) solid var(--border); border-radius: var(--radius-s);
    list-style: none; margin: 0; padding: 0; z-index: var(--layer-raised);
}
.has-sub:hover > .nav-sub,
.has-sub:focus-within > .nav-sub,
.nav-sub-toggle[aria-expanded="true"] + .nav-sub { display: block; }
.nav-sub > li { position: relative; display: flex; align-items: center; }
.nav-sub a {
    flex: 1 1 auto; display: block; padding: var(--space-s) var(--space-2xl) var(--space-s) var(--space-s);
    color: var(--ink-soft); text-decoration: none;
    font-size: var(--step-0); font-weight: var(--weight-400); text-transform: uppercase; white-space: nowrap;
}
.nav-sub > li:hover > a, .nav-sub a:focus-visible { background: var(--primary); color: var(--on-primary); }
.nav-sub .nav-sub-toggle { position: absolute; inset-inline-end: var(--space-xs); }
.nav-sub .nav-sub-toggle svg { transform: rotate(-90deg); }
.nav-sub > li:hover > .nav-sub-toggle { color: var(--on-primary); }
/* Third level (Women's Health) flies out to the right of its row -- or to
 * the LEFT when nav.js measures that the right would run off-screen (it did
 * at every width below 1600). Items may wrap so the flyout stays narrow. */
.nav-sub .nav-sub { top: 0; inset-inline-start: 100%; min-width: 0; width: max-content; max-width: 19rem; }
.nav-sub .nav-sub a { white-space: normal; padding-inline-end: var(--space-s); }
.nav-sub .has-sub.opens-left > .nav-sub { inset-inline-start: auto; inset-inline-end: 100%; }
.nav-sub .has-sub.opens-left > .nav-sub-toggle svg { transform: rotate(90deg); }
/* The last top-level submenu opens leftwards so it cannot run off-screen. */
.nav-list > li.has-sub:last-of-type > .nav-sub { inset-inline-start: auto; inset-inline-end: 0; }

.nav-toggle { display: none; }


/* --- Hero --------------------------------------------------------- */
.hero--home {
    position: relative;
    background: url("/assets/images/25410362_happy-boy-at-the-doctor-1920w.jpg") center / cover no-repeat;
    color: var(--on-primary);
    isolation: isolate;
}
/* Live tints the hero with its NAVY at 0.8 on a ::before, not a neutral
 * scrim -- measured off the live element, which reports
 * background-color rgb(31,48,84) / opacity 0.8. */
.hero--home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0.8;
    z-index: var(--layer-behind);
}
.hero__inner { padding-block: var(--space-3xl-4xl); max-width: 55rem; }   /* live: ~129px above and below; title one line at 60px */
.hero__eyebrow { margin: 0; font-size: var(--step-1); opacity: 0.9; }
.hero__title { margin: var(--space-3xs) 0 var(--space-xs); color: var(--on-primary); font-size: var(--step-6); font-weight: var(--weight-400); line-height: var(--leading-l); }   /* live: 60px in an 88px box */
.hero__lede { font-size: var(--step-0); line-height: var(--leading-3xl); margin: 0; max-width: none; }   /* live: 16/32, one line */
.hero__actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
/* The template's ghost button inherits --ink, which is invisible on the navy
 * hero overlay. Inside the hero it takes a white outline instead. */
.hero--home .btn--ghost {
    color: var(--on-primary);
    border-color: color-mix(in oklch, var(--on-primary) 70%, transparent);
}
.hero--home .btn--ghost:hover { background: color-mix(in oklch, var(--on-primary) 14%, transparent); border-color: var(--on-primary); }

/* --- Quick links -------------------------------------------------- */
/* Live: ~100px under the hero, then only ~40px to the About band, and
 * ~230px from About down to the map. */
.section.quicklinks { padding-block: var(--space-2xl-3xl) 0; }
.section.about-band { padding-block: var(--space-l) calc(var(--space-3xl-4xl) + var(--space-xl)); }
.quicklinks__grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-s);
}
/* Four tiles never split three-and-one: four across, then two by two, then
 * one column on a phone. (auto-fit left the fourth alone on its row from
 * 700 to 920px.) */
@media (max-width: 920px) { .quicklinks__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .quicklinks__grid { grid-template-columns: minmax(0, 1fr); } }
/* Live: 285x220 with 40px 20px padding. */
.quicklinks__grid a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 13.75rem; padding: var(--space-l) var(--space-s);
    background: var(--primary); color: var(--on-primary); text-decoration: none;
    border-radius: var(--radius-l); font-size: var(--step-1);
    transition: background var(--duration-fast);
}
.quicklinks__grid a:hover { background: var(--primary-hover); }
.quicklinks__grid a { flex-direction: column; gap: var(--space-2xs); }
.quicklinks__icon { display: block; width: 3.75rem; height: 3.75rem; }
.quicklinks__icon svg { width: 100%; height: 100%; display: block; }
.quicklinks__label { font-size: var(--step-1); }

/* --- About band --------------------------------------------------- */
/* Photo left, gold copy panel right -- live measures the image at x=120 w=491
 * and the panel at x=631 w=689, i.e. roughly 5:7, not equal columns. */
.about-band__grid {
    display: grid; grid-template-columns: 5fr 7fr;
    gap: 0; align-items: stretch;
}
/* Photo + panel read as one rounded card. The radius goes on the two halves,
 * not the grid: the grid is also the u-container, so its box is wider than
 * what shows. */
.about-band__media { border-radius: var(--radius-l) 0 0 var(--radius-l); overflow: hidden; }
.about-band__panel { border-radius: 0 var(--radius-l) var(--radius-l) 0; }
.about-band__media { display: flex; }
.about-band__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Live's About panel is a slightly warmer gold than the alert bar (#E2B855),
 * so it is the TERTIARY role, set on the dials in :root. */
.about-band__panel {
    background: var(--tertiary);
    padding: var(--space-l) var(--space-xl);
    display: flex; flex-direction: column; justify-content: center;
}
.about-band__panel h2 { margin-block-start: 0; font-size: var(--step-5); font-weight: var(--weight-400); line-height: var(--leading-l); }
/* Live sets the panel copy in the navy, not the body grey. */
.about-band__panel p { color: var(--primary); margin: 0; }
@media (max-width: 760px) {
    .about-band__grid { grid-template-columns: minmax(0, 1fr); }
    .about-band__media { border-radius: var(--radius-l) var(--radius-l) 0 0; }
    .about-band__panel { border-radius: 0 0 var(--radius-l) var(--radius-l); }
}

/* --- Team --------------------------------------------------------- */
.section__head { text-align: center; }
.section__lede { text-align: center; max-width: 42rem; margin-inline: auto; }
.doctor-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: var(--space-m); margin-block: var(--space-l);
}
.doctor-card { text-align: center; }
.doctor-card__name { margin: var(--space-2xs) 0 0; font-size: var(--step-1); }
.doctor-card__quals { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.doctor-card__role { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.section__cta { text-align: center; margin: 0; }

/* --- Find us ------------------------------------------------------ */
/* 350px to match live's Mapbox canvas exactly. */
.find-us__map { display: block; width: 100%; height: 350px; border: 0; border-radius: var(--radius-l); }

/* --- Footer ------------------------------------------------------- */
.site-footer { background: var(--primary); color: var(--on-primary); }
/* Four columns: the brand column a little wider for the blurb, the three
 * information columns equal. Two-up on tablet, stacked on phone. */
.footer-grid {
    display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    gap: var(--space-l) var(--space-xl); padding-block: var(--space-2xl);   /* live: 64px above and below */
}
@media (max-width: 1100px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-logo { height: 6rem; width: auto; display: block; margin-block-end: var(--space-s); }
.footer-blurb { font-size: var(--step--1); line-height: var(--leading-l); margin: 0; max-width: 32ch; }
/* Live: labels regular weight, values white. */
.footer-dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3xs) var(--space-s); margin: 0; font-size: var(--step--1); line-height: var(--leading-l); }
.footer-dl dt { font-weight: var(--weight-400); opacity: .8; }
.footer-dl dd { margin: 0; }
/* Live's footer headings are GOLD and bold on the navy, not white --
 * measured #E3BA3D w700. The body copy beneath them stays white. One size
 * for every column so the tops line up. */
.footer-col__title {
    font-size: var(--step-0);
    margin: 0 0 var(--space-s);
    color: var(--secondary);
    font-weight: 700;
}
.footer-afterhours ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2xs); font-size: var(--step--1); line-height: var(--leading-l); }
/* Service name on one line, its number beneath in bold -- scannable, and no
 * long "Name: number" lines wrapping mid-phrase. */
.footer-afterhours li { display: flex; flex-direction: column; }
.footer-afterhours a { font-weight: 700; }
.footer-note { margin: var(--space-xs) 0 0; font-size: var(--step--1); opacity: .8; }
.site-footer a { color: var(--on-primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
/* {{opening_hours_html}} -- the grouped table from Rails. */
.site-footer .hours-table { width: auto; margin: 0; border-collapse: collapse; font-size: var(--step--1); line-height: var(--leading-l); }
.site-footer .hours-table td { padding: 0 var(--space-s) var(--space-3xs) 0; vertical-align: top; border: 0; background: none; }
.site-footer .hours-table td:first-child { opacity: .8; white-space: nowrap; }

.footer-copy {
    background: var(--primary-hover); /* live #1B2A49, one step darker than the footer navy */
    color: var(--on-primary);
    font-family: var(--font-utility); font-size: var(--step--1); line-height: var(--leading-l);
    padding-block: var(--space-m);
}
/* Copyright left, Mediflare credit centred, legal links right. */
.footer-copy__inner {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: var(--space-s) var(--space-l);
}
.footer-copy p { margin: 0; }
.footer-copy .powered-by { justify-self: center; }
.footer-copy__links {
    list-style: none; margin: 0; padding: 0; justify-self: end;
    display: flex; flex-wrap: wrap; align-items: center;
}
.footer-copy__links li + li::before { content: "|"; margin-inline: var(--space-s); opacity: .6; }
.footer-copy a { color: var(--on-primary); }
@media (max-width: 760px) {
    .footer-copy__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .footer-copy__links { justify-self: center; justify-content: center; }
}
/* Live credited its web agency here; it is Mediflare's credit now, with the
 * template's inverted logo (the default on a dark footer). */
.footer-copy .powered-by { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.footer-copy .powered-by img { height: 1.375rem; width: auto; vertical-align: middle; }   /* no display here: the template's .mf-logo-* rules pick the variant */   /* fixed logo size, 22px as on the other sites */

@media (max-width: 600px) {
    /* Stacked on a phone there is room to spare, so the footer reads at body
     * size rather than the small size the four-column desktop row needs. */
    .footer-grid { gap: var(--space-xl); }
    .footer-logo { height: 7rem; }
    .footer-col__title { font-size: var(--step-1); }
    .footer-blurb, .footer-dl, .footer-afterhours ul, .footer-note,
    .site-footer .hours-table, .footer-copy { font-size: var(--step-0); }
    .footer-afterhours ul { gap: var(--space-s); }
    .footer-copy .powered-by img { height: 1.75rem; }
}

/* --- Buttons ------------------------------------------------------ *
 * Every button on live is the same object: navy ground, GOLD bold text and
 * a 2px gold border. Measured on 45 buttons across the site, not assumed. */
/* The search box's Search and the overlay's Close are buttons the platform
 * component writes (it takes no classes), so they join this rule rather
 * than copying it: one button object, as on live. */
.btn--kfp,
.mf-search__submit,
.mf-search-overlay__close {
    background: var(--primary); color: var(--secondary);
    border: var(--border-medium) solid var(--secondary);
    font-weight: var(--weight-700); font-size: var(--step--1);
    text-transform: uppercase; letter-spacing: var(--tracking-l);   /* every button is set in capitals */
    min-height: var(--target-min);   /* 44px touch target */
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn--kfp:hover, .btn--kfp:focus-visible,
.mf-search__submit:hover, .mf-search__submit:focus-visible,
.mf-search-overlay__close:hover, .mf-search-overlay__close:focus-visible { background: var(--secondary); color: var(--primary); transform: translateY(-1px); }
.btn--kfp:hover, .mf-search__submit:hover, .mf-search-overlay__close:hover { box-shadow: var(--shadow-s); }   /* the lift is a hover; focus is the ring */
@media (prefers-reduced-motion: reduce) { .btn--kfp:hover, .btn--kfp:focus-visible, .mf-search__submit:hover, .mf-search__submit:focus-visible, .mf-search-overlay__close:hover, .mf-search-overlay__close:focus-visible { transform: none; } }

/* --- Inner-page hero ---------------------------------------------- *
 * Live: full-bleed photo, navy ::before at 0.8, centred white Amiko 700
 * title at 60px on an 84px line. 264px tall for one line, 348 for two,
 * i.e. 90px above and below the text. The photo is set per page through
 * --hero-img, so the overlay is written once. */
.page-hero {
    position: relative; isolation: isolate; color: var(--on-primary); text-align: center;
    background: var(--hero-img, none) center / cover no-repeat, var(--primary);
}
.page-hero::before {
    content: ""; position: absolute; inset: 0; z-index: var(--layer-behind);
    background: var(--primary); opacity: 0.8;
}
.page-hero__inner { padding-block: var(--space-2xl-3xl); }
.page-hero__title {
    margin: 0; color: var(--on-primary); font-weight: var(--weight-700);
    font-size: var(--step-6); line-height: var(--leading-m);
    text-wrap: balance;
}
.page-hero__actions {
    display: flex; flex-direction: column; align-items: center;
    gap: var(--space-2xs); margin-block-start: var(--space-l);
}
/* Contact's hero buttons: transparent with a heavy white frame. */
.btn--frame {
    background: transparent; color: var(--secondary);
    border: var(--border-thick) solid var(--on-primary); min-width: 13.75rem;
    min-height: 3.4375rem; display: inline-flex; align-items: center; justify-content: center;   /* live: 220x55 */
    font-weight: var(--weight-700); font-size: var(--step--1); text-transform: uppercase; letter-spacing: var(--tracking-l);
}
.btn--frame:hover, .btn--frame:focus-visible { background: var(--on-primary); color: var(--primary); }

/* --- Inner-page body ---------------------------------------------- *
 * Live's rich-text pages sit hard under the hero and run the full 1200px.
 * Spacing is carried by blank paragraphs in the source (one 32px line
 * each); the generator turns each into .sp on the block that follows. */
.page-body { padding-block: var(--space-2xs) var(--space-3xl-4xl); }
.page-body--narrow { padding-block-start: var(--space-2xl-3xl); }
.page-body--narrow .u-container { max-width: calc(60rem + 2 * var(--grid-gutter)); }
.page-body--spaced { padding-block-start: var(--space-2xl); }
.prose > * { margin-block: 0; }
.prose > .sp { margin-block-start: var(--blank-lines); }
/* Blank paragraphs in the source become margin: --gaps whole blank body
 * lines at the leading those lines had on live. */
.sp { --blank-lines: calc(var(--gaps, 1) * var(--gap-lead, var(--leading-3xl)) * var(--step-0)); }
.sp-s { --gap-lead: var(--leading-s); }
.sp-m { --gap-lead: var(--leading-m); }
.sp-l { --gap-lead: var(--leading-l); }
.sp-xl { --gap-lead: var(--leading-xl); }
.sp-2xl { --gap-lead: var(--leading-2xl); }
/* Per-block leading, measured on live (Duda sets it paragraph by paragraph). */
main .lh-s, main .lh-s > li { line-height: var(--leading-s); }
main .lh-m, main .lh-m > li { line-height: var(--leading-m); }
main .lh-l, main .lh-l > li { line-height: var(--leading-l); }
main .lh-xl, main .lh-xl > li { line-height: var(--leading-xl); }
main .lh-2xl, main .lh-2xl > li { line-height: var(--leading-2xl); }
main .lh-3xl, main .lh-3xl > li { line-height: var(--leading-3xl); }
.prose h2 { font-size: var(--step-2); font-weight: var(--weight-700); line-height: var(--leading-l); }
.prose h3 { font-size: var(--step-1); font-weight: var(--weight-700); line-height: var(--leading-l); }
.prose ul, .prose ol { padding-inline-start: var(--space-l); }
.prose ul ul { list-style-type: circle; padding-inline-start: var(--space-m); margin: 0; }
/* Live packs list items on the line alone (16/28), no gap between them. */
.prose li, .prose li + li { margin: 0; }
.hl { color: var(--primary); }
.u-center { text-align: center; }
.page-cta { text-align: center; margin-block-start: var(--space-xl) !important; }
.page-cta .btn { min-width: 17.5rem; font-size: var(--step-1); text-transform: uppercase; letter-spacing: var(--tracking-l); }

/* --- FAQ accordion ------------------------------------------------ *
 * Live: "FAQs ?" 30px navy, then question rows with a hairline under
 * each, question text 16px navy regular, +/- at the right edge, the
 * first item open. <details> gives the behaviour without script. */
.prose > h2:has(+ .faq) { font-size: var(--step-3); margin-block-start: var(--space-xl); padding-inline: var(--space-s); }
.prose > .faq { margin-block-start: var(--space-xl); }
.faq__item { border-bottom: var(--border-thin) solid var(--border); }
.faq__item > summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-s);
    padding: var(--space-m) var(--space-s); cursor: pointer; list-style: none;
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary::after {
    content: "+"; font-size: var(--step-2); line-height: 1; color: var(--ink-soft); font-weight: var(--weight-400);
}
.faq__item[open] > summary::after { content: "\2212"; }
.prose .faq__q { margin: 0; font-size: var(--step-0); font-weight: var(--weight-400); line-height: var(--leading-xl); }
.faq__a { padding: 0 var(--space-s) var(--space-m); }
.faq__a > * { margin-block: 0; }
.faq__a > .sp { margin-block-start: var(--blank-lines); }
.faq__item > summary:focus-visible { outline-offset: calc(-1 * var(--focus-ring-w)); }   /* inset: the ring sits inside the row */

/* --- Emphasis ----------------------------------------------------- *
 * Bold is navy on live almost everywhere; the few grey/black bold runs are
 * marked .ink by the generator and take the surrounding colour instead. */
main strong { color: var(--primary); }
main strong.ink { color: inherit; }
.prose .ink:is(h2, h3) { color: var(--ink-strong); }
.prose .h-display, .h-display { font-size: var(--step-5); line-height: var(--leading-s); }
.prose p.lg { font-size: var(--step-2); line-height: var(--leading-l); }

/* --- Card grids (Services, Women's Health, Fees) ------------------ *
 * Live: grey cards (#F2F2F2) with 20px corners, rows 120px apart, the
 * button pinned to the card foot. Services runs wider than the 1200px
 * column (four 325px cards across 1360). */
.u-container--wide { max-width: calc(85rem + 2 * var(--grid-gutter)); }
.section--cards { padding-block: var(--space-3xl-4xl); }
.section--after-intro { padding-block-start: var(--space-xl); }
.card-grid { display: grid; gap: var(--space-3xl-4xl) var(--space-s); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
    .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid { row-gap: var(--space-l); }
}
@media (max-width: 760px) {
    .card-grid--4, .card-grid--3 { grid-template-columns: minmax(0, 1fr); }
}
.svc-card, .fee-card {
    display: flex; flex-direction: column;
    background: var(--neutral-pale); border-radius: var(--radius-l);
    padding: var(--space-xl) var(--space-m) var(--space-m);   /* live: 46px above the title */
}
.svc-card__title, .fee-card__title {
    margin: 0 0 var(--space-s); font-size: var(--step-2); line-height: var(--leading-l);
    font-weight: var(--weight-700); color: var(--primary);
}
.svc-card__body { flex: 1 1 auto; }
.svc-card__body > *, .fee-card__body > * { margin: 0; }
.svc-card__body > .sp, .fee-card__body > .sp { margin-block-start: var(--blank-lines); }
.sp-tail { display: block; }
.svc-card__cta { margin: var(--space-m) 0 0; }
.svc-card__cta .btn { display: block; width: 100%; text-align: center; padding-block: var(--space-s); }   /* live: 273x50 */
.btn--outline-kfp { background: transparent; color: var(--primary); border-color: var(--primary); }
/* Fees: white-lifted cards on the neutral ground, shadowed, 35px inset. */
.fee-card { padding: var(--space-xl) var(--space-l) var(--space-l); box-shadow: var(--shadow-m); }   /* live: 55px above, 35px beside */
.fee-card__body p.lg { font-size: var(--step-2); }

/* Centred intro block under a hero (Women's Health, Fees). */
.page-intro { padding-block: var(--space-s) 0; }
.page-intro__inner { max-width: 45rem; margin-inline: auto; }
.page-intro__inner--fees { text-align: center; }

/* --- Our team -------------------------------------------------------- *
 * Live: one #F0F0F0 band holding the heading and a three-up grid of white
 * cards -- photo left in a white frame, name/role/buttons right. The doctors
 * are a {{#each practitioners}} loop; staff and vacancies follow it. */
.team-band { background: var(--neutral-pale); margin-block-end: var(--space-3xl-4xl); }   /* live leaves 130px of white before the footer */
.team-band__head { text-align: center; max-width: 60rem; margin: 0 auto var(--space-xl); }
.team-band__title { margin: 0; font-size: var(--step-6); font-weight: var(--weight-400); line-height: var(--leading-s); }
.team-band__lede { margin: var(--space-2xs) 0 0; font-size: var(--step-2); line-height: var(--leading-m); color: var(--primary); }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-l); max-width: 69rem; margin-inline: auto; }
@media (max-width: 1140px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }   /* three-up is too narrow for the button labels below this */
@media (max-width: 640px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }
/* Three-up only: centre a short last row instead of leaving it flush left (owner, 2026-10-03; 10 cards
   left one alone). Six half-columns with every card spanning two keeps each card exactly as wide as a
   third (2 x (W - 5g)/6 + g = (W - 2g)/3); a lone last card starts at column 3, a last pair at 2 and 4. */
@media (min-width: 1141px) {
    .team-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .team-grid > * { grid-column: span 2; }
    .team-grid > :last-child:nth-child(3n + 1) { grid-column: 3 / span 2; }
    .team-grid > :nth-last-child(2):nth-child(3n + 1) { grid-column: 2 / span 2; }
    .team-grid > :last-child:nth-child(3n + 2) { grid-column: 4 / span 2; }
}
.team-card {
    display: flex; gap: var(--space-s); align-items: flex-start;
    background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-m);
    padding: var(--space-xs);
}
.team-card__photo {
    flex: 0 0 auto; width: 8rem; aspect-ratio: 147 / 213;
    border: var(--border-thick) solid var(--surface); box-shadow: var(--shadow-s); overflow: hidden;
    border-radius: var(--radius-m);   /* one step in from the card's radius-l */
}
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card__photo--staff { width: 8.5rem; aspect-ratio: 155 / 160; }
.team-card__body { flex: 1 1 auto; min-width: 0; }
.team-card__name { margin: 0; font-size: var(--step-2); line-height: var(--leading-m); font-weight: var(--weight-400); color: var(--ink-strong); }
.team-card__name.hl { color: var(--primary); }
.team-card__role { margin: var(--space-2xs) 0 var(--space-s); font-size: var(--step-0); line-height: var(--leading-l); }
.team-card--vacancy p { margin: var(--space-xs) 0 0; line-height: var(--leading-l); }
.team-card__actions { display: grid; gap: var(--space-xs); margin: 0; }
.team-card__actions .btn { display: flex; width: 100%; text-align: center; padding: var(--space-xs) var(--space-2xs); letter-spacing: 0.02em; white-space: normal; line-height: var(--leading-s); }   /* tighter tracking so the capitals fit beside the photo; wraps rather than overflowing when the card is narrow */

/* --- Doctor profile ---------------------------------------------------- *
 * Live: two 600px columns -- Book Appointment centred above a large photo
 * on the left, name (48px) and details on the right. No hero. */
.doctor-profile { padding-block-start: var(--space-m); }
/* Photo and name share a top edge; the booking button sits under the photo. */
.doctor-profile__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); align-items: start; }
.doctor-profile__media { display: flex; flex-direction: column; }
@media (max-width: 760px) { .doctor-profile__grid { grid-template-columns: minmax(0, 1fr); } }
.doctor-profile__book { text-align: center; margin: var(--space-m) 0 0; }   /* under the photo */
.doctor-profile__book .btn { min-width: 17.5rem; font-size: var(--step-0); padding: var(--space-s) var(--space-l); }
.doctor-profile__photo { display: block; border-radius: var(--radius-l); overflow: hidden; background: none; }
/* The whole photo at its own shape, never cropped. */
.doctor-profile__photo img { width: 100%; height: auto; display: block; }
.doctor-profile__name { margin: 0; font-size: var(--step-5); line-height: var(--leading-l); }

/* --- Contact ----------------------------------------------------------- */
.contact-band { padding-block-start: var(--space-3xl-4xl); }
.contact-band__grid { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-l); align-items: start; }
@media (max-width: 760px) { .contact-band__grid { grid-template-columns: minmax(0, 1fr); } }
.contact-band__details h2 { margin: 0 0 var(--space-s); }
.contact-band__details { max-width: 31rem; }   /* live: 482px, so the 48px heading wraps */
.contact-band__details p { margin: 0; }
.contact-lines { margin-block-start: var(--blank-lines, 2rem) !important; --blank-lines: calc(var(--leading-3xl) * var(--step-0)); }
.contact-band__map { display: block; width: 100%; height: 13.6rem; border: 0; border-radius: var(--radius-l); }   /* live: 682x218 */
.contact-band__notes { margin-block-start: var(--space-2xl); }
/* communication_policy arrives as bare <p>s: one blank body line between
 * them (what .sp gave the typed copy), and bold in the running ink (.ink). */
.contact-band__notes > p + p { margin-block-start: calc(var(--leading-3xl) * var(--step-0)); }
.contact-band__notes strong { color: inherit; }

/* Contact form: layout only. The fields are the Form controls section's,
 * the button is the site's one .btn--kfp. Three single-line fields side by
 * side, the message and the button full width; one column on phones. */
.contact-form { margin-block-start: var(--space-2xl); }
.contact-form h2 { margin: 0 0 var(--space-s); }
.contact-form__note { margin: 0 0 var(--space-m); max-width: 60ch; }
.contact-form__note a { white-space: nowrap; }   /* keep the phone number on one line */
.contact-form__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-s) var(--space-m); }
.contact-form__wide, .contact-form__grid altcha-widget { grid-column: 1 / -1; }
@media (max-width: 760px) { .contact-form__grid { grid-template-columns: minmax(0, 1fr); } }
.contact-form__feedback { margin-block-start: var(--space-s); padding: var(--space-xs) var(--space-s); border-radius: var(--radius-s); }
.contact-form__feedback[data-status="success"] { background: var(--success-pale); color: var(--ink-strong); }
.contact-form__feedback[data-status="error"] { background: var(--danger-pale); color: var(--ink-strong); }

/* --- Pathology panel ------------------------------------------------------ *
 * Live: a #F0F0F0 panel with a navy icon disc straddling its top edge. The
 * disc stays in flow with a negative margin rather than being positioned. */
.info-panel {
    background: var(--neutral-pale); text-align: center; border-radius: var(--radius-l);
    margin-block-start: var(--space-l);
    padding: 0 var(--space-l) var(--space-s);
}
.info-panel__icon {
    display: inline-flex; align-items: center; justify-content: center;
    --info-disc: 5rem;   /* a fixed 80px disc: a dimension, not spacing */
    width: var(--info-disc); height: var(--info-disc);
    margin-block-start: calc(var(--info-disc) / -2);   /* half of it above the panel edge, whatever its size */
    background: var(--primary); color: var(--on-primary); border-radius: var(--radius-round);
    border: var(--border-thick) solid var(--surface);
}
.info-panel__icon svg { width: 2.5rem; height: 2.5rem; }
.info-panel__title { margin: var(--space-m) auto var(--space-s); max-width: 54rem; font-size: var(--step-2); line-height: var(--leading-l); }
.info-panel__map { display: block; width: 100%; max-width: 54rem; height: 15.6rem; margin-inline: auto; border: 0; border-radius: var(--radius-l); }   /* live: 860x250 */

/* --- About page: live runs the copy in the left 541px only. */
.about-copy { max-width: 34rem; }
.about-page { padding-block: var(--space-3xl-4xl); }

.page-hero__title--regular { font-weight: var(--weight-400); }

/* --- Terms of use: hand-written prose, so it carries its own rhythm. */
.legal { max-width: var(--measure); }
.legal > * + * { margin-block-start: var(--space-s); }
.legal > h2 { margin-block-start: var(--space-xl); font-size: var(--step-2); }
.legal .lede { font-size: var(--step-1); line-height: var(--leading-xl); }
.terms-dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2xs) var(--space-m); }
.terms-dl dt { font-weight: var(--weight-700); color: var(--primary); }
.terms-dl dd { margin: 0; }
.terms-dl address { font-style: normal; }

/* --- Site search -------------------------------------------------- *
 * The platform component (mediflare.js) writes the box unstyled; every
 * rule here is this site's, on its tokens. One placement at every width:
 * one button (.site-search__trigger, data-mf-search-open) opens the one
 * overlay mediflare.js builds (.mf-search-overlay). The overlay is a
 * centred card over a dimmed page above the menu's own 960px, and full
 * screen at 960px and under (the Mobile block below). The trigger is drawn
 * as a search field between the menu and Book Appointment on desktop, and
 * as a bare magnifier beside the menu button on phones. Never inside the
 * menu: search behind the hamburger is search most patients never find.
 * The overlay and the results list are styled ONLY through :not([hidden]):
 * giving them a display of their own overrides [hidden] and they never
 * close. Search and Close are .btn--kfp (they join that rule above). */

/* The trigger, drawn as a field: border, ground, corner and height are the
 * --field-* tokens (Form controls), so it matches the search box it opens.
 * After the menu, before the button: the button is order 3 too and comes
 * after this in the markup. */
.site-search__trigger {
    order: 3;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    min-block-size: var(--field-h);
    padding-block: 0;
    padding-inline: var(--field-pad-inline) var(--space-xl);
    font: inherit;
    font-size: var(--field-font-size);
    font-weight: var(--field-weight);
    line-height: var(--field-leading);
    white-space: nowrap;
    color: var(--field-placeholder);
    background: var(--field-bg);
    border: var(--field-border-w) solid var(--field-border);
    border-radius: var(--field-radius);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.site-search__trigger svg { flex: none; }
/* The ellipsis is drawn, not spoken: the name stays "Search this site". */
.site-search__text::after { content: "\2026" / ""; }
.site-search__trigger:hover,
.site-search__trigger[aria-expanded="true"] { color: var(--primary); border-color: var(--field-border-hover); }
/* Drawn as a field, so the ring sits on its border as the field's does. */
.site-search__trigger:focus-visible { outline-offset: calc(-1 * var(--field-border-w)); border-radius: var(--field-radius); }

/* The header's tight bands. The menu folds to two rows below 1111px
 * whatever the trigger does, and a full-width trigger would fold it sooner,
 * so the trigger shortens instead (measured on 961-1440, every 20px and +-1
 * at each edge): the magnifier alone in its field outline, a 44px square
 * and so the width the old icon took, up to 1199px; magnifier and
 * "Search", without the ellipsis, up to 1259px; the full trigger above. */
@media (min-width: 961px) and (max-width: 1199px) {
    .site-search__trigger { justify-content: center; inline-size: var(--field-h); padding-inline: 0; }
    .site-search__text { display: none; }   /* the name is the aria-label */
}
@media (min-width: 1200px) and (max-width: 1259px) {
    .site-search__trigger { padding-inline: var(--field-pad-inline); }
    .site-search__text::after { content: none; }
}

/* The box, wherever it sits: the field and Search on one row, the status
 * and results beneath. */
.mf-search__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2xs);
    align-items: stretch;
}
.mf-search__label,
.mf-search__status,
.mf-search__results { grid-column: 1 / -1; }
/* Read out, not shown: the magnifier and the placeholder say what it is. */
.mf-search__label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* The search field's look is the --field-* tokens (Form controls), never a
 * rule here. */

.mf-search__status {
    margin: 0;
    padding-inline: var(--space-xs);
    font-size: var(--step--1);
    line-height: var(--leading-m);
    color: var(--ink-mid);
}
.mf-search__status:empty { display: none; }

/* Results: the title in the headings' navy Amiko, the excerpt in body grey,
 * matches marked in the alert bar's gold. */
.mf-search__results { margin: 0; padding: 0; list-style: none; }
.mf-search__results:not([hidden]) { display: flex; flex-direction: column; gap: var(--space-3xs); }
.mf-search__link {
    display: block;
    padding: var(--space-2xs) var(--space-xs);
    border-radius: var(--radius-s);
    color: var(--ink-mid);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background var(--duration-fast) var(--ease-out);
}
.mf-search__link:hover,
.mf-search__link:focus-visible { color: var(--ink-mid); background: var(--secondary-pale); }
.mf-search__link:hover .mf-search__title { text-decoration: underline; }
/* Inside a scrolling list an outset ring is clipped, so it sits inset. */
.mf-search__link:focus-visible { outline-offset: calc(-1 * var(--focus-ring-w)); border-radius: var(--radius-s); }
.mf-search__title {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--weight-700);
    line-height: var(--leading-s);
    color: var(--primary);
}
.mf-search__excerpt {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--step--1);
    line-height: var(--leading-l);
    color: var(--ink-mid);
}
.mf-search__excerpt mark {
    color: var(--primary);
    background: color-mix(in oklab, var(--secondary) 50%, transparent);
    border-radius: var(--radius-xs);
}

/* Phones: full screen, white, under the alert bar's gold rule. One row
 * holds Close, the field and Search (Close first, matching the focus
 * order); the results scroll below it, inside the overlay. mediflare.js
 * locks the page behind. Subgrid puts the box's own children on the
 * overlay's grid, so the results run the full width. */
.mf-search-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: var(--layer-modal);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: var(--space-xs) var(--space-2xs);
    padding-block-start: max(var(--space-s), env(safe-area-inset-top));
    padding-inline: max(var(--grid-gutter), env(safe-area-inset-left)) max(var(--grid-gutter), env(safe-area-inset-right));
    background: var(--bg);
    border-block-start: var(--border-thick) solid var(--secondary);
}
.mf-search-overlay__header { display: contents; }
.mf-search-overlay__close {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    z-index: var(--layer-base);   /* above the box, which spans this cell too */
}
.mf-search--overlay,
.mf-search--overlay .mf-search__form {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    align-items: stretch;   /* Close, the field and Search share one height */
}
.mf-search--overlay .mf-search__input { grid-column: 2; grid-row: 1; }
.mf-search--overlay .mf-search__submit { grid-column: 3; grid-row: 1; }
.mf-search--overlay .mf-search__status { grid-column: 1 / -1; grid-row: 2; }
.mf-search--overlay .mf-search__results {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    min-block-size: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-block-end: max(var(--space-s), env(safe-area-inset-bottom));
}

/* The card: above the menu's breakpoint the overlay is a centred panel
 * under a dimmed, lightly blurred page (body::after, in the ink), and grows
 * with its results up to the viewport, past which they scroll inside it.
 * It refines the full-screen rules above at equal specificity, so it must
 * stay after them. The card sits one layer above its backdrop: body::after
 * comes after the overlay in the tree, so at an equal z-index it would
 * paint over it. */
@media (min-width: 961px) {
    .mf-search-overlay:not([hidden]) {
        inset: var(--space-3xl) 0 auto;
        z-index: calc(var(--layer-modal) + 1);
        inline-size: calc(100% - 2 * var(--grid-gutter));
        max-inline-size: var(--measure);
        max-block-size: calc(100dvh - 2 * var(--space-3xl));
        margin-inline: auto;
        padding: var(--space-s);
        border-radius: var(--radius-s);
        box-shadow: var(--shadow-l);
    }
    .mf-search--overlay .mf-search__results { padding-block-end: 0; }
    html[data-mf-search-overlay="open"] body::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: var(--layer-modal);
        background: color-mix(in oklab, var(--ink-strong) 50%, transparent);
        backdrop-filter: blur(var(--space-3xs));
    }
}

/* --- Mobile ------------------------------------------------------- */
@media (max-width: 960px) {
    /* Search: the trigger becomes a bare 44px magnifier beside the menu
     * button, in the menu button's ink, and takes the auto margin. */
    .site-search__trigger {
        order: 0;
        justify-content: center;
        inline-size: var(--target-min);
        block-size: var(--target-min);
        margin-inline-start: auto;
        padding: 0;
        color: var(--ink);
        background: none;
        border-color: transparent;
    }
    .site-search__trigger:hover, .site-search__trigger[aria-expanded="true"] { color: var(--primary); border-color: transparent; }
    .site-search__text { display: none; }   /* the name is the aria-label */
    /* Mobile: the drawer opens on its own line below the bar. */
    .site-header__inner { flex-wrap: wrap; }
    .primary-nav { flex: 0 0 100%; order: 4; }
    .nav-toggle {
        display: flex; flex-direction: column; justify-content: center; align-items: center;
        min-block-size: var(--target-min); min-inline-size: var(--target-min);   /* the 44px tap target */
        background: none; border: 0;   /* the search icon before it takes the auto margin */
        padding: var(--space-2xs); cursor: pointer;
    }
    .brand img { height: 5.75rem; }   /* the "kareela family practice" line under the mark needs this to be legible */
    .nav-toggle__bar { display: block; width: 26px; height: 2px; background: var(--ink); margin: var(--space-3xs) 0; }
    .primary-nav { display: none; }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-list > li, .nav-sub > li { flex-wrap: wrap; }
    .nav-list > li > a, .nav-sub a { flex: 1 1 auto; }
    /* Every drawer row is a 44px target, and the chevron is a full-height 44px
     * square at the row's end. The desktop chevron borrows its height through
     * negative margins; stacked in the drawer, that made it overlap the rows
     * above and below (31px rows, 44px chevrons). */
    .nav-list > li > a { display: flex; align-items: center; min-block-size: var(--target-min); }
    .nav-sub-toggle { inline-size: var(--target-min); margin: 0; }
    .nav-sub, .nav-sub .nav-sub {
        position: static; display: none; flex: 0 0 100%;
        border: 0; min-width: 0; padding-inline-start: var(--space-s);
    }
    .has-sub:hover > .nav-sub, .has-sub:focus-within > .nav-sub { display: none; }
    .nav-sub-toggle[aria-expanded="true"] + .nav-sub { display: block; }
    .nav-sub .nav-sub-toggle { position: static; }
    .nav-sub .nav-sub-toggle svg { transform: none; }
    .nav-sub a { white-space: normal; padding-inline-end: var(--space-2xs); }
    .nav-cta { width: 100%; text-align: center; margin-block-start: var(--space-2xs); }
}
