/*
 * 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 (its blue, orange and navy, the white page,
 * the #424242 body text, 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 (the Elementor kit, measured
     * 2026-09-08), 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 blue and the navy pass every contrast target as they are, so
     *    every role of theirs paints the hex itself.
     *  - The orange is too light for white text (2.6:1) and for text or
     *    icons on white. Its fills (buttons, the footer bar, the phone menu's
     *    current page, the card and hours-card edges, the squiggle) paint the
     *    hex; their lettering is Dials' on-solid, black (8.1:1). Orange text
     *    is --secondary-on-soft (#AC591D, 4.5:1); orange icons, large
     *    numbers and the field edge are --secondary-line (#D77027, 3:1),
     *    which is also the button's hover fill (live's darker orange is
     *    #DB6E24).
     *  - The mid blue is --info: the FAQ-photo blue and the far end of every
     *    blue gradient, and the source of the pale blue, the hero ground and
     *    the other blues below (site layer). The site shows no status
     *    messages in it; it stays a mid blue, so it still reads as info. */
    --brand: hsl(210.8 77% 27.3%);       /* #10447B, the blue: waves, the footer, the nav, rules, links, the focus ring */
    --secondary: hsl(25 90.9% 57.1%);    /* #F5812E, the orange: buttons, ticks, the squiggle, counters, the footer bar */
    --tertiary: hsl(210 61.8% 13.3%);    /* #0D2237, the navy: headings, pills, the "Powered by" bar */
    --success: hsl(126 46% 33%);         /* the status colours: the template's */
    --warning: hsl(37 74% 54%);
    --danger: hsl(3 56% 48%);
    --info: hsl(205.8 58.2% 43.1%);      /* #2E77AE, the mid blue (see above) */
    --grey: hsl(0 0% 50%);               /* live's greys are pure (#424242, #333333, #D8D8D8): no tint */

    /* Paper and ink, exact. The white page, and an ink that puts Dials' body
     * text (--text, 86% of the ink into the paper) on live's #424242 exactly.
     * The ink itself, --text-strong, is #282828; live's headings are the
     * navy, which the site's rules set themselves. */
    --paper-light: hsl(0 0% 100%);       /* #FFFFFF */
    --ink-light: hsl(0 0% 15.8%);        /* #282828 */

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

    /* Type and space: live sizes type in rem on a fluid root (12px +
     * 0.3125vw: 16.5px body at 1440, 13.2px at 390) and spaces in fixed px on
     * a 10/20/30/40/60/80/120 rhythm. At 1440 these reproduce both: body
     * 16.5, steps 1-6 at 20.6, 25.7, 32.1, 40.0, 49.9, 62.3 (live 20.6,
     * 24.75, 33, 41.25, 49.5, 66), and the space steps land on live's px
     * (2xs 10, s 20, m 30, l 40, xl 60, 2xl 80, 3xl 120). On a phone body is
     * 14.5 (the fleet floor; live was 13.2) and a gentler 1.22 ratio keeps
     * the headings where live had them; spacing is 0.8 of desktop. */
    --screen-min: 390;
    --screen-max: 1440;
    --size-min: 14.5;
    --size-max: 16.5;
    --ratio-min: 1.22;
    --ratio-max: 1.248;
    --space-min: 16;
    --space-max: 20;
    --space-density: 1;

    /* Type: Dials' one type dial is line height, --leading-body: body text
     * 1.5, which every element without its own inherits. Weights and letter
     * spacing are written as values on the rules that use them: body 400
     * (Nunito); headings, buttons, labels and bold 700; the nav, the
     * doctors' qualifications and a few runs 600. Live tracks nothing; the
     * buttons' capitals are opened up by 0.04em. */
    --leading-body: 1.5;
    /* Cavenagh's own type tokens: values measured off live, role by role.
     * Live sets line height by role, not by size, so the site's rules read
     * these as numbers that hold at every size, rather than Dials' size
     * curve (--leading, which the template's own small print uses): live
     * sets 1.5 on most 25px card titles and 1.4 on its 20px ones. A few are
     * fixed px, which no unitless leading holds at every width. Weights
     * beyond 400, 600 and 700 are tokens too, since live sets five. */
    --leading-headline: 1.2;  /* headings and display type at a flat line height: the titles, the counters, the flip cards, the legal pages' h2 */
    --leading-title: 1.1;     /* the 62px page titles (.title--xl) */
    --leading-snug: 1.3;      /* the 32px titles, doctors' names, the core statement, phone sub-menu rows, search status */
    --leading-subhead: 1.4;   /* the 20px titles: strip, FAQ, icon boxes, cards, the footer tagline, form labels */
    --leading-loose: 1.6;     /* the Manrope ledes (reminders, careers link cards) */
    --leading-nav: 20px;      /* the menu links and the sub-menu: live's fixed 20px row */
    --leading-pill: 15px;     /* the pills: live's fixed 15px */
    --leading-pill-lg: 22px;  /* the hero pill and the large pills: live's fixed 22px */
    --leading-flip: 1.5rem;   /* the flip cards' back text: live's fixed 24px on small print */
    --weight-medium: 500;     /* Nunito and Manrope Medium: ledes, card copy, the FAQ answers */
    --weight-heavy: 800;      /* Nunito and Manrope ExtraBold: the pills, the 01/02/03 numerals, the FAQ questions */
    --tracking-tight: -2px;   /* the careers page's tall link-card title: live's fixed -2px */

    /* Corners: --radius-l 20px (cards, photos, panels), --radius-m 12.5px,
     * --radius-s 6.25px; live's 10px corner (buttons, fields, small photos,
     * the pull cards) is --radius-tile, its own value. Accent rules and
     * active states are 4px, not Dials' 3px. */
    --radius-base: 12.5;
    --radius-tile: 10px;
    --border-width-l: 4px;

    /* Faces: Nunito for body, Helvetica for headings, Manrope for the
     * reminders lede and the numerals (Google Fonts, in each page's <head>). */
    --font-body: "Nunito", "Segoe UI", sans-serif;
    --font-heading: Helvetica, Arial, sans-serif;
    --font-accent: "Manrope", "Nunito", sans-serif;
    --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;
}

h1, .h1 { font-size: var(--size-5); }
h2, .h2 { font-size: var(--size-4); }
h3, .h3 { font-size: var(--size-3); }
h4, .h4 { font-size: var(--size-2); }
h5, .h5 { font-size: var(--size-1); }
h6, .h6 {
    font-size: var(--size-0);
    letter-spacing: 0.04em;   /* 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.04em;   /* 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;
}

/* ── 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);
    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.04em;   /* 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;
}

/* ═══════════════════════════════════════════════════════════════════════
 * CAVENAGH MEDICAL CENTRE — site layer
 *
 * Everything above this line is the shared template (Dials, the site's
 * dials, the template's tokens and base layers). Everything below retunes
 * it to the practice's own design, transcribed from the WordPress site at
 * www.cavmed.com.au on 2026-09-08. Values are measured, not chosen. Two
 * conventions worth knowing before editing:
 *
 *  - The source sets its root font-size fluidly (12px + 0.3125vw) and sizes
 *    type in rem. Here the root stays 100% and every size is a Dials step
 *    tuned through the scale dials in "This site's dials" (fitted to live).
 *  - The source's paddings and gaps are fixed pixels per breakpoint (tablet
 *    1024, mobile 767). Here every margin, padding and gap is a --space-*
 *    step or a sum of them, fitted to live's px at the width each block
 *    targets (1440 for the base rules, 1024 tablet, 390 mobile). Elementor's
 *    small negative offsets (-6 to -13px) become -3xs / -2xs, and one-off
 *    nudges under a step are fractions of --space-3xs.
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* --- Live's other colours, as patterns from the dials ----------------
     * Each is a mix of tokens in OKLab that paints live's colour to within
     * a rounding step (live's hex in the comment). color-mix() rather than
     * relative colour, so Dials' fallback browsers draw them too. */
    --mid-blue: var(--info-solid);                                              /* #2E77AE, the FAQ-photo blue and the far end of the blue gradients */
    --pale: color-mix(in oklab, var(--info-solid) 15%, var(--surface));         /* #E0EAF3 (live #E0EAF4): the pale-blue bands, pills and hovers */
    --hero-bg: color-mix(in oklab, var(--info-solid) 26%, var(--surface));      /* #C9DBEB (live #C9DCEB): behind the home hero photo */
    --cream: color-mix(in oklab, var(--secondary-solid) 12%, var(--surface-lowered));  /* #F7E8DF (live #F8E8DD): the hours card, the policy cards */
    --text-alt: color-mix(in oklab, var(--text) 43%, var(--text-strong));       /* #333333: some body runs */
    --sub: color-mix(in oklab, var(--text) 68%, var(--tertiary-solid));         /* #31383F (live #33373D): the desktop sub-menu items */
    --rule: color-mix(in oklab, var(--text) 19%, var(--surface));               /* #D8D8D8: the counters divider, the FAQ rules, the phone menu's hairlines */
    /* The orange as small text on the site's own tints (the pale blue, the
     * cream), which are not Dials surfaces: --secondary-on-soft (#AC591D) is
     * 4.5:1 on Dials' surfaces but 4.1:1 there, so this takes it a step
     * towards the ink: #975223, 4.9:1 on both. The reminders' numerals, the
     * icon-box and contact-box titles. Large orange text on a tint (the
     * policy cards' titles, the fees) is the on-soft itself, 4.1:1. */
    --secondary-on-tint: color-mix(in oklab, var(--secondary-on-soft) 85%, var(--text-strong));

    /* Live's three card shadows: pure black at low strength (a shadow is
     * darkness, not a palette colour). */
    --shadow-card: 0 1px 20px color-mix(in srgb, black 4%, transparent);      /* the services list, the contact form */
    --shadow-pull: 0 1px 20px color-mix(in srgb, black 8%, transparent);      /* the services page's pull cards */
    --shadow-polcard: 0 0 10px color-mix(in srgb, black 50%, transparent);   /* the white policy cards */

    /* --- Form controls & focus (the template section's tokens) ---------
     * Fields are live's orange-edged boxes on a clear ground, with the
     * buttons' corner (--control-radius: the 10px Book button); the
     * single-line height keeps live's padded box where it beats 44px (46.8
     * at 1440), and their text keeps the body's 1.5 leading, which live's
     * fields inherited. ONE focus ring: Dials' --focus, the brand blue
     * (9.8:1 on white, 8.4 on the pale blue, 3.78 on the fields' orange
     * edge), re-set to white on the blue and navy grounds below. */
    --field-h: max(var(--target-min), calc(1lh + var(--space-2xs) * 2 + var(--field-border-w) * 2));
    --field-textarea-h: 161px;            /* live's */
    --field-leading: var(--leading-body);
    --field-pad-block: var(--space-3xs);
    --field-pad-inline: var(--space-xs);
    --control-radius: var(--radius-tile); /* 10px: the Book/Learn more buttons; fields share it */

    --shell-w: 1290px;

    /* --- Wave clearances -----------------------------------------------
     * A band under a wave pads by the wave's rendered height plus a step.
     * Below 1024 a wave paints at min(design height, 7vw) (see .wave), so
     * these are wave DIMENSIONS, not spacing, kept in one place. */
    --wave-clear: min(50px, 7vw);              /* the standard 50px wave */
    --wave-clear-tall: min(58px, 7vw);         /* who/core/careers: the tallest of their waves */
    --wave-clear-deserve: min(42px, 7vw);
    --wave-clear-afterhours: min(75px, 7vw);
    --wave-clear-which: min(91px, 7vw);
    --wave-clear-fees: min(100px, 7vw);
    --wave-clear-articles: min(125px, 7vw);
}
/* The fields' edge, on the four selectors the Form controls section
 * declares its colours on: the orange at the line's 3:1 (#D77027; live's
 * #F5812E edge was 2.6:1). Fields keep the section's ground, the raised
 * surface: white, as the cards they sit on. */
:root, [data-dials], .is-light, .is-dark {
    --field-border: var(--secondary-line);
}

h1, h2, h3, h4, h5, h6 { text-wrap: wrap; overflow-wrap: normal; }   /* the template balances headings; the source wraps plainly */
strong, b { font-weight: 700; }   /* live's bold runs are 700; the template's are 600 */

.skip-link { position: absolute; top: -100px; left: 0; z-index: var(--layer-top, 2147483647); padding: var(--space-3xs) var(--space-2xs); background: var(--surface); color: var(--brand-on-soft); }
.skip-link:focus { top: 0; }

/* ── Shared pieces ────────────────────────────────────────────────── */

/* Mobile browsers paint -webkit-tap-highlight-color over a tapped link. The
 * default is a sky blue on Android/Chrome, which is not a colour in this
 * palette. Use the pale blue the sub-menu hover already uses, so a tap looks
 * like the hover state rather than a stray system colour. The alpha is low
 * because the highlight composites OVER the element: at 0.6 the orange active
 * pill washed out to a muddy (232,192,165), where 0.3 leaves it orange. */
a, button, [role="button"], summary { -webkit-tap-highlight-color: color-mix(in srgb, var(--pale) 30%, transparent); }

