/*
 * Site styles. There is 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.
 *
 * COLOUR, TYPE AND SPACE ARE DIALS (#426). The first section is Dials
 * (github.com/joops/dials), copied verbatim between its begin and end
 * markers. It works out every colour, text size, space size and
 * corner from a few values called dials. This site sets its own dials in ONE
 * short block straight after the section, "This site's dials", and that block
 * is the only place in the file where a colour or a scale value is typed.
 *
 *   - Change the look by changing a dial: --brand for the brand colour,
 *     --size-min/--size-max and --ratio-min/--ratio-max for the type scale,
 *     --leading-body for line height, --space-min/--space-max and
 *     --space-density for spacing, --radius-base for corners,
 *     --font-body/--font-heading for faces.
 *   - Everything else reads a token: --surface*, --text*, --border*, --link,
 *     --focus, --solid/--on-solid/--soft/--on-soft/--line (and the named
 *     groups --brand-*, --secondary-*, --tertiary-*, --success-* ...), --size-*,
 *     --leading, --space-*, --radius-*, --border-width-*. Never a hex, rgb(),
 *     hsl() or named colour, never a px/rem length, and never a typed line
 *     height, anywhere else. Weights and letter spacing are the site's own:
 *     a weight is a unitless number, letter spacing is in em.
 *   - The rules are in refs/design/DESIGN.md ("Dials"). Every dial, token
 *     and class is listed in the reference for the version in the section's
 *     first line: github.com/joops/dials/blob/v0.4.0/docs/tokens.md. A
 *     gradient, a wash or a quiet coloured border is a pattern built from
 *     tokens (that reference, "Patterns"), never a token of its own.
 *     check-system.sh holds the section to _template's copy word for word,
 *     and fails a raw colour outside the dials block.
 */

/* ═══ Dials ═══ dials:begin ═════════════════════════════════════════════
 * Dials v0.4.3, VERBATIM. Never edit anything between this marker and the
 * end marker: check-system.sh fails the site if its copy differs from
 * _template's by a word. Each marker appears once; never write either in
 * prose. Set dials in "This site's dials" below; an upgrade
 * of Dials is a template change plus a migration of every site.
 * ═══════════════════════════════════════════════════════════════════════ */
/*! Dials v0.4.3 | MIT | https://github.com/joops/dials */
/* Dials: an AI-first CSS framework. This file is dials-colour.css, then
   dials-scale.css, then the fallback for older browsers; dials-base.css is optional.
   Its defaults are the Default theme: the device's own faces, nothing to load.
   The Dials house theme is themes/dials.css.
*/
/* ============================================================
   Dials: colour (dials-colour.css)
   Dials: seven colours and a few numbers, the only typed values.
   Derived: surfaces, text, lines and groups, worked out live with
   color-mix() and relative colour, in light and dark.
   Groups: .is-{group} points the ungrouped tokens at a group.
   Dials live on :root (and :host); the derived chain is declared on
   :root, [data-dials] and :host, so setting a dial on any
   [data-dials] element re-derives every token inside it.
   Needs color-mix(), light-dark() and relative colour. Don't
   register these with @property: they must resolve where they're
   used, which is what makes .is-dark bands work.
   ============================================================ */
:root, :host {
  /* ---- Colour dials: any CSS colour, preferably HSL ---- */
  --brand:     hsl(221 83% 53%);  /* the main colour: links, focus, primary buttons */
  --secondary: hsl(262 52% 55%);  /* a second colour: highlights and secondary actions (was --accent) */
  --success:   hsl(142 64% 38%);  /* status: done, saved, live */
  --warning:   hsl(38 92% 50%);  /* status: check this */
  --danger:    hsl(0 72% 51%);  /* status: errors and destructive actions */
  --info:      hsl(199 89% 42%);  /* status: neutral news */
  --grey:      hsl(220 9% 50%);  /* the hue and strength of the tint in paper and ink */

  /* ---- Number dials ---- */
  --balance: 0;              /* 1: every fill at --fill-lightness, so they carry equal weight. 0: exactly as set */
  --fill-lightness: 0.52;    /* the shared OKLCH lightness used when --balance is 1 */
  --dark-lift: 0.06;         /* how much lighter the fills are in dark */
  --tint-strength: 10%;      /* how much colour goes into a soft tint */
  --tint-vividness: 1;       /* 1-3: how saturated soft tints are, for crisper pastels */
  --text-contrast: 0;        /* 0-30: strengthens body, muted and quiet text and strong borders, for paper and ink that sit close together */
  --white-text-until: 0.179; /* fills below this luminance get white text, above it black. 0.179 gives each fill whichever contrasts more; held between 0.175 and 0.18333, where both still give 4.5:1: black needs (L + 0.05) / 0.05 >= 4.5, so L >= 0.175; white needs 1.05 / (L + 0.05) >= 4.5, so L <= 1.05 / 4.5 - 0.05 = 0.18333 */

  /* ---- Paper and ink: near-white and near-black, tinted by --grey at these OKLCH lightnesses.
     To use exact colours instead, set --paper-light, --paper-dark, --ink-light and/or
     --ink-dark (unset by default) to any colour. ---- */
  --paper-lightness: 0.985;       /* page background in light */
  --paper-dark-lightness: 0.17;   /* page background in dark */
  --ink-lightness: 0.2;           /* strongest text in light */
  --ink-dark-lightness: 0.95;     /* strongest text in dark */
}

/* Follow the visitor's light or dark setting. To force one, set
   :root { color-scheme: light; } (or dark) after dials.css. */
:root { color-scheme: light dark; }

