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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*
 * 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.
 */
@media (prefers-color-scheme: dark) {
    :root {
        /* Flipping --scheme inverts every neutral at once, via the --l-*
         * dials. The three brand values below are NOT a polarity flip -- a
         * brand colour has to get lighter and less contrasty on a dark
         * ground to stay legible, which is a different adjustment. */
        --scheme: 0;

        --l-solid: 0.68;
        --l-hover: 0.75;
        --l-pale: 0.24;
        --l-on-solid: 0.18;

        --shadow-strength: 12%;
    }
}

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

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

* { margin: 0; }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Small label above a heading. */
.eyebrow {
    display: block;
    margin-bottom: var(--space-2xs);
    font-size: var(--step--1);
    font-weight: var(--weight-600);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    color: var(--primary);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

img {
    border-radius: var(--radius-m);
    background: var(--surface);
}

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

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

figure { margin-inline: 0; }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*
 * Grid utilities. .u-container centres and pads; .u-grid lays out. Placement
 * within the grid is each layout's business — see refs/design/layouts.md.
 */
.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: clamp(6rem, 14vw, 11rem) clamp(4rem, 9vw, 7rem);
    text-align: center;
}
.notfound__inner { max-width: 46rem; margin-inline: auto; }

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

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

.notfound__links {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid currentColor;
    /* The rule is a hairline of the surrounding ink rather than a named border
     * token, so it works whatever the site's palette is. */
    border-color: color-mix(in oklab, currentColor 22%, transparent);
}
.notfound__links-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
}
.notfound__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    justify-content: center;
}
.notfound__links a {
    display: inline-block;
    /* WCAG 2.2 target size. */
    min-height: 24px;
    line-height: 24px;
    font-weight: 600;
}
/* ═══════════════════════════════════════════════════════════════════════
 * DR MERVAT AKLADIOUS SURGERY — site layer
 *
 * Everything above this line is the shared template. Everything below
 * retunes it to the practice's own design, transcribed from the WordPress
 * site at www.makladious.com.au on 2026-09-07. Values are measured, not
 * chosen: where a number looks odd (a 1350px shell, a 131px header, cards
 * at 86/91/78% opacity) it is because the source has it.
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* --- Type scale: base 16.5px, ratio 1.25 at desktop reproduces the
     * source's 20.6 / 25 / 33 / 41 / 49.5 ladder within a pixel. --- */
    --u-min-font: 15;
    --u-max-font: 16.5;
    --u-min-ratio: 1.18;
    --u-max-ratio: 1.25;

    /* Two sizes the ladder does not land on: the hero display (57.75px) and
     * the lede/eyebrow size (18.56px = 1.125 x body). */
    --title-hero: clamp(2.25rem, 1.45rem + 3.2vw, 3.61rem);
    --text-lede: clamp(1.0625rem, 1rem + 0.3vw, 1.16rem);

    /* --- Palette: burgundy brand, warm dark-brown secondary, cream ground. */
    --palette-hue: 18.7;
    --palette-chroma: 0.145;
    --l-solid: 0.43;            /* #8E202F */
    --l-hover: 0.37;
    --palette-secondary-shift: 48.2;
    --chroma-secondary: 0.0185;
    --l-secondary: 0.279;       /* #2F271F */

    /* Neutrals are true greys on this site (ink #292929, paper #F6F6F6). */
    --hue-neutral: 67.6;
    --chroma-ink: 0;
    --l-ink-strong: 0.2809;
    --l-ink: 0.2809;
    --l-ink-mid: 0.40;
    --l-bg: 1;

    --cream: oklch(0.943 0.0207 67.6);      /* #F6EADE — the site's ground */
    --paper: oklch(0.9731 0 0);            /* #F6F6F6 — text on dark */
    --paper-dim: oklch(0.965 0 0);         /* #F5F5F5 — legal page ground */

    /* --- Typefaces --- */
    --font-body: "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
    --font-heading: "Lora", Georgia, serif;

    /* --- Shell: the source's content width is 1350 (45px margins at 1440),
     * with a narrower 1290 variant on some bands. --- */
    --shell: 84.375rem;
    --shell-narrow: 80.625rem;
    --grid-max-width: var(--shell);
    --grid-gutter: var(--space-s-l);

    /* Band rhythm: 120px desktop / 64px phone on most bands, 80 on the
     * tighter ones. Both are existing pairs on the scale. */
    --space-band: var(--space-2xl-3xl);
    --space-band-tight: var(--space-xl-2xl);

    /* The header is 131px tall on the source and sits above the page, not
     * over it. */
    --header-h: 8.1875rem;

    /* Straddle depths: how far a block rides up into the band above. A card
     * row that straddles a hero sits 50:50 across its bottom edge (the owner's
     * standing rule), so each of those is half the row's desktop height;
     * scripts/straddle-ratio.mjs asserts the ratio on every .overlap. */
    --overlap-s: 5rem;      /* 80  — contact sidebar column (a layout, not a card) */
    --overlap-xl: 17rem;    /* 272 — legal card (the source's own depth) */
    --overlap-home: 10.3rem;     /* half of the 330px info-card row */
    --overlap-about: 18.9rem;    /* half of the 604px trust panel */
    --overlap-services: 9.8rem;  /* half of the 313px info-card row */
    --overlap-strip: 5.25rem;    /* half of the 168px CTA strip */

    --radius-none: 0;
}

/* The source never rounds a corner. */
img, .media-frame, .card, .btn, input, select, textarea { border-radius: var(--radius-none); }
img { background: none; }