.shell { max-width: var(--shell-w); margin-inline: auto; }
.band .u-container { max-width: var(--shell-w); padding-inline: 0; }   /* the straddle gate looks for .overlap > .u-container > * */
.band { position: relative; padding-inline: var(--space-l); }
.title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size-5);
    font-weight: 700;
    line-height: var(--leading-headline);
    color: var(--tertiary-on-soft);
}
.text-500 { font-weight: var(--weight-medium); }
.text-600 { font-weight: 600; }
p { margin: 0; }
p, li, td { line-height: var(--leading-body); }

.pill {
    display: inline-block;
    margin: 0;
    padding: var(--space-xs) var(--space-s);   /* the rounded ends need noticeably more room across than down */
    line-height: var(--leading-pill);
    border-radius: var(--radius-pill);
    background: var(--pale);
    font-family: var(--font-body);
    font-size: var(--size--1);
    font-weight: var(--weight-heavy);
    text-transform: uppercase;
    text-align: center;
    color: var(--tertiary-on-soft);
}
.pill--outlined { padding-block: var(--space-2xs); border: 1px solid var(--tertiary-line); }   /* the visible outline makes the same padding read as roomier than on the filled pills */

.btn,
.mf-search__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3xs);
    padding: var(--space-2xs) var(--space-s);
    border: 0;
    border-radius: var(--control-radius);
    background: var(--secondary-solid);
    font-family: var(--font-body);
    font-size: var(--size--1);
    font-weight: 700;
    line-height: var(--leading-body);
    letter-spacing: 0.04em;   /* deviation: the source has none; small uppercase on a saturated fill needs a little air */
    text-transform: uppercase;
    text-decoration: none;
    color: var(--secondary-on-solid);   /* Dials' lettering on the orange: black, 8.1:1 (live's white was 2.6:1) */
}
.btn, .mf-search__submit { transition: background var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.btn:hover, .btn:focus-visible, .mf-search__submit:hover {   /* owner 2026-09-17: deepen a step and lift, rather than the blue swap; the deeper orange is the line (#D77027, live #DB6E24) */
    background: var(--secondary-line);
    color: var(--secondary-on-solid);
    transform: translateY(-2px);
}
.btn:hover { box-shadow: 0 6px 16px color-mix(in srgb, var(--tertiary-solid) 22%, transparent); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover, .btn:focus-visible { transform: none; } }
.btn__icon { width: 12px; height: 12px; fill: currentColor; flex: none; }

/* Elementor's highlight headline: a hand-drawn stroke under the words. */
.highlight { position: relative; display: inline-block; z-index: var(--layer-base); }
.squiggle {
    position: absolute;
    top: -10px; left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    z-index: var(--layer-behind);
    fill: none;
    stroke: var(--secondary-solid);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

/* The squiggle draws itself on as it scrolls into view. Same reasoning as the
 * .reveal block above: the animation only exists inside no-preference, and the
 * undrawn state (dashoffset: 600) is only ever set by the animation itself, so
 * a browser without animation-timeline — or a reduced-motion visitor — gets the
 * finished squiggle rather than a stroke that never arrives. 600 comfortably
 * exceeds the path's ~548-unit length, which preserveAspectRatio="none" stretches. */
@media (prefers-reduced-motion: no-preference) {
    .squiggle path {
        animation: squiggle-draw linear both;
        animation-timeline: view();
        animation-range: entry 20% cover 40%;
    }

    /* The hero squiggle is above the fold, where a view() timeline is already
     * past its range on load and would paint the finished stroke. It runs on a
     * plain time-based animation instead, delayed to land after the hero's
     * staggered reveal. Note it is the ANIMATION that hides the stroke, never a
     * static rule: if the animation never runs, the squiggle is simply there. */
    .hero__title .squiggle path {
        animation: squiggle-draw var(--duration-slow) var(--ease-out) 620ms both;
        animation-timeline: auto;
    }
}

@keyframes squiggle-draw {
    from { stroke-dasharray: 600; stroke-dashoffset: 600; }
    to   { stroke-dasharray: 600; stroke-dashoffset: 0; }
}

/* Tick lists: icon + text, 5px row padding, 5px between rows (the source's
 * icon-list widget). The default icon is 15px; the --big variant is 20px. */
.ticklist { list-style: none; margin: 0; padding: 0; }
.ticklist li { display: flex; align-items: center; padding-bottom: var(--space-3xs); }
.ticklist li + li { margin-top: var(--space-3xs); }
.ticklist li:last-child { padding-bottom: 0; }
.ticklist__icon { flex: none; width: 15px; height: 15px; margin-right: calc(var(--space-3xs) / 2); fill: var(--secondary-line); }
.ticklist span { padding-left: var(--space-3xs); color: var(--tertiary-on-soft); }
.ticklist--600 span { font-weight: 600; }
.ticklist--big .ticklist__icon { width: 20px; height: 20px; margin-right: var(--space-3xs); }

/* ── Waves (Elementor "waves" divider, three layered paths) ────────── */
.wave { position: absolute; left: 0; width: 100%; overflow: hidden; line-height: 0; pointer-events: none; }
/* --wave-render is the height the wave actually paints at; --wave-h is the
 * per-instance design height measured off live. They are the same above 1024,
 * where the viewport is wide enough for the shape to read as designed. Below
 * that, see the cap in the 1024 block: the SVG is viewBox 0 0 1000 100 with
 * preserveAspectRatio="none", so a fixed pixel height against a narrowing
 * viewport compresses the curve horizontally and the slopes get steep — at 390
 * a 50px wave is ~3.7x the slope it has at 1440. Anything keyed to a wave's
 * height must use --wave-render, not the raw --wave-h. */
.wave { --wave-render: var(--wave-h, 50px); }
.wave svg { position: relative; left: 50%; display: block; max-width: none; width: calc(100% + 1.3px); height: var(--wave-render); transform: translateX(-50%); }
.wave--wide svg { width: calc(130% + 1.3px); }
.wave--top { top: -1px; }
.wave--bottom { bottom: -1px; transform: rotate(180deg); }
.wave--flip { transform: scaleX(-1); }
.wave--bottom.wave--flip { transform: rotate(180deg) scaleX(-1); }
.wave--white path { fill: var(--surface); }
.wave--blue path { fill: var(--brand-line); }
.wave--pale path { fill: var(--pale); }

/* ── Header ───────────────────────────────────────────────────────── */
.site-header { position: relative; z-index: var(--layer-nav); }
.topbar {
    position: relative;
    z-index: var(--layer-raised);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-l);
    width: min(100%, 1200px);
    min-height: 130px;
    margin: 0 auto;
    padding: var(--space-m) var(--space-xl-2xl) var(--space-xs);   /* 95 at 1440; the logo column gives way first below ~1200 */
    background: var(--surface);
}
.site-logo { flex: 0 1 460px; min-width: 200px; display: block; }
.site-logo img { display: block; width: 284px; height: auto; margin-left: calc(var(--space-3xs) / 2); }
.topbar__hours { flex: 0 0 230px; display: flex; align-items: flex-start; gap: var(--space-s); }
.topbar__icon { flex: none; width: 20px; height: 20px; fill: var(--secondary-line); }
.topbar__icon--sm { width: 15px; height: 15px; }
.topbar__title {
    display: block;
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size--1);
    font-weight: 700;
    line-height: var(--leading-subhead);
    color: var(--tertiary-on-soft);
    text-decoration: none;
}
.topbar__text { margin: 0; font-size: var(--size--1); line-height: var(--leading-body); color: var(--text-alt); }
.topbar__text .hours-table, .topbar__text .hours-table tbody, .topbar__text .hours-table tr { display: block; margin: 0; padding: 0; border: 0; }
.topbar__text .hours-table td { display: inline; padding: 0; border: 0; font-size: inherit; line-height: inherit; color: inherit; white-space: normal; }
.topbar__text .hours-table td + td::before { content: " "; }
.topbar__book { flex: 0 0 241px; padding: var(--space-2xs); }
.topbar__phone { display: flex; align-items: center; gap: var(--space-s); margin: 0; }
.topbar__icon-link { display: inline-flex; }
.topbar__book .nav-cta {
    /* how far the 44px floor outgrows live's padded label (0 once it is taller) */
    --_overhang: min(0px, calc(1lh + var(--space-2xs) * 2 - var(--target-min)));
    margin-top: var(--space-3xs);
    margin-bottom: var(--_overhang);   /* into the whitespace below, clear of the phone line above */
}

.nav-toggle { display: none; }

.navband { position: relative; z-index: var(--layer-base); background: var(--surface); padding: var(--space-xs) var(--space-3xl) var(--space-l); }
.primary-nav { width: max-content; max-width: 100%; margin: 0 auto; padding-top: var(--space-s); border-top: 1px solid var(--brand-line); }
.nav-list { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.nav-list > li { position: relative; display: flex; }
.nav-link {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: var(--space-xs) var(--space-s);
    border: 0;
    background: none;
    font-family: var(--font-heading);
    font-size: var(--size-0);
    font-weight: 600;
    line-height: var(--leading-nav);
    color: var(--brand-on-soft);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--secondary-on-soft); transform: translateY(-8px); }   /* the source's "float" hover */
.nav-link.active, .nav-link[aria-current="page"] { color: var(--secondary-on-soft); }   /* the orange as text, 4.5:1 on white (live's #F5812E was 2.6:1) */
.nav-caret { width: 16px; height: 16px; margin-left: var(--space-2xs); fill: currentColor; }
.nav-sub-toggle { display: inline-flex; align-items: center; margin-left: calc(-1 * var(--space-2xs)); padding: var(--space-xs) var(--space-s) var(--space-xs) 0; border: 0; background: none; color: var(--brand-on-soft); cursor: pointer; }
.nav-sub-toggle .nav-caret { margin-left: 0; }
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: var(--layer-overlay);
    display: none;
    min-width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--surface-raised);
    border-radius: var(--radius-xs);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--tertiary-solid) 12%, transparent);   /* the source shows none in a resting probe; a light lift keeps the panel legible over the hero photo */
}
.has-children:hover > .sub-menu, .has-children:focus-within > .sub-menu, .has-children.is-open > .sub-menu { display: block; }
.sub-menu a {
    display: block;
    padding: var(--space-xs) var(--space-s);
    font-family: var(--font-heading);
    font-size: var(--size-0);
    font-weight: 700;
    line-height: var(--leading-nav);
    white-space: nowrap;
    color: var(--sub);
    text-decoration: none;
}
.sub-menu a:hover, .sub-menu a:focus-visible { background: var(--pale); color: var(--brand-on-soft); }
.sub-menu li:first-child a { border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.sub-menu li:last-child a { border-radius: 0 0 var(--radius-xs) var(--radius-xs); }

/* ── Site search ──────────────────────────────────────────────────── *
 * mediflare.js writes the box unstyled; every rule here is this site's, on
 * its tokens. One overlay, built by mediflare.js (.mf-search-overlay),
 * opened by three buttons (data-mf-search-open), each the site's own kind
 * of item, so neither header bar changes:
 *   - 768px up: a magnifier at the end of the menu row, after Contact,
 *     drawn as a menu item (.nav-link--search);
 *   - phones: "Search", the first row of the menu drawer;
 *   - every width: "Search this site" in the footer's third column, under
 *     the address, drawn as a footer link.
 * The overlay is a centred card over a dimmed page from 768px up and fills
 * the screen on phones. Closing it returns focus to the button that opened
 * it. Never inside the menu on desktop, and never the drawer's only way in:
 * the footer has one at every width. The overlay and the results list are
 * styled ONLY through :not([hidden]): a display of their own would override
 * [hidden] and they would never close. Search joins the .btn rules. */

/* The menu row's magnifier: a menu item, the menu's blue and float, 44px
 * across. One per layout: the row's from 768px, the drawer's on phones. */
.nav-link--search { justify-content: center; gap: var(--space-2xs); min-inline-size: var(--target-min); padding-inline: 0; }
.nav-link--search svg { flex: none; }
.nav-list > .nav-search--drawer { display: none; }   /* beats .nav-list > li */

/* Where the row is tight, it closes up a step so the magnifier fits without
 * wrapping it or changing its height (measured 768 to 1920, every 20px and
 * +-1 at each edge): from
 * 768 to 807px, the navband's side padding (set here with the header's
 * class, since the Tablet block below sets it too), and from 1145 to
 * 1227px, where the row is one line with no room to spare, the links' side
 * padding. From 1025 to 1144px the row is already two lines, and the
 * magnifier joins the second. */
@media (min-width: 768px) and (max-width: 807px) {
    .site-header .navband { padding-inline: var(--space-s); }
}
@media (min-width: 1145px) and (max-width: 1227px) {
    .nav-link:not(.nav-link--search) { padding-inline: var(--space-xs); }
}

/* The footer's: drawn as a search field, the width of its column, under
 * the address. Its look is the --field-* tokens; on the blue footer they
 * are re-set on the container (.footer-main, with the other dark grounds),
 * never here. */
.footer-search {
    display: flex;              /* a block, so the margin below can give its height back */
    align-items: center;
    gap: var(--space-2xs);
    inline-size: 100%;
    min-block-size: var(--field-h);
    padding-block: 0;
    padding-inline: var(--field-pad-inline);
    font-size: var(--field-font-size);
    font-weight: var(--field-weight);
    line-height: var(--field-leading);
    white-space: nowrap;
    color: var(--field-placeholder);
    background: var(--field-bg);
    border: var(--field-border-w) solid var(--field-border);
    border-radius: var(--field-radius);
    transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.footer-search:hover { color: var(--field-ink); border-color: var(--field-border-hover); }
.footer-search svg { flex: none; }
.footer-search span { overflow: hidden; text-overflow: ellipsis; }
/* The ellipsis is drawn, not spoken: the name stays "Search this site". */
.footer-search span::after { content: "\2026" / ""; }
/* Side by side, the columns are centred on one another, so a taller third
 * column would lift the address out of line with where it sat. The field
 * gives its height back below, and the address stays exactly where it was. */
@media (min-width: 768px) {
    .footer-search { margin-block-end: calc(-1 * var(--field-h)); }
}

/* The box: the field and Search on one row, the status and results below. */
.mf-search__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2xs);
    align-items: stretch;
}
.mf-search__label,
.mf-search__status,
.mf-search__results { grid-column: 1 / -1; }
/* Read out, not shown: the placeholder says what the field is. */
.mf-search__label {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.mf-search__status {
    margin: 0;
    padding-inline: var(--space-xs);
    font-size: var(--size--1);
    line-height: var(--leading-snug);
    color: var(--text);
}
.mf-search__status:empty { display: none; }

/* Results: titles in the headings' navy, excerpts in the body ink, matches
 * marked in the pale blue of the bands and pills. */
.mf-search__results { margin: 0; padding: 0; list-style: none; }
.mf-search__results:not([hidden]) { display: flex; flex-direction: column; gap: var(--space-3xs); }
.mf-search__link {
    display: block;
    padding: var(--space-2xs) var(--space-xs);
    border-radius: var(--radius-xs);
    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(--text); background: var(--pale); }
.mf-search__link:hover .mf-search__title { text-decoration: underline; }
/* Inside a scrolling list an outset ring is clipped, so it sits inset. */
.mf-search__link:focus-visible { outline-offset: calc(-1 * var(--focus-ring-w)); }
.mf-search__title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--leading-headline);
    color: var(--tertiary-on-soft);
}
.mf-search__excerpt {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--size--1);
    line-height: var(--leading-body);
    color: var(--text);
}
.mf-search__excerpt mark {
    color: var(--tertiary-on-soft);
    background: var(--pale);
    border-radius: var(--radius-xs);
}