:root, [data-dials], :host {
  /* ---- Internal: paper, ink and the six fills, worked out from the dials ---- */
  --dl-paper-light: var(--paper-light, oklab(from var(--grey) var(--paper-lightness) calc(a * 0.12) calc(b * 0.12)));
  --dl-paper-dark:  var(--paper-dark,  oklab(from var(--grey) var(--paper-dark-lightness) calc(a * 0.15) calc(b * 0.15)));
  --dl-ink-light:   var(--ink-light,   oklab(from var(--grey) var(--ink-lightness) calc(a * 0.25) calc(b * 0.25)));
  --dl-ink-dark:    var(--ink-dark,    oklab(from var(--grey) var(--ink-dark-lightness) calc(a * 0.12) calc(b * 0.12)));
  --dl-paper: light-dark(var(--dl-paper-light), var(--dl-paper-dark));
  --dl-ink:   light-dark(var(--dl-ink-light), var(--dl-ink-dark));
  --dl-paper-grey: oklab(from var(--dl-paper) l 0 0);  /* paper without its tint: soft tints mix into this, so they keep their own hue */

  --dl-secondary-dial: var(--accent, var(--secondary));  /* --accent is --secondary's old name: while a site still sets it, it wins */
  --dl-brand-base:     oklab(from var(--brand)              calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
  --dl-secondary-base: oklab(from var(--dl-secondary-dial)  calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
  --dl-success-base:   oklab(from var(--success)            calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
  --dl-warning-base:   oklab(from var(--warning)            calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
  --dl-danger-base:    oklab(from var(--danger)             calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
  --dl-info-base:      oklab(from var(--info)               calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
  --dl-brand:     light-dark(var(--dl-brand-base), oklab(from var(--dl-brand-base) calc(l + var(--dark-lift)) a b));
  --dl-secondary: light-dark(var(--dl-secondary-base), oklab(from var(--dl-secondary-base) calc(l + var(--dark-lift)) a b));
  --dl-success:   light-dark(var(--dl-success-base), oklab(from var(--dl-success-base) calc(l + var(--dark-lift)) a b));
  --dl-warning:   light-dark(var(--dl-warning-base), oklab(from var(--dl-warning-base) calc(l + var(--dark-lift)) a b));
  --dl-danger:    light-dark(var(--dl-danger-base), oklab(from var(--dl-danger-base) calc(l + var(--dark-lift)) a b));
  --dl-info:      light-dark(var(--dl-info-base), oklab(from var(--dl-info-base) calc(l + var(--dark-lift)) a b));

  /* ---- Surfaces ---- */
  --surface:         var(--dl-paper);                                            /* the page background */
  --surface-raised:  oklab(from var(--dl-paper) calc(l + 0.03) calc(a * 0.5) calc(b * 0.5));  /* cards, fields, popovers */
  --surface-lowered: color-mix(in oklab, var(--dl-ink) 4%, var(--dl-paper));     /* wells, table headers, quiet panels */
  --surface-sunken:  color-mix(in oklab, var(--dl-ink) 8%, var(--dl-paper));     /* code, inset areas, disabled fills */
  --surface-overlay: color-mix(in oklab, black 45%, transparent);                /* the scrim behind a dialog */

  /* ---- Text ---- */
  --text-strong:   var(--dl-ink);                                                                         /* headings, labels, emphasis */
  --text:          color-mix(in oklab, var(--dl-ink) calc(86% + var(--text-contrast) * 0.4%), var(--dl-paper));  /* body text */
  --text-muted:    color-mix(in oklab, var(--dl-ink) calc(70% + var(--text-contrast) * 1%), var(--dl-paper));    /* secondary text */
  --text-quiet:    color-mix(in oklab, var(--dl-ink) calc(64% + var(--text-contrast) * 1.2%), var(--dl-paper));  /* captions, dates, placeholders */
  --text-disabled: color-mix(in oklab, var(--dl-ink) 38%, var(--dl-paper));                                /* disabled controls: exempt from contrast rules */
  --link:          var(--brand-on-soft);                                                                  /* links: 4.5:1 on every surface */
  --link-hover:    light-dark(color(from var(--dl-brand-hover) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-brand-hover) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));  /* links on hover: a step stronger (the link 0.08 darker in OKLCH lightness in light, lighter in dark), and on to 7:1 if that's short */

  /* ---- Lines and effects ---- */
  --border-quiet:  color-mix(in oklab, var(--dl-ink) 7%, var(--dl-paper));   /* dividers that should barely show */
  --border:        color-mix(in oklab, var(--dl-ink) 13%, var(--dl-paper));  /* card and table borders: decorative */
  --border-strong: color-mix(in oklab, var(--dl-ink) calc(46% + var(--text-contrast) * 1%), var(--dl-paper));  /* field and control borders: 3:1 on surfaces */
  --focus:         var(--brand-on-soft);                                     /* the focus ring: opaque, 4.5:1 on surfaces */
  --selection:     color-mix(in oklab, var(--dl-brand) 22%, var(--dl-paper));  /* selected text background */
  --shadow-color:  light-dark(color-mix(in oklab, black 10%, transparent), color-mix(in oklab, black 45%, transparent));  /* the colour of shadows */
  --shadow-s: 0 1px 3px var(--shadow-color);    /* a slight lift: buttons, chips */
  --shadow-m: 0 4px 14px var(--shadow-color);   /* cards */
  --shadow-l: 0 12px 32px var(--shadow-color);  /* popovers, menus, dialogs */

  /* ---- Hover and pressed: the second half of a color-mix(), from Web Awesome.
     Use as color-mix(in oklch, var(--solid), var(--mix-hover)). The text colour's lightness is flipped
     in OKLab, keeping its a and b: grey text has no hue a browser will read back (Chrome 157 reads it
     as none, which paints pink), so this reads none. ---- */
  --mix-hover:  oklab(from currentColor calc(1 - l) a b) 12%;  /* hover: away from the text colour */
  --mix-active: oklab(from currentColor calc(1 - l) a b) 22%;  /* pressed: further still */

  /* ---- Groups: brand, secondary, neutral, success, warning, danger, info. Five roles each:
     solid      a solid fill
     on-solid   text on it: white or black, whichever contrasts more (its sRGB luminance, as painted, vs --white-text-until)
     soft       a tinted background: the colour, held at L 0.7 or lighter in light (0.6 or darker in dark), mixed in OKLab
                into paper with its own tint taken out, so a blue soft stays blue on cream paper. Its vividness scales
                the mix's a and b, never its chroma and hue: a tint is too pale to carry a hue a browser will read back
                (Chrome 157 reads it as none, which paints pink), so no colour here reads a hue from a mix or from paper
     on-soft    text on soft, and coloured text on the page: the fill, moved only as far as 4.5:1 needs
     line       borders, icons and large text (24px, or 18.66px bold, and up): the dial, moved only as far as 3:1 needs

     Coloured text and lines follow one rule: keep the colour, and move it only as far as its
     contrast target needs, on the least contrasting background it sits on: its own soft tint,
     --surface-lowered or --surface-raised (--surface always lies between them). Only its
     linear-light RGB is scaled, which keeps the channels' ratios, so hue and saturation stay
     (in dark, until a channel reaches 1).
     --link-hover is the same rule at 7:1, starting from the link a step stronger.
       Y   the colour's luminance, 0.2126 r + 0.7152 g + 0.0722 b in linear sRGB (clipped to sRGB first)
       Yb  that background's luminance, as painted (clipped to sRGB)
       T   the target, plus 0.1 headroom so painting in 8 bits can't round it under the line
       light: Yt = (Yb + 0.05) / (T + 0.1) - 0.05; scale r, g and b by min(1, Yt / Y)
       dark:  Yt = (T + 0.1) * (Yb + 0.05) - 0.05; scale r, g and b by max(1, Yt / Y), each capped
              at 1; if a capped channel leaves it short, mix towards white only as far as Yt needs:
              by (Yt - Y1) / (1 - Y1), where Y1 is the luminance after scaling
     A colour that already passes keeps its exact value. CSS works out a relative colour from
     one colour's channels only, so the steps carry their numbers in colours:
       --dl-surfaces-y       the luminance of --surface-lowered in green, of --surface-raised in blue
       --dl-{group}-under    plus the soft tint's in red, mixed 50/50: Yb is min(2r, 4g, 4b) in light, max in dark
       --dl-{group}-text,    the colour, mixed 50/50 with a black whose alpha is s Yt, where s is 3 in
       --dl-{group}-line,    light (Yt is at most 0.29 there) and 1 in dark: scaling it up means Firefox
       --dl-brand-hover      rounding a mix's alpha to three decimals costs a third as much. Mixing
                             premultiplies, so the mix has alpha a = (1 + s Yt) / 2 and channels c / 2a:
                             the colour's channels are r * 2a, and Yt is (2a - 1) / s
       on-soft, line, hover  unpack both and scale, as above ---- */
  --dl-surfaces-y: color-mix(in srgb-linear, color(from var(--surface-lowered) srgb-linear 0 calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0), color(from var(--surface-raised) srgb-linear 0 0 calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))));

--dl-brand-under: color-mix(in srgb-linear, color(from var(--brand-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--dl-surfaces-y));
  --dl-brand-text:  color-mix(in srgb-linear, color(from var(--dl-brand-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-brand-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--dl-brand-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --dl-brand-line:  color-mix(in srgb-linear, color(from var(--brand) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-brand-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--dl-brand-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --brand-solid:    var(--dl-brand);
  --brand-on-solid: color(from var(--dl-brand) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
  --brand-soft:     oklab(from color-mix(in oklab, light-dark(oklab(from var(--dl-brand) max(l, 0.7) a b), oklab(from var(--dl-brand) min(l, 0.6) a b)) var(--tint-strength), var(--dl-paper-grey)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
  --brand-on-soft:  light-dark(color(from var(--dl-brand-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-brand-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --brand-line:     light-dark(color(from var(--dl-brand-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-brand-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));

  --dl-secondary-under: color-mix(in srgb-linear, color(from var(--secondary-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--dl-surfaces-y));
  --dl-secondary-text:  color-mix(in srgb-linear, color(from var(--dl-secondary-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-secondary-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--dl-secondary-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --dl-secondary-line:  color-mix(in srgb-linear, color(from var(--dl-secondary-dial) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-secondary-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--dl-secondary-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --secondary-solid:    var(--dl-secondary);
  --secondary-on-solid: color(from var(--dl-secondary) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
  --secondary-soft:     oklab(from color-mix(in oklab, light-dark(oklab(from var(--dl-secondary) max(l, 0.7) a b), oklab(from var(--dl-secondary) min(l, 0.6) a b)) var(--tint-strength), var(--dl-paper-grey)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
  --secondary-on-soft:  light-dark(color(from var(--dl-secondary-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-secondary-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --secondary-line:     light-dark(color(from var(--dl-secondary-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-secondary-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));

  --neutral-solid:    var(--dl-ink);
  --neutral-on-solid: var(--dl-paper);
  --neutral-soft:     var(--surface-lowered);
  --neutral-on-soft:  var(--text);
  --neutral-line:     var(--border);

  --dl-success-under: color-mix(in srgb-linear, color(from var(--success-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--dl-surfaces-y));
  --dl-success-text:  color-mix(in srgb-linear, color(from var(--dl-success-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-success-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--dl-success-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --dl-success-line:  color-mix(in srgb-linear, color(from var(--success) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-success-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--dl-success-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --success-solid:    var(--dl-success);
  --success-on-solid: color(from var(--dl-success) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
  --success-soft:     oklab(from color-mix(in oklab, light-dark(oklab(from var(--dl-success) max(l, 0.7) a b), oklab(from var(--dl-success) min(l, 0.6) a b)) var(--tint-strength), var(--dl-paper-grey)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
  --success-on-soft:  light-dark(color(from var(--dl-success-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-success-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --success-line:     light-dark(color(from var(--dl-success-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-success-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));

  --dl-warning-under: color-mix(in srgb-linear, color(from var(--warning-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--dl-surfaces-y));
  --dl-warning-text:  color-mix(in srgb-linear, color(from var(--dl-warning-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-warning-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--dl-warning-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --dl-warning-line:  color-mix(in srgb-linear, color(from var(--warning) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-warning-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--dl-warning-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --warning-solid:    var(--dl-warning);
  --warning-on-solid: color(from var(--dl-warning) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
  --warning-soft:     oklab(from color-mix(in oklab, light-dark(oklab(from var(--dl-warning) max(l, 0.7) a b), oklab(from var(--dl-warning) min(l, 0.6) a b)) var(--tint-strength), var(--dl-paper-grey)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
  --warning-on-soft:  light-dark(color(from var(--dl-warning-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-warning-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --warning-line:     light-dark(color(from var(--dl-warning-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-warning-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));

  --dl-danger-under: color-mix(in srgb-linear, color(from var(--danger-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--dl-surfaces-y));
  --dl-danger-text:  color-mix(in srgb-linear, color(from var(--dl-danger-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-danger-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--dl-danger-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --dl-danger-line:  color-mix(in srgb-linear, color(from var(--danger) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-danger-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--dl-danger-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --danger-solid:    var(--dl-danger);
  --danger-on-solid: color(from var(--dl-danger) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
  --danger-soft:     oklab(from color-mix(in oklab, light-dark(oklab(from var(--dl-danger) max(l, 0.7) a b), oklab(from var(--dl-danger) min(l, 0.6) a b)) var(--tint-strength), var(--dl-paper-grey)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
  --danger-on-soft:  light-dark(color(from var(--dl-danger-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-danger-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --danger-line:     light-dark(color(from var(--dl-danger-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-danger-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));

  --dl-info-under: color-mix(in srgb-linear, color(from var(--info-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--dl-surfaces-y));
  --dl-info-text:  color-mix(in srgb-linear, color(from var(--dl-info-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-info-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--dl-info-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --dl-info-line:  color-mix(in srgb-linear, color(from var(--info) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-info-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--dl-info-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
  --info-solid:    var(--dl-info);
  --info-on-solid: color(from var(--dl-info) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
  --info-soft:     oklab(from color-mix(in oklab, light-dark(oklab(from var(--dl-info) max(l, 0.7) a b), oklab(from var(--dl-info) min(l, 0.6) a b)) var(--tint-strength), var(--dl-paper-grey)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
  --info-on-soft:  light-dark(color(from var(--dl-info-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-info-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --info-line:     light-dark(color(from var(--dl-info-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--dl-info-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
  --dl-brand-hover: color-mix(in srgb-linear, color(from light-dark(oklab(from var(--brand-on-soft) calc(l - 0.08) a b), oklab(from var(--brand-on-soft) calc(l + 0.08) a b)) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--dl-brand-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (7 + 0.1) - 0.05), 1))), color(from var(--dl-brand-under) srgb-linear 0 0 0 / calc(clamp(0, (7 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));

  /* ---- Ungrouped: components use these; .is-{group} points them at a group ---- */
  --solid:    var(--brand-solid);
  --on-solid: var(--brand-on-solid);
  --soft:     var(--brand-soft);
  --on-soft:  var(--brand-on-soft);
  --line:     var(--brand-line);

  /* ---- Deprecated: --accent's tokens, renamed --secondary-*. They still work; rename them ---- */
  --accent-solid:    var(--secondary-solid);     /* deprecated: use --secondary-solid */
  --accent-on-solid: var(--secondary-on-solid);  /* deprecated: use --secondary-on-solid */
  --accent-soft:     var(--secondary-soft);      /* deprecated: use --secondary-soft */
  --accent-on-soft:  var(--secondary-on-soft);   /* deprecated: use --secondary-on-soft */
  --accent-line:     var(--secondary-line);      /* deprecated: use --secondary-line */
}
.is-brand     { --solid: var(--brand-solid);     --on-solid: var(--brand-on-solid);     --soft: var(--brand-soft);     --on-soft: var(--brand-on-soft);     --line: var(--brand-line); }
.is-secondary { --solid: var(--secondary-solid); --on-solid: var(--secondary-on-solid); --soft: var(--secondary-soft); --on-soft: var(--secondary-on-soft); --line: var(--secondary-line); }
.is-neutral   { --solid: var(--neutral-solid);   --on-solid: var(--neutral-on-solid);   --soft: var(--neutral-soft);   --on-soft: var(--neutral-on-soft);   --line: var(--neutral-line); }
.is-success   { --solid: var(--success-solid);   --on-solid: var(--success-on-solid);   --soft: var(--success-soft);   --on-soft: var(--success-on-soft);   --line: var(--success-line); }
.is-warning   { --solid: var(--warning-solid);   --on-solid: var(--warning-on-solid);   --soft: var(--warning-soft);   --on-soft: var(--warning-on-soft);   --line: var(--warning-line); }
.is-danger    { --solid: var(--danger-solid);    --on-solid: var(--danger-on-solid);    --soft: var(--danger-soft);    --on-soft: var(--danger-on-soft);    --line: var(--danger-line); }
.is-info      { --solid: var(--info-solid);      --on-solid: var(--info-on-solid);      --soft: var(--info-soft);      --on-soft: var(--info-on-soft);      --line: var(--info-line); }
.is-accent    { --solid: var(--secondary-solid); --on-solid: var(--secondary-on-solid); --soft: var(--secondary-soft); --on-soft: var(--secondary-on-soft); --line: var(--secondary-line); }  /* deprecated: use .is-secondary */
/* A light or dark band: its own scheme, and its own background and text worked out in it */
.is-light { color-scheme: light; background-color: var(--surface); color: var(--text); }
.is-dark  { color-scheme: dark;  background-color: var(--surface); color: var(--text); }
/* ============================================================
   Dials: type and space (dials-scale.css)
   A few dials set every text size and every space size, the way
   Utopia (utopia.fyi) works them out, but the maths runs in the
   browser: change a dial and the whole scale follows. Leading is
   worked out the same way, for whatever size it's used at. This
   file sets no type on any element: only
   dials-base.css does that. Dials live on
   :root (and :host); the derived scale is declared on :root,
   [data-dials] and :host, so a dial set on a [data-dials] element
   re-derives the sizes inside it.
   ============================================================ */
:root, :host {
  /* ---- Dials ---- */
  --screen-min: 360;       /* the screen widths the scale runs between, in px */
  --screen-max: 1240;
  --size-min: 16;          /* body text at the narrowest and widest screens, in px */
  --size-max: 18;
  --ratio-min: 1.2;        /* each step is this much bigger than the last: 1.2 minor third, */
  --ratio-max: 1.25;       /* 1.25 major third, 1.333 perfect fourth, 1.5 fifth, 1.618 golden */
  --space-min: var(--size-min);  /* --space-s at each end, in px: follows body text */
  --space-max: var(--size-max);  /* size unless you set a number */
  --space-density: 1;      /* scales every space size: 0.8 compact, 1.25 roomy */
  --radius-base: 10;       /* corner radius of cards and fields, in px (a number, not a length) */

  /* Faces: set per site, and load them yourself (each theme file names its Google Fonts link) */
  --font-body: ui-sans-serif, system-ui, sans-serif;  /* body text and controls */
  --font-heading: ui-sans-serif, system-ui, sans-serif;  /* headings */
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;  /* code, kbd, samp, pre */

  /* Border widths: every border and outline uses one of these */
  --border-width-s: 1px;   /* hairlines: cards, fields, tables */
  --border-width-m: 2px;   /* emphasis; outline offsets */
  --border-width-l: 3px;   /* focus rings, quote bars, active tabs */

  /* ---- Leading: one dial for the rhythm of the type ---- */
  /* --leading-body: 1.5;      line height at body size (--size-0), unitless. Every larger size keeps the same gap between lines, so it gets proportionally tighter; the space after paragraphs is one body line */
  /* --font-accent: var(--font-body);  a third face, for ledes, pull quotes or buttons; read it as var(--font-accent, var(--font-body)) */
}

:root, [data-dials], :host {
  /* ---- Internal: worked out from the dials, never edited by hand ---- */
  --dl-screen-range: calc(var(--screen-max) - var(--screen-min));
  --dl-fluid: calc((100vw - var(--screen-min) * 1px) / var(--dl-screen-range) * 16);  /* 0 at the narrowest, 16px at the widest */
  --dl-min-0: calc(var(--size-min) / 16);
  --dl-max-0: calc(var(--size-max) / 16);
  --dl-min--1: calc(var(--dl-min-0) / var(--ratio-min));
  --dl-max--1: calc(var(--dl-max-0) / var(--ratio-max));
  --dl-min--2: calc(var(--dl-min--1) / var(--ratio-min));
  --dl-max--2: calc(var(--dl-max--1) / var(--ratio-max));
  --dl-min-1: calc(var(--dl-min-0) * var(--ratio-min));
  --dl-max-1: calc(var(--dl-max-0) * var(--ratio-max));
  --dl-min-2: calc(var(--dl-min-1) * var(--ratio-min));
  --dl-max-2: calc(var(--dl-max-1) * var(--ratio-max));
  --dl-min-3: calc(var(--dl-min-2) * var(--ratio-min));
  --dl-max-3: calc(var(--dl-max-2) * var(--ratio-max));
  --dl-min-4: calc(var(--dl-min-3) * var(--ratio-min));
  --dl-max-4: calc(var(--dl-max-3) * var(--ratio-max));
  --dl-min-5: calc(var(--dl-min-4) * var(--ratio-min));
  --dl-max-5: calc(var(--dl-max-4) * var(--ratio-max));
  --dl-min-6: calc(var(--dl-min-5) * var(--ratio-min));
  --dl-max-6: calc(var(--dl-max-5) * var(--ratio-max));
  --dl-min-7: calc(var(--dl-min-6) * var(--ratio-min));
  --dl-max-7: calc(var(--dl-max-6) * var(--ratio-max));
  --dl-min-8: calc(var(--dl-min-7) * var(--ratio-min));
  --dl-max-8: calc(var(--dl-max-7) * var(--ratio-max));

  /* ---- Font sizes: --size-0 is body text; each number up or down is one step of the ratio,
     running in a straight line between its two ends ---- */
  --size--2: clamp(min(var(--dl-min--2), var(--dl-max--2)) * 1rem, var(--dl-min--2) * 1rem + (var(--dl-max--2) - var(--dl-min--2)) * var(--dl-fluid), max(var(--dl-min--2), var(--dl-max--2)) * 1rem);
  --size--1: clamp(min(var(--dl-min--1), var(--dl-max--1)) * 1rem, var(--dl-min--1) * 1rem + (var(--dl-max--1) - var(--dl-min--1)) * var(--dl-fluid), max(var(--dl-min--1), var(--dl-max--1)) * 1rem);
  --size-0: clamp(min(var(--dl-min-0), var(--dl-max-0)) * 1rem, var(--dl-min-0) * 1rem + (var(--dl-max-0) - var(--dl-min-0)) * var(--dl-fluid), max(var(--dl-min-0), var(--dl-max-0)) * 1rem);
  --size-1: clamp(min(var(--dl-min-1), var(--dl-max-1)) * 1rem, var(--dl-min-1) * 1rem + (var(--dl-max-1) - var(--dl-min-1)) * var(--dl-fluid), max(var(--dl-min-1), var(--dl-max-1)) * 1rem);
  --size-2: clamp(min(var(--dl-min-2), var(--dl-max-2)) * 1rem, var(--dl-min-2) * 1rem + (var(--dl-max-2) - var(--dl-min-2)) * var(--dl-fluid), max(var(--dl-min-2), var(--dl-max-2)) * 1rem);
  --size-3: clamp(min(var(--dl-min-3), var(--dl-max-3)) * 1rem, var(--dl-min-3) * 1rem + (var(--dl-max-3) - var(--dl-min-3)) * var(--dl-fluid), max(var(--dl-min-3), var(--dl-max-3)) * 1rem);
  --size-4: clamp(min(var(--dl-min-4), var(--dl-max-4)) * 1rem, var(--dl-min-4) * 1rem + (var(--dl-max-4) - var(--dl-min-4)) * var(--dl-fluid), max(var(--dl-min-4), var(--dl-max-4)) * 1rem);
  --size-5: clamp(min(var(--dl-min-5), var(--dl-max-5)) * 1rem, var(--dl-min-5) * 1rem + (var(--dl-max-5) - var(--dl-min-5)) * var(--dl-fluid), max(var(--dl-min-5), var(--dl-max-5)) * 1rem);
  --size-6: clamp(min(var(--dl-min-6), var(--dl-max-6)) * 1rem, var(--dl-min-6) * 1rem + (var(--dl-max-6) - var(--dl-min-6)) * var(--dl-fluid), max(var(--dl-min-6), var(--dl-max-6)) * 1rem);
  --size-7: clamp(min(var(--dl-min-7), var(--dl-max-7)) * 1rem, var(--dl-min-7) * 1rem + (var(--dl-max-7) - var(--dl-min-7)) * var(--dl-fluid), max(var(--dl-min-7), var(--dl-max-7)) * 1rem);  /* display type */
  --size-8: clamp(min(var(--dl-min-8), var(--dl-max-8)) * 1rem, var(--dl-min-8) * 1rem + (var(--dl-max-8) - var(--dl-min-8)) * var(--dl-fluid), max(var(--dl-min-8), var(--dl-max-8)) * 1rem);  /* display type: the top of the scale */

  /* ---- Leading: worked out for the size of the element it's used on ---- */
  /* --leading is a length: apply it on each element that sets a font size (dials-base.css applies it to every
     element), never on a wrapper for its children to inherit, where it would pass on one fixed length. */
  --dl-leading-body: var(--leading-body, 1.5);
  /* the body's gap between lines at every larger size (1em + the body gap), so bigger text gets proportionally
     tighter lines; smaller text keeps the body ratio; no size goes below 1.05 */
  --leading: max(1.05em, min(var(--dl-leading-body) * 1em, 1em + (var(--dl-leading-body) - 1) * var(--size-0)));  /* line height for the size it's on: the same gap between lines as body text at every larger size */
  --space-paragraph: calc(var(--dl-leading-body) * var(--size-0));  /* one body line: the space after paragraphs and other blocks; headings take two above and half below */

  /* ---- Space: multiples of the space base (Utopia's t-shirt sizes), times the density ---- */
  --dl-space-min: calc(var(--space-min) / 16 * var(--space-density));
  --dl-space-max: calc(var(--space-max) / 16 * var(--space-density));
  --space-3xs: clamp(calc(var(--dl-space-min) * 0.25rem), calc(var(--dl-space-min) * 0.25rem + (var(--dl-space-max) * 0.25 - var(--dl-space-min) * 0.25) * var(--dl-fluid)), calc(var(--dl-space-max) * 0.25rem));
  --space-2xs: clamp(calc(var(--dl-space-min) * 0.5rem), calc(var(--dl-space-min) * 0.5rem + (var(--dl-space-max) * 0.5 - var(--dl-space-min) * 0.5) * var(--dl-fluid)), calc(var(--dl-space-max) * 0.5rem));
  --space-xs: clamp(calc(var(--dl-space-min) * 0.75rem), calc(var(--dl-space-min) * 0.75rem + (var(--dl-space-max) * 0.75 - var(--dl-space-min) * 0.75) * var(--dl-fluid)), calc(var(--dl-space-max) * 0.75rem));
  --space-s: clamp(calc(var(--dl-space-min) * 1rem), calc(var(--dl-space-min) * 1rem + (var(--dl-space-max) * 1 - var(--dl-space-min) * 1) * var(--dl-fluid)), calc(var(--dl-space-max) * 1rem));
  --space-m: clamp(calc(var(--dl-space-min) * 1.5rem), calc(var(--dl-space-min) * 1.5rem + (var(--dl-space-max) * 1.5 - var(--dl-space-min) * 1.5) * var(--dl-fluid)), calc(var(--dl-space-max) * 1.5rem));
  --space-l: clamp(calc(var(--dl-space-min) * 2rem), calc(var(--dl-space-min) * 2rem + (var(--dl-space-max) * 2 - var(--dl-space-min) * 2) * var(--dl-fluid)), calc(var(--dl-space-max) * 2rem));
  --space-xl: clamp(calc(var(--dl-space-min) * 3rem), calc(var(--dl-space-min) * 3rem + (var(--dl-space-max) * 3 - var(--dl-space-min) * 3) * var(--dl-fluid)), calc(var(--dl-space-max) * 3rem));
  --space-2xl: clamp(calc(var(--dl-space-min) * 4rem), calc(var(--dl-space-min) * 4rem + (var(--dl-space-max) * 4 - var(--dl-space-min) * 4) * var(--dl-fluid)), calc(var(--dl-space-max) * 4rem));
  --space-3xl: clamp(calc(var(--dl-space-min) * 6rem), calc(var(--dl-space-min) * 6rem + (var(--dl-space-max) * 6 - var(--dl-space-min) * 6) * var(--dl-fluid)), calc(var(--dl-space-max) * 6rem));
  --space-4xl: clamp(calc(var(--dl-space-min) * 8rem), calc(var(--dl-space-min) * 8rem + (var(--dl-space-max) * 8 - var(--dl-space-min) * 8) * var(--dl-fluid)), calc(var(--dl-space-max) * 8rem));
  /* One-up pairs: small on phones, the next size up on desktops */
  --space-3xs-2xs: clamp(calc(var(--dl-space-min) * 0.25rem), calc(var(--dl-space-min) * 0.25rem + (var(--dl-space-max) * 0.5 - var(--dl-space-min) * 0.25) * var(--dl-fluid)), calc(var(--dl-space-max) * 0.5rem));
  --space-2xs-xs: clamp(calc(var(--dl-space-min) * 0.5rem), calc(var(--dl-space-min) * 0.5rem + (var(--dl-space-max) * 0.75 - var(--dl-space-min) * 0.5) * var(--dl-fluid)), calc(var(--dl-space-max) * 0.75rem));
  --space-xs-s: clamp(calc(var(--dl-space-min) * 0.75rem), calc(var(--dl-space-min) * 0.75rem + (var(--dl-space-max) * 1 - var(--dl-space-min) * 0.75) * var(--dl-fluid)), calc(var(--dl-space-max) * 1rem));
  --space-s-m: clamp(calc(var(--dl-space-min) * 1rem), calc(var(--dl-space-min) * 1rem + (var(--dl-space-max) * 1.5 - var(--dl-space-min) * 1) * var(--dl-fluid)), calc(var(--dl-space-max) * 1.5rem));
  --space-m-l: clamp(calc(var(--dl-space-min) * 1.5rem), calc(var(--dl-space-min) * 1.5rem + (var(--dl-space-max) * 2 - var(--dl-space-min) * 1.5) * var(--dl-fluid)), calc(var(--dl-space-max) * 2rem));
  --space-l-xl: clamp(calc(var(--dl-space-min) * 2rem), calc(var(--dl-space-min) * 2rem + (var(--dl-space-max) * 3 - var(--dl-space-min) * 2) * var(--dl-fluid)), calc(var(--dl-space-max) * 3rem));
  --space-xl-2xl: clamp(calc(var(--dl-space-min) * 3rem), calc(var(--dl-space-min) * 3rem + (var(--dl-space-max) * 4 - var(--dl-space-min) * 3) * var(--dl-fluid)), calc(var(--dl-space-max) * 4rem));
  --space-2xl-3xl: clamp(calc(var(--dl-space-min) * 4rem), calc(var(--dl-space-min) * 4rem + (var(--dl-space-max) * 6 - var(--dl-space-min) * 4) * var(--dl-fluid)), calc(var(--dl-space-max) * 6rem));
  --space-3xl-4xl: clamp(calc(var(--dl-space-min) * 6rem), calc(var(--dl-space-min) * 6rem + (var(--dl-space-max) * 8 - var(--dl-space-min) * 6) * var(--dl-fluid)), calc(var(--dl-space-max) * 8rem));
  /* Skip pairs, for gutters and section padding that need a bigger swing */
  --space-s-l: clamp(calc(var(--dl-space-min) * 1rem), calc(var(--dl-space-min) * 1rem + (var(--dl-space-max) * 2 - var(--dl-space-min) * 1) * var(--dl-fluid)), calc(var(--dl-space-max) * 2rem));
  --space-m-xl: clamp(calc(var(--dl-space-min) * 1.5rem), calc(var(--dl-space-min) * 1.5rem + (var(--dl-space-max) * 3 - var(--dl-space-min) * 1.5) * var(--dl-fluid)), calc(var(--dl-space-max) * 3rem));
  --space-l-2xl: clamp(calc(var(--dl-space-min) * 2rem), calc(var(--dl-space-min) * 2rem + (var(--dl-space-max) * 4 - var(--dl-space-min) * 2) * var(--dl-fluid)), calc(var(--dl-space-max) * 4rem));

  /* ---- Corners ---- */
  --radius-s: calc(var(--radius-base) * 0.5px);
  --radius-m: calc(var(--radius-base) * 1px);
  --radius-l: calc(var(--radius-base) * 1.6px);
  --radius-pill: 999px;
}
/* ============================================================
   Dials: the fallback (src/fallback.css, built into the end of dials.css)
   For browsers with color-mix() but without relative colour,
   light-dark(), or a relative colour from light-dark(): Chrome and
   Edge 111-130, Safari 16.2-17, Firefox 113-132. (Chrome 125-130 and
   Firefox 128-132 have the first two but throw away a relative colour
   from light-dark(), which the chain reads through var()s everywhere,
   so before 0.4.3 they took the chain and lost most colour tokens.
   Measured: Firefox 128-133 and Chrome 125, 128, 130 and 132.)
   They can't work out the derived chain above, so this
   block works every public colour token out again from the same
   dials, with color-mix() alone. It comes after the chain and uses
   the same selectors, so it wins there; a site's own file, loaded
   after dials.css, still wins over it. It never sets a dial.
   Approximations, held to the same contrast as the chain (the
   contrast check's --fallback mode):
   - The page is light. .is-dark bands are dark, .is-light bands light.
   - Paper and ink come from --grey at fixed mixes, so the four
     lightness dials, --balance, --dark-lift, --tint-vividness and
     --text-contrast have no effect. --paper-light and friends do.
   - on-solid text can't follow the fill's luminance: each group has a
     fixed choice, and its fill is pulled a fixed amount towards the
     other end so the text keeps 4.5:1 in every Dials theme. White on
     brand, secondary, danger and info, whose fills are darkened; black
     on success, whose fill is lightened, and warning, as set.
   - Coloured text and lines can't move only as far as their target
     needs: on-soft is the dial mixed a fixed amount into ink (so --link
     and --focus too), line a smaller amount, and --link-hover further
     still. The amounts hold 4.5:1 and 3:1 on every surface and soft
     tint, for every theme and for extreme dials, so they over-shoot for
     most colours. Ink is near-black on a light page and near-white in an
     .is-dark band, so the same mix works in both.
   - No calc() and no percentages computed inside color-mix(): only
     literal percentages and dials that are one (--tint-strength).
   ============================================================ */
@supports not ((color: oklch(from red l c h)) and (color: light-dark(red, red)) and (color: oklab(from light-dark(red, red) l a b))) {
  /* ---- Internal: the scheme switches, literal percentages a band can flip ---- */
  :root, :host, .is-light {
    color-scheme: light;
    --dl-fb-dark: 0%;     /* how much of the dark paper and ink to use */
    --dl-fb-raise: 38%;   /* how much white lifts --surface-raised */
    --dl-fb-shadow: 10%;  /* the strength of shadows */
  }
  .is-dark {
    color-scheme: dark;
    --dl-fb-dark: 100%;
    --dl-fb-raise: 4%;
    --dl-fb-shadow: 45%;
  }

  /* Bands are declared here too, so every token is worked out again in a band's own scheme */
  :root, [data-dials], :host, .is-light, .is-dark {
    /* ---- Internal: paper, ink and the six fills ---- */
    --dl-paper-light: var(--paper-light, color-mix(in oklab, var(--grey) 20%, white));
    --dl-paper-dark:  var(--paper-dark,  color-mix(in oklab, var(--grey) 30%, black));
    --dl-ink-light:   var(--ink-light,   color-mix(in oklab, var(--grey) 34%, black));
    --dl-ink-dark:    var(--ink-dark,    color-mix(in oklab, var(--grey) 17%, white));
    --dl-paper: color-mix(in oklab, var(--dl-paper-dark) var(--dl-fb-dark), var(--dl-paper-light));
    --dl-ink:   color-mix(in oklab, var(--dl-ink-dark) var(--dl-fb-dark), var(--dl-ink-light));
    --dl-brand:   color-mix(in oklab, var(--brand) 72%, black);
    --dl-secondary: color-mix(in oklab, var(--accent, var(--secondary)) 67%, black);
    --dl-success: color-mix(in oklab, var(--success) 85%, white);
    --dl-warning: var(--warning);
    --dl-danger:  color-mix(in oklab, var(--danger) 78%, black);
    --dl-info:    color-mix(in oklab, var(--info) 61%, black);

    /* ---- Surfaces ---- */
    --surface:         var(--dl-paper);
    --surface-raised:  color-mix(in oklab, white var(--dl-fb-raise), var(--dl-paper));
    --surface-lowered: color-mix(in oklab, var(--dl-ink) 4%, var(--dl-paper));
    --surface-sunken:  color-mix(in oklab, var(--dl-ink) 8%, var(--dl-paper));
    --surface-overlay: color-mix(in oklab, black 45%, transparent);

    /* ---- Text: a step stronger than the chain's defaults, to cover --text-contrast ---- */
    --text-strong:   var(--dl-ink);
    --text:          color-mix(in oklab, var(--dl-ink) 94%, var(--dl-paper));
    --text-muted:    color-mix(in oklab, var(--dl-ink) 89%, var(--dl-paper));
    --text-quiet:    color-mix(in oklab, var(--dl-ink) 86%, var(--dl-paper));
    --text-disabled: color-mix(in oklab, var(--dl-ink) 38%, var(--dl-paper));
    --link:          var(--brand-on-soft);
    --link-hover:    color-mix(in oklab, var(--brand) 20%, var(--dl-ink));

    /* ---- Lines and effects ---- */
    --border-quiet:  color-mix(in oklab, var(--dl-ink) 7%, var(--dl-paper));
    --border:        color-mix(in oklab, var(--dl-ink) 13%, var(--dl-paper));
    --border-strong: color-mix(in oklab, var(--dl-ink) 64%, var(--dl-paper));
    --focus:         var(--brand-on-soft);
    --selection:     color-mix(in oklab, var(--brand) 22%, var(--dl-paper));
    --shadow-color:  color-mix(in oklab, black var(--dl-fb-shadow), transparent);
    --shadow-s: 0 1px 3px var(--shadow-color);
    --shadow-m: 0 4px 14px var(--shadow-color);
    --shadow-l: 0 12px 32px var(--shadow-color);
    --mix-hover:  black 12%;
    --mix-active: black 22%;

    /* ---- Groups: soft mixed into paper, on-soft and line mixed towards ink ---- */
    --brand-solid:    var(--dl-brand);
    --brand-on-solid: white;
    --brand-soft:     color-mix(in oklab, var(--brand) var(--tint-strength), var(--dl-paper));
    --brand-on-soft:  color-mix(in oklab, var(--brand) 26%, var(--dl-ink));
    --brand-line:     color-mix(in oklab, var(--brand) 40%, var(--dl-ink));

    --secondary-solid:    var(--dl-secondary);
    --secondary-on-solid: white;
    --secondary-soft:     color-mix(in oklab, var(--accent, var(--secondary)) var(--tint-strength), var(--dl-paper));
    --secondary-on-soft:  color-mix(in oklab, var(--accent, var(--secondary)) 26%, var(--dl-ink));
    --secondary-line:     color-mix(in oklab, var(--accent, var(--secondary)) 40%, var(--dl-ink));

    --neutral-solid:    var(--dl-ink);
    --neutral-on-solid: var(--dl-paper);
    --neutral-soft:     var(--surface-lowered);
    --neutral-on-soft:  var(--text);
    --neutral-line:     var(--border);

    --success-solid:    var(--dl-success);
    --success-on-solid: black;
    --success-soft:     color-mix(in oklab, var(--success) var(--tint-strength), var(--dl-paper));
    --success-on-soft:  color-mix(in oklab, var(--success) 26%, var(--dl-ink));
    --success-line:     color-mix(in oklab, var(--success) 40%, var(--dl-ink));

    --warning-solid:    var(--dl-warning);
    --warning-on-solid: black;
    --warning-soft:     color-mix(in oklab, var(--warning) var(--tint-strength), var(--dl-paper));
    --warning-on-soft:  color-mix(in oklab, var(--warning) 26%, var(--dl-ink));
    --warning-line:     color-mix(in oklab, var(--warning) 40%, var(--dl-ink));

    --danger-solid:    var(--dl-danger);
    --danger-on-solid: white;
    --danger-soft:     color-mix(in oklab, var(--danger) var(--tint-strength), var(--dl-paper));
    --danger-on-soft:  color-mix(in oklab, var(--danger) 26%, var(--dl-ink));
    --danger-line:     color-mix(in oklab, var(--danger) 40%, var(--dl-ink));

    --info-solid:    var(--dl-info);
    --info-on-solid: white;
    --info-soft:     color-mix(in oklab, var(--info) var(--tint-strength), var(--dl-paper));
    --info-on-soft:  color-mix(in oklab, var(--info) 26%, var(--dl-ink));
    --info-line:     color-mix(in oklab, var(--info) 40%, var(--dl-ink));

    /* ---- Ungrouped ---- */
    --solid:    var(--brand-solid);
    --on-solid: var(--brand-on-solid);
    --soft:     var(--brand-soft);
    --on-soft:  var(--brand-on-soft);
    --line:     var(--brand-line);

    /* ---- Deprecated: the old names for the secondary group ---- */
    --accent-solid:    var(--secondary-solid);
    --accent-on-solid: var(--secondary-on-solid);
    --accent-soft:     var(--secondary-soft);
    --accent-on-soft:  var(--secondary-on-soft);
    --accent-line:     var(--secondary-line);
  }
  /* the group classes again, so they still win on a [data-dials] element or a band */
  .is-brand     { --solid: var(--brand-solid);     --on-solid: var(--brand-on-solid);     --soft: var(--brand-soft);     --on-soft: var(--brand-on-soft);     --line: var(--brand-line); }
  .is-secondary { --solid: var(--secondary-solid); --on-solid: var(--secondary-on-solid); --soft: var(--secondary-soft); --on-soft: var(--secondary-on-soft); --line: var(--secondary-line); }
  .is-neutral   { --solid: var(--neutral-solid);   --on-solid: var(--neutral-on-solid);   --soft: var(--neutral-soft);   --on-soft: var(--neutral-on-soft);   --line: var(--neutral-line); }
  .is-success   { --solid: var(--success-solid);   --on-solid: var(--success-on-solid);   --soft: var(--success-soft);   --on-soft: var(--success-on-soft);   --line: var(--success-line); }
  .is-warning   { --solid: var(--warning-solid);   --on-solid: var(--warning-on-solid);   --soft: var(--warning-soft);   --on-soft: var(--warning-on-soft);   --line: var(--warning-line); }
  .is-danger    { --solid: var(--danger-solid);    --on-solid: var(--danger-on-solid);    --soft: var(--danger-soft);    --on-soft: var(--danger-on-soft);    --line: var(--danger-line); }
  .is-info      { --solid: var(--info-solid);      --on-solid: var(--info-on-solid);      --soft: var(--info-soft);      --on-soft: var(--info-on-soft);      --line: var(--info-line); }
  .is-accent    { --solid: var(--secondary-solid); --on-solid: var(--secondary-on-solid); --soft: var(--secondary-soft); --on-soft: var(--secondary-on-soft); --line: var(--secondary-line); }
}
/* Generated by tools/fallback.mjs from dials.css (src/colour.css 192f968f0b78d4df): the defaults in
   the light scheme. Don't edit. The last resort, for browsers without color-mix() (Chrome and Edge
   before 111, Safari before 16.2, Firefox before 113, all 2022 or older): they can't work anything
   out, so every colour token is flat and they get the house colours, light only. Colour dials have no
   effect there; type and space work as normal. */
@supports not (color: color-mix(in srgb, red, blue)) {
  :root, [data-dials], :host, .is-light, .is-dark {
    color-scheme: light;
    --surface: #f9fafc;
    --surface-raised: #feffff;
    --surface-lowered: #eef0f2;
    --surface-sunken: #e4e5e7;
    --surface-overlay: rgb(0 0 0 / 45%);
    --text-strong: #151619;
    --text: #2f3033;
    --text-muted: #505154;
    --text-quiet: #5d5e61;
    --text-disabled: #999a9d;
    --link: #2362e9;
    --link-hover: #0743c2;
    --border-quiet: #e7e8ea;
    --border: #d7d8db;
    --border-strong: #86878a;
    --focus: #2362e9;
    --selection: #c9dbfc;
    --shadow-color: rgb(0 0 0 / 10%);
    --shadow-s: 0 1px 3px rgb(0 0 0 / 10%);
    --shadow-m: 0 4px 14px rgb(0 0 0 / 10%);
    --shadow-l: 0 12px 32px rgb(0 0 0 / 10%);
    --mix-hover: black 12%;
    --mix-active: black 22%;
    --brand-solid: #2463eb;
    --brand-on-solid: #ffffff;
    --brand-soft: #e9f1ff;
    --brand-on-soft: #2362e9;
    --brand-line: #2463eb;
    --secondary-solid: #7c51c8;
    --secondary-on-solid: #ffffff;
    --secondary-soft: #f1eefc;
    --secondary-on-soft: #7c51c8;
    --secondary-line: #7c51c8;
    --neutral-solid: #151619;
    --neutral-on-solid: #f9fafc;
    --neutral-soft: #eef0f2;
    --neutral-on-soft: #2f3033;
    --neutral-line: #d7d8db;
    --success-solid: #239f50;
    --success-on-solid: #000000;
    --success-soft: #eaf4eb;
    --success-on-soft: #197c3d;
    --success-line: #229c4f;
    --warning-solid: #f59f0a;
    --warning-on-solid: #000000;
    --warning-soft: #faf1e7;
    --warning-on-soft: #976003;
    --warning-line: #bd7906;
    --danger-solid: #dc2828;
    --danger-on-solid: #ffffff;
    --danger-soft: #ffece9;
    --danger-on-soft: #d02525;
    --danger-line: #dc2828;
    --info-solid: #0c8eca;
    --info-on-solid: #000000;
    --info-soft: #e9f2f9;
    --info-on-soft: #0773a4;
    --info-line: #0c8eca;
    --accent-solid: #7c51c8;
    --accent-on-solid: #ffffff;
    --accent-soft: #f1eefc;
    --accent-on-soft: #7c51c8;
    --accent-line: #7c51c8;
  }
}
/* ═══ dials:end (Dials) ═════════════════════════════════════════════════ */

/* ═══ This site's dials ═════════════════════════════════════════════════
 * The ONLY place a colour or a scale value is typed. The values reproduce
 * the site's look before Dials (live's crimson, blue and navy, the white page
 * and black ink, and its type and space knobs), so it looks the same. Light
 * only, as live.
 * ═══════════════════════════════════════════════════════════════════════ */
:root {
    color-scheme: light;   /* light only, as live: the practice has no dark palette */

    /* Colour dials: live's own colours (measured 2026-09-11), written as HSL
     * to one decimal place, which paints the same hex (in each comment). Each
     * is a group with five roles: --brand-solid, --brand-on-solid,
     * --brand-soft, --brand-on-soft and --brand-line.
     *  - The crimson and the navy pass every contrast target as they are, so
     *    every role of theirs paints the hex itself, and their lettering is
     *    white (Dials' on-solid).
     *  - The blue is too light for white text (2.99:1), so its lettering is
     *    black everywhere (the owner's decision, 4 Nov 2026), Dials' own
     *    on-solid for this fill. Its band grounds and strips paint the hex;
     *    the nav, Book, CLICK HERE, the footer call bar and the service tiles
     *    sit on a darker blue derived from this dial in the site layer
     *    (--brand-blue-surface, the owner's #008AE6), and blue TEXT on white
     *    on --brand-blue-text (#007ACC).
     *  - --warning is live's yellow, the wedge under the registrars' and the
     *    audiologist's heroes: the site shows no status messages, and a
     *    yellow is what a warning looks like anyway. */
    --brand: hsl(0 98.8% 31.4%);         /* #9F0101, the crimson: buttons, accents, links, the focus ring */
    --secondary: hsl(204 100% 50%);      /* #0099FF, the blue: band grounds, strips, the team band */
    --tertiary: hsl(240.7 100% 32.7%);   /* #0200A7, the navy: sub-headings, the footer headings, dividers, hovers */
    --success: hsl(126 46% 33%);         /* the status colours: the template's, apart from the yellow */
    --warning: hsl(60 100% 60%);         /* #FFFF33, live's yellow (see above) */
    --danger: hsl(3 56% 48%);
    --info: hsl(202 64% 41%);
    --grey: hsl(0 0% 50%);               /* live's greys are pure (#767676, #444444, #ECECEC): no tint */

    /* Paper and ink, exact: live's white page and its black headings. Body
     * text (--text) is 86% of the ink into the paper, #090909. */
    --paper-light: hsl(0 0% 100%);       /* #FFFFFF */
    --ink-light: hsl(0 0% 0%);           /* #000000 */

    /* Type and space: live sets a plain 16px root and fixed px sizes; these
     * are the anchors fitted to its measured ladder (body 15px at 390 to 16px
     * at 1440; 40px and 55px land exactly at 1440, 35px at 390). Spacing
     * lands on live's 10/20/30/40/60/80/120px rhythm at 1440 (2xs 10, s 20,
     * m 30, l 40, xl 60, 2xl 80, 3xl 120) and shrinks to 0.8 of that on a
     * phone (the owner's decision, 2026-10-03). */
    --screen-min: 390;
    --screen-max: 1440;
    --size-min: 15;
    --size-max: 16;
    --ratio-min: 1.112;
    --ratio-max: 1.165;
    --space-min: 16;
    --space-max: 20;
    --space-density: 1;

    /* Type: Dials v0.4 has one type dial, --leading-body, the body text's
     * line height: 1.5, as live. Live sets line height by role in px over
     * fixed-px type, re-expressed as ratios in the site's own tokens below,
     * and the site's rules read those, so each holds at every size. Weights
     * and letter spacing are written on the elements as plain numbers and em:
     * body 400, the sub-headings, card titles and practitioners'
     * qualifications 600, headings and bold 700; capitals take 0.035em,
     * live's 0.5px on its 14-16px button labels, and the site's own titles
     * set none, as live. */
    --leading-body: 1.5;

    /* v0.4 moved these defaults; pinned at v0.3's so every colour stays as it
     * was. The site is light only and has no .is-dark band, but check-contrast
     * scores the dark scheme too, and the pins keep it where it was. */
    --dark-lift: 0.04;
    --tint-strength: 8%;
    --paper-dark-lightness: 0.186;
    --ink-dark-lightness: 0.934;

    /* Priority Health's own type tokens: values measured off live, role by
     * role, that the dials do not hold. v0.4's --leading keeps body text's
     * gap between lines at larger sizes, which lands none of these leadings
     * (live's are flat ratios per role), and live sets two weights beside
     * the three above. */
    --leading-headline: 1.08; /* headings and display type at a flat line height: the hero and page titles, the band headings */
    --leading-heading: 1.2;   /* the large titles: whole-person care, the team, the practitioner label, staff names */
    --leading-snug: 1.3;      /* the sub-titles, card titles, the nav, fee figures */
    --leading-lede: 1.6;      /* the inner-page hero's lede */
    --leading-copy: 1.7;      /* the prose that runs 27px on 16px: staff, resources, the footer blurb */
    --leading-list: 1.82;     /* the footer's link rows: live's 25px on 13.7px */
    --leading-appt: 1.93;     /* the appointment band's copy: live's 36px on 18.6px */
    --leading-welcome: 2.125; /* the welcome band's copy: live's 34px on 16px */
    --tracking-wide: 0.08em;  /* the hero's Book button: live's wide label */
    --weight-medium: 500;     /* live's heading and link weight: band headings, names, the nav button */
    --weight-heavy: 800;      /* the fee figures */

    /* Corners: --radius-s 8px (photos, the about card), --radius-m 16px,
     * --radius-l 25.6px; live's 3px corner (the Book buttons, fields, chips
     * and cards) is --radius-2xs, its own value. Accent rules are 4px. */
    --radius-base: 16;
    --radius-2xs: 3px;
    --border-width-l: 4px;

    /* Faces: the browser's UI stack for body and headings (live's headings
     * fall back to it), IBM Plex Sans for the hero, the appointment band and
     * the header phone, and Roboto for the contact band (Google Fonts, in
     * each page's <head>). */
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: var(--font-body);
    --font-accent: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-roboto: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;   /* a fourth face: the contact band */
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── The tertiary group ───────────────────────────────────────────────────
 * A third brand colour, typically doing button and CTA work, that is neither
 * a tint of the brand nor a status colour (practices routinely have one:
 * "Button Brown", "Morning Orange"). Dials has no third brand group, so the
 * template adds one with the same five roles, worked out the way Dials v0.2.0
 * works out its own groups (each formula is Dials' brand formula with the
 * tertiary colour in it), from public tokens only. Set --tertiary above;
 * never set these. class="is-tertiary" points --solid and friends at it,
 * like .is-secondary. Declared on bands too, so a band's group follows the
 * band's own scheme.
 *
 *   --tertiary-on-soft  the fill, moved only as far as 4.5:1 needs on the
 *                       least contrasting of its soft tint, --surface-lowered
 *                       and --surface-raised; a colour that passes is kept
 *   --tertiary-line     the dial, moved only as far as 3:1 needs, the same way
 *
 * Dials carries the numbers those two need in its internal --dl-* plumbing,
 * which nothing outside Dials may read, so the template works the same
 * numbers out again from public tokens in its own --tpl-* properties: the
 * luminance of --surface-lowered and --surface-raised (Dials' --dl-surfaces-y)
 * and of the soft tint, and the colour carrying its target. They are the
 * template's plumbing: never use or set a --tpl-* property anywhere else. */
:root, [data-dials], .is-light, .is-dark {
    --tpl-tertiary-base:  oklab(from var(--tertiary) calc(l + (var(--fill-lightness) - l) * var(--balance)) a b);
    --tertiary-solid:     light-dark(var(--tpl-tertiary-base), oklab(from var(--tpl-tertiary-base) calc(l + var(--dark-lift)) a b));
    --tertiary-on-solid:  color(from var(--tertiary-solid) srgb-linear calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) calc(clamp(0, (clamp(0.175, var(--white-text-until), 0.18333) - (0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))) * 1000000, 1)) / 1);
    --tertiary-soft:      oklab(from color-mix(in oklab, light-dark(oklab(from var(--tertiary-solid) max(l, 0.7) a b), oklab(from var(--tertiary-solid) min(l, 0.6) a b)) var(--tint-strength), oklab(from var(--surface) l 0 0)) l calc(a * var(--tint-vividness)) calc(b * var(--tint-vividness)));
    --tpl-surfaces-y:     color-mix(in srgb-linear, color(from var(--surface-lowered) srgb-linear 0 calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0), color(from var(--surface-raised) srgb-linear 0 0 calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))));
    --tpl-tertiary-under: color-mix(in srgb-linear, color(from var(--tertiary-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--tpl-surfaces-y));
    --tpl-tertiary-text:  color-mix(in srgb-linear, color(from var(--tpl-tertiary-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
    --tpl-tertiary-line:  color-mix(in srgb-linear, color(from var(--tertiary) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
    --tertiary-on-soft:   light-dark(color(from var(--tpl-tertiary-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--tpl-tertiary-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
    --tertiary-line:      light-dark(color(from var(--tpl-tertiary-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--tpl-tertiary-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
}
.is-tertiary { --solid: var(--tertiary-solid); --on-solid: var(--tertiary-on-solid); --soft: var(--tertiary-soft); --on-soft: var(--tertiary-on-soft); --line: var(--tertiary-line); }
/* The tertiary group in older browsers: without relative colour or
 * light-dark() (iOS 16 and 17, Safari before 18, Chrome and Edge before 123,
 * Firefox before 128) the derivation above cannot be worked out, and Dials'
 * own fallback covers only Dials' groups. So, the way Dials' fallback does
 * its groups, under the same condition and with the same selectors as the
 * derivation: the five roles again with color-mix(in oklab, ...) alone, from
 * --tertiary and the paper (--surface) and ink (--text-strong) Dials'
 * fallback has already worked out. As in Dials v0.2.0's fallback, on-soft is
 * the colour mixed 26% into ink and the line 40% into ink; neither can move
 * only as far as it needs there, so both over-shoot for most colours. Text
 * on the fill is a fixed white, with the fill pulled towards black as Dials
 * pulls --brand (72%), so it keeps 4.5:1. A site with a very light
 * --tertiary checks it: check-contrast.mjs --fallback. */
@supports not ((color: oklch(from red l c h)) and (color: light-dark(red, red)) and (color: oklab(from light-dark(red, red) l a b))) {
    :root, [data-dials], .is-light, .is-dark {
        --tertiary-solid:    color-mix(in oklab, var(--tertiary) 72%, black);
        --tertiary-on-solid: white;
        --tertiary-soft:     color-mix(in oklab, var(--tertiary) var(--tint-strength), var(--surface));
        --tertiary-on-soft:  color-mix(in oklab, var(--tertiary) 26%, var(--text-strong));
        --tertiary-line:     color-mix(in oklab, var(--tertiary) 40%, var(--text-strong));
    }
}

/* ── The template's own tokens ────────────────────────────────────────────
 * What Dials does not cover: the measure, the grid, the shared control
 * corner, the tap target, layers and motion. None of them is a colour, a text
 * size or a space size. Line height is Dials' --leading; weights and letter
 * spacing are written on the elements that use them, as plain numbers and em
 * (the template's old --leading-*, --tracking-* and --weight-* are in "Old
 * names" below). */
:root {
    /* --- Weight -------------------------------------------------------- */
    /* THREE WEIGHTS, DELIBERATELY: 400 body, 600 emphasis (nav, labels,
     * buttons, eyebrows, strong) and 700 headline. A fourth needs a reason:
     * the face has a visibly distinct cut AND the three are not creating
     * enough contrast. A flat hierarchy is almost always a spacing or size
     * problem, not a weight problem. */

    /* --- Measure ------------------------------------------------------- */
    --measure: 65ch;                 /* body copy, where a container asks for it (.measure) */
    --measure-tight: 45ch;           /* card and caption copy */

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

    /* --- Corners beyond Dials' three ----------------------------------- */
    --radius-xs: calc(var(--radius-base) * 0.333px);  /* tags, inline chips, the focus ring: a third of --radius-m, so it follows --radius-base */
    --radius-round: 50%;                   /* avatars */
    --control-radius: var(--radius-s);     /* buttons AND fields: a site sets this once, both follow */

    /* --- Touch targets ------------------------------------------------- */
    /* The smallest box a finger hits reliably: 44px (WCAG 2.5.5, Apple's
     * HIG). A fixed dimension rather than spacing, so it does not scale. */
    --target-min: 2.75rem;

    /* --- Inset shadows, from Dials' --shadow-color ------------------------ */
    --shadow-inner-s: inset 0 1px 2px 0 var(--shadow-color);
    --shadow-inner-m: inset 0 2px 6px 0 var(--shadow-color);

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

/* ═══ Old names ═══ aliases:begin ═══════════════════════════════════════
 * The template's token names before Dials (#426), each pointing at the Dials
 * token that replaces it, so markup, the Form controls section and any site
 * layer written against them keep working until #427 migrates the live
 * sites. NEVER use one in new work: use the name on the right. Delete this
 * whole block (down to aliases:end) once nothing reads any of them.
 *
 * Declared on [data-dials] and the .is-light/.is-dark bands as well as
 * :root, so a re-themed scope's or a band's aliases follow its own dials and
 * scheme, as Dials' own tokens do (its fallback works them out again there). Names Dials took over with a new meaning are NOT
 * here: --surface is now the PAGE (the old raised --surface is
 * --surface-raised), --secondary is the second brand colour's dial (it used
 * to be its fill: that is --secondary-solid), --accent is that dial's old
 * Dials name (deprecated in Dials v0.2.0: never set it), --success/--warning/
 * --danger/--info/--tertiary are dials (the fill is --success-solid ...), and --border, --border-strong, --space-*,
 * --radius-s/m/l, --shadow-* and --font-* are Dials' own. The --u-*,
 * --palette-*, --hue-*, --chroma-*, --l-* and --scheme dials are gone: set
 * the Dials dials instead. */
:root, [data-dials], .is-light, .is-dark {
    --primary: var(--brand-solid);
    --primary-hover: light-dark(oklab(from var(--brand-solid) calc(l - 0.07) a b), oklab(from var(--brand-solid) calc(l + 0.07) a b));
    --primary-light: oklab(from var(--brand-solid) calc(l + 0.11) a b);
    --primary-muted: color-mix(in oklab, var(--brand-solid) 15%, var(--surface));
    --primary-pale: var(--brand-soft);
    --on-primary: var(--brand-on-solid);
    --secondary-hover: light-dark(oklab(from var(--secondary-solid) calc(l - 0.07) a b), oklab(from var(--secondary-solid) calc(l + 0.07) a b));
    --secondary-light: oklab(from var(--secondary-solid) calc(l + 0.11) a b);
    --secondary-pale: var(--secondary-soft);
    --on-secondary: var(--secondary-on-solid);
    --tertiary-hover: light-dark(oklab(from var(--tertiary-solid) calc(l - 0.07) a b), oklab(from var(--tertiary-solid) calc(l + 0.07) a b));
    --tertiary-pale: var(--tertiary-soft);
    --on-tertiary: var(--tertiary-on-solid);
    --accent-dark: var(--primary-hover);
    --accent-pale: var(--brand-soft);
    --success-pale: var(--success-soft);
    --warning-pale: var(--warning-soft);
    --danger-pale: var(--danger-soft);
    --info-pale: var(--info-soft);
    --ink-strong: var(--text-strong);
    --ink: var(--text);
    --ink-mid: var(--text-muted);
    --ink-soft: var(--text-quiet);
    --bg: var(--surface);
    --on-bg: var(--text);
    --on-surface: var(--text);
    --step--2: var(--size--2);
    --step--1: var(--size--1);
    --step-0: var(--size-0);
    --step-1: var(--size-1);
    --step-2: var(--size-2);
    --step-3: var(--size-3);
    --step-4: var(--size-4);
    --step-5: var(--size-5);
    --step-6: var(--size-6);
    --step-7: var(--size-7);
    --step-8: var(--size-8);
    --border-thin: var(--border-width-s);
    --border-medium: var(--border-width-m);
    --border-thick: var(--border-width-l);

    /* The template's type ladder before Dials v0.3 (#436), FROZEN at its old
     * values, so a site layer written against it renders exactly as it did.
     * They do not follow Dials, and the template reads none of them: line
     * height is var(--leading), and weights and letter spacing are plain
     * values on each element. check-system.sh accepts these values only
     * exactly as written here. */
    --weight-400: 400;
    --weight-600: 600;
    --weight-700: 700;
    --leading-xs: 1.05;
    --leading-s: 1.18;
    --leading-m: 1.3;
    --leading-l: 1.5;
    --leading-xl: 1.6;
    --tracking-xs: -0.02em;
    --tracking-s: -0.01em;
    --tracking-m: 0;
    --tracking-l: 0.04em;
    --tracking-xl: 0.08em;
}
/* ═══ aliases:end (Old names) ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
 * 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(--solid);
    color: var(--on-solid);
    text-decoration: none;
    border-radius: 0 0 var(--radius-xs) 0;
}
.skip-link:focus, .skip-link:focus-visible {
    left: 0;   /* the ring is the global one, in Form controls & focus */
}

* { margin: 0; }

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

body {
    -webkit-font-smoothing: antialiased;   /* line height: the base layer's body rule, from --leading-body */
}

/* 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(--size-0);
    font-weight: 400;
    line-height: var(--leading-body);   /* a number, so it inherits as one; --leading is a length */
    color: var(--text);
    background: var(--surface);
}

/* 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: 700;
    line-height: var(--leading);        /* for each heading's own size: on the heading, never inherited */
    color: var(--text-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;
}

/* The site's display tracking (-0.02), tightening more the larger the step:
 * the 404's plain heading; the site's own titles set none, as live. */
h1, .h1 { font-size: var(--size-5); letter-spacing: -0.02em; }
h2, .h2 { font-size: var(--size-4); letter-spacing: -0.016em; }
h3, .h3 { font-size: var(--size-3); letter-spacing: -0.012em; }
h4, .h4 { font-size: var(--size-2); letter-spacing: -0.008em; }
h5, .h5 { font-size: var(--size-1); letter-spacing: -0.004em; }
h6, .h6 {
    font-size: var(--size-0);
    letter-spacing: 0.035em;   /* capitals */
    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(--on-soft);   /* coloured text on the page */
}

/* 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(--size-1);
    line-height: var(--leading);
    color: var(--text-muted);
}

/* Small label above a heading. */
.eyebrow {
    display: block;
    margin-bottom: var(--space-2xs);
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0.035em;   /* capitals */
    text-transform: uppercase;
    color: var(--on-soft);
}

small, .text-small { font-size: var(--size--1); line-height: var(--leading); }

strong, b { font-weight: 600; }

a {
    color: var(--link);
    text-decoration-thickness: var(--border-width-s);
    text-underline-offset: 0.15em;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--link-hover); }

/* The focus ring lives in "Form controls & focus" below. */

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 {
    /* The quote bar is a quiet border in the group's colour: Dials' subtle
     * border pattern (tokens.md, "A subtle border in a group's colour"),
     * declared here rather than at :root so it follows an .is-* class on the
     * quote. --line itself is a strong 3:1 line since Dials v0.2.0; 30% of
     * it keeps the bar about as light as it was before (the pattern's
     * example is 40%: a step darker). Decoration: no contrast promised. */
    --quote-bar: color-mix(in oklab, var(--line) 30%, var(--border));
    padding-left: var(--space-m);
    border-left: var(--border-width-l) solid var(--quote-bar);
    color: var(--text-muted);
    font-style: italic;
}

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

code, kbd, samp, pre {
    font-family: var(--font-mono);
    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-raised) }`
 * 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(--size--1);
    line-height: var(--leading);
    color: var(--text-quiet);
}

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

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

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

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

/* ═══ 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 0px 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-width-s) solid <colour> and
 *   --field-radius: 0px (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 0px.
 * - Colours follow the band. The colour tokens are declared on the page
 *   AND on every .is-light/.is-dark band and [data-dials] scope, as Dials
 *   declares its own: a browser on Dials' fallback (no relative colour)
 *   works a token out once per scope, so declared on :root alone a field
 *   in a dark band kept the light page's border and ring. A site that
 *   changes a field COLOUR sets it on the same four selectors, after this
 *   section (:root, [data-dials], .is-light, .is-dark { --field-...: ... }),
 *   or a band keeps the default. Sizes are set on :root only.
 * - A panel on a ground that is not a Dials surface (a brand fill) re-sets
 *   the leaf colour tokens on the container, never the rules:
 *     .brand-panel {
 *         --focus-ring: var(--brand-on-solid);
 *         --field-border: var(--brand-on-solid);
 *     }
 *   --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(--size-0), 1rem);  /* never below 16px, or iOS zooms the page on focus */
    --field-leading: var(--leading);              /* Dials' leading, worked out at the field's own size */
    --field-weight: 400;                          /* one weight wherever the field sits */
    --field-label-weight: 600;                    /* the label's weight: the site's emphasis weight */
    --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-border-w: var(--border-width-s);
    /* 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-w: var(--border-width-m);        /* >= --field-border-w, so the ring covers the border */
}

/* The colours, on the bands too (see above). */
:root, [data-dials], .is-light, .is-dark {
    --field-bg: var(--surface-raised);            /* fields sit on the raised surface, as cards do */
    --field-ink: var(--text);
    --field-border: var(--border-strong);         /* Dials' control border: 3:1 on every surface */
    --field-border-hover: var(--text-quiet);
    --field-placeholder: var(--text-quiet);
    --focus-ring: var(--focus);                   /* Dials' focus ring: >= 3:1 on every surface, light and dark */
}

/* 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(--size--1);
    font-weight: var(--field-label-weight);
    line-height: var(--leading);
    color: var(--text-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(--brand-solid); }

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; every one is at least
 * --target-min (44px) tall, the tap target. 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(--size--1);
    font-weight: 600;
    line-height: var(--leading);        /* at each button size's own font size (.btn--sm, .btn--lg) */
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    min-block-size: var(--target-min);   /* 44px tap target, every size and variant */
    cursor: pointer;
    border: var(--border-width-s) 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(--solid);
    color: var(--on-solid);
}
/* Hover and pressed mix the fill away from its text colour (Dials' --mix-*),
 * so they work on every group: <a class="btn btn--primary is-tertiary">. */
.btn--primary:hover { background: color-mix(in oklch, var(--solid), var(--mix-hover)); color: var(--on-solid); }
.btn--primary:active { background: color-mix(in oklch, var(--solid), var(--mix-active)); color: var(--on-solid); }

.btn--secondary {
    background: transparent;
    border-color: var(--solid);
    color: var(--on-soft);
}
.btn--secondary:hover { background: var(--soft); color: var(--on-soft); }

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn--ghost:hover { background: var(--soft); color: var(--on-soft); }

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

/*
 * ON A BRAND-COLOURED GROUND
 *
 * A dark band is class="is-dark" on the section: Dials works every token out
 * again in the dark scheme, so the buttons above need nothing more. On a band
 * painted with a brand fill (background: var(--solid)) they invert instead:
 * the solid button goes to the raised surface, the outline picks up a
 * translucent edge in the fill's text colour. Put .on-dark on the button or
 * any ancestor.
 */
.on-dark .btn--primary,
.btn--primary.on-dark {
    background: var(--surface-raised);
    color: var(--on-soft);
}

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

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

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

.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-raised);
}

.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-raised);
    border: var(--border-width-s) 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 gradient
 * is Dials' band pattern (tokens.md, "Gradients are patterns"): from one
 * fill to another, decoration only, so no text is ever set on it.
 * The <img> has onerror="this.style.display='none'" which hides
 * the broken image, revealing this CSS background underneath.
 *
 * Derived from the site's own brand fill so a missing photo reads as part of
 * this practice rather than as a stray swatch.
 */
:root, [data-dials], .is-light, .is-dark {
    --avatar-shade: color-mix(in oklab, var(--brand-solid) 85%, black);   /* the avatar gradient's darker end: the brand fill, a step darker. color-mix() rather than relative colour, so Dials' fallback browsers draw it too */
}

.doctor-avatar {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-s);
    background: linear-gradient(135deg, var(--avatar-shade), var(--brand-solid));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The silhouette is an icon on the brand fill, so it is drawn in the fill's
 * own text colour, --brand-on-solid, through a mask (the shape only), and
 * keeps 3:1 in light and dark. A white silhouette fell to 2.8:1 on a dark
 * page, where the fill is lifted (mf-websites#431). */
.doctor-avatar::after {
    content: "";
    position: absolute;
    width: 40%;
    height: 40%;
    background-color: var(--brand-on-solid);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' 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") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' 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") center / contain no-repeat;
}

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

/* 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(--size-5);
    font-weight: 700;
    line-height: var(--leading);
    letter-spacing: -0.02em;
    margin: 0 0 var(--space-2xs);
    opacity: 0.55;
}
.notfound h1 { margin-top: 0; }
.notfound__lede { font-size: var(--size-1); line-height: var(--leading); 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-width-s) solid currentColor;
    border-color: color-mix(in oklab, currentColor 22%, transparent);
}
.notfound__links-title {
    font-size: var(--size-0);
    text-transform: uppercase;
    letter-spacing: 0.035em;   /* capitals */
    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);
    font-weight: 600;
}

/* ── Site search ──────────────────────────────────────────────────────
 * mediflare.js writes the search box wherever the markup asks for one, as
 * plain HTML with stable mf-search__* classes and NO styling. This is a
 * neutral base on the tokens above, so a new site inherits its own palette
 * and can restyle any of it freely in the site layer.
 *
 * The default (partials/header.html) is ONE overlay at every width, opened
 * by .search-trigger: a button drawn as a search field (magnifier and
 * "Search…") from 768px up, a 44px magnifier below. From 768px up the
 * overlay is a centred card over a dimmed page; below, it fills the screen.
 * The alternatives (an icon <details> panel, a visible header box with a
 * dropdown) are documented in /srv/sites/CLAUDE.md ("Site search"); the
 * dropdown's base is kept below because mediflare.js writes its hooks.
 *
 * Style the overlay and the dropdown popup ONLY through :not([hidden]).
 * Giving them a display of their own overrides the browser's
 * [hidden] { display: none }, and they then never close. */

/* The box, wherever it sits. LAYOUT ONLY: the field's look is the base rule
 * in "Form controls" above, exactly like every other field on the site. Do
 * not give .mf-search__input a border, radius, background or height here or
 * in the site layer -- change the --field-* tokens instead. */
.mf-search__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2xs);
    align-items: center;
}

.mf-search__label,
.mf-search__status,
.mf-search__results,
.mf-search__popup { grid-column: 1 / -1; }

.mf-search__label { margin-bottom: 0; }

/* Without a Search button the field takes the whole row. */
.mf-search__input { grid-column: 1 / -1; }
[data-mf-search-submit] .mf-search__input { grid-column: auto; }

.mf-search__submit {
    min-block-size: var(--field-h);   /* the field's height, so the row lines up */
    padding: 0 var(--space-s);
    font-weight: 600;
    line-height: var(--leading);
    color: var(--on-solid);
    background: var(--solid);
    border-radius: var(--control-radius);   /* the field beside it has the same corner */
    transition: background var(--duration-fast) var(--ease-out);
}
.mf-search__submit:hover { background: color-mix(in oklch, var(--solid), var(--mix-hover)); }

.mf-search__status {
    margin: 0;
    font-size: var(--size--1);
    line-height: var(--leading);
    color: var(--text-muted);
}
.mf-search__status:empty { display: 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(--text);
    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(--on-soft);
    background: var(--soft);
}
/* Inside a scrolling list an outset ring is clipped, so it sits inset. */
.mf-search__link:focus-visible { outline-offset: calc(var(--border-width-m) * -1); }

.mf-search__title {
    display: block;
    font-weight: 700;
    line-height: var(--leading);
    color: var(--text-strong);
}

.mf-search__excerpt {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--size--1);
    line-height: var(--leading);
    color: var(--text-muted);
}

.mf-search__excerpt mark {
    color: var(--text-strong);
    background: var(--selection);
    border-radius: var(--radius-xs);
}

/* In the header and the overlay the label is read out, not shown: the
 * placeholder says what the field is. Hidden visually, never removed. */
.mf-search--dropdown .mf-search__label,
.mf-search--overlay .mf-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.mf-search__popup .mf-search__results:not([hidden]) {
    max-block-size: 60dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* The trigger, drawn as a search field: its border, background and corner
 * are the --field-* tokens, so it matches every field on the site. It is a
 * button, so its focus ring is the global one; only the offset moves onto
 * its border, as a field's does. The ellipsis is drawn, not spoken.
 *
 * In a tight header band shorten it rather than let it wrap the nav, the
 * booking button or the logo: drop the ellipsis (content: none) and step
 * the padding down, or use the 44px magnifier below. The header's height
 * must not change. */
.search-trigger {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: var(--space-2xs);
    min-inline-size: calc(var(--target-min) * 4);
    min-block-size: var(--field-h);
    padding: 0 var(--space-m) 0 var(--field-pad-inline);
    font-size: var(--size--1);
    line-height: var(--leading);
    white-space: nowrap;
    color: var(--text-muted);
    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),
                background var(--duration-fast) var(--ease-out);
}
.search-trigger svg { flex: none; }
.search-trigger__text::after { content: "…" / ""; }
.search-trigger:hover { border-color: var(--field-border-hover); }
.search-trigger:focus-visible { outline-offset: calc(var(--field-border-w) * -1); }

/* Phones: a 44px magnifier. The word stays as its name, hidden visually. */
@media (max-width: 767px) {
    .search-trigger {
        justify-content: center;
        min-inline-size: var(--target-min);
        min-block-size: var(--target-min);
        padding: 0;
        background: none;
        border-color: transparent;
        border-radius: var(--radius-s);
    }
    .search-trigger:hover {
        color: var(--on-soft);
        background: var(--soft);
        border-color: transparent;
    }
    .search-trigger__text {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* Alternative: a visible box whose results float beneath it. */
.mf-search--dropdown { position: relative; }

.mf-search__popup:not([hidden]) {
    position: absolute;
    inset-block-start: calc(100% + var(--space-3xs));
    inset-inline-end: 0;
    z-index: var(--layer-overlay);
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    inline-size: max(100%, min(var(--measure-tight), calc(100vw - 2 * var(--grid-gutter))));
    padding: var(--space-xs);
    background: var(--surface-raised);
    border: var(--border-width-s) solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-l);
}

/* The overlay. Phones: full screen. One row holds Close, the field and Search (Close
 * first, matching the focus order); the results scroll below it, within the
 * overlay. The page behind is locked by mediflare.js itself. Subgrid puts
 * the box's own children on the overlay's grid, so the results run the full
 * width rather than only under the field. */
.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-xs), env(safe-area-inset-top));
    padding-inline: max(var(--space-s), env(safe-area-inset-left)) max(var(--space-s), env(safe-area-inset-right));
    background: var(--surface);
}

.mf-search-overlay__header { display: contents; }

.mf-search-overlay__close {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    position: relative;
    z-index: var(--layer-base);   /* above the box, which spans this cell too */
    min-inline-size: var(--target-min);
    min-block-size: var(--target-min);
    padding-inline: var(--space-2xs);
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-s);
}
.mf-search-overlay__close:hover { color: var(--on-soft); background: var(--soft); }

.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;
    gap: normal;            /* the overlay's own gap; a different subgrid gap pads the edge row and pushes Search 2px past the field */
    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));
}

/* From 768px up the same overlay is a centred card (the DocSearch pattern),
 * offset from the top rather than vertically centred, so it grows downward
 * with its results up to max-block-size, past which they scroll inside it.
 * A press on the dimmed page closes it (mediflare.js, #249).
 *
 * Stacking: the backdrop is body::after at --layer-modal, above the sticky
 * header (--layer-nav) and any dropdown (--layer-overlay). The card sits one
 * above it: body::after follows the overlay in tree order, so at an equal
 * z-index it would paint over the card. */
@media (min-width: 768px) {
    .mf-search-overlay:not([hidden]) {
        inset: var(--space-2xl) 0 auto;
        z-index: calc(var(--layer-modal) + 1);
        inline-size: calc(100% - 2 * var(--space-m));
        max-inline-size: calc(var(--grid-max-width) / 2);
        max-block-size: calc(100dvh - 2 * var(--space-2xl));
        margin-inline: auto;
        padding: var(--space-s);
        background: var(--surface-raised);
        border-radius: var(--radius-l);
        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: var(--surface-overlay);
        -webkit-backdrop-filter: blur(var(--space-3xs));
        backdrop-filter: blur(var(--space-3xs));
    }
}

/* Opening is a short fade and settle; closing is immediate, and under
 * reduced motion there is no animation at all. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
    .mf-search-overlay:not([hidden]) { animation: search-card-in var(--duration-base) var(--ease-out); }
    html[data-mf-search-overlay="open"] body::after { animation: search-backdrop-in var(--duration-base) var(--ease-out); }
}

@keyframes search-card-in { from { opacity: 0; transform: scale(0.98); } }
@keyframes search-backdrop-in { from { opacity: 0; } }

/* SITE LAYER */

/* ===========================================================================
   PRIORITY HEALTH MEDICAL CENTRE — site layer
   Every value here is MEASURED from https://www.priorityhealthmedicalcentre.com.au
   on 2026-09-11, not chosen. See CLAUDE.md for the measurements and the
   deliberate divergences. Colours, type and space are the dials above.
   =========================================================================== */

:root {
    /* Every button and field shares the Book button's 3px (owner,
     * 2026-10-06), so live's 4px CTAs and the footer's 2px button take it too. */
    --control-radius: var(--radius-2xs);

    /* Fields, as live's enquiry forms draw them: a 1px #54595F box with the
     * field's name as its placeholder. Everything else is the section's. */
    --field-border: var(--ink-muted);
    --field-border-hover: var(--ink-icon);
    --field-placeholder: var(--ink-muted);   /* live's grey; the dark scheme takes the section default, below */
    --field-textarea-h: 6rem;
    --field-leading: var(--leading-snug);   /* live's 1.3 in its fields, not the section's --leading (1.5 at body size) */

    /* --- Live's greys and blues, derived from the dials -------------------
     * Each is a mix of the dials, declared once here, and paints live's
     * measured hex (in the comment). The greys are the ink mixed into the
     * paper (both exact, so these are exact too); the tinted ones take a
     * little of the blue. The two darker blues are the blue mixed with black
     * in sRGB, which is how live's darker blues relate to it. color-mix()
     * rather than relative colour, so Dials' fallback browsers draw them too. */
    --ink-prose: color-mix(in oklab, var(--text-strong) 43.4%, var(--surface));   /* #767676: body prose, 4.54:1 on white (live's #7A7A7A is 4.29:1) */
    --ink-icon: color-mix(in oklab, var(--text-strong) 61.3%, var(--surface));    /* #444444: icon-card copy, the contact page's social glyphs */
    --ink-fee: color-mix(in oklab, var(--text-strong) 47.2%, var(--surface));     /* #6B6B6B: fee figures, 4.51:1 on the stripe, 5.33 on white */
    --fee-stripe: color-mix(in oklab, var(--text-strong) 5.7%, var(--surface));   /* #ECECEC: the fee tables' alternating row */
    --ink-muted: color-mix(in oklab, var(--secondary) 5.9%, color-mix(in oklab, var(--text-strong) 55%, var(--surface)));   /* #54595F: footer and contact prose, footer icons, the field edge */
    --ground-mist: color-mix(in oklab, var(--secondary) 5.4%, color-mix(in oklab, var(--text-strong) 6.4%, var(--surface)));  /* #E0E6EC: the care band, the social discs, card edges */
    /* Live paints small white text on #0099FF at 2.99:1, below the 4.5:1
     * floor. The same blue a fifth darker reaches 4.51:1 on white, for blue
     * TEXT on white; the nav, header button, CLICK HERE, footer call bar and
     * service tiles take the owner's #008AE6 (2026-10-02), with black
     * lettering (5.8:1) like every blue fill (owner, 4 Nov 2026). */
    --brand-blue-text: color-mix(in srgb, var(--secondary) 80%, black);      /* #007ACC: blue text on white, 4.51:1 */
    --brand-blue-surface: color-mix(in srgb, var(--secondary) 90%, black);   /* #008AE6: the owner's choice, 2026-10-02 */
    /* The mist ground is darker than the page, so the body grey and the
     * blue text fall short on it (#767676 3.61:1, #007ACC 3.58:1). On the
     * mist they take these deeper shades instead (see the mist rule below). */
    --ink-prose-mist: color-mix(in oklab, var(--text-strong) 49.2%, var(--surface));   /* #656565: 4.64:1 on the mist */
    --brand-blue-mist: color-mix(in srgb, var(--secondary) 68%, black);                /* #0068AD: 4.66:1 on the mist */
    --on-blue: var(--secondary-on-solid);   /* lettering on both blues: black (owner, 4 Nov 2026), Dials' on-solid for the blue. Red and navy fills keep white */
    --hero-veil: color-mix(in srgb, var(--surface) 93%, transparent);   /* measured alpha on the panel */
    --card-veil: color-mix(in srgb, var(--surface) 82%, transparent);   /* the about intro's card at tablet */
    --subnav-tint: color-mix(in srgb, var(--surface) 12%, transparent); /* open sub-menu on the mobile nav */
    --navy-on-blue: color-mix(in srgb, var(--tertiary-solid) 98%, black);   /* #0200A4: the navy a shade deeper, for text on the #0099FF band, 4.55:1 (the navy itself is 4.49:1) */

    /* The site's earlier names, kept as aliases because the divider and icon
     * markup colours its fills with them in inline styles. */
    --brand-crimson: var(--brand-solid);
    --brand-blue: var(--secondary-solid);
    --brand-navy: var(--tertiary-solid);
    --brand-yellow: var(--warning-solid);
    --white: var(--surface);

    /* --- Structure, measured ---------------------------------------------- */
    /* 1140 is a REAL cap: it holds at 1920, not viewport-minus-padding. */
    --shell: 1140px;
    /* Band padding is 5vw on live (19.5@390, 51.19@1024, 72@1440, 96@1920).
     * Composed from pairs and steps: 16@390, 48.7@1024, 70@1440. Band 7's
     * 10vw (144@1440) is 3xl + s, 140. */
    --band-pad: calc(var(--space-l-2xl) + var(--space-s-m) - var(--space-s) - var(--space-s));
    --header-rule: 5px;      /* crimson top rule + navy bottom rule */
    --hero-vh: 60vh;         /* 540@900, 648@1080, 499@700 — 60vh with a content floor */
}
/* The site is light only, so no visitor sees its dark scheme; check-contrast
 * scores it anyway, and live's grey placeholder is 4.43:1 on the dark field.
 * Where light-dark() exists the dark side takes the section's default; a
 * browser without it never draws dark, and keeps the plain grey above. */
@supports (color: light-dark(red, red)) {
    :root { --field-placeholder: light-dark(var(--ink-muted), var(--text-quiet)); }
}

/* Bold within text is live's 700, the heading weight, not the template's 600. */
strong, b { font-weight: 700; }
/* The template's lede and the header's search box keep the site's 1.3 and
 * 1.2 leading (the template's read Dials' --leading), and the box its
 * #444 grey. */
.lede { line-height: var(--leading-snug); letter-spacing: normal; }
.search-trigger { color: var(--ink-icon); line-height: var(--leading-heading); }

/* Containers ------------------------------------------------------------- */
.ph-shell { width: 100%; max-width: var(--shell); margin-inline: auto; }
.band { padding-block: var(--band-pad); padding-inline: var(--band-pad); }
.band--wide-pad { padding-block: calc(var(--space-3xl) + var(--space-s)); }
.band--mist { background: var(--ground-mist); }
.band--blue { background: var(--secondary-solid); }

/* Shape dividers ---------------------------------------------------------
 * Live uses ONE path for all seven dividers (M0,6V0h1000v100L0,6z), varying
 * only fill, height and mirror state. The svg is 1441 wide (100% + 1px) and
 * centred; a horizontal mirror is rotateY(180deg) on the SVG itself, and a
 * vertical flip is rotate(180deg) on the wrapper. Transcribed per divider. */
.shape { position: absolute; left: 0; width: 100%; line-height: 0; direction: ltr; overflow: hidden; pointer-events: none; }
.shape--top { top: 0; }
.shape--bottom { bottom: 0; transform: rotate(180deg); }
.shape svg { display: block; width: calc(100% + 1px); position: relative; left: 50%; transform: translateX(-50%); }
.shape--mirror svg { transform: translateX(-50%) rotateY(180deg); }
.shape path { fill: currentColor; }

/* Header ------------------------------------------------------------------ */
.site-header { position: relative; z-index: var(--layer-nav); }
.site-header__bar {
    background: var(--surface);
    border-top: var(--header-rule) solid var(--brand-solid);
    padding-inline: var(--band-pad);
}
/* Live's header row measures 180px inside a 185px bar (the 5px is the rule).
 * The row is taller than its content on purpose — the contact stack is 109px
 * and the logo 88px, both vertically centred in the row. */
.site-header__bar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-m); flex-wrap: wrap;
    min-height: 180px;
}
.site-logo img { width: 350px; max-width: 100%; height: auto; }
.site-header__contact { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-s); }
.site-header__phone {
    display: inline-flex; align-items: center; gap: var(--space-2xs);
    font-family: var(--font-accent); font-size: var(--size-1); font-weight: 700;
    color: var(--tertiary-solid); text-decoration: none;
}
.site-header__phone svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
/* Search sits beside Book, on the row Book already had, so the contact stack
 * keeps its height: the search field from 768px up, a 44px magnifier on phones.
 * Never in the menu. */
.site-header__actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); }
/* 768-859 the bar is tight beside the logo: the trigger drops its ellipsis and
 * its spare width rather than push the contact stack under the logo. */
@media (min-width: 768px) and (max-width: 859px) {
    .search-trigger { min-inline-size: 0; padding-inline-end: var(--field-pad-inline); }
    .search-trigger__text::after { content: none; }
}
.site-header__phone:hover, .site-header__phone:focus-visible { text-decoration: underline; }

.btn-book {
    background: var(--brand-blue-surface); color: var(--on-blue);
    font-size: var(--size--1); font-weight: var(--weight-medium); letter-spacing: 0.035em;
    text-transform: uppercase; text-decoration: none;
    padding: var(--space-2xs) var(--space-s); line-height: 1;
}
.btn-book:hover, .btn-book:focus-visible { background: var(--tertiary-solid); color: var(--tertiary-on-solid); }

/* Navbar ------------------------------------------------------------------ */
/* The navbar takes the owner's darker #008AE6 rather than live's #0099FF,
 * with black link text like every blue fill. Same hue; the large blue band
 * grounds elsewhere keep live's exact value. Hover and the current page turn
 * navy with white text. */
.site-nav {
    background: var(--brand-blue-surface);
    border-bottom: var(--header-rule) solid var(--tertiary-solid);
    padding-inline: var(--band-pad);
}
.site-nav__inner { display: flex; align-items: stretch; justify-content: space-between; }
.site-nav__list { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav__list > li { position: relative; }
.site-nav__link {
    display: inline-flex; align-items: center; gap: var(--space-3xs);
    padding: var(--space-2xs) var(--space-s);
    min-height: 56px;
    color: var(--on-blue); text-decoration: none; text-transform: uppercase;
    font-size: var(--size--1); font-weight: 400; line-height: var(--leading-snug);
}
.site-nav__link[aria-current="page"], .site-nav__link:hover, .site-nav__link:focus-visible { background: var(--tertiary-solid); color: var(--tertiary-on-solid); }
.site-nav__sub a:hover, .site-nav__sub a:focus-visible { color: var(--tertiary-solid); }
.site-nav__caret { width: 9px; height: 15px; fill: currentColor; flex: none; }
.site-nav__sub {
    list-style: none; margin: 0; padding: 0;
    position: absolute; top: 100%; left: 0; min-width: 260px;
    background: var(--surface-raised); box-shadow: var(--shadow-m);
    display: none; z-index: var(--layer-overlay);
}
.site-nav__list > li:hover > .site-nav__sub,
.site-nav__list > li:focus-within > .site-nav__sub { display: block; }
.site-nav__sub a {
    display: block; padding: var(--space-2xs) var(--space-s);
    color: var(--tertiary-solid); text-decoration: none;
    font-size: var(--size--2); text-transform: uppercase; line-height: var(--leading-snug);
}
.site-nav__sub a:hover, .site-nav__sub a:focus-visible { background: var(--ground-mist); }
/* Crimson is under 3:1 on the blues, so the ring changes there: navy on
 * live's #0099FF bands (5:1), the black lettering on the darker #008AE6 nav,
 * call bar and tiles (5.8:1), and crimson again on the white dropdown.
 * A nav link's ring is drawn inside it, on the navy it turns when focused,
 * since outside it would cross the white header bar above, so it is the
 * navy's white. */
.band--blue, .strip { --focus-ring: var(--tertiary-solid); }
.site-nav, .site-footer__call, .svc-grid li.svc-tile { --focus-ring: var(--on-blue); }
.site-nav__sub { --focus-ring: var(--brand-solid); }
.site-nav__link:focus-visible { --focus-ring: var(--tertiary-on-solid); outline-offset: calc(var(--focus-ring-w) * -1); }

/* Mobile nav -------------------------------------------------------------- */
.nav-toggle {
    display: none; background: none; border: 0; color: var(--on-blue);
    padding: var(--space-2xs) var(--space-xs); cursor: pointer; align-items: center; gap: var(--space-2xs);
    font-size: var(--size--1); text-transform: uppercase; min-height: 44px;
}
.nav-toggle__bars { display: block; width: 22px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; }
.nav-toggle__bars::before { top: -7px; } .nav-toggle__bars::after { top: 7px; }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: var(--hero-vh); }
.hero__copy {
    background: var(--hero-veil);
    display: flex; flex-direction: column; justify-content: center;
    padding-block: var(--space-l); padding-inline: var(--band-pad);
}
.hero__copy-inner { width: 100%; max-width: calc(var(--shell) / 2); margin-left: auto; }
.hero__media { background-size: cover; background-position: 50% 50%; }
.hero__title { font-size: var(--size-8); font-weight: 700; line-height: var(--leading-headline); color: var(--text-strong); margin: 0; letter-spacing: normal; }
.hero__title em { font-style: normal; color: var(--brand-solid); }
.hero__sub { font-family: var(--font-accent); font-size: var(--size-2); font-weight: 600; color: var(--tertiary-solid); margin: var(--space-2xs) 0 0; line-height: var(--leading-snug); letter-spacing: normal; }
.hero__lede { font-family: var(--font-accent); font-size: var(--size-1); color: var(--text); margin: var(--space-s) 0 0; line-height: var(--leading-body); }
.hero__lede + .hero__lede { margin-top: var(--space-xs); }
.hero__cta { margin-top: var(--space-m); }

/* Buttons — measured off live, per variant -------------------------------- */
.btn-hero {
    background: var(--brand-solid); color: var(--brand-on-solid);
    font-size: var(--size-1); font-weight: 400; letter-spacing: var(--tracking-wide);
    padding: var(--space-s) var(--space-m); text-decoration: none; line-height: 1;
}
.btn-solid {
    background: var(--brand-solid); color: var(--brand-on-solid);
    font-size: var(--size-0); letter-spacing: 0.035em; text-transform: uppercase;
    padding: var(--space-xs) calc(var(--space-m) + var(--space-xs)); text-decoration: none; line-height: 1;
}
.btn-ghost {
    gap: var(--space-2xs);
    background: transparent; color: var(--brand-solid);
    border: var(--border-width-m) solid var(--brand-solid);
    font-size: var(--size-0); letter-spacing: 0.035em; text-transform: uppercase;
    padding: var(--space-xs) var(--space-m); text-decoration: none; line-height: 1;
    white-space: normal;
}
.btn-hero:hover, .btn-hero:focus-visible, .btn-solid:hover, .btn-solid:focus-visible { background: var(--tertiary-solid); color: var(--tertiary-on-solid); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--brand-solid); color: var(--brand-on-solid); }
.btn-ghost svg, .btn-link svg { width: 0.7em; height: 1em; fill: currentColor; flex: none; }

/* Every site button: the 44px tap target and the shared corner (owner,
 * 2026-10-06). Flex, so a button grown to the floor keeps its label centred. */
.btn-book, .btn-hero, .btn-solid, .btn-ghost, .btn-link {
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
    min-block-size: var(--target-min);
    border-radius: var(--control-radius);
}

/* Small text on the blue band: black on the darker #008AE6 plate, as the
 * nav and the call bar, underlined on hover. */
.btn-link {
    gap: var(--space-2xs);
    background: var(--brand-blue-surface); color: var(--on-blue);
    text-transform: uppercase; text-decoration: none;
    font-size: var(--size--1); letter-spacing: 0.035em; line-height: 1;
    padding: var(--space-2xs) var(--space-xs);
}
.btn-link:hover, .btn-link:focus-visible { text-decoration: underline; }

/* Strip bands (1 and 6) — thin blue rules carrying a divider --------------- */
.strip { position: relative; background: var(--secondary-solid); }
/* Under a page hero: live's 8px navy rule, then 66px of blue. */
.strip--tall { height: 74px; box-sizing: border-box; border-top: 8px solid var(--tertiary-solid); }
.strip--short { height: 52px; }

/* Band 2 — Welcome -------------------------------------------------------- */
/* Live: 80px block padding, fixed at every width (not the 5vw band rhythm). */
.welcome { padding-block: var(--space-2xl); padding-inline: var(--band-pad); }
.welcome__inner { padding-right: 10%; }
.welcome__title { font-size: var(--size-7); font-weight: 600; color: var(--text-strong); margin: 0 0 var(--space-s); line-height: var(--leading-snug); letter-spacing: normal; }
.welcome p { color: var(--ink-prose); font-size: var(--size-0); line-height: var(--leading-welcome); margin: 0 0 var(--space-xs); }
.welcome p:last-child { margin-bottom: var(--space-m); }

/* Band 3 — Whole-Person Care --------------------------------------------- */
.care { position: relative; }
.care__inner { display: grid; grid-template-columns: minmax(0, 437fr) minmax(0, 703fr); align-items: center; }
.care__photo { background-size: cover; background-position: 50% 50%; border-radius: var(--radius-2xs); min-height: 750px; }
.care__body { padding-left: var(--space-2xl); }
.care__title { font-size: var(--size-6); font-weight: var(--weight-medium); color: var(--text-strong); margin: 0 0 var(--space-l); line-height: var(--leading-heading); letter-spacing: normal; text-transform: capitalize; }
.care__title em { font-style: normal; color: var(--brand-solid); display: block; }
.care__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-l); }
.icard__glyph { width: 35px; height: 35px; fill: var(--secondary-solid); display: block; margin-bottom: var(--space-xs); }
.icard__title { font-size: var(--size-1); font-weight: 600; color: var(--text-strong); margin: 0 0 var(--space-2xs); line-height: var(--leading-snug); letter-spacing: normal; }
.icard p { font-size: var(--size-0); color: var(--ink-icon); margin: 0; line-height: var(--leading-body); }
.care__cta { margin-top: var(--space-l); }

/* Band 4 — Make An Appointment ------------------------------------------- */
.appt { text-align: center; }
.appt__inner { max-width: 800px; margin-inline: auto; }
.appt__title { font-size: var(--size-7); font-weight: 600; color: var(--text-strong); margin: 0 0 var(--space-s); line-height: 1; letter-spacing: normal; }
.appt__sub { font-size: var(--size-2); font-weight: var(--weight-medium); color: var(--tertiary-solid); margin: 0 0 var(--space-s); line-height: var(--leading-headline); letter-spacing: normal; }
.appt p { font-family: var(--font-accent); font-size: var(--size-1); color: var(--ink-prose); margin: 0 0 var(--space-s); line-height: var(--leading-appt); padding-bottom: var(--space-xs); }
.appt p:has(> .btn-solid) { padding-bottom: 0; line-height: 0; }   /* collapses the line box round the inline-block button: geometry, not leading */
/* Live's rule widget is 32px tall (15px padding each side of a 1px line). */
.appt__rule { border: 0; border-top: var(--border-width-s) solid var(--secondary-solid); width: 50%; margin: var(--space-xs) auto var(--space-l); box-sizing: content-box; }

/* Band 5 — Meet The Team -------------------------------------------------- */
.team { position: relative; color: var(--on-blue); }
.team__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 0; min-height: 300px; }
.team__copy { padding-left: var(--space-xl); padding-right: calc(var(--space-3xl) + var(--space-m)); }
/* Five avatars in a staggered honeycomb, as live draws them: two above,
 * three below, rows touching (150px pitch, no vertical gap) and the lower row
 * offset left by half a face. ONE list from the app (the first five doctors in
 * the account's order), so the stagger is a six-track grid of half-faces: each
 * face spans two tracks, the first starts at track 2, and the third wraps.
 * Every doctor after the fifth is in the markup and never shown. */
.team__faces { display: flex; flex-direction: column; align-items: center; }
.team__grid { display: grid; grid-template-columns: repeat(6, calc((150px + var(--space-2xs)) / 2)); justify-content: center; list-style: none; margin: 0; padding: 0; }
.team__grid > li { grid-column: span 2; justify-self: center; }
.team__grid > li:first-child { grid-column: 2 / span 2; }
.team__grid > li:nth-child(n+6) { display: none; }
/* The circles are a FIXED 150px on live at every width. The fallback avatar
 * (.doctor-avatar, for a doctor with no photo) takes the circle too. */
.team__face.doctor-avatar { width: 150px; height: 150px; aspect-ratio: auto; border-radius: var(--radius-round); }
.team__faces img { width: 150px; height: 150px; border-radius: var(--radius-round); object-fit: cover; display: block; }
/* Live wraps its title to two lines in a 365px column (130px tall). */
/* Black display type on live's blue (7.0:1), like all lettering on the blues
 * (owner, 4 Nov 2026); live's white was 3.00:1. */
.team__title { font-size: var(--size-8); font-weight: 700; color: var(--on-blue); margin: 0 0 var(--space-s); line-height: var(--leading-heading); letter-spacing: normal; max-width: 365px; }
/* A plain text link under the red rule: no heading, no button. */
.team__more { display: flex; align-items: center; gap: var(--space-3xs); width: fit-content; margin-top: var(--space-s); font-size: var(--size-1); font-weight: 600; color: var(--navy-on-blue); text-decoration: underline; }
.team__more svg { width: 0.5em; height: 1em; fill: currentColor; flex: none; }   /* the Click Here chevron */
.team__rule { border: 0; border-top: var(--border-width-s) solid var(--brand-solid); width: 60px; margin: var(--space-s) 0 0; }

/* Band 7 — Contact -------------------------------------------------------- */
.contact__inner { display: grid; grid-template-columns: minmax(0, 475fr) minmax(0, 665fr); gap: 0; align-items: stretch; }
.contact__col-map { padding-left: calc(var(--space-l) + var(--space-2xs)); }
.contact__title { font-family: var(--font-roboto); font-size: var(--size-5); font-weight: var(--weight-medium); color: var(--text-strong); margin: 0 0 var(--space-s); line-height: var(--leading-body); letter-spacing: normal; text-transform: capitalize; }
.contact__phone { font-family: var(--font-roboto); font-size: var(--size-5); font-weight: var(--weight-medium); color: var(--brand-solid); text-decoration: none; display: block; margin: calc(-1 * var(--space-3xs)) 0 var(--space-s); line-height: var(--leading-headline); }
.contact__phone:hover, .contact__phone:focus-visible { text-decoration: underline; }
.contact__social { margin-top: var(--space-s); }
.contact__social a { min-height: 50px; }
.contact p { font-family: var(--font-roboto); font-size: var(--size-1); color: var(--text); margin: 0; line-height: var(--leading-body); padding-bottom: var(--space-xs); }
.contact p:last-of-type { padding-bottom: var(--space-l); }
.contact__social { display: flex; gap: var(--space-2xs); list-style: none; margin: var(--space-s) 0 0; padding: 0; }
.pband .contact__social { margin-bottom: var(--space-s); }
/* /contact: live shows bare #54595F glyphs, no disc; the homepage band keeps its discs. */
.pband .contact__social a { color: var(--ink-muted); background: none; width: 32px; height: 44px; min-height: 44px; }
.pband .contact__social a:hover, .pband .contact__social a:focus-visible { background: none; color: var(--brand-solid); }
.pband .contact__social svg { width: 20px; height: 20px; }
.contact__social a {
    display: grid; place-items: center; width: 50px; height: 50px;
    background: var(--ground-mist); border-radius: 10%; color: var(--ink-icon);
}
.contact__social svg { width: 25px; height: 25px; fill: currentColor; }
.contact__social a:hover, .contact__social a:focus-visible { background: var(--brand-solid); color: var(--brand-on-solid); }
/* The map fills its column, so it ends level with the copy beside it. */
.contact__map { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; }

/* Footer ------------------------------------------------------------------ */
.site-footer__call { position: relative; background: var(--brand-blue-surface); padding-block: calc(var(--space-s) + var(--space-3xs)); padding-inline: var(--band-pad); text-align: center; }
.site-footer__call .ph-shell { padding: var(--space-2xs); }
.site-footer__call p { margin: 0; font-size: var(--size-2); font-weight: var(--weight-medium); color: var(--on-blue); line-height: 1; }
.site-footer__call a { color: var(--on-blue); text-decoration: none; }
.site-footer__call a:hover, .site-footer__call a:focus-visible { text-decoration: underline; }

/* Live: 20px top padding on the section, then a 65px inset above the columns,
 * which are 241px tall; the section measures 326px total. */
.site-footer__main { position: relative; padding: var(--space-2xl) var(--band-pad) var(--space-s); }
.site-footer__cols { display: grid; grid-template-columns: minmax(0, 408fr) minmax(0, 182fr) minmax(0, 182fr) minmax(0, 185fr); gap: 0; }
.site-footer__brand { padding-right: var(--space-2xl); }
.site-footer__brand p { max-width: 317px; }
.site-footer__brand img { width: 328px; max-width: 100%; height: auto; }
.site-footer__brand p { font-size: var(--size--1); color: var(--ink-muted); margin: var(--space-s) 0 0; line-height: var(--leading-copy); }
.site-footer h2 { font-size: var(--size-1); font-weight: var(--weight-medium); color: var(--tertiary-solid); margin: 0 0 var(--space-s); line-height: 1; letter-spacing: normal; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0; }
/* Live's footer list rows measure 203/151/99px for 8/6/4 items = ~25.3px each.
 * Keep a 24px target height so the links stay tappable. */
.site-footer li a { font-size: var(--size--1); font-weight: var(--weight-medium); color: var(--ink-muted); text-decoration: none; line-height: var(--leading-list); display: inline-block; min-height: 24px; }
.site-footer li a:hover, .site-footer li a:focus-visible { color: var(--brand-solid); text-decoration: underline; }
.btn-book--footer { font-size: var(--size--2); background: var(--brand-solid); padding: var(--space-2xs) var(--space-s); }
.site-footer__cols p { margin: var(--space-s) 0 0; }

/* Live: 20px block padding over a 66px row — a 31px divider (15px of padding
 * around a 1px rule, 20px below it) then a 35px row pulled back up 20px. */
/* padding-block was 20px; the top is now spent on the divider gap below, so
   the legal block — and the 524px footer — keep their measured height while
   the social icons stop touching the rule. */
.site-footer__legal { padding-block: 0 var(--space-s); padding-inline: var(--band-pad); }
/* The row used to carry margin-top:-20px, which exactly cancelled this rule's
   20px bottom margin and left the social icons sitting hard against the
   divider. The negative margin is gone; this margin now IS the gap. */
.site-footer__legal-rule { border: 0; border-top: var(--border-width-s) solid var(--border); margin: var(--space-xs) 0 var(--space-s); }
.site-footer__legal-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); flex-wrap: wrap; min-height: 35px; }
.site-footer__legal p { margin: 0; font-size: var(--size--1); font-weight: var(--weight-medium); color: var(--ink-muted); }
.site-footer__legal ul { display: flex; gap: var(--space-s); list-style: none; margin: 0; padding: 0; }
.site-footer__legal a { color: var(--ink-muted); display: grid; place-items: center; min-width: 24px; min-height: 24px; }
.site-footer__legal svg { width: 15px; height: 15px; fill: currentColor; }

/* Entrance reveals — one-way IntersectionObserver, never the scroll-linked
 * template .reveal. Travel 26px vertical / 18px horizontal, 760ms ease-out. */
[data-reveal] { opacity: 0; transition: opacity 760ms ease-out, transform 760ms ease-out; will-change: opacity, transform; }
[data-reveal="up"]    { transform: translateY(26px); }
[data-reveal="down"]  { transform: translateY(-26px); }
[data-reveal="left"]  { transform: translateX(-18px); }
[data-reveal="right"] { transform: translateX(18px); }
[data-reveal][data-revealed] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Responsive --------------------------------------------------------------
 * Live is an Elementor site and switches at ITS breakpoints, measured:
 *   >=1025  desktop: inline nav, two-column bands, footer 524
 *   1024-768 tablet: burger (45x45), header 179, columns STAY side by side,
 *            footer 695 (brand full width above three link columns)
 *   <=767   mobile: header 243, hero photo hidden, everything one column,
 *            footer 1201-1260
 * Reproducing the tablet tier is what the last migration got wrong by simply
 * scaling everything in rem. */

/* ---- Tablet: 1024 down to 768 ---- */
@media (max-width: 1024px) {
    .nav-toggle { display: inline-flex; }
    .site-nav__list { display: none; width: 100%; flex-direction: column; padding-bottom: var(--space-xs); }
    .site-nav__list.is-open { display: flex; }
    .site-nav__list > li { width: 100%; }
    .site-nav__link { width: 100%; justify-content: space-between; min-height: 44px; }
    .site-nav__sub { position: static; display: none; box-shadow: none; background: var(--subnav-tint); min-width: 0; }
    .site-nav__sub a { color: var(--on-blue); }
    .site-nav__sub { --focus-ring: var(--on-blue); }   /* the drawer's sub-list sits on the blue */
    .site-nav__list > li.is-open > .site-nav__sub { display: block; }
    .site-nav__list > li:hover > .site-nav__sub,
    .site-nav__list > li:focus-within > .site-nav__sub { display: none; }
    .site-nav__list > li.is-open:hover > .site-nav__sub { display: block; }
    /* Live's tablet header is 179 = a 129px bar over a 50px nav. */
    .site-header__bar-inner { min-height: 124px; }
    .site-nav__link { min-height: 44px; }
    .site-nav { padding-inline: var(--space-s); }
    .site-header__bar { padding-inline: var(--space-s); }
    .site-nav__inner { flex-wrap: wrap; align-items: center; }

    /* Live PINS its tablet paddings rather than scaling them: the welcome and
     * appointment bands take 100px/25px and contact 60px/30px, where the
     * desktop rhythm is 5vw/10vw. Still restated per tier, now on the scale:
     * at 900, 2xl + s is 90px, s-m 23px, xl/m 55/27px. */
    .welcome { padding: calc(var(--space-2xl) + var(--space-s)) var(--space-s-m); }
    .appt { padding: calc(var(--space-2xl) + var(--space-s)) var(--space-s-m); }
    .contact { padding: var(--space-xl) var(--space-m); }
    .contact__inner { align-items: stretch; }
    .contact__col-map { padding-left: var(--space-s-m); }
    /* Live drops its body type to 16px/25.6px at tablet. Ours holds the fluid
     * step (17.9px) — see CLAUDE.md, "type stays on the scale". Matching live's
     * BAND height rather than its font size keeps the composition true. */
    .contact p { line-height: var(--leading-body); padding-bottom: 0; }
    .contact p:last-of-type { padding-bottom: 0; }
    .contact__title { line-height: var(--leading-body); margin-bottom: var(--space-s); }
    .contact__phone { line-height: var(--leading-headline); margin-bottom: var(--space-s); }
    .contact__social { margin-top: var(--space-s); }
    .contact__social a { width: 40px; height: 40px; min-height: 40px; }
    .contact__social svg { width: 20px; height: 20px; }
    .band { padding-inline: var(--space-s-m); }
    .appt__inner { max-width: none; }
    /* The map holds its 365px height on live's tablet. */

    /* A 3-up row of fixed 150px circles needs 474px; below ~940 that no longer
     * fits beside the copy column, so the team band stacks rather than
     * squashing the faces. Found by the 20px width sweep at 840. */
    @media (max-width: 940px) {
        .team__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; row-gap: var(--space-l); }
        .team__copy { padding-left: 0; padding-right: 0; }
    }

    /* Columns stay side by side on live's tablet. */
    /* Live's tablet care band is 749 with both columns 646 tall (353/568). */
    .care { padding: var(--band-pad); }   /* live's 5vw, pinned at its 1024 value */
    .care__inner { align-items: stretch; gap: 0; }
    .care__body { padding-left: var(--space-s-m); display: flex; flex-direction: column; justify-content: center; }
    .care__photo { min-height: 646px; }
    .care__grid { gap: var(--space-m) var(--space-s); }
    .welcome__inner { padding-right: 0; }
    .team__copy { padding-left: var(--space-l); padding-right: 0; }
    .contact__col-map { padding-left: var(--space-l); }
    .contact__inner { gap: var(--space-s); }

    /* Live's tablet footer is 695 = 105 call + 474 main + 116 legal, and it
     * pins 20px side padding rather than following the band rhythm. */
    .site-footer__call { padding: var(--space-s-m) var(--space-s); }
    .site-footer__main { padding: var(--space-s) var(--space-s) 0; }
    /* Live's tablet footer columns are 229px under a 200px brand block, inside
     * a 454px inner with 25px top padding. */
    .site-footer__cols { row-gap: var(--space-s-m); }
    .site-footer__brand { padding-bottom: 0; min-height: 200px; }
    .site-footer__cols > div:not(.site-footer__brand) { min-height: 229px; }
    .site-footer__legal { min-height: 116px; }
    .site-footer__legal { padding: var(--space-m) var(--space-s) 0; }
    .site-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .site-footer__brand { grid-column: 1 / -1; padding-right: 0; padding-bottom: var(--space-l); }
    .site-footer__brand p { max-width: none; }
}

/* ---- Mobile: 767 and below ---- */
@media (max-width: 767px) {
    /* Live hides the hero photo column entirely and runs the copy full width
     * (measured: photo column 0x0 at 767, 600 and 390). */
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero__media { display: none; }
    .hero__copy-inner { max-width: none; margin-left: 0; }

    /* Header: live is 243 = a 173px bar over a 70px nav, logo 200x39. */
    .site-header__bar-inner { min-height: 173px; }
    .site-logo img { width: 200px; }
    .site-nav__inner { min-height: 70px; }

    /* Live pins 50px/20px on the welcome and appointment bands and keeps the
     * 5vw rhythm on the care and team bands. */
    .welcome { padding: var(--space-xl) var(--space-s); }   /* live 50/20: 48/16 */
    .appt { padding: var(--space-xl) var(--space-s); }
    .contact { padding: var(--space-xl) var(--space-m); }
    .care, .band--blue { padding: var(--band-pad); }

    .care__inner, .team__inner, .contact__inner { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
    .care__body, .team__copy, .contact__col-map { padding-left: 0; padding-right: 0; }
    /* ⚠️ Live COLLAPSES the care photo to a 110px strip on mobile — it is an
     * empty div whose 30px padding is its only height, so the photo becomes a
     * band-wide sliver rather than a portrait. Reproduced, not "fixed". */
    .care__photo { min-height: 110px; height: 110px; padding: var(--space-m); }
    .care__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
    .care__title { margin-top: var(--space-l); }
    /* Live's mobile team band is 649: a 470px face block (2+2+1 rows of 150px
     * faces in 176px cells, full-bleed across the column) over a 140px copy
     * block. It does NOT centre the copy. */
    .team__inner { text-align: left; }
    .team__faces { margin-bottom: 0; align-items: stretch; }
    .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
    .team__grid > li, .team__grid > li:first-child { grid-column: auto; }
    .team__grid > li:nth-child(5) { grid-column: 1 / -1; }
    .team__title { line-height: var(--leading-snug); margin-bottom: var(--space-s); max-width: none; }
    .team__rule { margin-inline: 0; }
    .site-footer__cols { grid-template-columns: minmax(0, 1fr); }
    .site-footer__cols > div:not(.site-footer__brand) { min-height: 0; }
    .site-footer__brand { min-height: 0; }
    /* Live's mobile footer is 1260 = 130 call + 952 main + 178 legal, its
     * columns stacked at 224/259/210/214 and the legal row stacking too. */
    .site-footer__call { padding: var(--space-s); min-height: 130px; display: grid; place-items: center; }
    .site-footer__main { padding: var(--space-s) var(--space-s) 0; }
    .site-footer__legal { padding: 0 var(--space-s); min-height: 178px; }
    .site-footer__legal-inner { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
    .site-footer__cols { row-gap: 0; }
    .site-footer__brand { min-height: 224px; }
    .site-footer__cols > div:not(.site-footer__brand) { min-height: 210px; }
    .appt__rule { width: 80%; }
    .appt__inner { max-width: none; }
    /* Live stacks contact copy (436) above the map (415) at 390. */
    .contact__inner { min-height: 0; row-gap: 0; }
    .contact__col-map { padding-top: var(--space-xl); }   /* live 50: 48 */
    .contact p { line-height: var(--leading-copy); padding-bottom: 0; }
    /* the tablet tier's 45px and 33px lines, as ratios of the phone's smaller type */
    .contact__title { line-height: var(--leading-list); }
    .contact__phone { line-height: var(--leading-snug); }
    .contact p:last-of-type { padding-bottom: var(--space-s); }
    .contact__map { height: 365px; aspect-ratio: auto; }
}

@media (max-width: 520px) {
    .site-header__bar-inner { flex-direction: column; align-items: flex-start; gap: var(--space-xs); }
    .site-header__contact { align-items: flex-start; }
    .site-logo img { width: 280px; }
    .contact__social a { width: 44px; height: 44px; min-height: 44px; }
}

/* ===========================================================================
   INNER PAGES — phase 2. Every value measured off live on 2026-09-11.
   =========================================================================== */

/* Shared page hero — 18 of 19 inner pages use this exact component: a 250px
 * band with one photo, `cover` at `100% 50%` (the family sits right, sky left,
 * which is what keeps the black H1 legible at 7.47:1 on its darkest pixel),
 * no overlay, and a 50px/700 H1 vertically centred at the 1140 shell. */
.phero {
    position: relative;
    min-height: 250px;
    display: grid;
    align-items: center;
    padding-inline: var(--band-pad);
    background: url('/assets/images/page-hero-family.81036c486e.webp') 100% 50% / cover no-repeat;
}
/* The /about/ hero is 658px on live and carries the subtitle and intro. The
 * copy sits in a 627px column so the family photo stays visible to its right. */
.phero--tall { align-items: center; padding-block: var(--space-xl); }
.phero--tall .ph-shell { max-width: var(--shell); }
.phero__sub { font-family: var(--font-accent); font-size: var(--size-2); font-weight: 600; color: var(--tertiary-solid); line-height: var(--leading-snug); letter-spacing: normal; margin: var(--space-2xs) 0 var(--space-s); max-width: 627px; }
.phero__intro { max-width: 627px; }
.phero__lede { font-size: var(--size-1); color: var(--text); line-height: var(--leading-lede); margin: 0 0 var(--space-xs); }
.phero__lede:last-child { margin-bottom: 0; }
.phero__title {
    font-size: var(--size-7);
    font-weight: 700;
    line-height: var(--leading-headline);
    /* Set every property explicitly: this class can sit on more than one tag,
     * and an inherited value breaks silently the moment the tag changes. */
    font-family: var(--font-body);
    color: var(--text-strong);
    letter-spacing: normal;
    text-transform: none;
    margin: 0;
}

/* Content bands. Live pads every inner content band 80px/30px at 1440,
 * 60/25 on its tablet and 40/20 on a phone: the --space-l-2xl and --space-s-m
 * pairs carry all three tiers (57/23 at 900, 32/16 at 390), so the
 * per-breakpoint overrides are gone. */
.pband { position: relative; padding: var(--space-l-2xl) var(--space-s-m); }
.pband--mist { background: var(--ground-mist); }
.pband--white { background: var(--surface); }
.pband__inner { width: 100%; max-width: var(--shell); margin-inline: auto; }

/* Section heading, measured: 32px/500 navy, 20px below. */
/* Band defaults sit at :where() specificity (0,0,1) so any component class
 * (.person__role, .fee-note, .lede …) overrides them. At .pband p (0,1,1)
 * they silently beat every single-class rule on the site. */
:where(.pband) h2 {
    font-size: var(--size-4);
    font-weight: var(--weight-medium);
    color: var(--tertiary-solid);
    line-height: var(--leading-headline);
    letter-spacing: normal;
    margin: 0 0 var(--space-s);
}
/* Live's "spacer" under every band heading is an Elementor divider: a 60px
 * blue rule 10px below the heading. Same 34px total as before, now visible. */
:where(.pband) h2::after { content: ""; display: block; width: 60px; height: 2px; margin-top: var(--space-2xs); background: var(--secondary-solid); }
:where(.pband) h2:is(.pcard__name, .visually-hidden, .contact-form-title, .join-lead)::after,
:where(.pband) .touch h2::after, :where(.pband) .article-body h2::after,
:where(.pband) .media-split--contact h2::after { content: none; }
:where(.pband) h3 {
    font-size: var(--size-2);
    font-weight: var(--weight-medium);
    color: var(--tertiary-solid);
    line-height: var(--leading-snug);
    letter-spacing: normal;
    margin: 0 0 var(--space-xs);
}
:where(.pband) p { font-size: var(--size-0); color: var(--ink-prose); line-height: var(--leading-body); margin: 0 0 calc(var(--size-0) * var(--leading-body)); }   /* one body line, as live's 24px */
:where(.pband) p:where(:last-child) { margin-bottom: 0; }
:where(.pband) strong, :where(.pband) b { font-weight: 700; color: var(--ink-muted); }
:where(.pband) ul, :where(.pband) ol { margin: 0 0 var(--space-xs); padding-left: var(--space-s); }
:where(.pband) li { font-size: var(--size-0); color: var(--ink-prose); line-height: var(--leading-body); margin-bottom: var(--space-3xs); }
/* ⚠️ Body links only — NEVER a button. `.pband a` is (0,1,1) and beats
 * `.btn-solid` (0,1,0), so without the :not() every button inside a content
 * band rendered crimson-on-crimson: 1:1, completely invisible. A class does
 * not beat a descendant selector — see the same trap on ayr-medical's eyebrow. */
/* Now at :where() (0,0,1), like the band defaults above, so a link component's
 * own colour (.contact-details a, .rcard__title a, .contact__social a) wins.
 * The hover rule is limited to classless body links: it has to outrank the
 * template's a:hover (0,1,1), and anything carrying a class owns its hover. */
:where(.pband) a:where(:not([class*="btn"])) { color: var(--brand-solid); }
:where(.pband) a:not([class]):hover,
:where(.pband) a:not([class]):focus-visible { color: var(--brand-solid); text-decoration: none; }

/* Practitioner card — ONE component, 25 instances across 8 pages. Measured
 * 342 + 798 columns inside the 1140 shell, an 180px circular portrait, and
 * alternating white / mist grounds down the page. */
.pcard__inner {
    display: grid;
    grid-template-columns: minmax(0, 342fr) minmax(0, 798fr);
    align-items: start;
}
/* Column 0 carries the portrait, the name and the quals — measured on live at
 * 180 photo (+10), 42 name (+10), 16 quals (+10), then a 14px spacer. */
.pcard__photo {
    width: 180px; height: 180px;
    border-radius: var(--radius-round);
    object-fit: cover; display: block; margin-bottom: var(--space-2xs);
}
.pcard__photo.is-lg { width: 250px; height: 250px; }
.pcard__photo.is-md { width: 200px; height: 200px; }
.pcard h2.pcard__name { font-size: var(--size-4); font-weight: var(--weight-medium); color: var(--tertiary-solid); line-height: var(--leading-body); letter-spacing: normal; margin: 0; }
/* `.pcard` doubles the specificity so `.pband p` and `.pcard__body p` (both
 * 0,1,1) cannot repaint the label and credentials as grey body copy. */
.pcard p.pcard__quals { font-size: var(--size-0); font-weight: 600; color: var(--brand-solid); line-height: var(--leading-snug); letter-spacing: normal; margin: 0 0 calc(var(--size-0) * var(--leading-body)); }
.pcard p.pcard__quals::after { content: ""; display: block; width: 40px; height: 2px; margin-top: var(--space-xs); background: var(--secondary-solid); }
.pcard p.pcard__role { font-size: var(--size-0); font-weight: 600; color: var(--brand-solid); line-height: var(--leading-snug); margin: 0 0 var(--space-xs); }
.pcard p.pcard__note { font-size: var(--size--1); font-weight: 600; color: var(--tertiary-solid); line-height: var(--leading-snug); margin: 0; }
/* Special-interest lists: two columns where the body column is wide enough,
 * so a long list reads as a scan rather than a wall. */
/* Columns clip outside list markers in Chromium, so the bullet is drawn. */
.pcard .pcard__interests { columns: 2 16rem; column-gap: var(--space-l); margin: 0 0 var(--space-s); padding: 0; list-style: none; }
.pcard .pcard__interests li { break-inside: avoid; position: relative; padding-left: var(--space-s); margin-bottom: var(--space-3xs); }
.pcard .pcard__interests li::before, .pcard p.pcard__interests::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: var(--radius-round); background: var(--secondary-solid); }
/* Column 1 carries the label, the prose and the CTA. */
.pcard p.pcard__label, .pcard .pcard__body h3 { font-size: var(--size-2); font-weight: 600; color: var(--tertiary-solid); line-height: var(--leading-heading); letter-spacing: normal; margin: 0 0 var(--space-s); }
.pcard__body p { font-size: var(--size-0); color: var(--ink-prose); line-height: var(--leading-body); margin: 0 0 var(--space-xs); }
.pcard__body > :last-child { margin-bottom: 0; }
.pcard p.pcard__cta { margin: var(--space-s) 0 0; line-height: 0; }   /* geometry, as .appt p above */
.pcard__cta .btn-solid { padding: var(--space-2xs) var(--space-s); font-size: var(--size--1); line-height: var(--leading-headline); }
/* The looped cards (the practitioners loop on /doctors and /our-registrars).
 * Rails holds special interests as ONE comma-separated string, so it is a line
 * of text in the interests element, drawn with the list's own bullet; empty
 * (the practitioner has none) it takes no space, leaving the label over the
 * bio as before. Bios are paragraphs separated by blank lines: pre-line keeps
 * them. The loop cannot alternate a class, so the ground alternates by
 * position among the looped siblings, from the ground the markup names. */
.pcard p.pcard__interests { columns: auto; position: relative; padding-left: var(--space-s); }
.pcard p.pcard__interests:empty { display: none; }
.pcard p.pcard__bio { white-space: pre-line; }
.pcard--stripe.pband--white:nth-child(even of .pcard--stripe) { background: var(--ground-mist); }
.pcard--stripe.pband--mist:nth-child(even of .pcard--stripe) { background: var(--surface); }
/* /our-registrars' yellow wedge: it sat inside the first card, which is now a
 * loop body, so it hangs from a zero-height anchor above the loop instead. */
.pcard-shape { position: relative; height: 0; z-index: 1; }

/* Fee schedules — live builds these as Elementor rows; a <table> is the correct
 * semantic for a billing structure and reads the same. Every value measured off
 * live on 2026-09-12:
 *   header row  navy rgb(2,0,167), white 16px/700 uppercase centred, 102px tall
 *   body rows   alternating white / rgb(236,236,236), 78px tall
 *   body cells  rgb(122,122,122) 16px/800, CENTRED (not right-aligned)
 * The first column carries the long label and is left-aligned so it stays
 * readable when it wraps. */
.fee-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 var(--space-l);
    background: var(--surface-raised);
}
.fee-table caption {
    text-align: left;
    font-weight: 700;
    color: var(--ink-muted);
    padding-bottom: var(--space-xs);
}
.fee-table thead th {
    background: var(--tertiary-solid);
    color: var(--tertiary-on-solid);
    font-size: var(--size-0);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    line-height: var(--leading-snug);
    padding: var(--space-s) var(--space-xs);
    vertical-align: middle;
}
.fee-table tbody tr { background: var(--surface-raised); }
.fee-table tbody tr:nth-child(even) { background: var(--fee-stripe); }
.fee-table tbody th,
.fee-table tbody td {
    font-size: var(--size-0);
    font-weight: var(--weight-heavy);
    /* Live's #7A7A7A measures 3.19:1 on its own #ECECEC stripe. #6B6B6B is the
     * darkest grey that clears 4.5:1 on BOTH grounds, so every row reads the
     * same rather than alternate rows being harder to read than their
     * neighbours. Applied to the whole table, not just the stripes. */
    color: var(--ink-fee);
    text-align: center;
    line-height: var(--leading-snug);
    padding: var(--space-s) var(--space-xs);
    vertical-align: middle;
    border: 0;
}
/* The label column carries the long text: left-aligned, and the one allowed to
 * wrap. Prices never break — "$85.05" split across lines is worse than a
 * scrollbar, and the wrapper scrolls for exactly that reason. */
.fee-table th[scope="row"] {
    text-align: center;           /* live centres every column, labels included */
    font-weight: 700;
    white-space: normal;
    overflow-wrap: break-word;
    min-width: 9rem;
}
/* nowrap protects a PRICE from splitting ("$85.05" -> "$8 5.0 5"); it must
 * never reach prose, which then cannot wrap and stretches the table. Applied
 * only to cells narrow enough to be values. */
.fee-table td { white-space: nowrap; }
.fee-table th, .fee-table td { overflow-wrap: normal; }
.fee-table td[colspan] { white-space: normal; }
/* Full-width sub-heading rows inside the independent-doctors schedule. */
/* Section rows would throw the zebra off by one; live keeps price rows white
 * and shades only the full-width sub-headings. */
.fee-table--wide tbody tr, .fee-table--wide tbody tr:nth-child(even) { background: var(--surface-raised); border-bottom: var(--border-width-s) solid var(--fee-stripe); }
.fee-table tbody tr.fee-table__section { background: var(--fee-stripe); }
.fee-table tbody tr.fee-table__section th { font-weight: 700; text-align: center; padding-block: var(--space-2xs); }
.fee-th-sub { display: block; text-transform: none; font-size: var(--size--1); }
/* The cancellation-fee warning: live sets it crimson, bold, italic. */
.fees p.fee-warning { color: var(--brand-solid); font-weight: 700; font-style: italic; }
.fees p.fee-lead { font-weight: 700; color: var(--ink-muted); margin-bottom: var(--space-s); }
.fee-em { color: var(--brand-solid); }
.fees h2:not(:first-child) { margin-top: var(--space-xl); }

/* Services list — live bullets each row with the practice's own mark. */
/* Services tiles — live's 3-across grid of blue cards with the yellow cross.
 * Ground is --brand-blue-surface (#008AE6), the owner's choice, not live's
 * #0099FF, with black lettering like every blue fill. */
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); }
.svc-grid li.svc-tile { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: var(--space-xs);
    background: var(--brand-blue-surface); color: var(--on-blue); text-align: center; padding: var(--space-m) var(--space-s) var(--space-l);
    font-size: var(--size-0); font-weight: 700; line-height: var(--leading-snug); min-height: 10rem; }
.svc-grid li.svc-tile:last-child:nth-child(3n+1) { grid-column: 2; }
.svc-grid img { width: 40px; height: auto; }
@media (max-width: 767px) { .svc-grid { grid-template-columns: minmax(0, 1fr); } .svc-grid li.svc-tile:last-child:nth-child(3n+1) { grid-column: auto; } .svc-grid li.svc-tile { min-height: 0; } }
@media (min-width: 768px) and (max-width: 1024px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .svc-grid li.svc-tile:last-child:nth-child(3n+1) { grid-column: auto; } }
.svc-corp h3.svc-kicker { font-size: var(--size-0); font-weight: 700; color: var(--brand-solid); margin: var(--space-m) 0 var(--space-2xs); }
.svc-corp h2 + h3.svc-kicker { margin-top: 0; }
.svc-corp p.svc-lead { font-weight: 700; color: var(--tertiary-solid); }
.svc-corp .svc-checks { list-style: none; padding: 0; margin: 0 0 var(--space-s); }
.svc-corp .svc-checks li { display: flex; gap: var(--space-2xs); align-items: baseline; margin-bottom: var(--space-3xs); }
.svc-corp .svc-checks svg { width: 14px; height: 14px; fill: var(--brand-solid); flex: none; transform: translateY(2px); }



/* Two-column media band (join-the-team, contact policy). */
.media-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); align-items: center; }
.media-split img { width: 100%; height: auto; border-radius: var(--radius-s); display: block; }

/* Contact page --------------------------------------------------------- */
.contact-details { list-style: none; margin: 0 0 var(--space-l); padding: 0; display: grid; gap: var(--space-2xs); }
.contact-details li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-xs); align-items: start;
    font-family: var(--font-accent); font-size: var(--size-0); color: var(--ink-muted); line-height: var(--leading-body); }
.contact-details svg { width: 20px; height: 20px; fill: var(--tertiary-solid); margin-top: calc(var(--space-3xs) / 2); }   /* optical: centres the glyph on the first line */
.contact-intro { font-size: var(--size-1); color: var(--tertiary-solid); line-height: var(--leading-snug); margin: 0 0 var(--space-m); }
.contact-intro::after { content: ""; display: block; width: 60px; height: 2px; margin-top: var(--space-s); background: var(--secondary-solid); }
.contact-follow { font-size: var(--size-1); color: var(--tertiary-solid); margin: var(--space-m) 0 var(--space-2xs); }
.contact-details a { color: var(--ink-muted); text-decoration: none; display: inline-block; min-height: 24px; padding-block: calc(var(--space-3xs) / 3); word-break: break-word; overflow-wrap: anywhere; max-width: 100%; }
.contact-details a:hover, .contact-details a:focus-visible { color: var(--brand-solid); text-decoration: underline; }

/* Enquiry form. Live's is an Elementor Pro form; this posts to Mediflare. */
.mf-form { display: grid; gap: var(--space-s); }
.mf-form button { justify-self: start; }
.form-note { font-size: var(--size--1); color: var(--ink-prose); line-height: var(--leading-body); }
.form-note strong { color: var(--brand-solid); }

/* Inner-page responsive ------------------------------------------------- */
@media (max-width: 1024px) {
    .phero { padding-inline: var(--space-s-m); }
    .media-split { gap: var(--space-l); }
}

@media (max-width: 767px) {
    .phero { min-height: 180px; padding-inline: var(--space-s); }
    /* The portrait goes above the copy, as live does. */
    .pcard__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); }
    .pcard__media img, .pcard__media img.is-lg, .pcard__media img.is-md { width: 180px; height: 180px; }
    .media-split { grid-template-columns: minmax(0, 1fr); }
    .fee-table th, .fee-table td { padding: var(--space-3xs) var(--space-2xs); font-size: var(--size--1); }
}

/* People grid (/staff/) — live puts the heading and intro in the card's 342
 * column and the grid in its 798: reception 2-across (349px cells), nursing
 * 3-across (233px cells), every cell 298px tall. Three people share one avatar
 * placeholder on live, reproduced rather than substituted. */
.staff__head h2 { margin-bottom: var(--space-xs); }
.staff__head p { font-size: var(--size-0); color: var(--ink-prose); line-height: var(--leading-copy); margin: 0; }
.staff__head p + p { margin-top: var(--space-xs); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-l) 0; justify-items: center; text-align: center; }
.people--2up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.people--3up { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.people img { width: 180px; height: 180px; border-radius: var(--radius-round); object-fit: cover; display: block; margin-bottom: var(--space-xs); }
.person__name { font-size: var(--size-2); font-weight: var(--weight-medium); color: var(--tertiary-solid); line-height: var(--leading-heading); letter-spacing: normal; margin: 0 0 var(--space-3xs); }
.person__role { font-size: var(--size--1); font-weight: var(--weight-medium); color: var(--brand-solid); line-height: var(--leading-snug); margin: 0; }
@media (max-width: 767px) {
    .people--2up, .people--3up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .people--2up, .people--3up { grid-template-columns: minmax(0, 1fr); } }

/* The template's website terms have no live equivalent, so nothing in live's
 * own footer links them. Published unlinked they would be an orphan, so the
 * legal row carries both. */
.site-footer__legal-links { display: flex; gap: var(--space-s); list-style: none; margin: 0; padding: 0; }
.site-footer__legal-links a { font-size: var(--size--1); font-weight: var(--weight-medium); color: var(--ink-muted); text-decoration: none; display: inline-block; min-height: 24px; }
.site-footer__legal-links a:hover, .site-footer__legal-links a:focus-visible { color: var(--brand-solid); text-decoration: underline; }
@media (max-width: 767px) { .site-footer__legal-inner { gap: var(--space-2xs); } }

/* Long-form pages (the legal pages): .article-body. */
.article-body h2 { font-size: var(--size-2); font-weight: var(--weight-medium); color: var(--tertiary-solid); line-height: var(--leading-snug); letter-spacing: normal; margin: var(--space-l) 0 var(--space-xs); }
.article-body h2:first-child { margin-top: 0; }
.article-body p { max-width: var(--measure); }
.article-body .lede { color: var(--ink-muted); }   /* live's #54595F, not the template's .lede default (--ink-mid) */
.article-body ul,
.article-body ol { max-width: var(--measure); }

/* Fee schedule extras — the gap figure sits under its price, and the wide
 * independent-doctors table scrolls rather than crushing its five columns. */
.fee-gap { display: block; font-size: var(--size--2); color: var(--ink-prose); }
.fee-sub { display: block; font-weight: 400; font-size: var(--size--1); color: var(--ink-fee); }   /* the fee grey: 4.51:1 on the stripe, where the body grey is 3.84 */
.fee-caption { font-size: var(--size-0); color: var(--ink-muted); margin: 0 0 var(--space-xs); }
.fee-table--wide { min-width: 44rem; }
.fee-scroll { overflow-x: auto; max-width: 100%; margin-bottom: var(--space-l); }
.fee-scroll .fee-table { width: 100%; min-width: min(30rem, 100%); margin-bottom: 0; }

/* 404 page — the template's own colours are not this site's. The "404"
 * numeral sat at opacity .55 (reading as washed-out grey) and the eyebrow
 * inherited a teal that appears nowhere else here. */
.notfound .eyebrow { color: var(--brand-solid); }
.notfound__code { font-size: var(--size-8); line-height: 1; letter-spacing: normal; color: var(--brand-blue-text); opacity: 1; }   /* the site's display step, as the hero headline */
.notfound h1 { color: var(--text-strong); line-height: var(--leading-heading); }
.notfound__lede { color: var(--ink-icon); line-height: var(--leading-body); letter-spacing: normal; }


/* Buttons state their own colour at a specificity no band-scoped link rule can
 * outrank. A button's text colour must never be inherited or overridable. */
a.btn-solid, a.btn-hero { color: var(--brand-on-solid); }
a.btn-book, a.btn-link { color: var(--on-blue); }
a.btn-book--footer { color: var(--brand-on-solid); }   /* the footer's Book button is on the red, which keeps white */
a.btn-ghost { color: var(--brand-solid); }
a.btn-solid:hover, a.btn-solid:focus-visible,
a.btn-hero:hover, a.btn-hero:focus-visible,
a.btn-book:hover, a.btn-book:focus-visible { color: var(--tertiary-on-solid); }
a.btn-link:hover, a.btn-link:focus-visible { color: var(--on-blue); }
a.btn-ghost:hover, a.btn-ghost:focus-visible { color: var(--brand-on-solid); }

.fee-note { font-size: var(--size--1); color: var(--ink-muted); line-height: var(--leading-body); margin: 0 0 var(--space-xs); max-width: var(--measure); }
.fee-note:last-of-type { margin-bottom: var(--space-l); }
/* Notes under a schedule: one block, body size, full width, even rhythm. */
.fee-notes { margin: var(--space-s) 0 var(--space-xl); }
.fee-notes p { font-size: var(--size-0); color: var(--ink-prose); line-height: var(--leading-body); margin: 0 0 var(--space-2xs); }
.fee-notes p:last-child { margin-bottom: 0; }

/* Health Resources ------------------------------------------------------- */
/* Curated external links. Own grid rather than reusing .care__grid, which is
   bound to the homepage two-column band. */
.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-l); margin-top: var(--space-m); }
.rcard { background: var(--surface-raised); border: var(--border-width-s) solid var(--ground-mist); border-radius: var(--radius-2xs); padding: var(--space-m); }
.pband--white .rcard { background: var(--ground-mist); border-color: transparent; }
/* Prose and blue text on the mist ground take the deeper shades, so they
 * keep 4.5:1 there; a white card inside a mist band takes the page's back. */
.band--mist, .pband--mist, .pcard--stripe.pband--white:nth-child(even of .pcard--stripe), .pband--white .rcard { --ink-prose: var(--ink-prose-mist); --brand-blue-text: var(--brand-blue-mist); }
.pcard--stripe.pband--mist:nth-child(even of .pcard--stripe) { --ink-prose: inherit; --brand-blue-text: inherit; }
.rcard__title { font-size: var(--size-1); font-weight: 600; margin: 0 0 var(--space-2xs); line-height: var(--leading-snug); letter-spacing: normal; }
.rcard__title a { color: var(--brand-blue-text); text-decoration: none; }
.rcard__title a:hover, .rcard__title a:focus-visible { color: var(--brand-solid); text-decoration: underline; }
.rcard p { font-size: var(--size-0); color: var(--ink-icon); margin: 0; line-height: var(--leading-body); }

/* Footer legal row: the three items each sit in a 24px-tall box, but they
   filled it differently — the privacy links are inline-block, so their text
   hugged the TOP of the box, while the social icons are grid+place-items:center,
   so their 15px glyph sits in the MIDDLE. Centring the link text in its own box
   makes all three share one optical centre line. A padding nudge on the icons
   only masked it, and broke again at other widths. */
.site-footer__legal-links a { display: grid; place-items: center; }
.site-footer__legal-inner > p { display: grid; place-items: center; min-height: 24px; }
/* MEASURED at 1440: the social <li> rendered 31px tall while its <a> is 24px,
   because a list-item is an inline formatting context and leaves ~7px of
   descender space below the link. The icon therefore centred in the LINK box,
   8px above the text's centre line (svg mid 4493.4 vs text mid 4501.4), even
   though the <ul> and the text boxes themselves aligned exactly. Making the
   item a flex box collapses that leftover space so the glyph centres on the
   row. Do not chase this with padding — the offset is the descender gap. */
.site-footer__social li { display: flex; }
/* The link carried min-height:24px but no height, so as a flex item it shrank
   to its 15px glyph and centred THAT — leaving the icon 4.5px above the text's
   centre line. An explicit height gives it the full 24px box to centre within.
   MEASURED at 1440: svg mid 4496.9 -> 4501.4, exactly matching the copyright
   and privacy links at 4501.4. Verified by injecting the rule into the live
   DOM and re-measuring, not by eye. */
.site-footer__social li a { height: 24px; display: flex; align-items: center; justify-content: center; }
/* NOTE the `li` in that selector: `.site-footer li a` (line ~1473) sets
   display:inline-block at specificity (0,1,2) and beat `.site-footer__social a`
   at (0,1,1) no matter where it sat in the file — height applied, display did
   not, and the flex centring silently never ran. Two rules must AGREE on
   specificity, not just order. */

/* Patient Resources — label/link rows ------------------------------------ */
/* Live renders these as one "Label: url" line each. The original build turned
   them into broken <ul> fragments with URLs split across two <a> tags; this is
   a <dl> so the label/value relationship is real rather than visual. */
.reslist { margin: var(--space-s) 0 0; display: grid; gap: var(--space-2xs); }
.reslist__row { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-2xs); align-items: baseline; }
.reslist dt { font-weight: 600; color: var(--text-strong); margin: 0; }
.reslist dd { margin: 0; color: var(--ink-prose); }
.reslist a { color: var(--brand-blue-text); word-break: break-word; }
.reslist a:hover, .reslist a:focus-visible { color: var(--brand-solid); }
.reslist__alert { margin: var(--space-s) 0; }
.reslist__links { list-style: none; margin: var(--space-s) 0 0; padding: 0; display: grid; gap: var(--space-2xs); }
.reslist__links a { color: var(--brand-blue-text); }
.reslist__links a:hover, .reslist__links a:focus-visible { color: var(--brand-solid); }


/* About — Our Mission beside live's pull quote ---------------------------- */
.mission { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xl); align-items: center; }
.mission-quote { margin: 0; text-align: center; max-width: 26rem; justify-self: center; }
.mission-quote__mark { width: 40px; height: 40px; fill: var(--brand-solid); display: block; margin: 0 auto var(--space-2xs); }
.mission-quote blockquote { margin: 0; padding: 0; border: 0; }
.mission-quote blockquote p { font-size: var(--size-2); font-style: italic; color: var(--tertiary-solid); line-height: var(--leading-snug); margin: 0 0 var(--space-s); }
.mission-quote figcaption { font-size: var(--size--1); color: var(--ink-prose); line-height: var(--leading-body); }
@media (max-width: 767px) { .mission { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); } }

/* Join the Team ------------------------------------------------------------ */
.pband h2.join-lead { font-size: var(--size-4); font-weight: 700; line-height: var(--leading-heading); margin-bottom: var(--space-m); }
.pband ul.dot-list { list-style: none; padding-left: var(--space-s); }
.pband ul.dot-list li { position: relative; padding-left: var(--space-s); margin-bottom: var(--space-2xs); }
.pband ul.dot-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: var(--radius-round); background: var(--brand-solid); }
.touch { text-align: center; }
.pband .touch h2 { color: var(--brand-solid); font-weight: 700; }
.pband .touch p { margin-bottom: var(--space-3xs); }
.touch .mf-form { max-width: 38rem; margin: var(--space-m) auto 0; text-align: left; }

/* Compact forms, as live: the field name sits in the box (the label stays in
 * the accessibility tree), and SEND runs the full width of the form. */
.mf-form--compact { gap: var(--space-2xs); }
.mf-form--compact p:has(> button) { margin: var(--space-3xs) 0 0; }
.mf-form--compact button.btn-solid { width: 100%; justify-content: center; }

/* Contact ------------------------------------------------------------------ */
.media-split--contact { align-items: start; }
.pband p.contact-appt { margin-bottom: var(--space-m); }
.pband h2.contact-form-title { font-size: var(--size-1); line-height: var(--leading-copy); margin: 0 0 var(--space-xs); }
.pband.contact-map-band { padding-top: 0; padding-bottom: var(--space-2xl); }
.media-split--policy { align-items: start; }
.media-split--policy img { aspect-ratio: 53 / 50; object-fit: cover; object-position: 50% 30%; }
.pband p.policy-warning { color: var(--brand-solid); font-weight: 700; margin-bottom: var(--space-xs); }

/* Mobile header + footer, centred (owner's request 2026-10-02). Appended last
 * so it outranks the live-measured min-heights above, which pinned the button
 * flush against the navbar and let footer columns run into each other. */
@media (max-width: 767px) {
    .site-header__bar-inner { flex-direction: column; align-items: center; justify-content: center; text-align: center;
        gap: var(--space-xs); min-height: 0; padding-block: var(--space-s) var(--space-m); }
    .site-header__contact { align-items: center; gap: var(--space-xs); }

    .site-footer__main { text-align: center; }
    .site-footer__cols { row-gap: var(--space-l); }
    .site-footer__cols > div, .site-footer__cols > div:not(.site-footer__brand), .site-footer__brand { min-height: 0; padding: 0; }
    .site-footer__brand img { margin-inline: auto; display: block; }
    .site-footer__brand p { margin-inline: auto; max-width: 32rem; }
    .site-footer h2 { margin-bottom: var(--space-xs); }
    .site-footer__legal { min-height: 0; padding-block: 0 var(--space-m); }
    .site-footer__legal-inner { align-items: center; text-align: center; gap: var(--space-s); }
    .site-footer__legal-links, .site-footer__social { justify-content: center; }
    .site-footer__main { padding-top: var(--space-xl); padding-bottom: var(--space-m); }
    .site-footer__call a { white-space: nowrap; }
}
/* Bigger tap area for resource links without changing the line box. */
.rcard__title a, .reslist a { padding-block: calc(var(--space-3xs) / 2); }

/* Sub-labels split out of run-on paragraphs ("Areas of Support", "Services include:"). */
.pband p.sublabel { margin: var(--space-xs) 0 var(--space-3xs); }
.pband p.sublabel strong { color: var(--ink-muted); }

@media (max-width: 1024px) {
    /* Tablet footer: the live-measured min-heights left a gap under the brand block. */
    .site-footer__brand, .site-footer__cols > div:not(.site-footer__brand) { min-height: 0; }
    /* Homepage contact copy: the tablet tier zeroed the paragraph gap. */
    .contact p { padding-bottom: var(--space-2xs); }
    .site-footer__main { padding-top: var(--space-l); }
    /* About hero: the intro sits over the family photo once the columns
     * narrow; a light card keeps it readable without hiding the photo. */
    .phero--tall .ph-shell { background: var(--card-veil); padding: var(--space-s) var(--space-m); border-radius: var(--radius-s); max-width: 40rem; margin-inline: 0; }
}
@media (max-width: 767px) {
    .phero--tall .ph-shell { padding: var(--space-s); max-width: none; }
}

/* Doctor photos come from the app (photo_url, #301), inside a .doctor-avatar box
 * that shows the fallback for a doctor without one. The box keeps the photo's own
 * size and shape, which .doctor-avatar would otherwise set. */
.pcard__photo.doctor-avatar { aspect-ratio: auto; border-radius: var(--radius-round); display: flex; }
/* The fallback's gradient is for a doctor with no photo: under a photo it shows as
 * a hairline ring at the anti-aliased edge, so a box holding a photo has none. */
.doctor-avatar:has(img) { background: none; }