/* No dark mode: the practice's design is a fixed light palette. */
@media (prefers-color-scheme: dark) {
    :root { --scheme: 1; --l-solid: 0.43; --l-hover: 0.37; --l-pale: 0.96; --l-on-solid: 0.99; --shadow-strength: 1%; }
}

/* ── Base ─────────────────────────────────────────────────────────── */
body { background: var(--bg); color: var(--ink); }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    letter-spacing: var(--tracking-m);
    line-height: var(--leading-m);
    text-wrap: pretty;
}
h6, .h6 { text-transform: none; letter-spacing: var(--tracking-m); }

.u-container { max-width: calc(var(--grid-max-width) + 2 * var(--grid-gutter)); }
.u-container--narrow { --grid-max-width: var(--shell-narrow); }

.section { padding-block: var(--space-band); }
.section--tight { padding-block: var(--space-band-tight); }
.section--flush { padding-block: 0; }
.bg-cream { background: var(--cream); }
.bg-brand { background: var(--primary); color: var(--paper); }
.bg-brown { background: var(--secondary); color: var(--paper); }

/* Skip link */
.skip-link {
    position: absolute; left: var(--space-s); top: -100%;
    z-index: var(--layer-top);
    padding: var(--space-2xs) var(--space-s);
    background: var(--primary); color: var(--paper);
}
.skip-link:focus { top: var(--space-s); }

/* ── Type roles ───────────────────────────────────────────────────── */
/* Eyebrow: Source Sans 700, body-lede size, ALL CAPS, brand red. The
 * source writes the capitals into the copy; text-transform keeps the
 * markup readable and the render identical. */
.eyebrow {
    display: block;
    margin: 0 0 var(--space-s);
    font-family: var(--font-body);
    font-size: var(--text-lede);
    font-weight: var(--weight-700);
    line-height: var(--leading-l);
    letter-spacing: var(--tracking-m);
    text-transform: uppercase;
    color: var(--primary);
}
.on-dark .eyebrow, .eyebrow--light { color: var(--paper); }

.band-title { margin: 0 0 var(--space-m); font-family: var(--font-heading); font-weight: var(--weight-700); font-size: var(--step-5); line-height: var(--leading-s); color: var(--ink-strong); }
.band-title--md { font-size: var(--step-4); }
.band-title--sm { font-size: var(--step-3); }
.band-title--brand { color: var(--primary); }
.on-dark .band-title { color: var(--paper); }
.title-hero { font-size: var(--title-hero); line-height: 1.2; }

.lede { font-size: var(--text-lede); line-height: var(--leading-l); color: var(--ink); }
.lede strong { display: block; margin-bottom: var(--space-xs); }
.on-dark .lede, .on-dark p { color: var(--paper); }
p:last-child { margin-bottom: 0; }

.center { text-align: center; }
.measure-band { max-width: 52.5rem; margin-inline: auto; }   /* 839px intro paragraph */

/* Rich text carried over from the source verbatim */
.prose h2 { font-size: var(--step-4); margin: var(--space-l) 0 var(--space-s); }
.prose h3 { font-size: var(--step-3); margin: var(--space-l) 0 var(--space-s); }
.prose ul, .prose ol { padding-left: var(--space-m); margin-bottom: var(--space-m); }
.prose li { margin-bottom: var(--space-3xs); }
.prose a { color: var(--primary); text-decoration: underline; }

/* ── Buttons: flat, square, uppercase, Source Sans 700 ─────────────── */
.btn {
    padding: 1.25rem 2.5rem;                 /* 20 / 40 */
    font-size: var(--text-lede);
    font-weight: var(--weight-700);
    line-height: var(--leading-l);
    letter-spacing: var(--tracking-m);
    text-transform: uppercase;
    white-space: normal;
    max-width: 100%;
    border: var(--border-thin) solid transparent;
    border-radius: var(--radius-none);
}
.btn--primary { background: var(--primary); color: var(--paper); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--primary-hover); color: var(--paper); }
/* Cream button on a burgundy panel */
.btn--cream { background: var(--cream); color: var(--primary); border-color: var(--cream); }
.btn--cream:hover, .btn--cream:focus-visible { background: var(--paper); color: var(--primary-hover); }
.btn--sm { padding: 0.9375rem 1.875rem; font-size: var(--step-0); }   /* 15 / 30 */
.btn--md { padding: 1.25rem 1.875rem; }                              /* 20 / 30 */
.on-dark .btn--primary { background: var(--primary); color: var(--paper); }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header {
    position: relative;
    z-index: var(--layer-nav);
    background: var(--cream);
    min-height: var(--header-h);
}
.site-header__inner {
    --grid-max-width: 81rem;                 /* 1296: the header's own shell */
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--space-m);
    min-height: var(--header-h);
}
.site-logo { display: block; padding-inline: 3.1875rem; }
.site-logo img { width: var(--header-h); height: var(--header-h); }

.primary-nav { display: flex; justify-content: center; }
.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 45.7rem;                      /* 731px: wraps "Contact" to a second row, as the source does */
    margin: 0 auto;
}
.nav-list a {
    display: inline-block;
    position: relative;
    padding: 0.8125rem 1.25rem;              /* 13 / 20 */
    font-family: var(--font-heading);
    font-size: 1.134rem;                     /* 18.15px */
    font-weight: var(--weight-700);
    line-height: var(--leading-l);
    color: var(--ink);
    text-decoration: none;
}
.nav-list a::after {
    content: "";
    position: absolute;
    left: 1.25rem; right: 1.25rem; bottom: 0.5rem;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-base) var(--ease-out);
}
.nav-list a:hover::after, .nav-list a.active::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list a:hover, .nav-list a.active { color: var(--primary); }
.nav-list a.active { color: var(--ink); }