/* Close: a plain text button in the nav's blue, the pale blue on hover. */
.mf-search-overlay__close {
    min-block-size: var(--target-min);
    padding-inline: var(--space-xs);
    font-weight: 700;
    color: var(--brand-on-soft);
    border-radius: var(--radius-xs);
    transition: background var(--duration-fast) var(--ease-out);
}
.mf-search-overlay__close:hover { background: var(--pale); }

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

/* From 768px the overlay is a centred card under a dimmed, lightly blurred
 * page (body::after, in the navy), growing with its results up to the
 * viewport, past which they scroll inside it. It refines the full-screen
 * rules above at equal specificity, so it must stay after them. The card
 * sits one layer above its backdrop: body::after comes after the overlay in
 * the tree, so at an equal z-index it would paint over it. Both sit above
 * the header (--layer-nav) and its sub-menus (--layer-overlay). */
@media (min-width: 768px) {
    .mf-search-overlay:not([hidden]) {
        inset: var(--space-3xl) 0 auto;
        z-index: calc(var(--layer-modal) + 1);
        inline-size: calc(100% - 2 * var(--space-l));
        max-inline-size: var(--measure);
        max-block-size: calc(100dvh - 2 * var(--space-3xl));
        margin-inline: auto;
        padding: var(--space-s);
        border-radius: var(--radius-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: color-mix(in oklab, var(--tertiary-solid) 50%, transparent);
        backdrop-filter: blur(var(--space-3xs));
    }
}

/* Phones: the drawer's row replaces the menu row's magnifier. */
@media (max-width: 767px) {
    .nav-list > .nav-search--row { display: none; }
    .nav-list > .nav-search--drawer { display: block; }
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background: var(--hero-bg) url("/assets/images/hero-home.a5893e5ccf.webp") center / cover no-repeat;
}
.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-l) 0 calc(var(--space-4xl) * 4 + var(--space-2xs));
    text-align: center;
}
.hero .pill { min-width: 250px; margin-bottom: var(--space-s); font-size: var(--size--1); font-weight: 700; line-height: var(--leading-pill-lg); }
.hero__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size-5);
    font-weight: 700;
    line-height: var(--leading-headline);
    color: var(--tertiary-on-soft);
}
.hero__lede { max-width: 890px; margin: var(--space-s) 0 0; padding: 0; color: var(--tertiary-on-soft); }
.hero .btn { margin-top: var(--space-xs); }

/* ── Blue icon strip ──────────────────────────────────────────────── */
.strip { background: var(--brand-solid); padding: 0 var(--space-l) 0 var(--space-2xl); }
.strip__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-xl);
    margin: 0 auto;
    padding: var(--space-l) 0;
    list-style: none;
}
.strip__grid li { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); text-align: center; }
.strip__icon { width: 75px; height: 75px; }
.strip__grid h2 { margin: var(--space-3xs) 0 var(--space-2xs); font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--brand-on-solid); }

/* ── Bands ────────────────────────────────────────────────────────── */
.band__inner { padding: var(--space-3xl) 0; }
.spacer { position: relative; background: var(--brand-solid); }
.spacer--a { height: 70px; }
.spacer--b { height: 40px; }

/* Two-column photo + copy (who we are, careers) */
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); }
.two-up__photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); align-self: center; }
/* The source stacks widgets at a 35px gap, each pulling back with negative margins; the net rhythm is 22px, measured text-top to text-top. */
.two-up__text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-s); }
.two-up__text > * { margin: 0; }
.two-up__text .btn { margin-top: var(--space-3xs); }
.two-up--who .text-500, .two-up--who .text-600 { color: var(--text); }
.counters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-top: var(--space-m); }
.counter { display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-m) 0 var(--space-m); text-align: center; }
.counter + .counter { border-left: 1px solid var(--rule); }   /* light-grey divider between the two counters */
.counter__num { margin: 0; font-family: var(--font-heading); font-size: var(--size-5); font-weight: 700; line-height: var(--leading-headline); color: var(--secondary-line); }
.counter__label { margin: 0; font-size: var(--size-1); font-weight: 700; line-height: var(--leading-body); text-transform: uppercase; color: var(--text); }

/* Core statement */
.band--core { background: linear-gradient(var(--pale) 0%, var(--surface) 100%); }
.core { display: flex; flex-direction: column; align-items: center; text-align: center; }
.core__emblem { display: block; width: 90px; height: 90px; margin: var(--space-s) 0 var(--space-m); border-radius: var(--radius-round); }
.core__eyebrow { margin: 0 0 var(--space-s); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-body); text-transform: uppercase; color: var(--text); }
.core__statement { max-width: 100%; margin: 0 0 var(--space-s); font-family: var(--font-heading); font-size: var(--size-3); font-weight: 700; line-height: var(--leading-snug); color: var(--tertiary-on-soft); }
.core__sig { display: flex; flex-direction: column; gap: calc(var(--space-3xs) / 3); margin: 0; text-transform: uppercase; }
.core__sig-name { font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-subhead); color: var(--tertiary-on-soft); }
.core__sig span { font-size: var(--size-0); color: var(--text); }

/* Services */
.services-head { display: flex; padding-bottom: var(--space-xl); }
.services-head__left { display: flex; flex: 0 0 60%; flex-direction: column; align-items: flex-start; gap: var(--space-s); }
.services-head__left .title { max-width: 579px; }
.services-head .pill { font-size: var(--size--1); }
.services-head__right { flex: 0 0 40%; padding-top: var(--space-2xl); text-align: right; }
.services-head__right p { color: var(--tertiary-on-soft); }
.services-head__right .btn { margin-top: var(--space-s); }
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-m); }   /* 300px tracks at 1440, shrinking with the shell */
.svc-list .ticklist { margin: calc(-1 * var(--space-3xs)) 0 calc(-1 * var(--space-3xs)); }   /* the source's widget wrapper pulls the list up by this much */
.svc-list {
    padding: var(--space-l);
    background: var(--surface-raised);
    border: 1px solid var(--secondary-solid);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
}
.svc-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.svc-card img { display: block; width: 100%; height: auto; margin-bottom: var(--space-s); border-radius: var(--radius-l); }
.svc-card h3 { margin: var(--space-3xs) 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--tertiary-on-soft); }
.svc-card p { margin: 0 0 var(--space-m); font-weight: var(--weight-medium); color: var(--text); }

/* General reminders */
.band--reminders { background: var(--pale); }
.band--reminders .band__inner { display: flex; flex-direction: column; padding: var(--space-3xl) 0 var(--space-2xl); }
.reminders-head { margin-bottom: var(--space-xl); }
.reminders-photo { margin-bottom: var(--space-xl); }
.reminders-head { text-align: center; }
.reminders-lede { max-width: 750px; margin: var(--space-s) auto 0; font-family: var(--font-accent); font-size: var(--size-0); font-weight: var(--weight-medium); line-height: var(--leading-loose); color: var(--tertiary-on-soft); }
.reminders-photo { display: block; width: 100%; height: clamp(180px, 22vw, 380px); object-fit: cover; border-radius: var(--radius-l); }   /* the source is a 2560x595 banner (4.3:1), so height:auto rendered it 300px at 1440 and an 84px letterbox at 390; cover crops it to a usable shape instead */
.reminders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl); margin: 0; padding: 0; list-style: none; }
.reminders li { display: flex; flex-direction: column; align-items: center; margin-bottom: calc(-1 * var(--space-3xs)); text-align: center; }
.reminders__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-s);
    border: 1px solid var(--secondary-on-tint);
    border-radius: var(--radius-round);
    font-family: var(--font-accent);
    font-size: var(--size-1);
    font-weight: var(--weight-heavy);
    line-height: 1;
    color: var(--secondary-on-tint);
}
.reminders h3 { margin: 0 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--tertiary-on-soft); }
.reminders h3 a { color: inherit; text-decoration: none; }
.reminders p { color: var(--text); }

/* Doctors */
.band--doctors .band__inner { padding: var(--space-3xl) 0 var(--space-3xl); }
.doctors { display: grid; grid-template-columns: 2fr 1fr; }
.doctors__intro { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; padding-left: var(--space-2xl); }
.doctors__intro .pill { margin-bottom: var(--space-s); }
.doctors__intro .title { margin-bottom: var(--space-s); }
.doctors__intro p { margin-bottom: var(--space-m); }
.doctors__grid { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
.doctors__col { display: flex; flex-direction: column; gap: var(--space-m); margin: 0; padding: 0; list-style: none; }
.doc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); align-items: center; }
.doc__photo { width: 150px; height: 150px; border-radius: var(--radius-tile); object-fit: cover; justify-self: center; }
.doc__name { margin: 0 0 var(--space-2xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--tertiary-on-soft); }
.doc__quals { margin: 0; color: var(--text); }

/* FAQ (the skin-checks page; .faqs--skin below sets its colours) */
.faqs { width: 100%; }
.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xs);
    padding: var(--space-s) 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-weight: 700;
    line-height: var(--leading-subhead);
    color: var(--brand-on-soft);
    list-style: none;
    cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__plus, .faq__minus { flex: none; width: 13px; height: 15px; fill: currentColor; }
.faq__minus { display: none; }
.faq[open] .faq__minus { display: block; }
.faq[open] .faq__plus { display: none; }
.faq__a { padding: var(--space-s) 0 var(--space-s); border-bottom: 1px solid var(--rule); font-size: var(--size-1); color: var(--text); }
.faq__a p + p { margin-top: var(--space-xs); }
.faq__a a { color: var(--tertiary-on-soft); }

/* Location */
.band--location { background: var(--pale); }
.band--location .band__inner { padding: calc(var(--space-4xl) + var(--space-xs)) 0 var(--space-3xl); }
.location { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.location__text { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-l); padding-right: var(--space-2xl); }
.location__copy { display: flex; flex-direction: column; align-items: flex-start; }
.location__copy .pill { margin-bottom: var(--space-m); }
.location__copy .title { margin-bottom: var(--space-s); }
.location .prose p { margin: 0 0 var(--space-xs); color: var(--text); }
.location .prose p:last-child { margin-bottom: 0; }
.location__map iframe { display: block; width: 100%; height: 550px; border: 0; border-radius: var(--radius-l); }

/* ── Footer ───────────────────────────────────────────────────────── */
.site-footer { color: var(--brand-on-solid); }
.footer-top { position: relative; padding: var(--space-2xl) var(--space-l) var(--space-l); background: var(--surface); }
.footer-top__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); align-items: center; }
.footer-logo { display: block; width: 350px; max-width: 100%; }
.footer-logo img { display: block; width: 100%; height: auto; }
.footer-top__cta { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-m); }
.footer-tagline { margin: 0; font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--tertiary-on-soft); }
.footer-main { position: relative; display: flex; min-height: 270px; background: var(--brand-solid); }
.footer-main__inner {
    display: flex;
    flex-wrap: nowrap;                          /* three columns down to 1025; the gap gives way before the columns do */
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-xl) var(--space-2xl-3xl);       /* 200 at 1440, as live */
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: var(--space-l) 0 0;
}
.footer-col p { margin: 0 0 var(--space-xs); color: var(--brand-on-solid); }
.footer-col strong { font-weight: 700; }
.footer-col a { color: var(--brand-on-solid); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-col--hours { flex: 0 1 20%; }
.footer-col--contact { flex: 0 1 32%; }
.footer-col--address { flex: 0 1 19%; }
.footer-col--hours p { margin: 0; }
.footer-col .hours-table, .footer-col .hours-table tbody, .footer-col .hours-table tr { display: block; margin: 0; padding: 0; border: 0; }
.footer-col .hours-table { margin-bottom: var(--space-xs); }
.footer-col .hours-table td { display: inline; padding: 0; border: 0; font-size: inherit; line-height: inherit; color: var(--brand-on-solid); white-space: normal; }
.footer-col .hours-table td:first-child { font-weight: 700; }
.footer-col .hours-table td + td::before { content: " "; }
.footer-bar { padding: var(--space-xs); background: var(--secondary-solid); font-size: var(--size--1); text-align: center; color: var(--tertiary-on-soft); }   /* owner: one step smaller, even padding (live 1rem, 15/25) */   /* deviation: white on the orange bar is 2.6:1; navy matches the button decision */
.footer-links { margin: 0 0 calc(var(--space-3xs) / 2); }
.footer-links a { color: var(--tertiary-on-soft); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { margin: 0; }
.footer-powered { display: flex; align-items: center; justify-content: center; gap: var(--space-2xs); padding: var(--space-2xs) var(--space-3xs); background: var(--tertiary-solid); }
.footer-powered p { margin: 0; font-size: var(--size--1); }
.footer-powered img { display: block; width: 75px; height: auto; }

/* ── Tablet (the source's 1024 breakpoint) ────────────────────────── */
@media (max-width: 1024px) {
    /* Tone down the wave slopes as the viewport narrows. preserveAspectRatio
     * is "none", so holding the design height while the width shrinks makes
     * the curve steeper and steeper; 7vw keeps the painted slope at a steady
     * ~0.70 instead of 1.28 (50px) to 3.69 (144px) at 390. The shape still
     * reads as a wave, just a calmer one. */
    .wave { --wave-render: min(var(--wave-h, 50px), 7vw); }

    .topbar { width: 100%; min-height: 0; padding: var(--space-s) var(--space-xs) var(--space-xs); gap: var(--space-l); }
    .site-logo { flex: 0 1 auto; }
    .site-logo img { width: clamp(180px, 25.7vw, 284px); margin-left: 0; }
    .topbar__hours { flex: 0 1 320px; }
    .topbar__book { flex: 0 1 auto; }
    .navband { padding: 0 var(--space-l) var(--space-l); }
    .primary-nav { width: 100%; padding-top: 0; }
    .nav-link { padding: var(--space-xs) calc(var(--space-3xs) * 0.75); }
    .nav-sub-toggle { margin-left: calc(var(--space-3xs) * -0.75); padding-right: calc(var(--space-3xs) * 0.75); }
    .hero { padding-inline: var(--space-l); }
    .hero__inner { padding: var(--space-xl) 0 calc(var(--space-4xl) * 3 + var(--space-3xl)); }
    .hero__lede { padding: 0; }
    .strip { padding: 0 var(--space-l); }
    .strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); }
    .band--who .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
    .two-up { grid-template-columns: minmax(0, 1fr); }
    .two-up__photo { order: 2; }   /* the source reverses the columns below 1024: copy first, photo second */
    .two-up--who .title { max-width: 398px; }      /* the source's heading widget is width:initial at tablet, so it wraps early */
    .spacer { display: none; }
    .band--core .band__inner { padding: var(--space-2xl) 0; }
    .band--services .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
    .services-head { flex-direction: column; padding-bottom: var(--space-xl); }
    .services-head__left, .services-head__right { flex: none; }
    .services-head__right { max-width: 54%; padding-top: var(--space-xs); text-align: left; }
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l) var(--space-m); }
    .reminders-head { margin-bottom: var(--space-xl); }
    .reminders-photo { margin-bottom: var(--space-xl); }
    .reminders { gap: var(--space-l); }
    .band--doctors .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
    .doctors { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
    .doctors__intro { grid-column: 1; grid-row: 1; padding-left: 0; }
    .doctors__grid { grid-column: 1; grid-row: 2; grid-template-columns: minmax(0, 1fr); }
    .band--location .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
    .location { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
    .location__text { padding-right: 0; }
    .location .prose { max-width: 545px; }
    .location__map iframe { height: 370px; }
    .footer-top { padding: var(--space-l) var(--space-l); }
    .footer-top__inner { grid-template-columns: minmax(0, 35fr) minmax(0, 65fr); }
    .footer-top__cta { justify-content: space-between; }
    .footer-main { min-height: 0; }
    .footer-main__inner { flex-wrap: nowrap; justify-content: flex-end; gap: var(--space-l); padding: var(--space-2xl) 3% var(--space-l) 10%; }   /* the 50px top wave sits inside this padding */
    .footer-col--hours, .footer-col--contact, .footer-col--address { flex: 1 1 0; }
}

/* ── Mobile (the source's 767 breakpoint) ─────────────────────────── */
@media (max-width: 767px) {
    .topbar { padding: var(--space-s); gap: var(--space-2xs); }
    .topbar__hours, .topbar__phone { display: none; }
    .site-logo { flex: 0 0 auto; min-width: 0; }
    .site-logo img { width: min(130px, 33.4vw, calc(100vw - 223px)); margin-left: 0; }   /* 130 at 390 as before; gives way below it so logo + button + toggle fit at 320 (the row overflowed 11px there). The third term (2026-10-06) makes room for the 44px toggle below ~350: 97px at 320 */
    .topbar__book { flex: 0 1 auto; padding: 0; margin-left: auto; }
    .topbar__book .nav-cta { margin-block: calc(var(--_overhang) / 2); padding: var(--space-2xs) var(--space-xs); letter-spacing: normal; }   /* 390 budget: 130 logo + 162 button + 34 toggle + gaps */
    .nav-toggle { flex: none; }
    .nav-cta .btn__icon { display: none; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--target-min);
        height: var(--target-min);
        margin-block: calc(var(--space-2xs) * -0.625);   /* -5px: lays out at live's 34px, so the 44px tile does not grow the topbar */
        padding: var(--space-3xs);
        border: 0;
        border-radius: 3px;
        background: var(--secondary-solid);
        color: var(--secondary-on-solid);
        cursor: pointer;
    }
    .nav-toggle svg { width: 23px; height: 23px; fill: currentColor; }
    .nav-toggle__close { display: none; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
    /* The bottom wave is 50px tall and sits at bottom: -1px, so the navband has
     * to be at least that tall for the white to run the full height of the wave
     * shape. At min-height: 37px the background stopped short and the wave met
     * the hero photo as a straight edge instead of flowing out of the nav. */
    .navband { min-height: calc(min(50px, 7vw) + 1px); padding: 0; }
    .primary-nav { display: none; width: 100%; padding: 0; border-top: 0; }
    .primary-nav.is-open { display: block; padding-bottom: var(--space-l); }   /* clear the navband's bottom wave, which otherwise paints over the last items (a margin would collapse out of the navband) */
    .nav-list { flex-direction: column; }
    .nav-list > li { display: block; }
    /* The link + caret pair stays centred, but the row itself must span the full
     * width so the sub-menu below it does too: justify-content: center shrank
     * the grid to its content, and the sub-menu's grid-column: 1 / -1 then
     * covered only those two narrow columns. */
    .nav-list > li.has-children { display: grid; grid-template-columns: 1fr auto auto 1fr; }
    .nav-list > li.has-children > .nav-link { grid-column: 2; }
    .nav-list > li.has-children > .nav-sub-toggle { grid-column: 3; }
    .nav-list > li.has-children .nav-link { width: auto; padding-right: 0; }   /* Services is a link plus a toggle; the pair sits centred like the single-button parents */
    .nav-link { display: flex; justify-content: center; width: 100%; padding: var(--space-2xs) var(--space-s); transform: none; }
    .nav-link:hover, .nav-link:focus-visible { transform: none; }
    .nav-link.active, .nav-link[aria-current="page"] { background: var(--secondary-solid); color: var(--secondary-on-solid); }   /* the orange pill, lettered as the buttons are (black, 8.1:1; live's white was 2.6:1) */
    .nav-sub-toggle { margin: 0; padding: var(--space-2xs) var(--space-s) var(--space-2xs) var(--space-2xs); }
    .sub-menu { position: static; grid-column: 1 / -1; min-width: 0; width: 100%; box-shadow: none; border-radius: 0; background: var(--surface); }   /* white like the rest of the open menu; min-width: max-content from the desktop rule kept it at content width */
    .has-children:hover > .sub-menu, .has-children:focus-within > .sub-menu { display: none; }
    .has-children.is-open > .sub-menu { display: block; }
    /* On white the sub-items' 700 weight and dark grey read as bolder than the
     * parent links they sit under; match the nav links so the open menu is one
     * consistent list. Desktop keeps the panel's own heavier styling. */
    /* Tighter rows inside the dropdown so the two or three child pages read as
     * one close-set group. They must be tighter than the PARENT rows, not just
     * tighter than the desktop panel: at --space-2xs they matched .nav-link
     * exactly (33.4px both), so the dropdown read as more of the same list.
     * --space-3xs plus a 1.3 line-height puts a sub-row near 25px against the
     * parents' 33.4px. Still clear of the 24x24 WCAG 2.2 AA target minimum
     * (2.5.8); the 44px figure is AAA (2.5.5). */
    .sub-menu a { padding-block: var(--space-3xs); line-height: var(--leading-snug); text-align: center; white-space: normal; font-weight: 600; color: var(--brand-on-soft); }

    /* Now that the panel is white like the navband, nothing marked where one
     * item ended and the next began. A 1px --rule hairline — the same grey the
     * FAQ rules and the counters divider use — separates every row, including
     * the sub-items, without reintroducing a coloured block. Top border rather
     * than bottom, so the list never ends on a trailing line. */
    /* Hairline between the top-level items only. Inside an open sub-menu a
     * divider on every row pushed the children apart, so the group read as a
     * list of unrelated links rather than as the parent's children. Without
     * them the rows sit closer and read as one block.
     *
     * The rows keep their --space-xs block padding: they are already 40.3px
     * tall at 390, and trimming the padding to close the gap further would
     * drop them under the 44px touch target — not a trade worth making on
     * navigation links. The panel's own padding is trimmed instead. */
    .nav-list > li + li { border-top: 1px solid var(--rule); }
    .sub-menu { padding-block: var(--space-3xs); }
    .sub-menu li:first-child a, .sub-menu li:last-child a { border-radius: 0; }   /* the desktop panel's rounded ends read as a stray corner on a full-width band */
    .band { padding-inline: var(--space-s); }
    .hero { padding-inline: var(--space-s); }
    .hero__inner { padding: var(--space-xl) 0 calc(var(--space-4xl) * 3 + var(--space-3xl) + var(--space-s) + var(--space-3xs)); }
    .hero__title { font-size: var(--size-2); }
    .strip { padding: 0 var(--space-s); }
    .strip__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); padding: var(--space-xl) 0; }
    .counters { grid-template-columns: minmax(0, 1fr); }
    .counter + .counter { border-left: 0; border-top: 1px solid var(--rule); }   /* stacked: the divider turns horizontal */
    /* The waves keep their desktop height on mobile (58px on who, 50px on core)
     * while --space-xl computes to ~41px at 390, so the wave overlapped the
     * heading. Clear the tallest of them, then the normal padding below it. */
    .band--who .band__inner, .band--core .band__inner { padding: calc(var(--wave-clear-tall) + var(--space-m)) 0 var(--space-xl); }
    .two-up { gap: var(--space-l); }
    .band--services .band__inner { padding: var(--space-3xl) 0 var(--space-xl); }
    .services-head { padding-bottom: var(--space-l); }
    .services-head__right { max-width: none; }
    .services-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
    .band--reminders .band__inner { padding: var(--space-3xl) 0 var(--space-xl); }
    .reminders-head { margin-bottom: var(--space-l); }
    .reminders-photo { margin-bottom: var(--space-l); }
    .reminders { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
    .band--doctors .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
    .doctors__grid, .doctors__col { gap: var(--space-l); }
    .doc { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); text-align: center; }
    /* The doctor cards already centre here; the intro kept flex-start from the
     * desktop two-column layout, so the heading and button sat left of them. */
    .doctors__intro { align-items: center; text-align: center; }
    .band--location .band__inner { padding: var(--space-3xl) 0 var(--space-xl); }
    .location__map iframe { height: 330px; }
    .footer-top { padding: calc(var(--wave-clear) + var(--space-m)) var(--space-s) var(--space-l); }   /* clears the wave at whatever height the cap paints it */
    .footer-top__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); justify-items: center; text-align: center; }
    .footer-logo { width: 298px; }
    .footer-top__cta { flex-direction: column; align-items: center; gap: var(--space-l); }
    .footer-main__inner { flex-direction: column; align-items: stretch; gap: var(--space-xl); padding: var(--space-2xl) var(--space-s) var(--space-m); }
    .footer-col--hours, .footer-col--contact, .footer-col--address { flex: none; width: 100%; }
    .footer-bar { padding: var(--space-xs) var(--space-2xs); }
}