.nav-toggle { display: none; width: 2.75rem; height: 2.75rem; color: var(--ink); }
.nav-toggle svg { width: 1.75rem; height: 1.75rem; fill: currentColor; margin: auto; }

/* Mobile drawer */
@media (max-width: 62rem) {
    .site-header__inner { grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: var(--space-xs); }
    .site-logo { padding-inline: 0; }
    .nav-toggle { display: inline-flex; order: 4; }
    .nav-cta { order: 3; }
    .primary-nav {
        order: 5;
        grid-column: 1 / -1;
        display: none;
        padding-block: var(--space-s) var(--space-m);
    }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; align-items: stretch; max-width: none; }
    .nav-list a { display: block; padding: var(--space-xs) 0; border-bottom: var(--border-thin) solid color-mix(in oklab, var(--ink) 12%, transparent); }
    .nav-list a::after { display: none; }
}
@media (max-width: 36rem) {
    :root { --header-h: 5.5rem; }
    .nav-cta { padding: 0.75rem 1rem; font-size: var(--step--1); }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    isolation: isolate;
    background: var(--ink-strong) var(--hero-image) center / cover no-repeat;
    color: var(--ink);
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    z-index: var(--layer-behind);
    background: var(--hero-wash);
    opacity: var(--hero-wash-opacity, 1);
}
.hero__inner { position: relative; padding-block: var(--space-band); }
.hero__copy { max-width: 46.5rem; }          /* 743px title column */
.hero__copy .lede { max-width: 31.25rem; }   /* 500px */
.hero__copy .btn { margin-top: var(--space-m); }
.hero .eyebrow { margin-bottom: var(--space-m); }

/* Home: photo with a cream wash sweeping from the top-left */
.hero--home {
    --hero-image: url("/assets/images/hero-home.webp");
    --hero-wash: linear-gradient(143deg, var(--cream) 34%, rgba(246, 246, 246, 0.2) 60%);
    --hero-wash-opacity: 0.71;
    background-color: oklch(0 0 0);
}
.hero--home .hero__inner { padding-block: 7.5rem 0; min-height: 52.7rem; }   /* 1008px photo on the source, less the 165px the cards ride up */

/* Cards that ride the bottom edge of a hero. The row is an in-flow sibling
 * pulled up by --overlap; the hero itself gets that much extra bottom
 * padding so its copy is never covered. */
.overlap { position: relative; z-index: var(--layer-raised); margin-top: calc(-1 * var(--overlap)); }
.overlap--s { --overlap: var(--overlap-s); }
.overlap--xl { --overlap: var(--overlap-xl); }
.overlap--home { --overlap: var(--overlap-home); }
.overlap--about { --overlap: var(--overlap-about); }
.overlap--services { --overlap: var(--overlap-services); }
.overlap--strip { --overlap: var(--overlap-strip); }
:is(.hero, .section):has(+ .overlap--s) { padding-bottom: var(--overlap-s); }
:is(.hero, .section):has(+ .overlap--xl) { padding-bottom: var(--overlap-xl); }
:is(.hero, .section):has(+ .overlap--home) { padding-bottom: var(--overlap-home); }
:is(.hero, .section):has(+ .overlap--about) { padding-bottom: var(--overlap-about); }
:is(.hero, .section):has(+ .overlap--services) { padding-bottom: var(--overlap-services); }
:is(.hero, .section):has(+ .overlap--strip) { padding-bottom: var(--overlap-strip); }
/* A band that carries the overlap itself paints its ground from the seam
 * down, so it does not cover the hero it rides into. */
.overlap.bg-cream, .overlap.bg-brand { background-color: transparent; background-image: linear-gradient(var(--band-bg), var(--band-bg)); background-repeat: no-repeat; background-position: 0 var(--overlap); }
.overlap.bg-cream { --band-bg: var(--cream); }
.overlap.bg-brand { --band-bg: var(--primary); }

/* Rails' grouped hours table, rendered as stacked centred lines: day in bold
 * above its times, no rules. Used inside the info cards and the contact panel. */
.hours-stack .hours-table, .hours-stack .hours-table tbody, .hours-stack .hours-table tr, .hours-stack .hours-table td { display: block; padding: 0; border: 0; text-align: inherit; }
.hours-stack .hours-table { margin: 0 0 var(--space-xs); }
.hours-stack .hours-table td:first-child { font-weight: var(--weight-700); }
.hours-stack .hours-table tr + tr { margin-top: var(--space-3xs); }

/* Three translucent burgundy info cards (home, contact, services heroes) */
.infocards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); box-shadow: var(--shadow-s); }
.infocard {
    padding: 3rem 3.75rem;                        /* 60 */
    text-align: center;
    color: var(--paper);
    background: color-mix(in srgb, var(--primary) 86%, transparent);
}
.infocard:nth-child(2) { background: color-mix(in srgb, var(--primary) 91%, transparent); }
.infocard:nth-child(3) { background: color-mix(in srgb, var(--primary) 78%, transparent); }
.infocards--solid .infocard { background: var(--primary); }
.infocards--solid .infocard + .infocard { border-left: var(--border-thin) solid color-mix(in srgb, var(--cream) 30%, transparent); }
.infocard__icon { width: 1.5625rem; height: 1.5625rem; margin: 0 auto var(--space-s); fill: currentColor; }
.infocard__title { margin: 0 0 var(--space-xs); font-size: var(--step-2); color: var(--paper); }
.infocard p { margin: 0; color: var(--paper); }
.infocard strong { font-weight: var(--weight-700); }
.infocard a, .contact-side a, .on-dark a:not(.btn) { color: var(--paper); text-decoration: underline; text-underline-offset: 0.15em; }
.infocard a:hover, .contact-side a:hover { color: var(--cream); }
@media (max-width: 62rem) {
    .infocards { grid-template-columns: minmax(0, 1fr); }
    .infocard { padding: var(--space-l) var(--space-m); }
    .infocards--solid .infocard + .infocard { border-left: 0; border-top: var(--border-thin) solid color-mix(in srgb, var(--cream) 30%, transparent); }
}

/* ── Two-column split (copy + media) ──────────────────────────────── */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl); align-items: center; }
.split--start { align-items: start; }
.split--wide { gap: 3.75rem; }
.split > .media-frame { aspect-ratio: auto; }
@media (max-width: 62rem) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ── Icon box: icon above (column) or beside (row) a title and copy ──── */
.iconbox { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
.iconbox--center { align-items: center; text-align: center; }
.iconbox--row { flex-direction: row; align-items: flex-start; gap: var(--space-s); }
.iconbox__icon { flex: 0 0 auto; width: var(--icon-size, 2.1875rem); height: var(--icon-size, 2.1875rem); fill: var(--icon-color, var(--primary)); }
.iconbox--lg { --icon-size: 2.8125rem; }     /* 45 */
.iconbox--sm { --icon-size: 1.5625rem; }     /* 25 */
.iconbox__title { margin: var(--space-2xs) 0 var(--space-xs); font-size: var(--step-2); }
.iconbox p { margin: 0; }
.on-dark .iconbox__icon { --icon-color: var(--paper); }
.on-dark .iconbox__title { color: var(--paper); }

/* ── Home: about band ─────────────────────────────────────────────── */
.about__video { aspect-ratio: 4 / 3; background: oklch(0 0 0); }
.about__video iframe { width: 100%; height: 100%; border: 0; display: block; }
.about__copy p { margin-bottom: var(--space-s); }
.about__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); flex-wrap: wrap; margin-top: var(--space-l); }
.author { display: flex; align-items: center; gap: var(--space-xs); }
.author__photo { width: 4rem; height: 4rem; border-radius: var(--radius-round); object-fit: cover; }
.author__name { margin: 0; font-family: var(--font-heading); font-weight: var(--weight-700); font-size: var(--step-1); }
.author__role { margin: 0; font-size: var(--step--1); color: var(--primary); }

/* ── Home: specialisations (4-col grid, copy spans two) ───────────── */
.specialisations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2xl) 3.75rem; }
.specialisations__copy { grid-column: 1 / 3; }
.specialisations__copy p { margin: 0; }
@media (max-width: 78rem) { .specialisations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-l); } .specialisations__copy { grid-column: 1 / -1; } }
@media (max-width: 40rem) { .specialisations { grid-template-columns: minmax(0, 1fr); } }

/* ── Home: beyond office hours ────────────────────────────────────── */
.beyond { display: grid; grid-template-columns: minmax(0, 753fr) minmax(0, 517fr); gap: 5rem; align-items: start; }
.beyond__boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) 2.1875rem; margin-bottom: var(--space-l); }
.beyond__contacts h3 { font-size: var(--step-2); margin-bottom: var(--space-s); }
.beyond__contacts p { margin-bottom: var(--space-xs); }
@media (max-width: 62rem) { .beyond { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } }

/* ── CTA band: copy beside a photo ────────────────────────────────── */
.cta { display: grid; grid-template-columns: minmax(0, 675fr) minmax(0, 675fr); gap: var(--space-l); align-items: start; }
.cta__copy { padding-right: var(--space-l); }
.cta__copy .band-title { color: oklch(0 0 0); }
.cta__copy .btn { margin-top: var(--space-l); }
.cta__photo { min-height: 28.8rem; background: var(--cta-image) center / cover no-repeat; }
@media (max-width: 62rem) { .cta { grid-template-columns: minmax(0, 1fr); } .cta__photo { min-height: 18rem; } }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer { background: var(--primary); color: var(--paper); }
.site-footer__inner {
    --grid-max-width: 85rem;                 /* 1360 */
    display: grid;
    grid-template-columns: minmax(0, 470fr) minmax(0, 330fr) minmax(0, 200fr) minmax(0, 300fr);
    gap: var(--space-l);
    padding-block: 5rem 3.5rem;
}
.site-footer h2 { margin: 0 0 var(--space-m); font-size: var(--step-1); color: var(--cream); }
.footer-logo { width: min(100%, 27rem); height: auto; margin-bottom: var(--space-l); }
.site-footer p { margin: 0 0 var(--space-s); color: var(--paper); }
.footer-item { display: flex; gap: var(--space-s); margin-bottom: var(--space-m); }
.footer-item__icon { flex: 0 0 auto; width: 1.5rem; height: 1.5rem; fill: var(--cream); }
.footer-item__title { display: block; margin-bottom: var(--space-3xs); font-family: var(--font-heading); font-weight: var(--weight-700); color: var(--cream); }
.footer-item a, .footer-links a { color: var(--paper); text-decoration: none; }
.footer-item a:hover, .footer-links a:hover { color: var(--cream); text-decoration: underline; }
.footer-links li { margin-bottom: var(--space-2xs); }
/* Hours arrive as Rails' grouped table; render it as stacked lines. */
.site-footer .hours-table, .site-footer .hours-table tbody, .site-footer .hours-table tr, .site-footer .hours-table td { display: block; padding: 0; border: 0; }
.site-footer .hours-table td:first-child { font-family: var(--font-heading); font-weight: var(--weight-700); color: var(--cream); }
.site-footer .hours-table tr + tr { margin-top: var(--space-xs); }
.site-footer .hours-table { margin: 0 0 var(--space-s); }
.site-footer .hours-table td:last-child { white-space: normal; }   /* the template pins times to one line; this column is too narrow for a split day */
.footer-bar p { margin: 0; }
.footer-bar { background: var(--secondary); font-size: var(--step--1); }
.footer-bar__inner { --grid-max-width: 85rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-s) var(--space-l); padding-block: 1.875rem; }
.footer-bar__left { display: flex; align-items: center; gap: var(--space-m); }
.footer-bar__left > * + * { padding-left: var(--space-m); border-left: var(--border-thin) solid color-mix(in srgb, var(--paper) 60%, transparent); }
.powered-by { display: flex; align-items: center; gap: var(--space-2xs); margin: 0; }
.powered-by img { width: 4.6875rem; height: auto; }
.footer-bar__legal { display: flex; gap: var(--space-s); margin: 0; }
.footer-bar__legal a { color: var(--paper); text-decoration: none; }
.footer-bar__legal a:hover { text-decoration: underline; }
.mf-logo-light { display: none; } .mf-logo-dark { display: inline; }
@media (max-width: 78rem) { .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .site-footer__inner { grid-template-columns: minmax(0, 1fr); } }

/* ── About page ───────────────────────────────────────────────────── */
.hero--about {
    --hero-image: url("/assets/images/hero-about.webp");
    --hero-wash: linear-gradient(160deg, rgba(246, 234, 222, 0.2) 25%, var(--cream) 100%);
    --hero-wash-opacity: 0.59;
    text-align: center;
}
.hero--about .hero__inner { padding-block: 5rem 0; min-height: 28rem; }   /* 753px photo less the 302px the panel rides up */
.hero--about .hero__copy { max-width: 37.25rem; margin-inline: auto; }
.hero--about .hero__copy .lede { max-width: 26rem; margin-inline: auto; }
.hero--about .eyebrow { color: var(--ink); }
.trust-panel { display: grid; grid-template-columns: minmax(0, 545fr) minmax(0, 606fr); gap: var(--space-2xl); padding: 4.375rem; background: var(--primary); color: var(--paper); box-shadow: var(--shadow-s); }
.trust-panel .band-title { color: var(--cream); font-size: var(--step-3); }
.trust-panel__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-xl); }
@media (max-width: 62rem) { .trust-panel { grid-template-columns: minmax(0, 1fr); padding: var(--space-l); } }
@media (max-width: 36rem) { .trust-panel__grid { grid-template-columns: minmax(0, 1fr); } }

.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.75rem; text-align: center; }
.team-section { padding-bottom: var(--space-band-tight); }
.team__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: var(--space-m); }
.team__name { margin: 0; font-size: var(--step-1); color: var(--primary); }
.team__role { margin: 0 0 var(--space-s); }
@media (max-width: 62rem) { .team { grid-template-columns: minmax(0, 1fr); max-width: 30rem; margin-inline: auto; } }

/* Dark-brown band with a faint photo, holding a cream panel */
.band-brown {
    position: relative; isolation: isolate;
    background: var(--secondary);
    color: var(--paper);
}
.band-brown::before { content: ""; position: absolute; inset: 0; z-index: var(--layer-behind); background: var(--band-image) center / cover no-repeat; opacity: var(--band-image-opacity, 0.33); }
.panel-cream { background: var(--cream); color: var(--ink); box-shadow: var(--shadow-s); }
.panel-cream p { color: var(--ink); }
.visit { display: grid; grid-template-columns: minmax(0, 575fr) minmax(0, 575fr); gap: var(--space-l); padding: 4.6875rem; }
.visit__photo { min-height: 37rem; background: var(--visit-image) center / cover no-repeat; }
.visit__card { padding: 4.375rem; background: var(--primary); color: var(--paper); }
.visit__card .band-title { font-size: var(--step-3); color: var(--cream); }
.visit__card .btn { margin-top: var(--space-m); }
.visit__card p, .cta-panel__copy p { color: var(--paper); }
@media (max-width: 62rem) { .visit { grid-template-columns: minmax(0, 1fr); padding: var(--space-m); } .visit__photo { min-height: 20rem; } .visit__card { padding: var(--space-l); } }