/* ── Entrance reveals ─────────────────────────────────────────────── */
/* Elements opt in with data-reveal="up|down|left|right|fade" and an optional
 * data-reveal-stagger="<ms>"; partials/scripts.html reveals them once, the
 * first time they enter the viewport, and never hides them again. Travel is
 * short on purpose — a nudge, not a slide. */
.js [data-reveal] {
    opacity: 0;
    transition: opacity 0.76s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms), transform 0.76s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}
.js [data-reveal="up"]    { transform: translateY(26px); }
.js [data-reveal="down"]  { transform: translateY(-26px); }
.js [data-reveal="left"]  { transform: translateX(-18px); }
.js [data-reveal="right"] { transform: translateX(18px); }
.js [data-reveal="fade"]  { transform: none; }
.js [data-reveal][data-revealed] { opacity: 1; transform: none; }
.js [data-reveal][data-reveal-done] { will-change: auto; transition: none; }
@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
 * Inner pages — measured off the same source at 1440 (dump-<page>.txt).
 * ═══════════════════════════════════════════════════════════════════════ */
/* The blue and navy grounds: the one ring goes white there (DARK_NOTE).
 * Not .site-footer as a whole: its orange bar keeps the blue. */
.footer-main, .footer-powered, .strip, .spacer, .band--pull, .flip__back,
.ctacard, .gradcard__text, .ah-card__box, .gradbox, .linkcard, .posbar, .contact-card { --focus-ring: var(--brand-on-solid); }
/* The footer's search field (Site search), on the blue: a white edge and ink
 * on the footer's own blue. */
.footer-main {
    --field-bg: var(--brand-solid);
    --field-ink: var(--brand-on-solid);
    --field-border: var(--brand-on-solid);
    --field-border-hover: var(--brand-on-solid);
    --field-placeholder: color-mix(in oklab, var(--brand-on-solid) 80%, transparent);
}
.contact-form, .pullcard { --focus-ring: var(--focus); }   /* white cards riding those grounds */

/* Shared type + pieces */
.title--md { font-size: var(--size-4); }                       /* 41.25px section titles */
.title--sm { font-size: var(--size-3); line-height: var(--leading-snug); }       /* 33px */
.title--xl { font-size: var(--size-6); line-height: var(--leading-title); }   /* live 66px page titles; step-6 is 62.3 at 1440 */
.lede { margin: 0; font-size: var(--size-1); line-height: var(--leading-body); color: var(--text); }
.text-navy { color: var(--tertiary-on-soft); }
.text-alt { color: var(--text-alt); }
.prose p { margin: 0 0 var(--space-xs); color: var(--text); }
.prose p:last-child { margin-bottom: 0; }
.prose--alt p { color: var(--text-alt); }
.pill--lg { font-size: var(--size--1); font-weight: 700; line-height: var(--leading-pill-lg); }
.pill--clear { background: transparent; }
.ihero { position: relative; background-color: var(--pale); background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; }
.ihero__center { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); text-align: center; }
.ihero__center .title { max-width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-m); }
.cta-row--center { justify-content: center; }
.avatars { display: flex; gap: var(--space-3xs); margin: 0; padding: 0; list-style: none; }
.avatars img { display: block; width: 40px; height: 40px; border-radius: var(--radius-round); object-fit: cover; }
.spacer--100 { height: 100px; }
.ibox { display: flex; align-items: flex-start; gap: var(--space-s); }
.ibox__icon { flex: none; width: 45px; height: 45px; fill: var(--secondary-line); }
.ibox__title { margin: var(--space-3xs) 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--tertiary-on-soft); }
.ibox__desc { margin: 0; color: var(--text); }
.ibox--plain .ibox__title { margin: 0 0 var(--space-3xs); font-size: var(--size-1); line-height: var(--leading-subhead); color: var(--secondary-on-tint); }
.ibox--plain .ibox__desc { color: var(--text-alt); }
.ibox--sm .ibox__icon { width: 25px; height: 25px; }
.ibox--sm .ibox__title { font-size: var(--size-1); line-height: var(--leading-subhead); }
.ibox--navy .ibox__icon { fill: var(--brand-line); }   /* owner: the brand blue rather than live's near-black navy */
.ibox--navy .ibox__title { font-size: var(--size-1); line-height: var(--leading-subhead); color: var(--secondary-on-tint); }
.ibox--navy .ibox__desc { font-weight: var(--weight-medium); }

/* ── The Practice ─────────────────────────────────────────────────── */
.ihero--practice { background-image: linear-gradient(var(--pale) 0%, color-mix(in srgb, var(--surface) 77%, transparent) 15%), url("/assets/images/practice-hero-bg.5bcff2b0ba.webp"); }
.ihero--practice .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
.two-up--practice { align-items: center; }
.two-up__text--practice { gap: var(--space-m); }
.two-up__text--practice .cta-row { gap: var(--space-l); }
.two-up__text--practice .avatars { gap: 0; }
.two-up__text--practice .ihero__p { max-width: 471px; color: var(--text); }
.band--values .band__inner { padding: calc(var(--space-4xl) + var(--space-s)) 0 var(--space-3xl); }
.values-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding-bottom: var(--space-xl); }
.values-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl); }
.values-col { display: flex; flex-direction: column; gap: var(--space-l); margin-top: calc(-1 * var(--space-2xs)); }
.ibox--stack { flex-direction: column; gap: 0; }
.ibox--stack .ibox__icon { margin-bottom: var(--space-s); }
.band--accred { background: var(--pale); }
.band--accred .band__inner { padding: var(--space-3xl) 0 var(--space-2xl); }
.two-up__photo--tall { align-self: start; }
.accred-copy { display: flex; flex-direction: column; }
.accred-copy__photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.accred-copy__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-m); padding-top: var(--space-l); }
.accred-copy__text .prose { padding-bottom: var(--space-l); }
.accred-copy .pill--outlined, .future-copy .pill--outlined, .imp-head .pill--outlined, .visit__copy .pill--outlined { background: var(--pale); }
.band--why .band__inner { padding: var(--space-3xl) 0; }
.why-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-2xl); align-items: center; }
.why-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-m); }
.why-copy .title { margin-top: calc(-1 * var(--space-3xs)); }
.why-list { display: flex; flex-direction: column; gap: var(--space-xs); align-self: stretch; margin-top: calc(-1 * (var(--space-s) + var(--space-3xs))); }
.why-photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.band--future, .band--first { background: var(--pale); }
.band--first { isolation: isolate; }
.band--first::before { content: ""; position: absolute; inset: 0; z-index: var(--layer-behind); background: url("/assets/images/skin-bg.2b90a09e9b.webp") center / cover no-repeat; opacity: 0.42; }
.band--future .band__inner, .band--first .band__inner { padding: calc(var(--space-4xl) + var(--space-2xs)) 0 var(--space-3xl); }
.two-up--future { grid-template-columns: minmax(0, 517fr) minmax(0, 673fr); align-items: start; }
.future-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.future-copy .title { margin-top: var(--space-xs); }
.future-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); padding: var(--space-l) 0 var(--space-s); }
.splitcard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border-radius: var(--radius-l); }
.splitcard__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-2xl); background: var(--surface-raised); }
.splitcard__text p { color: var(--text); }
.splitcard__photo { min-height: 575px; background: url("/assets/images/practice-couple.2e0611749f.webp") center / cover no-repeat; }

/* ── Doctors ──────────────────────────────────────────────────────── */
.ihero--doctors { background-image: linear-gradient(var(--pale) 0%, color-mix(in srgb, var(--surface) 67%, transparent) 35%), url("/assets/images/doctors-hero-bg.73679f4afc.webp"); }
.ihero--doctors .band__inner { padding: var(--space-3xl) 0; }
.doc-hero { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-2xl); }
.doc-hero__copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-l); }
.doc-hero__copy p { color: var(--text); }
.doc-hero__card { overflow: hidden; border-radius: var(--radius-tile); background: var(--surface-raised); }
.doc-hero__card > img { display: block; width: 100%; height: auto; }
.doc-hero__card-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-l); }
.doc-hero__card-body h2 { margin: 0; font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--brand-on-soft); }
.doc-hero__card-body p { color: var(--text); }
.band--team { background: linear-gradient(var(--surface) 0%, var(--pale) 100%); }
.band--team .band__inner { padding: var(--space-3xl) 0; }
.team-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); padding-bottom: var(--space-xl); text-align: center; }
.team-head .reminders-lede { margin-top: 0; }
.dcards { display: flex; flex-direction: column; }
.dcard + .dcard { margin-top: var(--space-m); }
.dcard:nth-child(n+3) { margin-top: var(--space-l); }
.dcard:nth-child(n+4) { margin-top: var(--space-2xl); }
.dcard { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: var(--space-m); }
.dcard__photo { width: 150px; height: 150px; margin-top: var(--space-3xl); border-radius: 15px; object-fit: cover; justify-self: center; }
.dcard--lg .dcard__photo { width: 200px; height: 200px; margin-top: var(--space-xl); }
.dcard__body { display: flex; flex-direction: column; padding: var(--space-2xl); background: var(--surface-raised); border-radius: var(--radius-l); }
.dcard__name { margin: 0 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-3); font-weight: 700; line-height: var(--leading-snug); color: var(--tertiary-on-soft); }
.dcard__quals { margin: 0 0 var(--space-s); font-size: var(--size-1); font-weight: 600; color: var(--secondary-on-soft); }
.dcard__body p { color: var(--tertiary-on-soft); }
.dcard__body p + p { margin-top: var(--space-xs); }
.dcard__body .dcard__quals + p { margin-top: 0; }
.dcard__bio { white-space: pre-line; }   /* bio is plain text from Rails, paragraphs separated by a blank line */

/* ── Services ─────────────────────────────────────────────────────── */
.ihero--services { background-image: linear-gradient(var(--pale) 0%, color-mix(in srgb, var(--surface) 48%, transparent) 100%), url("/assets/images/services-hero-bg.d65473ccc7.webp"); background-position: 50% 0; }
.ihero--services .band__inner { padding: var(--space-2xl) 0 calc(var(--space-4xl) + var(--space-3xl) + var(--space-s)); gap: var(--space-l); }
.ihero--services .pill { max-width: 340px; margin-bottom: var(--space-s); }   /* was 300px; the wider pill padding needs the extra room to stay on one line */
.ihero--services .title { max-width: 590px; margin: calc(-1 * var(--space-3xs)) 0 calc(-1 * var(--space-3xs)); }
.ihero__center .text-500 { max-width: 900px; color: var(--text); }
.ihero--services .text-500 { max-width: 774px; margin: calc(-1 * var(--space-3xs)) 0 0; }   /* -21px bottom put the button under the lede */
.band--pull { background: var(--brand-solid); }
.band--pull .band__inner { display: flex; flex-direction: column; padding: 0 0 var(--space-3xl); }   /* flex so the cards' negative margin cannot collapse through to the band */
.pullcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); margin-top: calc(-1 * (var(--space-4xl) + var(--space-xl) + var(--space-3xs))); }
.pullcard { display: flex; flex-direction: column; align-items: center; padding: var(--space-l); background: var(--surface-raised); border-radius: var(--radius-tile); box-shadow: var(--shadow-pull); text-align: center; }
.pullcard h2 { margin: calc(var(--space-3xs) / -3) 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--tertiary-on-soft); }
.pullcard p { margin-bottom: var(--space-m); color: var(--text); }
.pullcard .btn { margin-bottom: var(--space-m); }
.pullcard img { display: block; width: 100%; height: auto; border-radius: var(--radius-tile); }
.band--solutions .band__inner { padding: var(--space-3xl) 0; }
.services-head--inner { padding-bottom: var(--space-2xl); }
.services-head--inner .services-head__left { gap: var(--space-2xs); }
.services-head--inner .services-head__right { padding-top: 0; }
.flips { display: flex; flex-direction: column; gap: var(--space-l); padding: 0 var(--space-2xl); }
.flips__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-s); padding: var(--space-2xs); }
.flip { position: relative; height: 280px; perspective: 1000px; outline-offset: 4px; }
.flip--wide { height: 350px; }
.flip__front, .flip__back { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-m); border-radius: 15px; backface-visibility: hidden; transition: transform 0.8s ease; }
.flip__front { isolation: isolate; background: var(--mid-blue) center 0 / cover no-repeat; }
.flip__front::before { content: ""; position: absolute; inset: 0; z-index: var(--layer-behind); border-radius: 15px; background: color-mix(in srgb, var(--brand-solid) 34%, transparent); }
.flip--wide .flip__front { justify-content: center; padding: 0; }
.flip__title { margin: var(--space-3xs) 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-4); font-weight: 700; line-height: var(--leading-headline); color: var(--brand-on-solid); text-align: center; }
.flip__back { justify-content: center; align-items: center; background: var(--brand-solid); text-align: center; transform: rotateX(180deg); }
.flip--wide .flip__back { padding: 0 var(--space-2xl); }
.flip__desc { margin: 0 0 var(--space-xs); font-size: var(--size--1); line-height: var(--leading-flip); color: var(--brand-on-solid); }
.flip--wide .flip__desc { margin-bottom: var(--space-m); }
.flip:hover .flip__front, .flip:focus .flip__front, .flip:focus-within .flip__front { transform: rotateX(-180deg); }
.flip:hover .flip__back, .flip:focus .flip__back, .flip:focus-within .flip__back { transform: rotateX(0); }
.btn--xs { padding: var(--space-2xs) var(--space-s); }
@media (prefers-reduced-motion: reduce) { .flip__front, .flip__back { transition: none; } }