/* ── Services page ────────────────────────────────────────────────── */
.hero--services {
    --hero-image: url("/assets/images/hero-services.webp");
    --hero-wash: linear-gradient(165deg, var(--cream) 0%, rgba(47, 39, 31, 0) 100%);
    background-color: var(--cream);
}
.hero--services .hero__inner { padding-block: 5rem 0; min-height: 38.25rem; }  /* 769px photo less the 157px card overlap */
.hero--services .hero__copy { max-width: 38.75rem; }
.hero--services .hero__copy .lede { max-width: 35.5rem; }
.service-feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6.25rem; align-items: center; }
.service-feature + .service-feature { margin-top: var(--space-2xl); }
.service-feature__photo { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.service-feature__title { margin: 0 0 var(--space-s); font-size: var(--step-3); color: var(--primary); }
.service-feature--flip .service-feature__photo { order: 2; }
@media (max-width: 62rem) { .service-feature { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } .service-feature--flip .service-feature__photo { order: 0; } }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl) 5rem; margin-top: var(--space-xl); }
.services-grid .iconbox__title { font-size: var(--step-2); color: var(--ink); }
.ticklist { list-style: none; padding: 0; margin: var(--space-s) 0 0; }
.ticklist li { position: relative; padding-left: 1.75rem; margin-bottom: var(--space-2xs); }
.ticklist li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 0.9375rem; height: 0.9375rem; background: var(--primary); mask: url("data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 512 512&quot;&gt;&lt;path d=&quot;M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z&quot;/&gt;&lt;/svg&gt;") center / contain no-repeat; }
@media (max-width: 62rem) { .services-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } }
.cta-panel { display: grid; grid-template-columns: minmax(0, 833fr) minmax(0, 417fr); gap: var(--space-2xl); align-items: start; }
.cta-panel__photo { position: relative; min-height: 24.75rem; background: var(--cta-image) center / cover no-repeat; }
.cta-panel__note { position: relative; margin: -6.25rem 0 0 10rem; max-width: 37rem; padding: 3.125rem; }
.cta-panel__note h2 { font-size: var(--step-1); color: var(--primary); margin-bottom: var(--space-xs); }
.cta-panel__copy .band-title { font-size: var(--step-3); color: var(--cream); margin-bottom: var(--space-s); }
.cta-panel__copy .btn { margin-top: var(--space-m); }
@media (max-width: 62rem) { .cta-panel { grid-template-columns: minmax(0, 1fr); } .cta-panel__note { margin: -3rem var(--space-m) 0; padding: var(--space-m); } }

/* ── Practice policy page ─────────────────────────────────────────── */
.hero--policy {
    --hero-image: url("/assets/images/hero-practice-policy.webp");
    --hero-wash: linear-gradient(98deg, var(--cream) 28%, rgba(242, 41, 91, 0) 100%);
    --hero-wash-opacity: 0.79;
    background-color: var(--paper-dim);
    background-position: 0 0;
}
.hero--policy .hero__inner { padding-block: 7.5rem; }   /* the source keeps 120px under the columns and the CTA card; nothing rides this hero */
.policy-hero { display: grid; grid-template-columns: minmax(0, 929fr) minmax(0, 371fr); gap: 3rem; align-items: end; }
.policy-hero__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: var(--space-xl); }
.policy-hero__cards > :not(:last-child) { padding-right: 1.5625rem; border-right: 1px solid var(--primary); }   /* the source's 1px burgundy column dividers */
.policy-hero__cards > * + * { padding-left: 1.5625rem; }
.policy-hero__cards .iconbox__title { font-size: var(--step-2); }
.policy-hero__cards .btn { margin-top: auto; }
.policy-hero__cards .iconbox p { margin-bottom: var(--space-xs); }
.policy-cta { align-self: end; }
.policy-cta__photo { width: 100%; aspect-ratio: 371 / 255; object-fit: cover; display: block; }
.policy-cta__card { padding: 3.125rem; text-align: center; background: color-mix(in srgb, var(--primary) 88%, transparent); color: var(--paper); }
.policy-cta__card h2 { margin: 0 0 var(--space-s); font-size: var(--step-2); color: var(--paper); }
.policy-cta__card .btn { margin-top: var(--space-s); }
@media (max-width: 78rem) { .policy-hero { grid-template-columns: minmax(0, 1fr); } .policy-hero__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 62rem) { .policy-hero__cards { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } .policy-hero__cards > * { padding: 0; border-right: 0; } }

.appointments { display: grid; grid-template-columns: minmax(0, 430fr) minmax(0, 430fr) minmax(0, 430fr); gap: var(--space-l); }
.appointments__photo { min-height: 39rem; background: var(--photo) center / cover no-repeat; }
.appointments__col { padding: var(--space-l) var(--space-l) var(--space-l) 0; }
.appointments__col + .appointments__col { border-left: var(--border-thin) solid var(--primary); padding-left: var(--space-l); }
.subhead { margin: var(--space-m) 0 var(--space-xs); font-family: var(--font-body); font-size: var(--step-1); font-weight: var(--weight-600); color: var(--ink); }
.subhead:first-child { margin-top: 0; }
.hours-rows { list-style: none; padding: 0; margin: 0 0 var(--space-m); }
.hours-rows li { display: flex; align-items: baseline; gap: var(--space-xs); margin-bottom: var(--space-2xs); }
.hours-rows li::after { content: ""; flex: 1; order: 2; border-bottom: var(--border-medium) solid var(--primary); transform: translateY(-0.35em); }
.hours-rows span:last-child { order: 3; font-weight: var(--weight-700); }
@media (max-width: 78rem) { .appointments { grid-template-columns: minmax(0, 1fr); } .appointments__photo { min-height: 22rem; } .appointments__col { padding: 0; } .appointments__col + .appointments__col { border-left: 0; padding-left: 0; } }

.fees { display: grid; grid-template-columns: minmax(0, 733fr) minmax(0, 567fr); gap: var(--space-l); align-items: start; }
.fees__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: var(--space-l); }
.fees__card { padding: 1.875rem; background: var(--primary); color: var(--paper); }
.fees__card .iconbox__icon { --icon-color: var(--cream); }
.fees__card .iconbox__title { color: var(--cream); }
.fees__photo { min-height: 32.8rem; background: var(--photo) center / cover no-repeat; }
@media (max-width: 62rem) { .fees { grid-template-columns: minmax(0, 1fr); } .fees__cards { grid-template-columns: minmax(0, 1fr); } .fees__photo { min-height: 20rem; } }

.after-hours { display: grid; grid-template-columns: minmax(0, 675fr) minmax(0, 675fr); gap: var(--space-l); text-align: center; }
.after-hours > div:first-child { padding-right: 6.25rem; border-right: var(--border-thin) solid var(--primary); }
.after-hours .band-title { font-size: var(--step-4); color: var(--primary); }
.wide-photo { width: 100%; aspect-ratio: 1290 / 450; object-fit: cover; margin-top: var(--space-2xl); }
@media (max-width: 62rem) { .after-hours { grid-template-columns: minmax(0, 1fr); } .after-hours > div:first-child { padding-right: 0; border-right: 0; padding-bottom: var(--space-l); border-bottom: var(--border-thin) solid var(--primary); } }
.home-visits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6.25rem; align-items: center; }
.home-visits__photo { width: 100%; aspect-ratio: 1; object-fit: cover; }
.home-visits hr { border-top: var(--border-thin) solid var(--primary); margin: var(--space-l) 0; }
@media (max-width: 62rem) { .home-visits { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } }

/* ── Health articles page ─────────────────────────────────────────── */
.hero--articles {
    --hero-image: url("/assets/images/hero-health-articles.webp");
    --hero-wash: radial-gradient(var(--cream) 12%, var(--cream) 100%);
    --hero-wash-opacity: 0.61;
    background-color: oklch(0 0 0);
}
.hero--articles .hero__inner { padding-block: 7.5rem 0; min-height: 41rem; }  /* 739px photo less the 80px strip overlap */
.hero--articles .hero__copy .lede { max-width: 31.25rem; }
.strip { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-l); align-items: center; padding: var(--space-l) 3.125rem; background: var(--primary); color: var(--paper); box-shadow: var(--shadow-s); }
.strip h2 { margin: 0 0 var(--space-2xs); font-size: var(--step-2); color: var(--cream); }
.strip p { margin: 0; }
.strip__phone { display: inline-flex; align-items: center; gap: var(--space-xs); font-family: var(--font-heading); font-size: var(--step-1); font-weight: var(--weight-700); color: var(--paper); text-decoration: none; }
.strip__phone svg { width: 1.4375rem; height: 1.4375rem; fill: var(--cream); }
@media (max-width: 62rem) { .strip { grid-template-columns: minmax(0, 1fr); padding: var(--space-m); } }
/* The Your Health widget, styled exactly as the source page styles it. */
#yh-widget { display: flex; flex-wrap: wrap; gap: 20px; }
#yh-widget > div { flex: 1 1 calc(33.33% - 20px); box-sizing: border-box; }
#yh-widget img { border: 15px solid oklch(0.85 0 0); border-radius: 15px; width: 100%; box-sizing: border-box; }
#yh-widget h2, #yh-widget h3, #yh-widget h4 { font-family: inherit; font-size: inherit; color: inherit; margin: 0.5em 0; }

.resource-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); margin-top: var(--space-l); }
.resource-card { padding: var(--space-l); background: var(--paper); border-top: var(--border-thick) solid var(--primary); box-shadow: var(--shadow-s); }
.resource-card h3 { margin: 0 0 var(--space-xs); font-size: var(--step-1); }
.resource-card h3 a { color: var(--primary); text-decoration: none; }
.resource-card h3 a:hover, .resource-card h3 a:focus-visible { text-decoration: underline; }
.resource-card p { margin: 0; }
@media (max-width: 62rem) { .resource-cards { grid-template-columns: minmax(0, 1fr); } }
.advice { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: start; }
.advice__actions { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-top: var(--space-l); }
.advice__panel { padding: var(--space-l); background: var(--primary); }
.advice__panel h3 { margin: 0 0 var(--space-s); font-size: var(--step-2); color: var(--cream); }
@media (max-width: 62rem) { .advice { grid-template-columns: minmax(0, 1fr); } }