/* ── Skin checks ──────────────────────────────────────────────────── */
.ihero--skin { background: var(--surface); }
.ihero--skin .band__inner { padding: var(--space-3xl) 0; }
.skin-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); align-items: start; }
.skin-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); }
.skin-hero__copy .lede { color: var(--text); }
.skin-hero__copy .text-alt { color: var(--text-alt); }
.skin-hero__photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.band--which { background: linear-gradient(color-mix(in srgb, var(--pale) 83%, transparent) 33%, color-mix(in srgb, var(--brand-solid) 83%, transparent) 100%), url("/assets/images/skin-bg.2b90a09e9b.webp") 50% 0 / cover no-repeat; }
.band--which .band__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); padding: var(--space-3xl) 0; text-align: center; }
.which-lede { color: var(--tertiary-on-soft); }
.which-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); width: 100%; text-align: left; }
.which-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-l); background: var(--surface-raised); border-radius: var(--radius-l); }
.which-card .title--sm { color: var(--brand-on-soft); }
.which-card__time { margin: 0; font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--tertiary-on-soft); }
.which-card .lede { color: var(--text); }
.which-note { color: var(--brand-on-solid); }
.band--skinfaq .band__inner { padding: var(--space-3xl) 0; }
.two-up--skinfaq { align-items: start; padding-bottom: var(--space-2xl); }
.skinfaq { display: flex; flex-direction: column; gap: var(--space-l); }
.faqs--skin .faq__q { font-family: var(--font-accent); font-size: var(--size-0); font-weight: var(--weight-heavy); line-height: var(--leading-body); color: var(--tertiary-on-soft); border-color: color-mix(in srgb, var(--text) 28%, transparent); }
.faqs--skin .faq[open] .faq__q { color: var(--secondary-on-soft); }
.faqs--skin .faq__a { font-size: var(--size-0); font-weight: var(--weight-medium); border-color: color-mix(in srgb, var(--text) 28%, transparent); color: var(--text-alt); }
.ctacard { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: var(--space-m); padding: var(--space-2xl); border-radius: var(--radius-l); background: linear-gradient(var(--brand-solid) 0%, var(--mid-blue) 100%); color: var(--brand-on-solid); text-align: center; }
.ctacard::before { content: ""; position: absolute; inset: 0; z-index: var(--layer-behind); background: url("/assets/images/cta-bg.94d9798223.webp") center / cover no-repeat; opacity: 0.18; }
.ctacard__eyebrow { margin: 0; font-size: var(--size-1); }
.ctacard__title, .ctacard .lede { color: var(--brand-on-solid); }
.ticklist--inline { display: flex; flex-wrap: wrap; gap: var(--space-m); }
.ticklist--inline li, .ticklist--inline li + li { margin: 0; padding: 0; }
.ticklist--inline span { color: var(--brand-on-solid); }
.ticklist--inline .ticklist__icon { fill: var(--brand-on-solid); }

/* ── Fees ─────────────────────────────────────────────────────────── */
.ihero--fees { background: var(--brand-solid) url("/assets/images/fees-hero-bg.b12ec13c29.webp") center / cover no-repeat; }
.ihero--fees .band__inner { display: flex; flex-direction: column; align-items: center; padding: calc(var(--space-4xl) + var(--space-2xl) + var(--space-2xs)) 0; }
.feecard { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); width: 770px; max-width: 100%; padding: var(--space-xl) var(--space-xl) var(--space-2xl); background: color-mix(in srgb, var(--surface-raised) 82%, transparent); border-radius: var(--radius-l); text-align: center; }
.feecard__btn { margin-top: calc(-1 * (var(--space-s) + var(--space-3xs))); }
/* The Book button straddles the card's bottom edge, so an outset focus ring
 * would sit half on the photo, at about 1.2:1. Its ring is drawn inside the
 * button instead, in the navy: 6.2:1 on the orange, 4.8:1 on the darker
 * orange it turns on focus. The colour is a token override on the button;
 * only the offset is set on focus. */
.feecard__btn { --focus-ring: var(--tertiary-solid); }
.feecard__btn:focus-visible { outline-offset: calc(-2 * var(--focus-ring-w)); }
.band--weekday { background: linear-gradient(var(--surface) 0%, var(--pale) 100%); }
.band--weekday .band__inner { display: flex; flex-direction: column; align-items: center; padding: calc(var(--space-4xl) + var(--space-l)) 0 var(--space-3xl); }
.fees-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); margin-bottom: var(--space-xl); text-align: center; }
.fees-head .lede a { color: var(--brand-on-soft); }
.fees-head .title { max-width: 707px; }
.fees-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); width: 100%; }
.fees-book { margin-top: var(--space-l); }
.pricelist { margin: 0; padding: 0; list-style: none; }
.pricelist__item { margin-bottom: var(--space-2xs); }
.pricelist__item:last-child { margin-bottom: 0; }
.pricelist__head { display: flex; align-items: center; margin-bottom: var(--space-2xs); }
.pricelist__title { font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--brand-on-soft); }
.pricelist__sep { flex: 1; margin: 0 var(--space-2xs); border-bottom: 1px dotted var(--text); }
.pricelist__price { font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--secondary-on-soft); }
.pricelist__desc { margin: 0; color: var(--text); }
.band--saturday .band__inner { padding: calc(var(--space-4xl) + var(--space-s)) 0 var(--space-3xl); }
.sat-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-2xl) 0; }
.sat-copy .pricelist { width: 100%; }
.sat-photo { min-height: 579px; border-radius: var(--radius-l); background: url("/assets/images/fees-team.b8f8915381.webp") center / cover no-repeat; }
.band--important { background: var(--pale); }
.band--important .band__inner { padding: calc(var(--space-4xl) + var(--space-xs)) 0 var(--space-3xl); }
.imp-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); text-align: center; }
.gradcard { display: grid; grid-template-columns: 695px minmax(0, 1fr); margin-top: var(--space-l); overflow: hidden; border-radius: var(--radius-l); }
.gradcard--b { grid-template-columns: 602px minmax(0, 1fr); }
.gradcard__photo { min-height: 409px; }
.gradcard--a .gradcard__photo { min-height: 459px; background-position: center; background-size: cover; }
.gradcard__photo--psych { background-image: url("/assets/images/fees-psych.3adf4ac934.webp"); }
.gradcard__photo--intern { background-image: url("/assets/images/fees-intern.4ab054098f.webp"); }
.gradcard__text { display: flex; flex-direction: column; justify-content: center; gap: var(--space-s); padding: var(--space-3xl) var(--space-2xl); background: linear-gradient(var(--mid-blue) 0%, var(--brand-solid) 100%); }
.gradcard--b .gradcard__text { background: linear-gradient(var(--brand-solid) 0%, var(--mid-blue) 100%); }
.gradcard__text h3 { margin: 0; font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--brand-on-solid); }
.gradcard__text p { color: var(--brand-on-solid); }

/* ── Appointment ──────────────────────────────────────────────────── */
.ihero--appt { background: linear-gradient(color-mix(in srgb, var(--pale) 78%, transparent), color-mix(in srgb, var(--pale) 78%, transparent)), url("/assets/images/appt-hero-bg.f2e9b1f015.webp") center / cover no-repeat; }
.ihero--appt .band__inner { padding: var(--space-3xl) 0; }
.appt-lede { max-width: 750px; }
.appt-row { display: grid; grid-template-columns: 2.55fr minmax(230px, 1fr); gap: var(--space-xl); width: 100%; padding: 0 var(--space-2xs); margin-top: var(--space-m); text-align: left; }
.appt-row__photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.hours-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-l); border: 2px solid var(--secondary-solid); border-radius: var(--radius-l); background: var(--cream); }
.hours-card h2 { margin: 0; font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--brand-on-soft); }
.hours-card p { color: var(--text); }
.hours-list { width: 100%; }
/* The hours come from Rails as {{opening_hours_html}} (a <table class="hours-table">,
 * days grouped by Rails), laid out as the build's day / leader / hours rows. */
.hours-list { margin: 0; padding: 0; container-type: inline-size; }
.hours-list__row { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: var(--space-2xs); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-body); color: var(--brand-on-soft); }
.hours-list dt, .hours-list dd { display: flex; align-items: center; margin: 0; padding: 0; font: inherit; color: inherit; }
.hours-list dt { flex: 1 0 auto; white-space: nowrap; }
.hours-list dt::after { content: ""; flex: 1; margin: 0 var(--space-2xs); border-bottom: 1px solid var(--secondary-solid); }   /* leader joining the day to its hours, as the fees price lists do */
.hours-list dd { margin-left: auto; color: var(--tertiary-on-soft); white-space: nowrap; }   /* deviation: the source's orange on cream is 2.2:1. Rails' own format (8:00am-5:00pm), as the header and footer show it */
.band--steps .band__inner { padding: var(--space-3xl) 0; }
.steps { display: grid; grid-template-columns: 839px minmax(0, 1fr); }
.steps__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); padding: var(--space-2xs); }
.steps__copy .title { margin: calc(-1 * var(--space-3xs)) 0; }
.steps__copy .lede { margin-bottom: var(--space-s); }
.steps__grid { display: grid; grid-template-columns: repeat(2, 368px); gap: var(--space-s); }
.ibox--sm { gap: var(--space-xs); padding: var(--space-2xs); }
.ibox--sm .ibox__title { margin: var(--space-3xs) 0 var(--space-xs); }
.steps__photo { min-height: 579px; border-radius: var(--radius-l); background: url("/assets/images/appt-records.d82e85ebf5.webp") center / cover no-repeat; }
.band--afterhours { background: var(--pale); }
.band--afterhours .band__inner { padding: var(--space-3xl) 0; }
.ah-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); margin-bottom: var(--space-xl); text-align: center; }
.ah-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); }
.ah-card { display: flex; flex-direction: column; align-items: center; }
.ah-card > img { display: block; width: 100%; height: auto; border-radius: var(--radius-tile); }
.ah-card__box { width: 330px; max-width: 100%; margin-top: calc(-1 * (var(--space-2xl) + var(--space-xs))); padding: var(--space-s) var(--space-l); border-radius: var(--radius-tile); background: linear-gradient(var(--mid-blue) 0%, var(--brand-solid) 100%); text-align: center; }
.ah-card__box h3 { margin: 0 0 var(--space-2xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--brand-on-solid); }
.ah-card__box p, .ah-card__box a { color: var(--brand-on-solid); text-decoration: none; }
.band--guidelines .band__inner { padding: calc(var(--space-4xl) + var(--space-2xl) + var(--space-s)) 0 var(--space-3xl); }
.guide-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2xl); margin-bottom: var(--space-xl); }
.guide-head .title { max-width: 358px; }
.guide-head__right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-s); text-align: right; }
.guide-head__right p { color: var(--text); }
.guide-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
.gcard { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-l); background: var(--pale); }
.gcard__text { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-xl) var(--space-2xl) var(--space-xl) var(--space-xl); }
.gcard__text h3 { margin: 0; font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--tertiary-on-soft); }
.gcard__text p { color: var(--text); }
.gcard__photo { display: block; width: 560px; max-width: 100%; height: auto; margin-top: auto; align-self: flex-end; border-radius: var(--radius-l) 0 0 0; }

/* ── Practice policies ────────────────────────────────────────────── */
.ihero--policies { background-image: linear-gradient(var(--pale) 0%, color-mix(in srgb, var(--surface) 49%, transparent) 80%), url("/assets/images/policies-hero-bg.dafebdc52e.webp"); background-position: 50% 0; }
.ihero--policies .band__inner { padding: var(--space-3xl) 0 calc(var(--space-4xl) * 2 + var(--space-xl) + var(--space-3xs)); gap: var(--space-l); }
.ihero--policies .title { margin: calc(-1 * var(--space-2xs)) 0 calc(-1 * var(--space-2xs)); }
.ihero--policies .pol-lede { margin: calc(-1 * var(--space-3xs)) 0 0; }   /* -21px bottom put the button under the lede */
.ihero--policies .pill { margin-bottom: var(--space-s); }
.pol-lede { max-width: 538px; color: var(--text); }
.band--mosaic { background: linear-gradient(var(--pale) 59%, var(--surface) 100%); }
.band--mosaic .band__inner { position: relative; z-index: var(--layer-base); display: flex; flex-direction: column; padding: 0 0 var(--space-3xl); }   /* the wave divs follow .band__inner in the markup, so without this they paint over the straddling images */
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-s); align-items: center; margin-top: calc(-1 * (var(--space-4xl) + var(--space-3xl) - var(--space-xs))); }
.mosaic__img { display: block; width: 100%; height: auto; border-radius: var(--radius-tile); }
.mosaic__col { display: grid; gap: var(--space-s); align-self: stretch; }
.band--policies .band__inner { padding: var(--space-l) 0 var(--space-3xl); }
.polcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-2xl); }
.polcard { margin: calc(-1 * var(--space-2xs)) 0 calc(-1 * var(--space-3xs)); padding: var(--space-l); border-radius: var(--radius-l); }
.polcard--white { background: var(--surface-raised); box-shadow: var(--shadow-polcard); }
.polcard--cream { background: var(--cream); }
.polcard h2 { margin: var(--space-3xs) 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--secondary-on-soft); }
.polcard p { color: var(--text); }
.band--deserve { background: var(--pale); }
.band--deserve .band__inner { display: flex; flex-direction: column; align-items: center; padding: var(--space-3xl) 0; }
.deserve-photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.deserve-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); width: 1000px; max-width: 100%; margin-top: calc(-1 * (var(--space-4xl) + var(--space-2xl) + var(--space-xs))); padding: var(--space-2xl); background: var(--surface-raised); border-radius: var(--radius-l); text-align: center; }
.deserve-card p { color: var(--text); }