/* ── Contact page ─────────────────────────────────────────────────── */
.hero--contact {
    --hero-image: url("/assets/images/hero-contact.webp");
    --hero-wash: none;
    background: var(--secondary);
    color: var(--paper);
}
.hero--contact::before { background: var(--hero-image) center / cover no-repeat; opacity: 0.27; }
.hero--contact .hero__inner { padding-block: 7.5rem 0; min-height: 41rem; display: flex; align-items: center; }
.hero--contact .contact-hero { width: 100%; }
.hero--contact .eyebrow, .hero--contact .band-title, .hero--contact .lede { color: var(--paper); }
.contact-hero { display: grid; grid-template-columns: minmax(0, 625fr) minmax(0, 625fr); gap: 6.25rem; align-items: start; }
.contact-hero__actions { display: flex; align-items: center; gap: var(--space-m); margin-top: var(--space-l); }
.contact-hero__actions p { max-width: 18rem; margin: 0; }
.contact-hero__photo { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
@media (max-width: 62rem) { .contact-hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } }
.contact-layout { display: grid; grid-template-columns: minmax(0, 450fr) minmax(0, 800fr); gap: 6.25rem; align-items: start; }
.contact-side { padding: 4.375rem; background: var(--primary); color: var(--paper); text-align: center; }
.contact-side .iconbox { margin-bottom: var(--space-l); }
.contact-side .iconbox:last-child { margin-bottom: 0; }
.contact-map { aspect-ratio: 1; margin-bottom: var(--space-l); background: var(--secondary); }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-form-wrap { padding-top: 10rem; }   /* 80px overlap + ~113px, as measured */
.contact-form-wrap .band-title { font-size: var(--step-3); color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m) var(--space-s); margin-top: var(--space-l); }
.form-grid .form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: var(--text-lede); font-weight: var(--weight-600); color: var(--ink); margin-bottom: var(--space-2xs); }
.form-field label .req { color: var(--primary); margin-left: 0.25em; }
.form-field input, .form-field textarea { padding: var(--space-xs) var(--space-s); background: transparent; border: var(--border-thin) solid var(--primary); }
.form-field textarea { min-height: 5rem; }
.form-submit { grid-column: 1 / -1; width: 100%; }
.form-note { margin-top: var(--space-m); padding: var(--space-s) var(--space-s) var(--space-s) var(--space-m); border-left: var(--border-thick) solid var(--primary); background: color-mix(in srgb, var(--primary) 32%, var(--cream)); font-size: var(--step--1); }
.form-note strong { display: block; margin-bottom: var(--space-3xs); }
[data-mf-feedback] { margin-top: var(--space-m); padding: var(--space-s); border: var(--border-thin) solid var(--primary); }
[data-mf-feedback][data-status="success"] { background: var(--success-pale); color: var(--ink); border-color: var(--success); }
[data-mf-feedback][data-status="error"] { background: var(--danger-pale); color: var(--ink); border-color: var(--danger); }
@media (max-width: 62rem) { .contact-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } .contact-side { padding: var(--space-l); } .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Legal / policy pages ─────────────────────────────────────────── */
.hero--legal { min-height: 56.25rem; background-color: var(--paper-dim); }
.hero--legal::before { background: linear-gradient(oklch(0 0 0) 0%, rgba(255, 255, 255, 0.15) 9%); opacity: 0.5; }
.hero--terms::before { background: none; }
.hero--privacy { --hero-image: url("/assets/images/hero-privacy.webp"); }
.hero--terms { --hero-image: url("/assets/images/hero-terms.webp"); }
.hero--social { --hero-image: url("/assets/images/policy-home-visits.webp"); }
.hero--electronic { --hero-image: url("/assets/images/policy-hero-card.webp"); }
.legal-band { background: var(--primary); padding-bottom: 0; }
.legal-band .overlap { margin-bottom: 0; }
.legal-card { padding: 6.25rem; background: var(--cream); color: var(--ink); }
.legal-card p, .legal-card li { color: var(--ink); }
.legal-card--rounded { border-radius: 1.25rem; }
.legal-card .band-title { color: var(--primary); margin-bottom: var(--space-m); }
.legal-card .prose h2 { font-size: var(--step-4); }
.legal-card .prose h3 { font-size: var(--step-3); }
.legal-card p, .legal-card ul, .legal-card ol { margin-bottom: var(--space-s); }
.legal-card .prose h2 { margin: var(--space-m) 0 var(--space-xs); }
.legal-card .prose h3 { margin: var(--space-m) 0 var(--space-xs); }
.legal-card .prose li { margin-bottom: 0; }
@media (max-width: 62rem) { .legal-card { padding: var(--space-l); } .hero--legal { min-height: 30rem; } }

/* ── 404 ──────────────────────────────────────────────────────────── */
.notfound { padding-block: var(--space-band); background: var(--cream); text-align: left; }
.notfound__grid { display: grid; grid-template-columns: minmax(0, 480fr) minmax(0, 740fr); gap: 6.25rem; align-items: center; }
.notfound h1 { font-size: var(--step-5); color: oklch(0.36 0.06 280); }
.notfound__lede { color: var(--ink-mid); margin: var(--space-m) 0 var(--space-l); }
.notfound__photo { width: 100%; aspect-ratio: 740 / 542; object-fit: cover; }
@media (max-width: 62rem) { .notfound__grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Scroll entrance (one-way) ────────────────────────────────────── */
/* Elements opt in with data-reveal="up|down|left|right|fade" and an optional
 * data-reveal-stagger="<ms>"; partials/scripts.html reveals them once, the
 * first time they enter the viewport, and never re-hides them. Short travel
 * (26px / 18px) on purpose. Hidden only under .js so a failed script leaves
 * the page visible. */
.js [data-reveal] {
    opacity: 0;
    transition: opacity 760ms cubic-bezier(0.22, 0.61, 0.36, 1), transform 760ms cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.js [data-reveal="up"]    { transform: translateY(26px); }
.js [data-reveal="down"]  { transform: translateY(-26px); }
.js [data-reveal="left"]  { transform: translateX(-18px); }
.js [data-reveal="right"] { transform: translateX(18px); }
.js [data-reveal="fade"]  { transform: none; }
.js [data-reveal][data-revealed] { opacity: 1; transform: none; }
.js [data-reveal][data-reveal-done] { will-change: auto; transition: none; }
@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── Accessibility floor ──────────────────────────────────────────── */
main a:not([class]) { color: var(--primary); text-decoration: underline; }
.on-dark a:not([class]) { color: var(--cream); }