/* ── Health topics ────────────────────────────────────────────────── */
.ihero--health { padding: 0 0 var(--space-l); background: linear-gradient(var(--pale) 0%, var(--surface) 100%); }   /* the photo's 40px sits inside the band so the waves cover it */
.ihero--health .title { margin: calc(-1 * var(--space-3xs)) 0 calc(-1 * var(--space-3xs)); }
.ihero--health .health-lede { margin: calc(-1 * var(--space-3xs)) 0; }
.ihero--health .band__inner { padding: var(--space-3xl) 0; gap: var(--space-l); }
.health-lede { max-width: 700px; }
.ihero--health .pill { background: var(--surface-raised); }
.health-photo { position: relative; z-index: var(--layer-base); display: block; width: calc(100% - 200px); height: auto; margin: 0 auto; border-radius: 70px; }   /* above the waves, as live */
.band--articles { background: linear-gradient(color-mix(in srgb, var(--pale) 81%, transparent), color-mix(in srgb, var(--pale) 81%, transparent)), url("/assets/images/ht-bg.452ea02122.webp") center / cover no-repeat; }
.band--articles .band__inner { max-width: 1140px; padding: calc(var(--space-4xl) + var(--space-s)) 0 var(--space-3xl); }
.articles-card { margin: 0 var(--space-s); padding: var(--space-2xl); background: var(--surface-raised); border-radius: var(--radius-tile); }
.articles-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); text-align: center; }
.articles-card .lede { max-width: 750px; color: var(--tertiary-on-soft); }
.resources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); width: 100%; text-align: left; }
.rcard { padding: var(--space-m); background: var(--pale); border-radius: var(--radius-tile); }
.rcard h3 { margin: 0 0 var(--space-2xs); font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--brand-on-soft); }
.rcard h3 a { color: inherit; text-decoration: none; }
.rcard h3 a:hover, .rcard h3 a:focus-visible { text-decoration: underline; }
.rcard p { color: var(--text); }
.rcard p a { color: var(--tertiary-on-soft); }

/* ── Careers & growth ─────────────────────────────────────────────── */
.ihero--careers { background: linear-gradient(var(--pale) 0%, color-mix(in srgb, var(--surface) 27%, transparent) 100%), var(--neutral-solid) url("/assets/images/careers-hero-bg.03312cab37.webp") 0 0 / 2560px auto no-repeat; }   /* the source paints the 2560px original at natural size from the top-left */
.ihero--careers .band__inner { padding: var(--space-3xl) 0; }
.careers-hero { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-2xl); }
.careers-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-l); }
.careers-lede { max-width: 645px; margin: calc(-1 * var(--space-3xs)) 0 0; }   /* -21px bottom put the button under the lede */
.careers-hero__copy .title { margin: calc(-1 * var(--space-2xs)) 0 calc(-1 * var(--space-2xs)); }
.careers-hero__cards { display: grid; align-content: start; gap: var(--space-m); }
.gradbox { display: grid; grid-template-columns: 111px minmax(0, 1fr); align-items: center; gap: var(--space-s); padding: var(--space-s); border-radius: var(--radius-tile); background: linear-gradient(var(--mid-blue) 0%, var(--brand-solid) 100%); }
.gradbox img { display: block; width: 111px; height: 111px; border-radius: var(--radius-tile); object-fit: cover; }
.gradbox h2 { margin: 0 0 var(--space-3xs); font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--brand-on-solid); }
.gradbox p { color: var(--brand-on-solid); }
.band--training { background: linear-gradient(var(--surface-lowered) 0%, var(--pale) 100%); }
.band--training .band__inner { padding: var(--space-3xl) 0 var(--space-3xl); }
.two-up--training { align-items: center; }
.training-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-m); }
.training-copy > p { color: var(--text); }
.rule { width: 100%; margin: 0; border: 0; border-top: 1px solid var(--brand-line); }
.training-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-l); }
.training-grid .ibox { min-height: 175px; }
.band--links .band__inner { padding: var(--space-3xl) 0; }
.linkcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
.linkcards__col { display: grid; gap: var(--space-m); }
.linkcard { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-s); min-height: 355px; padding: var(--space-3xl) var(--space-l) var(--space-l); border-radius: var(--radius-l); background: var(--pale) center / cover no-repeat; }
.linkcard::before { content: ""; position: absolute; inset: 0; z-index: var(--layer-behind); border-radius: var(--radius-l); background: linear-gradient(var(--brand-solid) 0%, var(--mid-blue) 100%); opacity: 0.86; }
.linkcard--tall::before { background: linear-gradient(var(--brand-solid) 35%, var(--mid-blue) 100%); opacity: 0.8; }
.linkcard__title { margin: calc(var(--space-3xs) / -2) 0; font-family: var(--font-heading); font-size: var(--size-2); font-weight: 700; line-height: var(--leading-body); color: var(--brand-on-solid); }
.linkcard__text { max-width: 450px; margin: calc(-1 * var(--space-3xs)) 0 0; font-family: var(--font-accent); font-size: var(--size-0); font-weight: var(--weight-medium); line-height: var(--leading-loose); color: var(--pale); }   /* live's -21px bottom cancelled the card gap and put the button under the text */
.linkcard--tall { justify-content: center; align-items: center; gap: var(--space-m); min-height: 740px; padding: var(--space-l); text-align: center; }
.linkcard--tall .linkcard__title { font-family: var(--font-accent); font-size: var(--size-5); font-weight: var(--weight-heavy); line-height: 1; letter-spacing: var(--tracking-tight); }
.linkcard--tall .linkcard__text { max-width: 350px; }
.band--collab .band__inner { padding: var(--space-3xl) 0; }
.two-up--collab { align-items: center; }
.collab-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-m); }
.collab-copy > p { color: var(--text); }
.band--positions { background: var(--pale); }
.band--positions .band__inner { display: flex; flex-direction: column; align-items: center; padding: var(--space-3xl) 0 var(--space-3xl); }
.pos-head { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); margin-bottom: var(--space-l); text-align: center; }
.pos-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-m); width: 100%; }
.pos-photos img { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.pos-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-s); width: 100%; padding: var(--space-l) var(--space-2xs) var(--space-2xs); }
.pos-text p { color: var(--text-alt); }
.pos-text a { color: var(--tertiary-on-soft); text-decoration: none; }
.posbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-l); width: 100%; margin-top: var(--space-l); padding: var(--space-l); border-radius: var(--radius-tile); background: linear-gradient(var(--mid-blue) 0%, var(--brand-solid) 100%); }
.posbar__left { display: flex; flex-direction: column; gap: var(--space-s); }
.posbar h3 { margin: calc(var(--space-3xs) / -2) 0; font-family: var(--font-heading); font-size: var(--size-3); font-weight: 700; line-height: var(--leading-snug); color: var(--brand-on-solid); }
.posbar ul { margin: calc(-1 * var(--space-3xs)) 0 calc(-1 * (var(--space-xs) + var(--space-3xs))); padding-left: var(--space-l); font-size: var(--size-1); color: var(--pale); }
.posbar__right { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-m); }
.posbar__phone { display: inline-flex; align-items: center; gap: var(--space-2xs); font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; color: var(--brand-on-solid); text-decoration: none; }
.posbar__icon { width: 28px; height: 28px; fill: var(--brand-on-solid); }

/* ── Contact ──────────────────────────────────────────────────────── */
.ihero--contact { background-image: linear-gradient(var(--pale) 0%, color-mix(in srgb, var(--surface) 31%, transparent) 100%), url("/assets/images/contact-hero-bg.b7a9aa5c33.webp"); background-position: 50% 0; }
.ihero--contact .band__inner { padding: var(--space-3xl) 0 calc(var(--space-4xl) + var(--space-2xl) + var(--space-3xs)); }
.contact-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--space-xl) var(--space-2xl) var(--space-m); border-radius: var(--radius-l); background: linear-gradient(var(--mid-blue) 0%, var(--brand-solid) 100%); }
.contact-card__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-m); padding: var(--space-s) var(--space-2xl) 0 0; }
.contact-card__copy .title, .contact-card__copy p { color: var(--brand-on-solid); }
.contact-card__photo { display: block; width: 100%; height: auto; border-radius: var(--radius-l); }
.contact-form { margin-bottom: calc(-1 * (var(--space-3xl) + var(--space-3xs))); padding: var(--space-xl); background: var(--surface-raised); border-radius: var(--radius-l); box-shadow: var(--shadow-card); }
.cform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-s); }
.cform__field { display: flex; flex-direction: column; }
.cform__field--full, .cform altcha-widget, .cform__submit { grid-column: 1 / -1; }
.cform label { padding-bottom: var(--space-3xs); font-family: var(--font-heading); font-size: var(--size-0); font-weight: 700; line-height: var(--leading-subhead); color: var(--tertiary-on-soft); }
.req { color: var(--secondary-on-soft); }
.cform__submit { width: 100%; padding: var(--space-2xs); font-size: var(--size-0); font-weight: 600; letter-spacing: normal; cursor: pointer; }
[data-mf-feedback]:not([hidden]) { margin-top: var(--space-s); color: var(--tertiary-on-soft); }
.band--visit { background: var(--pale); }
.band--visit .band__inner { padding: var(--space-3xl) 0; }
.visit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.visit__map iframe { display: block; width: 100%; height: 570px; border: 0; border-radius: var(--radius-l); }
.visit__copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-m); padding-left: var(--space-2xl); }
.visit__copy .title { margin: calc(-1 * var(--space-3xs)) 0 calc(-1 * var(--space-3xs)); }
.visit__copy .prose { margin: calc(-1 * var(--space-3xs)) 0 0; }   /* live's -21px bottom, plus .cbox's -10px top, pulled the contact details into the description */
.cbox { margin: 0 0 calc(-1 * var(--space-3xs)); }   /* the -10px top closed the gap under the description */
.visit__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-l); width: 100%; }
.visit__col { display: flex; flex-direction: column; gap: var(--space-m); }
.cbox h3 { margin: 0 0 var(--space-3xs); font-family: var(--font-heading); font-size: var(--size-1); font-weight: 700; line-height: var(--leading-subhead); color: var(--secondary-on-tint); }
.cbox h3 a { color: inherit; text-decoration: none; }
.cbox h3 a:hover { text-decoration: underline; }
.cbox p { color: var(--text); white-space: nowrap; }   /* the source lets the long addresses run past the column, as here */
@media (max-width: 1360px) { .cbox p { white-space: normal; overflow-wrap: anywhere; } }   /* ...but between 1025 and ~1340 the email addresses ran past the VIEWPORT and the page scrolled sideways, so below 1360 they wrap */

/* ── Legal pages ──────────────────────────────────────────────────── */
.ihero--legal { min-height: 900px; background-size: cover; background-position: center; }
.ihero--privacy { background-image: linear-gradient(color-mix(in srgb, var(--mid-blue) 21%, transparent) 30%, color-mix(in srgb, var(--tertiary-solid) 21%, transparent) 94%), url("/assets/images/contact-hero-bg.b7a9aa5c33.webp"); }
.ihero--terms { background-image: linear-gradient(color-mix(in srgb, var(--mid-blue) 16%, transparent) 0%, color-mix(in srgb, var(--brand-solid) 16%, transparent) 100%), url("/assets/images/terms-hero-bg.aa9acd7d96.webp"); }
.band--legal { background: var(--pale); }
.band--legal .band__inner { display: flex; flex-direction: column; padding: 0 0 var(--space-3xl); }
.legal-card { position: relative; z-index: var(--layer-raised); margin-top: calc(-1 * (var(--space-4xl) + var(--space-3xl) - var(--space-2xs))); padding: var(--space-2xl); background: var(--surface-raised); border-radius: var(--radius-l); }
.legal-card .title { margin-bottom: var(--space-s); }
.legal-body > p:first-child { margin-bottom: var(--space-l); }
.legal-body h2 { margin: var(--space-m) 0 var(--space-xs); font-family: var(--font-heading); font-size: var(--size-4); font-weight: 700; line-height: var(--leading-headline); color: var(--tertiary-on-soft); }
.legal-body h3 { margin: var(--space-s) 0 var(--space-2xs); font-family: var(--font-heading); font-size: var(--size-3); font-weight: 700; line-height: var(--leading-snug); color: var(--tertiary-on-soft); }
.legal-card .title--md { font-size: var(--size-4); }
.legal-body p, .legal-body li { color: var(--text-alt); }
.legal-body ul, .legal-body ol { margin: 0 0 var(--space-xs); padding-left: var(--space-l); }
.legal-body li { margin-bottom: var(--space-3xs); }
.legal-body a { color: var(--brand-on-soft); }

/* ── 404 ──────────────────────────────────────────────────────────── */
.ihero--404 .band__inner { padding: var(--space-3xl) 0 var(--space-3xl); }
.ihero--404 .lede { max-width: 700px; }
.ihero--404 .lede a { color: var(--brand-on-soft); }

/* ── Inner pages: tablet (≤1024) ──────────────────────────────────── */
@media (max-width: 1024px) {
    .values-grid, .why-grid, .doc-hero, .skin-hero, .which-cards, .fees-cols, .steps, .guide-cards, .polcards, .careers-hero, .linkcards, .pos-text, .contact-card, .visit, .splitcard, .future-cols { grid-template-columns: minmax(0, 1fr); }
    .values-grid { gap: var(--space-xl); }
    .why-grid { gap: var(--space-xl); }
    .why-photo { width: 600px; max-width: 100%; justify-self: center; }
    .doc-hero { gap: var(--space-xl); }
    .dcard { grid-template-columns: minmax(0, 1fr); gap: var(--space-s); }
    .dcard__photo, .dcard--lg .dcard__photo { margin-top: 0; justify-self: start; }
    .dcard__body { padding: var(--space-l); }
    .pullcards { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); }
    .pullcard img { width: 310px; max-width: 100%; }
    .flips { padding: 0; }
    .flips__row { grid-template-columns: minmax(0, 1fr); padding: 0; }
    .flip--wide { height: 280px; }
    .skin-hero__photo { order: -1; }
    .which-cards { gap: var(--space-m); }
    .gradcard, .gradcard--b { grid-template-columns: minmax(0, 1fr); }
    .gradcard__photo { min-height: 400px; }
    .gradcard--b .gradcard__photo { order: -1; }
    .gradcard__text { padding: var(--space-xl) var(--space-l); }
    .appt-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); padding: 0; }
    .steps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-s) var(--space-l); }
    .steps__photo { min-height: 450px; margin-top: var(--space-l); }
    .ah-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-l); }
    .ah-card > img { width: 410px; max-width: 100%; }
    .guide-head { flex-direction: column; gap: var(--space-s); }
    .guide-head__right { align-items: flex-start; text-align: left; }
    .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ihero--policies .band__inner { padding-bottom: calc(var(--space-4xl) * 2 + var(--space-3xs)); }
    .health-photo { width: calc(100% - 80px); border-radius: 40px; }
    .articles-card { margin: 0; padding: var(--space-l); }
    .resources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .careers-hero { gap: var(--space-xl); }
    .careers-hero__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gradbox { grid-template-columns: minmax(0, 1fr); }
    .gradbox img { width: 100%; height: auto; }
    .two-up--future { grid-template-columns: minmax(0, 1fr); }
    .two-up--training .two-up__photo, .two-up--collab .two-up__photo, .two-up--skinfaq .two-up__photo, .two-up--accred .two-up__photo { width: 600px; max-width: 100%; justify-self: center; }
    .linkcard--tall { min-height: 500px; }
    .pos-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .posbar { grid-template-columns: minmax(0, 1fr); }
    .posbar__right { justify-content: flex-start; }
    .contact-card { gap: var(--space-l); padding: var(--space-l); }
    .contact-card__copy { padding: 0; }
    .contact-form { margin-bottom: 0; }
    .ihero--contact .band__inner { padding-bottom: var(--space-3xl); }
    .visit { gap: var(--space-l); }
    .visit__copy { padding-left: 0; }
    .visit__map iframe { height: 400px; }
    .legal-card { padding: var(--space-xl); }
    .splitcard__photo { order: -1; min-height: 400px; }
    /* Centre the Saturday Fees block like the weekday one above it (.fees-head
     * is already centred). The price rows keep their own alignment: each
     * .pricelist__head is a flex row with a flex: 1 dotted leader between the
     * title and the price, so centring it would collapse the leader. */
    .sat-copy { align-items: center; padding: 0 0 var(--space-l); text-align: center; }
    .sat-copy .pricelist__desc { text-align: center; }
    .sat-photo { min-height: 450px; }
}

/* ── Inner pages: mobile (≤767) ───────────────────────────────────── */
@media (max-width: 767px) {
    .ihero .band__inner, .band--values .band__inner, .band--accred .band__inner, .band--why .band__inner, .band--future .band__inner, .band--first .band__inner,
    .band--team .band__inner, .band--solutions .band__inner, .band--which .band__inner, .band--skinfaq .band__inner, .band--weekday .band__inner, .band--saturday .band__inner,
    .band--important .band__inner, .band--steps .band__inner, .band--afterhours .band__inner, .band--guidelines .band__inner, .band--policies .band__inner, .band--deserve .band__inner,
    .band--articles .band__inner, .band--training .band__inner, .band--links .band__inner, .band--collab .band__inner, .band--positions .band__inner, .band--visit .band__inner { padding: var(--space-2xl) 0 var(--space-xl); }
    /* Waves keep their desktop height on mobile while the band padding shrinks,
     * so a tall top wave paints over the heading beneath it. --space-2xl is
     * ~55px at 390, against waves of 67-125px. Give each overlapped band a top
     * padding that clears its own wave, plus a --space-m breath below it. */
    .band--which .band__inner, .band--skinfaq .band__inner { padding-top: calc(var(--wave-clear-which) + var(--space-m)); }
    .band--afterhours .band__inner { padding-top: calc(var(--wave-clear-afterhours) + var(--space-m)); }
    .band--articles .band__inner { padding-top: calc(var(--wave-clear-articles) + var(--space-m)); }
    .band--weekday .band__inner, .band--saturday .band__inner,
    .band--important .band__inner, .band--guidelines .band__inner { padding-top: calc(var(--wave-clear-fees) + var(--space-m)); }

    .ihero--services .band__inner { padding: var(--space-xl) 0 calc(var(--space-4xl) * 2 + var(--space-3xs)); }
    .ihero--policies .band__inner { padding: var(--space-xl) 0 calc(var(--space-4xl) + var(--space-3xl) - var(--space-3xs)); }
    .ihero--fees .band__inner { padding: var(--space-3xl) 0; }
    .ihero--legal { min-height: 400px; }
    .legal-card { margin-top: calc(-1 * (var(--space-3xl) + var(--space-m))); padding: var(--space-m) var(--space-s); }
    .band--legal .band__inner { padding-bottom: var(--space-xl); }
    .title--xl { font-size: var(--size-4); }
    .cta-row { gap: var(--space-s); }
    .two-up__text--practice, .doc-hero__copy, .careers-hero__copy { gap: var(--space-s); }
    .values-head, .team-head, .services-head--inner { padding-bottom: var(--space-l); }
    .values-col { gap: var(--space-l); }
    .splitcard__text, .dcard__body, .pullcard, .which-card, .feecard, .gradcard__text, .hours-card, .steps__copy, .gcard__text, .polcard, .deserve-card, .articles-card, .linkcard, .posbar, .contact-card, .contact-form, .legal-card { padding: var(--space-m) var(--space-s); }

    /* The white/cream classes are a checkerboard for the 2-column desktop grid,
     * so stacked into one column the DOM order reads white, cream, cream,
     * white, white … — doubled pairs rather than an alternation. Drive the
     * colour off nth-child here instead. Cream is the site's warm panel and
     * keeps body text at 8.41:1; the full brand orange would drop it to 3.86:1
     * across ten paragraphs of policy text. */
    .polcard:nth-child(odd) { background: var(--surface-raised); box-shadow: var(--shadow-polcard); }
    .polcard:nth-child(even) { background: var(--cream); box-shadow: none; }

    /* The deserve band leads straight into a full-width photo, so the wave's
     * trough sits close to its rounded top corners even with the band padding
     * clearing the wave. Give it the wave's height again. */
    /* The photo comes first in the markup and .deserve-card pulls -254px up over
     * it, which works at 1440 where the photo renders 650px tall. On mobile it
     * is only ~183px, so the card covered it completely and overshot by 71px
     * into the section above. Put the card first and let the photo follow, as
     * the owner's reference does: same two pieces, no overlap. */
    .band--deserve .band__inner { gap: var(--space-l); padding-top: calc(var(--wave-clear-deserve) + var(--space-l)); }
    .deserve-card { order: -1; margin-top: 0; padding: calc(var(--space-l) + var(--space-2xs)); }   /* owner 2026-09-17: an even 40px inside this card on mobile, overriding the shared card padding above */
    .linkcard { padding-top: var(--space-3xl); }
    .feecard__btn { margin-top: calc(-1 * (var(--space-s) + var(--space-3xs))); }
    .fees-cols { gap: var(--space-l); }
    .steps__grid { grid-template-columns: minmax(0, 1fr); }
    .steps__photo { min-height: 320px; }
    .ah-card__box { width: 280px; margin-top: calc(-1 * (var(--space-xl) + var(--space-xs))); padding: var(--space-s); }
    /* Owner's call: on mobile the mosaic shows only its second row — the
     * pol-5/6/7 column and the tall pol-8. The first four are hidden rather
     * than removed: desktop keeps all eight in the 4-column layout whose 0.50
     * straddle ratio is measured at 1440.
     *
     * The block straddles the seam as on desktop — half in the hero above, half
     * in this section. Measured off the rendered page at 390: the block is
     * 269px tall, and -182px puts its midpoint on the seam (-150px left it at
     * 38/62). It looked broken before only because the section's own wave--top
     * painted over the images, which the z-index lift on
     * .band--mosaic .band__inner now fixes at every width. */
    .mosaic { gap: var(--space-2xs); margin-top: calc(-1 * (var(--space-4xl) + var(--space-xl) + var(--space-3xs))); }
    .mosaic > :nth-child(1), .mosaic > :nth-child(2) { display: none; }   /* pol-1 and the pol-2/3/4 column; positional, so it cannot latch onto the wrong div */
    .mosaic__col { gap: var(--space-2xs); }
    .health-photo { width: calc(100% - 40px); border-radius: var(--radius-l); }
    .careers-hero__cards { grid-template-columns: minmax(0, 1fr); }
    .gradbox { grid-template-columns: 111px minmax(0, 1fr); }
    .gradbox img { width: 111px; height: 111px; }
    .training-grid { grid-template-columns: minmax(0, 1fr); }
    .training-grid .ibox { min-height: 0; margin-bottom: var(--space-s); }
    .linkcard--tall { min-height: 400px; }
    .linkcard--tall .linkcard__title { font-size: var(--size-4); }
    .pos-photos { gap: var(--space-xs); }
    .pos-text { padding: var(--space-m) 0 0; }
    .cform { grid-template-columns: minmax(0, 1fr); }
    .resources { grid-template-columns: minmax(0, 1fr); }
    .visit__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-m); }
    .visit__map iframe { height: 300px; }
    .ihero--careers { background-size: 1600px auto; }

    /* Heading-to-content spacing. The section headings stay large on mobile
     * (title--md is ~33px at 390) while --space-s/--space-m shrink with the
     * viewport, so the gap under a heading reads tighter here than on desktop —
     * the proportion moves the wrong way. Lift the floor on the blocks that
     * stack a pill, a heading and a body block. */
    .accred-copy__text, .why-copy, .training-copy, .collab-copy, .visit__copy,
    .contact-card__copy, .values-head, .team-head, .fees-head, .imp-head,
    .ah-head, .pos-head, .articles-card, .deserve-card, .services-head__left,
    .skin-hero__copy, .sat-copy, .steps__copy, .two-up__text, .ihero__center {
        gap: var(--space-l);
    }
    .accred-copy__text { padding-top: var(--space-xl); }
}

/* Doctors render from one {{#each practitioners}} loop, so the list can no
   longer be split into two hand-written columns. One list spans both grid
   tracks and flows 2-up, painting identically without hard-coding the count. */
.doctors__col--all { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }
@media (max-width: 760px) { .doctors__col--all { grid-template-columns: minmax(0, 1fr); } }

.hours-list__notes { margin: 0; font-size: var(--size-0); line-height: var(--leading-body); color: var(--text); }
@container (max-width: 300px) { .hours-list__row { font-size: var(--size-0); } }
@container (max-width: 230px) { .hours-list__row { font-size: var(--size--1); } .hours-list dt::after { margin: 0 var(--space-3xs); } }   /* the card is narrowest at desktop widths, where it sits beside the photo */

/* 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. */
.dcard__photo.doctor-avatar { aspect-ratio: auto; border-radius: 15px; display: flex; }
.doc__photo.doctor-avatar { aspect-ratio: auto; border-radius: var(--radius-tile); display: flex; }
.avatars .doctor-avatar { width: 40px; height: 40px; aspect-ratio: auto; border-radius: var(--radius-round); }
/* 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; }
