/*
 * 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.1/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. A site differs from
 * another in these values and nowhere else. The values below reproduce the
 * template's look before Dials (its --palette-*, --hue-* and --l-* dials);
 * change them to match the practice.
 *
 * Colours are HSL, which is the easiest to reason about ("the same teal, a
 * bit darker"); any CSS colour works, so a brand's own hex can go straight
 * into --brand. Dials works the rest out in OKLCH, and keeps every text
 * colour at 4.5:1 and every control border and focus ring at 3:1, in light
 * and dark.
 * ═══════════════════════════════════════════════════════════════════════ */
:root {
    /* Churinga, from the Claude Design import (Nov 2026): a warm cream
     * paper, espresso ink, copper for links and icons, a deep olive for the
     * feature bands, honey for highlights on dark grounds, and terracotta
     * for the emergency call. Each colour dial is a group with five roles:
     * --brand-solid, --brand-on-solid, --brand-soft, --brand-on-soft and
     * --brand-line. */
    --brand: hsl(27 47% 37%);       /* copper #8A5A32: links, icons, the call tab */
    --secondary: hsl(81 22% 29%);   /* olive #4F5A3A: feature bands and the CTA panel */
    --tertiary: hsl(46 77% 76%);    /* honey #F1DB94: eyebrows and highlights on dark grounds */
    /* Older browsers only: honey is light, so black text on it as set. */
    --tertiary-is-light: 100%;
    --success: hsl(96 25% 39%);
    --warning: hsl(37 74% 54%);
    --danger: hsl(18 51% 41%);      /* terracotta #9F5434: the emergency (000) call */
    --info: hsl(202 64% 41%);
    --grey: hsl(30 25% 45%);        /* the warm brown tint in paper and ink */

    /* Paper and ink, exact: cream page and espresso text in light; in dark,
     * a deep espresso page with cream text. */
    --paper-light: hsl(38 47% 92%);  /* #F4EDE1 */
    --paper-dark: hsl(24 27% 10%);
    --ink-light: hsl(24 31% 13%);    /* #2A1E16 */
    --ink-dark: hsl(38 52% 94%);     /* #F7F0E4 */

    /* Paper and ink sit close in tone on a cream page: strengthen muted
     * text and strong borders a little. */
    --text-contrast: 8;
    --dark-lift: 0.1;
    --tint-strength: 14%;

    /* Type and space, measured off the design at 360px and 1440px: body 16px
     * to 17px, each step 1.17x (phone) to 1.26x (desktop). The steps land
     * on the design's sizes:
     *   -1  13.7 / 13.5  labels, buttons, nav, small print (design 13-14.5)
     *    0  16 / 17      body text (16.5-18)
     *    1  18.7 / 21.4  hero standfirst, table names, highlights (19-22)
     *    2  21.9 / 27    card and list headings (24-28)
     *    3  25.6 / 34    gallery cards, names, milestones (30-36)
     *    4  30 / 42.9    sub-section headings, the welcome lead (40-46)
     *    5  35.1 / 54    the CTA heading, the 30+ badge (52)
     *    6  41 / 68      section headings (40 / 66)
     *    7  48 / 85.7    inner page heroes (52 / 95)
     *    8  56.2 / 108   the home hero (60 / 124)
     * --space-s 16px to 20px. */
    --screen-min: 360;
    --screen-max: 1440;
    --size-min: 16;
    --size-max: 17;
    --ratio-min: 1.17;
    --ratio-max: 1.26;
    --space-min: 16;
    --space-max: 20;
    --space-density: 1;

    /* Line height: the design's body copy runs at 1.6. */
    --leading-body: 1.6;
    /* Young Serif headings sit tighter than Dials' --leading gives at their
     * size: about 1.0 to 1.1 in the design. Display is the hero headline. */
    --leading-heading: 1.06;
    --leading-hero: 0.94;

    /* Corners: --radius-s 9px, --radius-m 18px, --radius-l 28.8px (the
     * design's cards and panels) */
    --radius-base: 18;
    --border-width-l: 4px;

    /* Faces: Young Serif for headings, Instrument Sans for everything else */
    --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-heading: 'Young Serif', Georgia, 'Times New Roman', serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* A re-themed band: the deep olive feature bands, drawn as Dials' dark band
 * (class="is-dark") with the olive as its dark paper, so every token inside
 * (text, borders, links, buttons, fields, the focus ring) is worked out for
 * that ground. Markup: <section class="is-dark" data-dials="olive">. */
[data-dials][data-dials="olive"] {
    --paper-dark: hsl(81 22% 29%);  /* #4F5A3A */
    --ink-dark: hsl(38 52% 94%);
}

/* The espresso panels and the textured marquee strip: the same, on a deep
 * brown. <div class="is-dark" data-dials="espresso">. */
[data-dials][data-dials="espresso"] {
    --paper-dark: hsl(24 31% 13%);  /* #2A1E16 */
    --ink-dark: hsl(38 52% 94%);
}

/* The marquee strip and the "30+" badge: the design's warmer bark brown. */
[data-dials][data-dials="bark"] {
    --paper-dark: hsl(25 45% 20%);  /* #4A2F1C */
    --ink-dark: hsl(38 52% 94%);
}

/* ── The colour scheme ────────────────────────────────────────────────────
 * The page follows the device's light or dark setting: Dials' own
 * color-scheme: light dark (mf-websites#431). The visitor can override it
 * with the switcher in partials/header.html, which sets <html
 * data-scheme="light|dark"> (none = match the device); partials/
 * scheme-head.html applies a stored choice before first paint.
 *
 * Only where Dials can draw a dark page, under Dials' own condition:
 * elsewhere (Dials' fallback) the page is always light, the switcher stays
 * hidden, and a forced dark scheme would only darken the browser's own
 * controls on a light page.
 *
 * A site that should only ever be light (or dark) sets color-scheme on :root
 * in its dials block instead, and deletes the switcher and the scheme-head
 * include: a visitor must not be offered a choice the site does not honour. */
@supports (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-scheme="light"] { color-scheme: light; }
    :root[data-scheme="dark"] { color-scheme: dark; }
}

/* ── 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 can't follow the fill's luminance there, so, as in Dials'
 * fallback, it is a fixed choice with the fill moved to suit it. Dials fixes
 * the choice per group (white on --brand pulled 72% towards black, black on
 * --warning as set); the tertiary is whatever colour the site gives it, so
 * the site fixes it with --tertiary-is-light in its dials block, a literal
 * percentage like Dials' own fallback switches: 0% (the default) is white on
 * the fill pulled 72% towards black, as Dials does --brand; 100% is black on
 * --tertiary as set, as Dials does --warning. A light --tertiary at 0% gets
 * white on a mid fill below 4.5:1, a dark one at 100% black on a dark fill:
 * check-contrast.mjs --fallback says which a site needs. */
@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) var(--tertiary-is-light, 0%), color-mix(in oklab, var(--tertiary) 72%, black));
        --tertiary-on-solid: color-mix(in oklab, black var(--tertiary-is-light, 0%), 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;
}

/* Display headings tighten a little, more the larger they are; tune to the
 * face (one with optical sizes may need none). */
h1, .h1 { font-size: var(--size-5); letter-spacing: -0.025em; }
h2, .h2 { font-size: var(--size-4); letter-spacing: -0.02em; }
h3, .h3 { font-size: var(--size-3); letter-spacing: -0.015em; }
h4, .h4 { font-size: var(--size-2); letter-spacing: -0.01em; }
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;
}

/*
 * Entrances: one-way reveal (the default) and scroll-linked (set-pieces).
 *
 * .reveal fades an element in the first time it enters the viewport and it
 * then stays put: scrolling back up never hides it again. Add .reveal for a
 * plain fade, or a directional modifier: .reveal--up, --down, --left, --right.
 * The script that drives it is in partials/footer.html: it adds .is-revealed
 * to an element as it first comes into view, then stops watching it, and it
 * sets .js-reveal on <html> only once it is watching.
 *
 * FAIL VISIBLE. The hidden start state applies only on a screen, only with
 * .js-reveal on <html> AND prefers-reduced-motion: no-preference. No script,
 * no IntersectionObserver, a script error, reduced motion or print: the
 * content is simply there. An element already in view at load is revealed
 * on the first frame. Never write a hidden state for .reveal anywhere else.
 *
 * .reveal-scroll is the scroll-linked version (native animation-timeline:
 * view(), no JS): it plays forwards AND backwards as the page scrolls, so it
 * is only for a deliberate set-piece where the motion tracks the scroll on
 * purpose. It takes the same modifiers (.reveal-scroll--up ...). Browsers
 * without animation-timeline simply show the content.
 *
 * The transition is on opacity and transform: an element that also needs its
 * own transform transition (a hover lift) should carry .reveal on a wrapper.
 */
@media screen and (prefers-reduced-motion: no-preference) {
    .reveal--up, .reveal-scroll--up { --reveal-from: translateY(var(--reveal-distance)); }
    .reveal--down, .reveal-scroll--down { --reveal-from: translateY(calc(var(--reveal-distance) * -1)); }
    .reveal--left, .reveal-scroll--left { --reveal-from: translateX(var(--reveal-distance)); }
    .reveal--right, .reveal-scroll--right { --reveal-from: translateX(calc(var(--reveal-distance) * -1)); }

    .js-reveal .reveal {
        transition: opacity var(--duration-slow) var(--ease-out),
                    transform var(--duration-slow) var(--ease-out);
    }
    .js-reveal .reveal:not(.is-revealed) {
        opacity: 0;
        transform: var(--reveal-from, none);
    }

    .reveal-scroll {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }
}

@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;
}

/* ── Images on a dark ground: twins ──────────────────────────────────────
 * Photos need nothing in dark. A logo or drawing made for a light ground
 * (dark lettering, a dark line) fades into a dark one, so it gets a
 * dark-ground TWIN: the same artwork with its dark parts made pale. Both go
 * in the markup, and CSS shows the one that suits the ground it sits on:
 *
 *     <img class="show-in-light" src="assets/images/logo.webp" alt="…">
 *     <img class="show-in-dark" src="assets/images/logo-dark.webp" alt="…" loading="lazy">
 *
 * The ground is the nearest .is-dark or .is-light band, else the page: dark
 * when the visitor chose Dark, or chose nothing on a dark device, and only
 * where Dials can draw a dark page. The other twin is display: none, so it
 * is out of the accessibility tree and, with loading="lazy", never fetched
 * until it is shown. Give both the same alt.
 *
 * These rules only ever HIDE, so each twin keeps whatever display the site
 * gives it. Never make a dark twin with filter: invert() or hue-rotate():
 * they turn the practice's colours into other colours (an all-white
 * knockout, brightness(0) invert(1), only where the practice's brand allows
 * one). On a band painted with a brand fill (.on-dark), put only the twin
 * that suits that fill. */
.is-dark .show-in-light:not(.is-dark .is-light *),
.is-light .show-in-dark:not(.is-light .is-dark *) { display: none; }

@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))) {
    .show-in-dark:not(:is(.is-light, .is-dark) *) { display: none; }
}

@supports (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-scheme="light"] .show-in-dark:not(:is(.is-light, .is-dark) *),
    :root[data-scheme="dark"] .show-in-light:not(:is(.is-light, .is-dark) *) { display: none; }

    @media not all and (prefers-color-scheme: dark) {
        :root:not([data-scheme]) .show-in-dark:not(:is(.is-light, .is-dark) *) { display: none; }
    }

    @media (prefers-color-scheme: dark) {
        :root:not([data-scheme]) .show-in-light:not(:is(.is-light, .is-dark) *) { display: none; }
    }
}

/* The "Powered by Mediflare" logo in the footer is a pair of twins
 * (partials/footer.html), so it follows the footer's ground: a plain footer,
 * light or dark with the page, or a footer band (class="is-dark"). */
.powered-by img { display: inline; }

/* Hours: prevent time strings from breaking between number and am/pm */
.hours-table td:last-child,
.footer__hours-row span {
    white-space: nowrap;
}
/* ── 404 ──────────────────────────────────────────────────────────────
 * Served for any unmatched path, so it stands alone: say what happened, then
 * offer the way back rather than leaving a dead end.
 *
 * Deliberately written against fallbacks rather than this site's own token
 * names - every site in the fleet has a different vocabulary, and a 404 that
 * silently loses its layout because one variable is spelt differently is
 * worse than one that is slightly plainer. */
.notfound {
    padding-block: var(--space-3xl) var(--space-2xl);
    text-align: center;
}
.notfound__inner { max-width: 46rem; margin-inline: auto; }
.notfound__code {
    font-size: var(--size-5);
    font-weight: 700;
    line-height: var(--leading);
    letter-spacing: -0.025em;
    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;
}

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

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

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

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

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

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

.mf-search__status {
    margin: 0;
    font-size: var(--size--1);
    line-height: var(--leading);
    color: var(--text-muted);
}
.mf-search__status:empty { display: none; }

.mf-search__results:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xs);
}

.mf-search__link {
    display: block;
    padding: var(--space-2xs) var(--space-xs);
    border-radius: var(--radius-s);
    color: var(--text);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background var(--duration-fast) var(--ease-out);
}
.mf-search__link:hover,
.mf-search__link:focus-visible {
    color: var(--on-soft);
    background: var(--soft);
}
/* Inside a scrolling list an outset ring is clipped, so it sits inset. */
.mf-search__link:focus-visible { outline-offset: calc(var(--border-width-m) * -1); }

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

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

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

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

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

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

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

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

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

/* The overlay. Phones: full screen. One row holds Close, the field and Search (Close
 * first, matching the focus order); the results scroll below it, within the
 * overlay. The page behind is locked by mediflare.js itself. Subgrid puts
 * the box's own children on the overlay's grid, so the results run the full
 * width rather than only under the field. */
.mf-search-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: var(--layer-modal);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: var(--space-xs) var(--space-2xs);
    padding-block-start: max(var(--space-xs), env(safe-area-inset-top));
    padding-inline: max(var(--space-s), env(safe-area-inset-left)) max(var(--space-s), env(safe-area-inset-right));
    background: var(--surface);
}

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

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

.mf-search--overlay,
.mf-search--overlay .mf-search__form {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    gap: normal;            /* the overlay's own gap; a different subgrid gap pads the edge row and pushes Search 2px past the field */
    align-items: stretch;   /* Close, the field and Search share one height */
}

.mf-search--overlay .mf-search__input { grid-column: 2; grid-row: 1; }
.mf-search--overlay .mf-search__submit { grid-column: 3; grid-row: 1; }
.mf-search--overlay .mf-search__status { grid-column: 1 / -1; grid-row: 2; }

.mf-search--overlay .mf-search__results {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    min-block-size: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-block-end: max(var(--space-s), env(safe-area-inset-bottom));
}

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

    .mf-search--overlay .mf-search__results { padding-block-end: 0; }

    html[data-mf-search-overlay="open"] body::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: var(--layer-modal);
        background: var(--surface-overlay);
        -webkit-backdrop-filter: blur(var(--space-3xs));
        backdrop-filter: blur(var(--space-3xs));
    }
}

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

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

/* ── Colour scheme switcher: Churinga ────────────────────────────────────
 * A 44px round sun/moon button in the header bar (and a second one in the
 * phone menu) that opens Light / Dark / Match device as a small menu: the
 * menu form the script in partials/header.html supports. The pressed choice
 * is bold with a tick, so not by colour alone; the ring is the global one.
 * The hiding rule stays first and unbeaten: the switcher shows only where
 * the head script set data-scheme-ui. */
:root:not([data-scheme-ui]) [data-scheme-switcher] { display: none; }

.scheme {
    position: relative;
    display: inline-flex;
}

.scheme__toggle {
    display: inline-grid;
    place-items: center;
    inline-size: var(--target-min);
    block-size: var(--target-min);
    color: var(--text-strong);
    border: var(--field-border-w) solid var(--border);
    border-radius: var(--radius-pill);
    transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.scheme__toggle:hover { background: var(--sand); border-color: var(--field-border); }
.scheme__toggle svg { inline-size: 1.25rem; block-size: 1.25rem; }
/* The moon in light, the sun in dark: what the page is showing now. */
.scheme__toggle .icon-sun { display: none; }
@supports (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-scheme="dark"] .scheme__toggle .icon-sun { display: block; }
    :root[data-scheme="dark"] .scheme__toggle .icon-moon { display: none; }
    @media (prefers-color-scheme: dark) {
        :root:not([data-scheme="light"]) .scheme__toggle .icon-sun { display: block; }
        :root:not([data-scheme="light"]) .scheme__toggle .icon-moon { display: none; }
    }
}

.scheme__menu:not([hidden]) {
    position: absolute;
    inset-block-start: calc(100% + var(--space-2xs));
    inset-inline-end: 0;
    z-index: var(--layer-overlay);
    display: grid;
    gap: var(--space-3xs);
    min-inline-size: 13rem;
    padding: var(--space-xs);
    background: var(--surface-raised);
    color: var(--text);
    border: var(--border-width-s) solid var(--border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-l);
}

.scheme__label {
    margin: 0 0 var(--space-3xs);
    padding-inline: var(--space-2xs);
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scheme__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    min-block-size: var(--target-min);
    padding-inline: var(--space-xs);
    font-size: var(--size--1);
    line-height: var(--leading);
    text-align: start;
    color: var(--text);
    border-radius: var(--radius-s);
}
.scheme__option:hover { background: var(--sand); color: var(--text-strong); }
.scheme__option::after {
    content: "";
    inline-size: 0.5em;
    block-size: 0.9em;
    border: solid transparent;
    border-width: 0 var(--border-width-m) var(--border-width-m) 0;
    transform: rotate(45deg) translate(-15%, -15%);
}
.scheme__option[aria-pressed="true"] { font-weight: 600; color: var(--text-strong); }
.scheme__option[aria-pressed="true"]::after { border-color: var(--brand-line); }

/* ── Connect widgets on a dark page ──────────────────────────────────────
 * The Your Health hub and the newsletter sign-up are drawn by the Connect
 * widget (connect.mediflare.cloud) in its own light colours, and it does not
 * follow the page's scheme: on a dark page its tabs and labels inherit pale
 * text on its own white cards. So the widgets stay light, always: the light
 * scheme and ink inside them, and on a dark page a light panel behind them,
 * drawn as a spread shadow so the layout does not move (proven on Wellbrook,
 * mf-websites#427). Put them on the page or a light band, never inside an
 * .is-dark band. Connect's chat and request windows draw their own colours
 * and need nothing. */
#mediflare-yourhealth-hub,
.mediflare-yourhealth-newsletter-signup {
    color-scheme: light;
    color: var(--text);
}

@supports (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-scheme="dark"] :is(#mediflare-yourhealth-hub, .mediflare-yourhealth-newsletter-signup):not(:empty) {
        background: var(--surface);
        border-radius: var(--radius-m);
        box-shadow: 0 0 0 var(--space-s) var(--surface);
    }

    @media (prefers-color-scheme: dark) {
        :root:not([data-scheme="light"]) :is(#mediflare-yourhealth-hub, .mediflare-yourhealth-newsletter-signup):not(:empty) {
            background: var(--surface);
            border-radius: var(--radius-m);
            box-shadow: 0 0 0 var(--space-s) var(--surface);
        }
    }
}

/* ═══════════════════════════════════════════════════════════════════════
 * CHURINGA MEDICAL CENTRE: the site layer
 *
 * Rebuilt on the template from the Claude Design import "Churinga Home"
 * (Nov 2026). Warm cream paper, espresso ink, Young Serif headings over
 * Instrument Sans, organic "leaf" and pebble corners, wave edges between
 * bands, deep olive feature bands and tree-ring drawings. Every colour,
 * size, space and corner below is a token; the values are the dials above.
 * ═══════════════════════════════════════════════════════════════════════ */

/* ── Site tokens: patterns built from Dials' tokens ───────────────────── */
:root, [data-dials], .is-light, .is-dark {
    /* The sand band, the design's #E6D9C4: the page with a little copper in
     * it, so it follows the page into dark. */
    --sand: color-mix(in oklab, var(--brand-solid) 12%, var(--surface));
    /* A quiet copper ring around icon blobs and soft panels: decoration. */
    --ring: color-mix(in oklab, var(--brand-line) 35%, var(--surface));
    /* The hero's photo wash: the hero's own (espresso) ground, faded. */
    --wash-strong: color-mix(in oklab, var(--surface) 88%, transparent);
    --wash-mid: color-mix(in oklab, var(--surface) 60%, transparent);
    --wash-light: color-mix(in oklab, var(--surface) 16%, transparent);
    /* The design's warm copper tint over every hero photo, under the wash. */
    --wash-warm: color-mix(in oklab, var(--brand-solid) 24%, transparent);
    /* Muted text and a quiet line on an olive (secondary) fill, as the
     * design's #E3DDC8 and #7E8763 on #4F5A3A. */
    --on-olive-muted: color-mix(in oklab, var(--secondary-on-solid) 85%, var(--secondary-solid));
    --on-olive-line: color-mix(in oklab, var(--secondary-on-solid) 30%, var(--secondary-solid));
    /* The shade under a photo tile's label: decoration only. */
    --tile-shade: color-mix(in oklab, var(--surface) 62%, transparent);
    /* The header bar: the page, a touch see-through over the hero photo. */
    --bar: color-mix(in oklab, var(--surface) 94%, transparent);
}

:root {
    /* The design's container: 1450px including its side padding (the
     * design's 32px; --space-m is 24px on phones, 30px on desktop), so the
     * content runs about 1390px wide, as the design's 1386px. The header
     * bar uses the same 1450px. */
    --grid-max-width: 90.625rem;
    --grid-gutter: var(--space-m);
    /* Pill buttons and pill fields */
    --control-radius: var(--radius-pill);
    /* The organic corners: a "leaf" (two tight, two wide corners) and a
     * soft pebble, both from the radius scale. */
    --leaf: var(--radius-l) calc(var(--radius-l) * 5) var(--radius-l) calc(var(--radius-l) * 5);
    --leaf-r: calc(var(--radius-l) * 5) var(--radius-l) calc(var(--radius-l) * 5) var(--radius-l);
    --pebble: 54% 46% 50% 50% / 48% 54% 46% 52%;
    --card-tail: var(--radius-l) var(--radius-l) calc(var(--radius-l) * 3) var(--radius-l) / var(--radius-l) var(--radius-l) calc(var(--radius-l) * 2.4) var(--radius-l);
    --ease-soft: cubic-bezier(0.3, 0.7, 0.2, 1);
    /* Wave edges: the design's three hand-drawn curves */
    --wave-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 86C300 96 520 30 820 46S1240 92 1440 40V100H0Z'/%3E%3C/svg%3E");
    --wave-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 40C260 90 520 10 800 44S1220 86 1440 30V100H0Z'/%3E%3C/svg%3E");
    --wave-c: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 60C320 10 620 80 900 50S1260 0 1440 46V100H0Z'/%3E%3C/svg%3E");
}

/* ── Base adjustments ─────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { position: relative; overflow-x: clip; }

/* Young Serif has one weight; headings use it at 400 and sit tight. */
h1, h2, h3, .h1, .h2, .h3 {
    font-weight: 400;
    line-height: var(--leading-heading);
}
h4, h5, h6, .h4, .h5, .h6 {
    font-family: var(--font-body);
    font-weight: 600;
}
h2, .h2 { letter-spacing: -0.03em; }
h3, .h3 { font-size: var(--size-1); letter-spacing: -0.01em; }

a { text-underline-offset: 0.2em; }
::selection { background: var(--selection); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
    padding: var(--space-xs) var(--space-m);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: var(--space-2xs) var(--space-s); font-size: var(--size--1); }

/* The outline button: a copper line on any ground. */
.btn--outline {
    background: transparent;
    color: var(--text-strong);
    border-color: var(--brand-line);
    border-width: var(--border-width-m);
}
.btn--outline:hover { background: var(--sand); color: var(--text-strong); }
.is-dark .btn--outline { border-color: var(--border-strong); }
.is-dark .btn--outline:hover { background: color-mix(in oklab, var(--text-strong) 12%, transparent); }

/* ── Layout: bands and wave edges ─────────────────────────────────────── */
.band {
    position: relative;
    /* The design's section padding: 40-72px above, 140-190px below (the
     * bottom holds the next band's wave edge). */
    padding-block: var(--space-xl-2xl) calc(var(--space-3xl-4xl) + var(--space-l));
    background: var(--surface);
    color: var(--text);
}
.band--sand { background: var(--sand); }
.band--flush-top { padding-block-start: 0; }

/* A band's top edge is a hand-drawn wave in its own colour, reaching up over
 * the band before it (which it follows in the page, so it paints on top). */
.band--wave::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-end: calc(100% - 1px);
    block-size: calc(var(--space-xl-2xl) * 1.25);
    background: inherit;
    -webkit-mask: var(--wave-b) center / 100% 100% no-repeat;
    mask: var(--wave-b) center / 100% 100% no-repeat;
    pointer-events: none;
}
.band--wave-a::before { -webkit-mask-image: var(--wave-a); mask-image: var(--wave-a); }
.band--wave-c::before { -webkit-mask-image: var(--wave-c); mask-image: var(--wave-c); }
/* Under a hero the design's wave is taller: clamp(60px,8vw,120px). */
.hero + .band--wave::before { block-size: var(--space-2xl-3xl); }
/* The last band before the footer hands over with a sand wave of its own
 * (pages that end without the call-to-action band). */
.band--wave-out::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-end: -1px;
    block-size: calc(var(--space-xl-2xl) * 1.25);
    background: var(--sand);
    -webkit-mask: var(--wave-b) center / 100% 100% no-repeat;
    mask: var(--wave-b) center / 100% 100% no-repeat;
    pointer-events: none;
}

.u-container { position: relative; }

/* A section's head row: the heading and a standfirst or a button. */
.band__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-s) var(--space-xl);
    margin-block-end: var(--space-l);
}
.band__head > :first-child { max-inline-size: 40rem; }
.band__head h2 { margin: 0; }
.band__head p { margin: var(--space-s) 0 0; color: var(--text-muted); }
.band__head > .band__intro, .band__head > .doctors-intro { margin: 0; }

/* Section headings and their supporting type */
.title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size-6);
    font-weight: 400;
    line-height: var(--leading-heading);
    letter-spacing: -0.03em;
    color: var(--text-strong);
    text-wrap: balance;
}
.title--centre { margin-inline: auto; max-inline-size: 14em; text-align: center; }
.title--s { font-size: var(--size-4); }

.kicker {
    margin: 0 0 var(--space-s);
    font-family: var(--font-body);
    font-size: var(--size-0);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0;
    color: var(--brand-on-soft);
}
.is-dark .kicker { color: var(--tertiary-on-soft); }

.label {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.standfirst {
    font-size: var(--size-0);
    line-height: var(--leading);
    color: var(--text-muted);
    text-wrap: pretty;
}

.prose p { color: var(--text-muted); text-wrap: pretty; }
.prose > :last-child { margin-block-end: 0; }

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

/* Icon in a pebble: the design's soft blob with a copper line icon. */
.blob {
    display: inline-grid;
    place-items: center;
    flex: none;
    inline-size: 3.5rem;
    block-size: 3.25rem;
    color: var(--brand-line);
    background: var(--brand-soft);
    border-radius: var(--pebble);
    box-shadow: inset 0 0 0 var(--border-width-s) var(--ring);
}
.blob svg { inline-size: 1.625rem; block-size: 1.625rem; }
.blob--s { inline-size: 2.9rem; block-size: 2.7rem; }
.blob--s svg { inline-size: 1.3rem; block-size: 1.3rem; }
.blob--l { inline-size: 4.75rem; block-size: 4.4rem; }
.blob--l svg { inline-size: 2.2rem; block-size: 2.2rem; }
/* Each pebble in a row has its own shape, as the design draws them. */
:nth-child(4n + 2) > .blob { border-radius: 46% 54% 56% 44% / 52% 46% 54% 48%; }
:nth-child(4n + 3) > .blob { border-radius: 50% 50% 44% 56% / 56% 48% 52% 44%; }
:nth-child(4n + 4) > .blob { border-radius: 58% 42% 50% 50% / 46% 52% 48% 54%; }
.is-dark .blob { color: var(--tertiary-on-soft); background: color-mix(in oklab, var(--text-strong) 8%, var(--surface)); box-shadow: inset 0 0 0 var(--border-width-s) var(--border); }

/* The tree-ring drawing: a mask in the ground's own line colour, so it
 * works on any band and in dark without a second file. */
.rings {
    position: absolute;
    aspect-ratio: 1;
    background: var(--brand-line);
    -webkit-mask: url("/assets/images/tree-ring-lines.1bab8eefe8.webp") center / contain no-repeat;
    mask: url("/assets/images/tree-ring-lines.1bab8eefe8.webp") center / contain no-repeat;
    pointer-events: none;
}
.is-dark .rings { background: var(--text-strong); opacity: 0.22; }

/* Photos fill their frame */
.photo {
    position: relative;
    overflow: hidden;
    background: var(--sand);
}
.photo > img {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
    /* No top offset: the header sits where it would in the flow, at the top of
     * the body's content, so anything that pads the body (the staging preview
     * bar) pushes it down instead of covering it. */
    position: absolute;
    inset-inline: 0;
    z-index: var(--layer-nav);
    padding: var(--space-s) var(--space-s) 0;
}
.site-header__bar {
    max-inline-size: var(--grid-max-width);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-m);
    background: var(--bar);
    color: var(--text);
    border-radius: var(--radius-pill);
    -webkit-backdrop-filter: blur(var(--space-2xs));
    backdrop-filter: blur(var(--space-2xs));
    box-shadow: var(--shadow-l);
}
.site-header__logo { display: block; flex: none; }
/* The logo keeps its own width (never the base 100% cap), so the link around
 * it can't shrink below the logo and squash it sideways. */
.site-header__logo img { block-size: 2.1rem; inline-size: auto; max-inline-size: none; object-fit: contain; }

.site-nav ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--space-2xs);
}
.site-nav a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding-inline: var(--space-xs);
    font-size: var(--size--1);
    font-weight: 500;
    line-height: var(--leading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text-strong);
    border-radius: var(--radius-pill);
    box-shadow: inset 0 0 0 var(--border-width-s) transparent;
    transition: background var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out);
}
.site-nav a:hover {
    background: var(--sand);
    box-shadow: inset 0 0 0 var(--border-width-s) var(--ring);
    color: var(--text-strong);
    transform: translateY(-1px);
}
.site-nav a[aria-current="page"] {
    background: var(--neutral-solid);
    color: var(--neutral-on-solid);
    box-shadow: none;
    transform: none;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
}

/* Search: a 44px round magnifier, drawn as a field (its border and fill). */
.site-header .search-trigger {
    justify-content: center;
    min-inline-size: var(--target-min);
    min-block-size: var(--target-min);
    padding: 0;
    color: var(--text-strong);
    background: transparent;
    border-color: var(--border);
    border-radius: var(--radius-pill);
}
.site-header .search-trigger:hover { background: var(--sand); border-color: var(--field-border); }
.site-header .search-trigger__text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header__call { display: none; }

/* The menu toggle, phones and tablets */
.menu-toggle {
    display: inline-grid;
    place-items: center;
    inline-size: var(--target-min);
    block-size: var(--target-min);
    color: var(--neutral-on-solid);
    background: var(--neutral-solid);
    border-radius: var(--radius-pill);
}
.menu-toggle svg { inline-size: 1.25rem; block-size: 1.25rem; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-header__call-icon {
    display: inline-grid;
    place-items: center;
    inline-size: var(--target-min);
    block-size: var(--target-min);
    color: var(--text-strong);
    border: var(--border-width-s) solid var(--border);
    border-radius: var(--radius-pill);
}
.site-header__call-icon svg { inline-size: 1.15rem; block-size: 1.15rem; }

/* The menu panel below the bar, under 1280px */
.site-menu-extras { display: none; }

@media (max-width: 1279px) {
    .site-nav {
        position: absolute;
        inset-inline: var(--space-s);
        inset-block-start: calc(100% + var(--space-2xs));
        display: none;
        padding: var(--space-s);
        background: var(--surface-raised);
        color: var(--text);
        border-radius: var(--radius-l);
        box-shadow: var(--shadow-l);
    }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; align-items: stretch; }
    .site-nav a { inline-size: 100%; padding-inline: var(--space-s); font-size: var(--size-0); }
    .site-menu-extras {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-xs);
        margin-block-start: var(--space-s);
        padding-block-start: var(--space-s);
        border-block-start: var(--border-width-s) solid var(--border);
    }
    .site-header__actions > [data-scheme-switcher] { display: none; }
}

@media (min-width: 1280px) {
    .menu-toggle, .site-header__call-icon { display: none; }
    .site-nav { flex: 1 1 auto; display: flex; justify-content: center; }
    /* The design: logo and actions take equal room, so the nav sits in the true centre. */
    .site-header__logo, .site-header__actions { flex: 1 0 0; }
    .site-header__actions { justify-content: flex-end; }
}

@media (min-width: 1400px) {
    .site-header__call { display: inline-flex; }
}

@media (max-width: 479px) {
    .site-header { padding-inline: var(--space-2xs); }
    .site-header__bar { padding-inline-start: var(--space-s); gap: var(--space-3xs); }
    .site-header__logo img { block-size: 1.45rem; }
    .site-header__actions { gap: var(--space-3xs); }
}

/* The call tab, fixed to the right edge on wider screens */
.call-tab {
    /* Physical sides on purpose: in vertical writing mode the logical ones
     * turn, and the tab ends up at the bottom of the screen. */
    position: fixed;
    right: 0;
    top: 50%;
    z-index: var(--layer-raised);
    display: none;
    padding: var(--space-s) var(--space-xs);
    writing-mode: vertical-rl;
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0.02em;
    text-decoration: none;
    background: var(--danger-solid);
    color: var(--danger-on-solid);
    border-radius: var(--radius-m) 0 0 var(--radius-m);
    box-shadow: var(--shadow-l);
    transform: translateY(-50%);
    transition: background var(--duration-fast) var(--ease-out);
}
.call-tab:hover { background: var(--neutral-solid); color: var(--neutral-on-solid); }
@media (min-width: 768px) { .call-tab { display: block; } }

/* ── Page heroes ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-block-size: max(38rem, min(82svh, 47.5rem));
    /* Clear the floating header, then the design's 56-110px */
    padding-block-start: calc(var(--target-min) + var(--space-l) + var(--space-2xl-3xl));
    background: var(--surface);
    color: var(--text);
}
.hero--home { min-block-size: max(42.5rem, min(94svh, 55rem)); }
.hero__photo { position: absolute; inset: 0; overflow: hidden; }
.hero__photo img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.hero__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(95deg, var(--wash-strong) 0%, var(--wash-mid) 42%, var(--wash-light) 80%), linear-gradient(var(--wash-warm), var(--wash-warm));
}
.hero__inner {
    position: relative;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-xl);
    padding-block-end: calc(var(--space-3xl-4xl) + var(--space-s));
}
.hero__text { flex: 1 1 32rem; max-inline-size: 45rem; background: none; }
.hero__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size-7);
    font-weight: 400;
    line-height: var(--leading-hero);
    letter-spacing: -0.035em;
    color: var(--text-strong);
    text-wrap: balance;
}
.hero--home .hero__title { font-size: var(--size-8); letter-spacing: -0.04em; }
.hero__lede {
    margin: var(--space-s) 0 0;
    max-inline-size: 30em;
    font-size: var(--size-1);
    line-height: var(--leading);
    color: var(--text-muted);
    text-wrap: pretty;
}
.hero .actions { margin-block-start: var(--space-l); }

/* The plain hero (privacy, legal pages): a sand band, no photo */
.hero--plain {
    min-block-size: 0;
    background: var(--sand);
    overflow: hidden;
}
.hero--plain .hero__inner { align-items: center; }
.hero--plain .rings { inset-inline-end: -7%; inset-block-start: 6%; inline-size: min(46vw, 38rem); opacity: 0.22; transform: rotate(14deg); }

/* The light card that sits on a hero: hours, at a glance, contact details */
.glance {
    position: relative;
    flex: 0 1 25rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-m) var(--space-m) var(--space-s);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-l);
}
.glance__stamp {
    position: absolute;
    inset-inline-end: calc(var(--space-m) * -1);
    inset-block-start: calc(var(--space-m) * -1);
    display: grid;
    place-items: center;
    inline-size: 5.5rem;
    block-size: 5.5rem;
    background: var(--surface);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-m);
}
.glance__stamp img { inline-size: 3.9rem; block-size: 3.9rem; }
.glance__rows { margin: 0; }
.glance__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-s);
    padding-block: var(--space-xs);
    border-block-end: var(--border-width-s) solid var(--border);
    color: var(--text-strong);
    text-decoration: none;
}
a.glance__row:hover { color: var(--brand-on-soft); }
.glance__row dt, .glance__key { font-weight: 600; }
.glance__row dd, .glance__value { margin: 0; font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); text-align: end; }
.glance .btn { align-self: flex-start; margin-block-start: var(--space-2xs); }

@media (max-width: 767px) {
    .glance__stamp { inset-inline-end: var(--space-s); }
}

/* ── Home: hero ──────────────────────────────────────────────────────── */
.hero--home .hero__inner { padding-block-end: 0; }
.hero--home .hero__text { padding-block-end: calc(var(--space-3xl-4xl) + var(--space-s)); }
.hero__kicker { margin: 0 0 var(--space-m); font-weight: 600; color: var(--tertiary-on-soft); }

.hours-card {
    position: relative;
    z-index: var(--layer-raised);
    flex: 0 1 22.5rem;
    margin-block-end: calc(var(--space-3xl) * -0.6);
}
.hours-card__panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    padding: var(--space-l) var(--space-m) var(--space-m);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--card-tail);
    box-shadow: var(--shadow-l);
}
.hours-card__stamp {
    position: absolute;
    inset-inline-end: calc(var(--space-l) * -1);
    inset-block-start: calc(var(--space-2xl) * -0.75);
    z-index: var(--layer-raised);
    display: grid;
    place-items: center;
    inline-size: 7.4rem;
    block-size: 7.4rem;
    background: var(--surface);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-m);
}
.hours-card__stamp svg.stamp-text {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    fill: var(--text-strong);
    animation: spin 30s linear infinite;
}
.hours-card__stamp text { font-family: var(--font-body); font-weight: 600; text-transform: uppercase; }
.hours-card__stamp img { inline-size: 3.6rem; block-size: 3.6rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.open-status {
    display: flex;
    align-items: center;
    gap: var(--space-2xs);
    margin: 0;
    font-weight: 600;
    color: var(--text-strong);
}
.open-status[hidden] { display: none; }
.open-status::before {
    content: "";
    inline-size: 0.6em;
    block-size: 0.6em;
    border-radius: var(--radius-round);
    background: var(--danger-solid);
}
.open-status.is-open::before { background: var(--success-solid); }

/* Opening hours from Rails, as a list of rows (hours_grouped) */
.hours-list { margin: 0; font-variant-numeric: tabular-nums; }
.hours-list__row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-s);
    padding: var(--space-xs) var(--space-2xs);
    border-block-start: var(--border-width-s) solid var(--border);
}
.hours-list__row:last-child { border-block-end: var(--border-width-s) solid var(--border); }
.hours-list dt { font-weight: 600; color: var(--text-strong); }
.hours-list dd { margin: 0; text-align: end; white-space: nowrap; }
.hours-list__row.is-today { background: var(--sand); border-radius: var(--radius-s); }
.hours-card .hours-list__row.is-today { background: none; }
/* One day's hours picked out of the app's hours_daily loop (Saturday on the
 * homepage card), in the short format: the other six days are not shown. */
.one-day[data-day="saturday"] > :not(.saturday) { display: none; }
/* Today's shaded row gets room inside its shading, and steps out by the same
 * amount so its day and time stay in line with the other rows. */
.map-hours .hours-list__row.is-today { padding-inline: var(--space-xs); margin-inline: calc(var(--space-xs) * -1); }
.hours-list--plain .hours-list__row { border: 0; }
.hours-note { margin: 0; font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); }
.hours-note a { font-weight: 600; text-decoration: none; }
.hours-note a:hover { text-decoration: underline; }

/* ── Home: highlights and the marquee ─────────────────────────────────── */
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
    gap: var(--space-m) var(--space-l);
    max-inline-size: 56rem;
    padding-block-end: var(--space-xl);
}
.highlights li { display: flex; align-items: flex-start; gap: var(--space-xs); }
.highlights strong {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-weight: 400;
    line-height: var(--leading-heading);
    color: var(--text-strong);
}
.highlights span:not(.blob) { display: block; margin-block-start: var(--space-3xs); font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); }

.marquee {
    position: relative;
    margin-inline: calc(var(--space-xl) * -1);
    display: flex;
    align-items: center;
    block-size: 4.75rem;
    overflow: hidden;
    background: var(--surface);
    color: var(--text-strong);
    transform: rotate(-1.6deg);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 14C360 0 720 26 1080 10S1400 16 1440 18V66C1080 80 720 56 360 72S40 64 0 64Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 14C360 0 720 26 1080 10S1400 16 1440 18V66C1080 80 720 56 360 72S40 64 0 64Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
/* The wood-grain texture, in the ground's own line colour */
.marquee::before, .grain::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--text-strong);
    opacity: 0.18;
    -webkit-mask: url("/assets/images/grain-texture.8f0054d6a3.webp") center / 68rem auto repeat;
    mask: url("/assets/images/grain-texture.8f0054d6a3.webp") center / 68rem auto repeat;
    pointer-events: none;
}
.marquee__track {
    position: relative;
    display: flex;
    flex: none;
    inline-size: max-content;
    animation: marquee 46s linear infinite;
}
.marquee__run {
    display: flex;
    align-items: center;
    gap: var(--space-l);
    padding-inline-end: var(--space-l);
    font-family: var(--font-heading);
    font-size: var(--size-1);
    line-height: var(--leading-heading);
    white-space: nowrap;
}
.marquee__run i { font-style: normal; color: var(--tertiary-on-soft); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Home: welcome collage ────────────────────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
    gap: var(--space-xl) calc(var(--space-2xl) + var(--space-2xs));
    align-items: center;
}
.split--top { align-items: start; }
.welcome__lead {
    margin: 0 0 var(--space-m);
    font-family: var(--font-heading);
    font-size: var(--size-4);
    line-height: var(--leading-heading);
    letter-spacing: -0.02em;
    color: var(--text-strong);
    text-wrap: balance;
}
.welcome__intro { font-size: var(--size-1); line-height: var(--leading); color: var(--text-strong); text-wrap: pretty; }

.collage { position: relative; aspect-ratio: 1 / 1.02; min-block-size: 30rem; max-block-size: 40rem; }
.collage .rings { inset-inline-start: 28%; inset-block-end: -8%; inline-size: 52%; transform: rotate(-14deg); opacity: 0.7; }
.collage__main { position: absolute; inset: 0 38% 16% 0; border-radius: var(--leaf); box-shadow: var(--shadow-l); }
.collage__side { position: absolute; inset: 48% 0 0 52%; border-radius: var(--leaf-r); box-shadow: 0 0 0 var(--space-2xs) var(--surface); }
.badge-years {
    position: absolute;
    z-index: var(--layer-base);
    inset-inline-end: 15%;
    inset-block-start: 8%;
    display: grid;
    place-content: center;
    gap: var(--space-3xs);
    inline-size: 26%;
    aspect-ratio: 1;
    overflow: hidden;
    text-align: center;
    background: var(--surface);
    color: var(--text-strong);
    border-radius: var(--radius-round);
    transform: rotate(-6deg);
}
.badge-years strong { font-family: var(--font-heading); font-size: var(--size-5); font-weight: 400; line-height: var(--leading-hero); }
.badge-years span { font-size: var(--size--1); font-weight: 600; line-height: var(--leading); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tertiary-on-soft); }

/* ── Home: what makes us different ────────────────────────────────────── */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
    gap: var(--space-s);
    align-items: start;
    margin-block-start: var(--space-xl);
}
.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xl) var(--space-m) var(--space-l);
    text-align: center;
    background: var(--surface);
    /* The design's card leaf: 28px and 120px corners. */
    border-radius: var(--radius-l) calc(var(--radius-l) * 4.2) var(--radius-l) calc(var(--radius-l) * 4.2);
}
.feature-card h3 { margin: var(--space-2xs) 0 0; font-size: var(--size-2); }
.feature-card p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
@media (min-width: 1100px) {
    .feature-card:nth-child(2) { margin-block-start: var(--space-xl); }
    .feature-card:nth-child(3) { margin-block-start: var(--space-s); }
    .feature-card:nth-child(4) { margin-block-start: var(--space-2xl); }
}

/* ── Home: the services gallery ───────────────────────────────────────── */
.gallery {
    display: flex;
    gap: var(--space-2xs);
    block-size: min(46vw, 38.75rem);
    min-block-size: 30rem;
}
.gallery__item {
    position: relative;
    flex: 1 1 0%;
    min-inline-size: 0;
    overflow: hidden;
    background: var(--sand);
    border-radius: var(--radius-l);
    cursor: pointer;
}
.gallery__item:first-child { border-start-end-radius: calc(var(--radius-l) * 4); }
.gallery__item:last-child { border-end-end-radius: calc(var(--radius-l) * 4); }
.gallery__item.is-open { flex-grow: 6; }
.gallery__media { position: absolute; inset: 0; }
.gallery__item img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.gallery__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--tile-shade), transparent 55%);
    pointer-events: none;
}
.gallery__link { position: absolute; inset: 0; z-index: var(--layer-base); color: var(--text-strong); text-decoration: none; }
.gallery__short {
    position: absolute;
    inset-inline-start: 50%;
    inset-block-end: var(--space-m);
    font-family: var(--font-heading);
    font-size: var(--size-1);
    line-height: var(--leading-heading);
    white-space: nowrap;
    writing-mode: vertical-rl;
    z-index: var(--layer-base);
    color: var(--text-strong);
    transform: translateX(-50%) rotate(180deg);
    transition: opacity var(--duration-base) var(--ease-out);
}
.gallery__card {
    position: absolute;
    inset-inline-start: var(--space-s);
    inset-block-end: var(--space-s);
    inline-size: min(calc(100% - var(--space-l)), 25rem);
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-s) var(--space-m);
    background: var(--surface);
    color: var(--text-strong);
    border-radius: var(--card-tail);
    opacity: 0;
    transform: translateY(var(--space-xs));
    transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}
.gallery__name { font-family: var(--font-heading); font-size: var(--size-3); line-height: var(--leading-heading); }
.gallery__desc { font-size: var(--size-0); line-height: var(--leading); color: var(--text-muted); }
.gallery__item.is-open .gallery__card { opacity: 1; transform: none; }
.gallery__item.is-open .gallery__short { opacity: 0; }
.gallery__link:hover .gallery__name { color: var(--brand-on-soft); }
.gallery__link:focus-visible { outline-offset: calc(var(--focus-ring-w) * -3); }

@media (max-width: 759px) {
    .gallery { flex-direction: column; block-size: auto; min-block-size: 0; }
    .gallery__item { flex: 0 0 4.5rem; border-radius: var(--radius-l); }
    .gallery__item:first-child, .gallery__item:last-child { border-radius: var(--radius-l); }
    .gallery__item.is-open { flex-basis: 23.75rem; }
    .gallery__short { inset-inline-start: var(--space-m); inset-block-end: var(--space-s); writing-mode: horizontal-tb; transform: none; }
}

/* ── Home: the people band ────────────────────────────────────────────── */
/* Clip the tree rings sideways only: a vertical clip would cut off the band's own wave edge. */
.band--people, .band--how, .band--message { overflow-x: clip; }
.band--people .rings, .band--how .rings, .band--message .rings { inset-inline-start: -8%; inset-block-end: -18%; inline-size: min(44vw, 35rem); transform: rotate(-12deg); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.chips li {
    padding: var(--space-3xs) var(--space-xs);
    font-size: var(--size--1);
    line-height: var(--leading);
    white-space: nowrap;
    border: var(--border-width-m) solid var(--border);
    border-radius: var(--radius-pill);
}
.people-stack { display: grid; grid-template-columns: 1.25fr 1fr; gap: var(--space-s); align-items: start; }
.people-stack__main { grid-row: span 2; aspect-ratio: 3 / 4.4; border-radius: var(--leaf); }
.people-stack__a { position: relative; z-index: var(--layer-base); aspect-ratio: 4 / 5; margin-block-start: var(--space-2xl); margin-inline-end: calc(var(--space-xl) * -1); border-radius: var(--leaf); }
.people-stack__b { position: relative; z-index: var(--layer-raised); aspect-ratio: 4 / 3.4; margin-block-start: calc(var(--space-l) * -1); margin-inline-start: calc(var(--space-3xl) * -1); border-radius: var(--leaf-r); box-shadow: 0 0 0 var(--space-2xs) var(--surface), var(--shadow-l); }
@media (max-width: 767px) {
    .people-stack__a { margin-inline-end: 0; }
    .people-stack__b { margin-inline-start: calc(var(--space-xl) * -1); }
}

/* ── Home: before you come in ─────────────────────────────────────────── */
.visit-photo { position: relative; max-inline-size: 40rem; padding-block-end: var(--space-3xl); }
.visit-photo .photo { aspect-ratio: 4 / 3.4; border-radius: var(--leaf); }
.visit-photo__note {
    position: absolute;
    inset-inline: 22% calc(var(--space-xl) * -1);
    inset-block-end: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-m);
    border-radius: var(--radius-l) calc(var(--radius-l) * 3) var(--radius-l) var(--radius-l) / var(--radius-l) calc(var(--radius-l) * 2.4) var(--radius-l) var(--radius-l);
    box-shadow: var(--shadow-l);
}
.visit-photo__note h3 { margin: 0; font-size: var(--size-2); }
.visit-photo__note p { margin: 0; color: var(--text-muted); }
.visit-photo__note a { color: var(--tertiary-on-soft); font-weight: 600; text-decoration: none; }
.visit-photo__note a:hover { text-decoration: underline; }
@media (max-width: 599px) { .visit-photo__note { position: relative; inset: auto; margin-block-start: calc(var(--space-xl) * -1); margin-inline-start: var(--space-m); } .visit-photo { padding-block-end: 0; } }

.info-list { border-block-start: var(--border-width-s) solid var(--ring); }
.info-list > div, .info-list > li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    padding-block: var(--space-m);
    border-block-end: var(--border-width-s) solid var(--ring);
}
.info-list h3 { margin: 0; font-size: var(--size-2); }
.info-list p { margin: 0; max-inline-size: 36em; color: var(--text-muted); text-wrap: pretty; }

/* ── Home: find us ────────────────────────────────────────────────────── */
.map-frame { aspect-ratio: 4 / 3.2; border-radius: var(--leaf); overflow: hidden; background: var(--sand); }
.map-frame iframe { inline-size: 100%; block-size: 100%; border: 0; display: block; }
.map-hours {
    position: relative;
    z-index: var(--layer-base);
    inline-size: min(100%, 22.5rem);
    margin: calc(var(--space-3xl) * -0.8) calc(var(--space-xl) * -0.85) 0 auto;
    padding: var(--space-m) var(--space-m);
    font-size: var(--size-0);
    line-height: var(--leading);
    background: var(--surface);
    border-radius: var(--radius-l) var(--radius-l) var(--radius-l) calc(var(--radius-l) * 3) / var(--radius-l) var(--radius-l) var(--radius-l) calc(var(--radius-l) * 2.4);
    box-shadow: var(--shadow-l);
}
@media (max-width: 767px) { .map-hours { margin-inline-end: 0; } }
address { font-style: normal; }
.address-strong { font-weight: 600; color: var(--text-strong); }

/* ── The call-to-action panel ─────────────────────────────────────────── */
.cta { position: relative; padding-block-start: var(--space-m-l); background: var(--sand); }
.cta__panel {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-l) var(--space-xl);
    padding: var(--space-l-2xl);
    overflow: hidden;
    border-radius: calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 5.5) calc(var(--radius-l) * 1.4) / calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 4) calc(var(--radius-l) * 1.4);
}
.cta__panel--home { border-radius: calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 5.5) / calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 1.4) calc(var(--radius-l) * 4); }
.cta__panel .rings { inset-inline-end: -4rem; inset-block-end: -7.5rem; inline-size: 19rem; }
.cta__panel h2 { margin: 0 0 var(--space-xs); font-size: var(--size-5); }
.cta__panel p { margin: 0; font-size: var(--size-0); line-height: var(--leading); color: var(--text-muted); }
.cta__panel p a { color: inherit; font-weight: inherit; text-decoration: underline; text-underline-offset: 0.2em; }
.cta__panel p a:hover { text-decoration: underline; }
.cta__text, .cta__panel .actions { position: relative; }
@media (max-width: 599px) { .cta__panel { padding: var(--space-xl) var(--space-l); } }

/* ── GP opportunity box (homepage people band, /team doctors) ────────────
   On the olive homepage band it is a light card in either scheme (.is-light, like the
   contact form's); on /team it is a sand panel that follows the page. Delete with both boxes. */
.gp-opening {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-inline-size: 36rem;
    margin-block-start: var(--space-xl);
    padding: var(--space-m-l);
    /* The leaf's big corner is top left: inset the start so the tag clears its curve. */
    padding-block-start: var(--space-l-xl);
    padding-inline-start: var(--space-l-xl);
    border-radius: var(--leaf-r);
    box-shadow: var(--shadow-l);
}
.gp-opening h3 { margin: 0; font-size: var(--size-3); line-height: var(--leading); }
.gp-opening p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
.gp-opening > div { margin-block-start: var(--space-2xs); }
.gp-opening .gp-opening__tag {
    align-self: flex-start;
    padding: var(--space-3xs) var(--space-s);
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--tertiary-solid);
    color: var(--tertiary-on-solid);
    border-radius: var(--radius-pill);
}
.gp-opening--page { margin-inline: auto; scroll-margin-top: var(--space-l); background: var(--sand); color: var(--text); box-shadow: none; }
/* A narrow card can't spare the full leaf curve: a gentler one on phones. */
@media (max-width: 599px) { .gp-opening { border-radius: calc(var(--radius-l) * 3) var(--radius-l) calc(var(--radius-l) * 3) var(--radius-l); } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: var(--sand); color: var(--text); font-size: var(--size--1); line-height: var(--leading); }
.site-footer__cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-l) var(--space-xl);
    padding-block: var(--space-xl-2xl) var(--space-l);
}
.site-footer__brand { flex: 0 1 19rem; min-inline-size: 15rem; display: flex; flex-direction: column; gap: var(--space-xs); }
.site-footer__brand img.logo { inline-size: min(100%, 17.5rem); block-size: auto; }
.site-footer__brand p { margin: 0; color: var(--text-muted); }
.site-footer__brand .accreditation-badge { block-size: 3.5rem; inline-size: auto; }
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-2xs); min-inline-size: 11rem; }
.site-footer__col h2 { margin: 0 0 var(--space-3xs); font-family: var(--font-body); font-size: var(--size--1); font-weight: 600; line-height: var(--leading); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.site-footer .ico { display: flex; gap: var(--space-2xs); align-items: flex-start; }
.site-footer .ico svg { flex: none; inline-size: 1.15rem; block-size: 1.15rem; margin-block-start: var(--space-3xs); color: var(--brand-line); }
.site-footer a { color: var(--text-strong); font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: var(--brand-on-soft); text-decoration: underline; }
.site-footer nav a { font-weight: 400; }
.site-footer nav ul { display: flex; flex-direction: column; gap: var(--space-2xs); }
.site-footer .hours-list__row { padding: 0; border: 0; gap: var(--space-s); }
.site-footer .hours-list dt { font-weight: 400; color: var(--text); }
.site-footer .hours-list dd { color: var(--text-strong); }
.site-footer__base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2xs) var(--space-l);
    padding-block: var(--space-s) var(--space-m);
    border-block-start: var(--border-width-s) solid var(--ring);
    color: var(--text-muted);
}
.site-footer__base p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-m); }
.site-footer__base a { color: var(--text-muted); font-weight: 400; }
.powered-by { display: flex; align-items: center; gap: var(--space-2xs); }
.powered-by img { block-size: 1.6rem; inline-size: auto; }

/* ── Inner pages: shared pieces ───────────────────────────────────────── */
.card-soft {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    padding: var(--space-m-l);
    background: var(--sand);
    border-radius: var(--radius-l);
}
.card-soft h3 { font-size: var(--size-2); }
.card-soft > .title + *, .card-soft > .title--s + *, .card-soft > .blob { margin-block: 0; }
.card-soft h2, .card-soft h3 { margin: 0; }
.card-soft p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 27.5rem), 1fr)); gap: var(--space-s); }

.ticks { display: grid; gap: var(--space-2xs); }
.ticks li { display: flex; gap: var(--space-xs); align-items: flex-start; }
.ticks li::before {
    content: "";
    flex: none;
    inline-size: 0.6em;
    block-size: 0.6em;
    margin-block-start: var(--space-2xs);
    background: var(--brand-line);
    border-radius: var(--pebble);
}
.is-dark .ticks li::before { background: var(--tertiary-on-soft); }

.rows { border-block-start: var(--border-width-s) solid var(--border); }
.rows > li {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: var(--space-2xs) var(--space-m);
    padding-block: var(--space-m);
    border-block-end: var(--border-width-s) solid var(--border);
}
.rows .blob { grid-row: span 2; }
.rows h3 { margin: 0; font-size: var(--size-2); }
.rows p { margin: 0; color: var(--text-muted); }

/* A table on a sand panel: allied health, hours */
.data-table { min-inline-size: 35rem; font-variant-numeric: tabular-nums; }
.data-table thead th { padding: 0 var(--space-s) var(--space-xs) 0; font-size: var(--size--1); font-weight: 600; line-height: var(--leading); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border-block-end: var(--border-width-s) solid var(--ring); }
.data-table tbody :is(th, td) { padding: var(--space-s) var(--space-s) var(--space-s) 0; border-block-end: var(--border-width-s) solid var(--ring); }
.data-table tbody tr:last-child :is(th, td) { border-block-end: var(--border-width-s) solid var(--ring); }
.data-table tbody th { font-family: var(--font-heading); font-size: var(--size-1); font-weight: 400; line-height: var(--leading-heading); color: var(--text-strong); }
.data-table td { color: var(--text-muted); }
.table-scroll { overflow-x: auto; }

.on-this-page { position: sticky; inset-block-start: var(--space-m); align-self: start; }
.on-this-page nav { display: flex; flex-direction: column; gap: var(--space-3xs); padding: var(--space-s) var(--space-s) var(--space-m); background: var(--sand); border-radius: var(--card-tail); }
.on-this-page h2 { margin: 0 0 var(--space-2xs); }
.on-this-page a { padding-block: var(--space-2xs); font-weight: 500; color: var(--text-strong); text-decoration: none; border-block-end: var(--border-width-s) solid var(--ring); }
.on-this-page a:hover { color: var(--brand-on-soft); }
@media (max-width: 899px) { .on-this-page { position: static; } }

.doc-layout { display: grid; grid-template-columns: minmax(14rem, 17rem) minmax(0, 49rem); gap: var(--space-2xl) var(--space-3xl); }
@media (max-width: 899px) { .doc-layout { grid-template-columns: 1fr; } }
.doc-section { padding-block: var(--space-xl); border-block-start: var(--border-width-s) solid var(--ring); scroll-margin-top: var(--space-l); }
.doc-section:first-child { padding-block-start: 0; border: 0; }
.doc-section { display: flex; flex-direction: column; gap: var(--space-s); }
.doc-section > * { margin: 0; }
.doc-section h2 { font-size: var(--size-4); }
.doc-section p, .doc-section li { color: var(--text-muted); }
.doc-section .note p { color: var(--text-strong); }
.doc-section > :last-child { margin-block-end: 0; }

.note {
    display: flex;
    gap: var(--space-s);
    align-items: flex-start;
    padding: var(--space-m);
    background: var(--sand);
    border-radius: var(--radius-l);
}
.note p { margin: 0; }
.note h3 { margin: 0 0 var(--space-3xs); font-family: var(--font-body); font-size: var(--size-0); font-weight: 600; }
.is-dark .note { background: color-mix(in oklab, var(--text-strong) 7%, var(--surface)); box-shadow: inset 0 0 0 var(--border-width-s) var(--border); }

/* Big phone tiles: after hours and emergency */
.call-tiles { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.call-tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xs);
    padding: var(--space-s) var(--space-m);
    min-inline-size: 11rem;
    text-decoration: none;
    border-radius: var(--radius-l);
    background: var(--neutral-solid);
    color: var(--neutral-on-solid);
    transition: background var(--duration-fast) var(--ease-out);
}
.call-tile span:first-child { font-size: var(--size--1); font-weight: 600; line-height: var(--leading); }
.call-tile span:last-child { font-family: var(--font-heading); font-size: var(--size-2); line-height: var(--leading-heading); }
.call-tile:hover { background: color-mix(in oklch, var(--neutral-solid), var(--mix-hover)); color: var(--neutral-on-solid); }
.call-tile--danger { background: var(--danger-solid); color: var(--danger-on-solid); }
.call-tile--danger:hover { background: color-mix(in oklch, var(--danger-solid), var(--mix-hover)); color: var(--danger-on-solid); }

/* Rich text from the app (fees, services, policies): plain prose */
.rich > :first-child { margin-block-start: 0; }
.rich > :last-child { margin-block-end: 0; }
.rich ul { padding-left: var(--space-m); }
.rich :is(h2, h3) { font-size: var(--size-2); }

/* Gentle hover lift for cards with links */
@media (prefers-reduced-motion: no-preference) {
    .lift { transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
    .lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
}

/* Small spacing helpers, from the scale */
.gap-above { margin-block-start: var(--space-l); }
.gap-above-s { margin-block-start: var(--space-2xs); }
.gap-below { margin-block-end: var(--space-l); }
.gap-below-s { margin-block-end: var(--space-2xs); }
.address-inline { display: inline; }

/* ── About ────────────────────────────────────────────────────────────── */
.collage--story { aspect-ratio: 1 / 1.05; }
.collage--story .collage__main { inset: 0 18% 18% 0; }
.collage--story .collage__side { inset: 58% 0 0 52%; }
.parking-pill {
    position: absolute;
    z-index: var(--layer-base);
    inset-inline-start: 6%;
    inset-block-end: 6%;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-m) var(--space-xs) var(--space-xs);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-l);
}
.parking-pill strong { display: block; font-family: var(--font-heading); font-size: var(--size-1); font-weight: 400; line-height: var(--leading-heading); color: var(--text-strong); }
.parking-pill span span { display: block; font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); }

.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: var(--space-s); margin-block-start: var(--space-m); }
.milestones li { display: flex; flex-direction: column; gap: var(--space-3xs); padding: var(--space-s) var(--space-m); background: var(--sand); border-radius: var(--radius-l); }
.milestones li.is-dark { background: var(--surface); }
.milestones strong { font-family: var(--font-heading); font-size: var(--size-3); font-weight: 400; line-height: var(--leading-hero); color: var(--brand-on-soft); }
.milestones li.is-dark strong { color: var(--tertiary-on-soft); }
.milestones span { color: var(--text-strong); }

.how-photo { aspect-ratio: 4 / 3; margin-block-start: var(--space-l); border-radius: var(--leaf); }
.how-photo--tall { aspect-ratio: 4 / 4.6; margin-block-start: 0; border-radius: var(--leaf-r); }
.accreditation:empty { display: none; }
.accreditation img { block-size: 4.5rem; inline-size: auto; }

/* ── Doctors and staff ────────────────────────────────────────────────── */
.doctors-intro { flex: 0 1 38.75rem; margin: 0; color: var(--text-muted); text-wrap: pretty; }
.doctor-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 32.5rem), 1fr)); gap: var(--space-s); }
.doctor-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
    padding: var(--space-l);
    background: var(--sand);
    color: var(--text);
    border-radius: var(--radius-l);
}
/* Every other card on the olive: the design's alternating pattern (1, 4, 5, 8 light). */
.doctor-card:nth-child(4n + 2), .doctor-card:nth-child(4n + 3) {
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
.doctor-card:nth-child(4n + 2) :is(h3, p, dt, dd), .doctor-card:nth-child(4n + 3) :is(h3, p, dt, dd) { color: inherit; }
.doctor-card:nth-child(4n + 2) hr, .doctor-card:nth-child(4n + 3) hr,
.doctor-card:nth-child(4n + 2) .doctor-card__quals, .doctor-card:nth-child(4n + 3) .doctor-card__quals { border-color: var(--on-olive-line); }
.doctor-card:nth-child(4n + 2) .doctor-card__bio, .doctor-card:nth-child(4n + 3) .doctor-card__bio { color: var(--on-olive-muted); }
.doctor-card__quals:empty { display: none; }
.doctor-card__quals {
    align-self: flex-start;
    margin: 0;
    padding: var(--space-3xs) var(--space-xs);
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    letter-spacing: 0.08em;
    border: var(--border-width-m) solid var(--brand-line);
    border-radius: var(--radius-pill);
}
.doctor-card h3 { margin: var(--space-m-l) 0 0; font-size: var(--size-4); letter-spacing: -0.02em; }
.doctor-card__role { margin: 0; font-weight: 600; }
.doctor-card__role:empty, .doctor-card__bio:empty { display: none; }
.doctor-card hr { margin: 0; border-color: var(--ring); }
.doctor-card__bio { margin: 0; max-inline-size: 38em; text-wrap: pretty; }
.doctor-card__facts { display: grid; gap: var(--space-2xs); margin: 0; }
.doctor-card__facts div { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-xs); }
.doctor-card__facts dt { font-weight: 600; }
.doctor-card__facts dd { margin: 0; }
.doctor-card__facts div:has(dd:empty) { display: none; }

.name-list { border-block-start: var(--border-width-s) solid var(--border); margin-block: var(--space-s) var(--space-m); }
.name-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-2xs) var(--space-m);
    padding-block: var(--space-s);
    border-block-end: var(--border-width-s) solid var(--border);
}
.name-list__name { font-family: var(--font-heading); font-size: var(--size-3); line-height: var(--leading-heading); color: var(--text-strong); }
.name-list__role { color: var(--text-muted); }
.name-list__group { flex-direction: column; align-items: flex-start; }
.name-list__names { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-m); font-family: var(--font-heading); font-size: var(--size-3); line-height: var(--leading-heading); color: var(--text-strong); }

.card-soft--wide { padding: var(--space-xl) var(--space-xl); }

/* ── Services ─────────────────────────────────────────────────────────── */
/* The app's services list ({{services}}, a <ul>), set as soft cards. */
.service-list ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-xs); margin: 0; padding: 0; list-style: none; }
.service-list li {
    margin: 0;
    padding: var(--space-m);
    background: var(--sand);
    border-radius: var(--radius-l);
    color: var(--text-strong);
}
.service-list li:nth-child(3n + 1) { border-start-end-radius: calc(var(--radius-l) * 3); }

.focus-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-s); }
.focus-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: var(--leaf); scroll-margin-top: var(--space-l); }
.focus-card .photo { aspect-ratio: 4 / 3; }
.focus-card__text { padding: var(--space-l); }
.focus-card h3 { margin: 0 0 var(--space-xs); font-size: var(--size-2); }
.focus-card p { margin: 0; color: var(--text-muted); text-wrap: pretty; }

.proc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: var(--space-s); }
.proc { display: flex; flex-direction: column; gap: var(--space-l); padding: var(--space-xl); background: var(--sand); border-radius: var(--radius-l); scroll-margin-top: var(--space-l); }
.proc--sport { background: var(--surface); border-radius: var(--leaf-r); }
.proc__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: var(--space-m); align-items: center; }
.proc__photo { aspect-ratio: 4 / 3; border-radius: var(--radius-l); }
.proc--sport .proc__photo { aspect-ratio: 16 / 10; margin-block-start: auto; }

/* ── Contact ──────────────────────────────────────────────────────────── */
.hours-list--big dt { font-family: var(--font-heading); font-size: var(--size-1); font-weight: 400; line-height: var(--leading-heading); }
.hours-list--big .hours-list__row { padding-block: var(--space-s); }
.after-hours { display: flex; flex-direction: column; gap: var(--space-s); padding: var(--space-l-xl); border-radius: var(--radius-l); align-self: center; }
.after-hours p { margin: 0; color: var(--text-muted); }
.map-frame--leaf { min-block-size: 23.75rem; border-radius: var(--leaf); }

.form-card { padding: var(--space-m); border-radius: var(--radius-l); }
.form-card { --field-textarea-h: calc(var(--field-h) * 2); }
.form { display: flex; flex-direction: column; gap: var(--space-2xs); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.75rem), 1fr)); gap: var(--space-2xs); }
.field { display: flex; flex-direction: column; gap: var(--space-3xs); }
.field label { font-size: var(--size--1); font-weight: 600; line-height: var(--leading); color: var(--text-strong); }
.field :is(input, textarea) { inline-size: 100%; }
.form__note { margin: 0; font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); }
[data-mf-feedback]:not([hidden]) { margin-block-start: var(--space-s); padding: var(--space-s); background: var(--surface); color: var(--text-strong); border-radius: var(--radius-m); }

/* ── Patient information ──────────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: var(--space-s); }
.note--line { background: transparent; box-shadow: inset 0 0 0 var(--border-width-s) var(--ring); }
.chips--light li { border-color: var(--brand-line); color: var(--text-strong); }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--space-s); align-items: start; }
.trio__item { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-xl) var(--space-l); background: var(--surface); border-radius: var(--leaf); scroll-margin-top: var(--space-l); }
.trio__item:nth-child(2) { border-radius: var(--leaf-r); }
.trio__item h3 { margin: var(--space-2xs) 0 0; font-size: var(--size-2); }
.trio__item p { margin: 0; color: var(--text-muted); text-wrap: pretty; }

/* ── Legal pages and the 404 ──────────────────────────────────────────── */
.legal { max-inline-size: 49rem; }
.legal h2 { margin: var(--space-xl) 0 var(--space-s); padding-block-start: var(--space-xl); font-size: var(--size-4); border-block-start: var(--border-width-s) solid var(--ring); }
.legal h2:first-child { margin-block-start: 0; padding-block-start: 0; border: 0; }
.legal :is(p, li) { color: var(--text-muted); }
.legal ul:not(.ticks) { padding-left: var(--space-m); }
.legal ul li::marker { color: var(--brand-line); }
.hero--404 { padding-block-end: var(--space-3xl); }
.chips--links li { padding: 0; border: 0; }
.chips--links a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding-inline: var(--space-s);
    color: var(--text-strong);
    text-decoration: none;
    border: var(--border-width-m) solid var(--brand-line);
    border-radius: var(--radius-pill);
}
.chips--links a:hover { background: var(--sand); }

/* Content sits above the grain texture */
.grain > * { position: relative; }
.prose + :is(.btn, .actions) { margin-block-start: var(--space-m); }

/* The hours cards (hero and map): the design's compact rows */
.map-hours .hours-list__row, .hours-card .hours-list__row { padding: var(--space-xs) 0; }
.hours-card .hours-list { font-size: var(--size--1); line-height: var(--leading); }
.map-hours .hours-note { margin-block-start: var(--space-xs); padding-inline: var(--space-2xs); }

/* Space after a section heading: the design's 24px gap between a heading and
 * whatever follows it (the template's base layer zeroes that margin). */
.title + *, .title--s + * { margin-block-start: var(--space-m); }
.hero__title + * { margin-block-start: var(--space-s); }
.title--centre + .feature-cards { margin-block-start: var(--space-xl); }
.title.gap-below + * { margin-block-start: 0; }

/* Tick lists with the design's check: an olive disc with a cream tick */
.ticks--check li { position: relative; }
.ticks--check li::before {
    inline-size: 1.6rem;
    block-size: 1.6rem;
    margin-block-start: 0;
    background: var(--secondary-solid);
    border-radius: var(--radius-round);
}
.ticks--check li::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    top: 0.38rem;
    inline-size: 0.4rem;
    block-size: 0.7rem;
    border: solid var(--secondary-on-solid);
    border-width: 0 var(--border-width-m) var(--border-width-m) 0;
    transform: rotate(45deg);
}
.btn__icon { inline-size: 1.1rem; block-size: 1.1rem; flex: none; }

/* Services: the general practice grid (the design's photo and five cards) */
.band__intro { flex: 0 1 32.5rem; margin: 0; color: var(--text-muted); text-wrap: pretty; }
.band__head > .band__intro { max-inline-size: none; }
.gp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr)); grid-auto-flow: dense; gap: var(--space-s); }
.gp-grid__photo { grid-row: span 2; min-block-size: 27.5rem; border-radius: var(--leaf); }
.gp-card { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-m); background: var(--sand); border-radius: var(--radius-l); }
.gp-card.is-dark { background: var(--surface); }
.gp-card--wide { grid-column: span 2; }
@media (max-width: 699px) { .gp-card--wide { grid-column: auto; } }
.gp-card h3 { margin: auto 0 0; font-size: var(--size-2); }
.gp-card p { margin: 0; color: var(--text-muted); text-wrap: pretty; }
.all-services { margin-block-start: var(--space-xl); }
.all-services .label { margin-block-end: var(--space-s); }
.all-services .service-list li { padding: var(--space-xs) var(--space-s); border-radius: var(--radius-pill); }
.all-services .service-list li:nth-child(3n + 1) { border-start-end-radius: var(--radius-pill); }
.all-services .service-list ul { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }

/* Footer hours: the design's clock, sun and moon, picked by the row's days
 * (each row carries its day keys from Rails). Icons in the copper line colour. */
.site-footer .hours-list__row { justify-content: flex-start; align-items: flex-start; gap: var(--space-2xs); }
.site-footer .hours-list__row::before {
    content: "";
    flex: none;
    inline-size: 1.15rem;
    block-size: 1.15rem;
    margin-block-start: var(--space-3xs);
    background: var(--brand-line);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%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 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-footer .hours-list__row.saturday:not(.friday)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M12 3.5v2M12 18.5v2M3.5 12h2M18.5 12h2M6 6l1.4 1.4M16.6 16.6 18 18M6 18l1.4-1.4M16.6 7.4 18 6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M12 3.5v2M12 18.5v2M3.5 12h2M18.5 12h2M6 6l1.4 1.4M16.6 16.6 18 18M6 18l1.4-1.4M16.6 7.4 18 6'/%3E%3C/svg%3E");
}
.site-footer .hours-list__row.sunday:not(.saturday)::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14.5A7.5 7.5 0 0 1 9.5 5a7.5 7.5 0 1 0 9.5 9.5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14.5A7.5 7.5 0 0 1 9.5 5a7.5 7.5 0 1 0 9.5 9.5z'/%3E%3C/svg%3E");
}
.site-footer .hours-list dd { text-align: start; }
.site-footer .hours-list dt::after { content: " ·"; }

/* Home section padding, from the design (phone / desktop):
 * highlights 46 above on desktop, more on phones where the hours card stacks
 * under the headline and hangs into this band; welcome 80/120 above and
 * 120/170 below; services 56/96 above and 80/120 below; the people band
 * 120/170 above and 140/190 below; the sand bands 48/80 above and 120/170
 * below; find us 56/96 above. */
.band--highlights { padding-block: var(--space-l) var(--space-m); }
/* The design ends this band at the marquee (the welcome band's own top
 * padding is the gap below it); --space-m only clears the tilted strip's
 * lower end, which the next band would otherwise paint over. */
@media (max-width: 899px) { .band--highlights { padding-block-start: calc(var(--space-3xl) * 0.6 + var(--space-xl)); } }
.band--welcome { padding-block: var(--space-2xl-3xl) calc(var(--space-3xl-4xl) + var(--space-s)); }
.band--services { padding-block: calc(var(--space-xl-2xl) + var(--space-s)) var(--space-2xl-3xl); }
.band--people { padding-block: calc(var(--space-3xl-4xl) + var(--space-s)) calc(var(--space-3xl-4xl) + var(--space-l)); }
.band--sand.band--home { padding-block: var(--space-xl-2xl) calc(var(--space-3xl-4xl) + var(--space-s)); }
.band--find { padding-block-start: calc(var(--space-xl-2xl) + var(--space-s)); }

/* ── Services, as the design ──────────────────────────────────────────── */
.glance__chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.glance__chips a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding-inline: var(--space-s);
    font-size: var(--size--1);
    font-weight: 500;
    line-height: var(--leading);
    text-decoration: none;
    color: var(--text-strong);
    border: var(--border-width-m) solid var(--ring);
    border-radius: var(--radius-pill);
}
.glance__chips a:hover { background: var(--neutral-solid); color: var(--neutral-on-solid); border-color: var(--neutral-solid); }

/* Care for every age: olive behind the head and the top half of the cards */
.band--focus { padding-block-start: var(--space-xl-2xl); }
.band--focus__olive { position: absolute; inset: 0 0 48% 0; overflow: hidden; }
.band--focus__olive .rings { inset-inline-end: -6%; inset-block-start: 4%; inline-size: min(36vw, 28.75rem); opacity: 0.16; transform: rotate(18deg); }
.band--focus__head { background: none; }
.band--focus .focus-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.25rem), 1fr)); gap: var(--space-s); align-items: start; }
.band--focus .focus-card { border-radius: calc(var(--radius-l) * 1.1); background: var(--surface); box-shadow: var(--shadow-l); }
/* The olive wave rising into the band: the band itself is the page colour. */
.band--focus::before { background: var(--secondary-solid); }
.band--focus .focus-card .photo { aspect-ratio: auto; block-size: min(28vw, 23.75rem); min-block-size: 18.75rem; }
.focus-card--arch { border-start-start-radius: var(--radius-pill) !important; border-start-end-radius: var(--radius-pill) !important; }
.band--focus .focus-card__text { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-m) var(--space-m) var(--space-l); }
.band--focus .focus-card h3 { margin: 0; font-size: var(--size-3); }
@media (min-width: 1100px) { .focus-card--drop { margin-block-start: var(--space-xl-2xl); } }

/* Procedures and sports: text beside a leaf photo, the tick card overlapping */
.proc-stack { display: flex; flex-direction: column; gap: var(--space-2xl-3xl); }
.proc-stack .proc {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xl) calc(var(--space-2xl) + var(--space-2xs));
    padding: 0;
    background: none;
    border-radius: 0;
}
.proc-stack .proc--reverse { flex-direction: row-reverse; }
.proc__text { flex: 1 1 23.75rem; max-inline-size: 32.5rem; display: flex; flex-direction: column; gap: var(--space-s); }
.proc__text .title + * { margin-block-start: 0; }
.proc__note { display: flex; gap: var(--space-s); align-items: flex-start; }
.proc__note p { margin: 0; color: var(--text-muted); }
.proc__media { flex: 1 1 30rem; position: relative; padding-block-end: var(--space-3xl-4xl); }
.proc-stack .proc__photo { aspect-ratio: auto; block-size: min(32vw, 27.5rem); min-block-size: 20rem; border-radius: var(--leaf-r); }
.proc-stack .proc__photo--sport { flex: 1 1 30rem; block-size: min(30vw, 25rem); min-block-size: 18.75rem; border-radius: var(--leaf); }
.proc__list {
    position: absolute;
    inset-inline-end: calc(var(--space-xl) * -0.5);
    inset-block-end: 0;
    inline-size: min(100%, 25rem);
    padding: var(--space-m);
    background: var(--surface);
    border-radius: var(--card-tail);
    box-shadow: var(--shadow-l);
}
@media (max-width: 767px) { .proc__list { inset-inline-end: 0; } }

/* On site: the list beside the week chart */
.band--onsite { overflow-x: clip; }
.band--onsite .rings { inset-inline-start: max(-30vw, -26rem); inset-block-end: -12%; inline-size: min(62vw, 52.5rem); opacity: 0.16; transform: rotate(-12deg); }
.onsite-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26.25rem), 1fr)); gap: var(--space-xl) var(--space-2xl); margin-block-start: var(--space-l-xl); }
.onsite-list { border-block-start: var(--border-width-s) solid var(--border); }
.onsite-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-3xs) var(--space-s);
    padding-block: var(--space-s);
    border-block-end: var(--border-width-s) solid var(--border);
}
.onsite-list__what { font-family: var(--font-heading); font-size: var(--size-1); line-height: var(--leading-heading); color: var(--text-strong); }
.onsite-list__who { font-size: var(--size--1); line-height: var(--leading); color: var(--tertiary-on-soft); text-align: end; }
.onsite-list__when { grid-column: 1 / -1; color: var(--text-muted); }
.onsite-side { display: flex; flex-direction: column; gap: var(--space-s); }

/* The week chart: tints of the site's colours (decoration, aria-hidden) */
.week {
    --slot-path: color-mix(in oklab, var(--secondary-solid) 38%, var(--surface));
    --slot-psych: var(--tertiary-soft);
    --slot-social: color-mix(in oklab, var(--brand-solid) 40%, var(--surface));
    --slot-physio: var(--sand);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-2xs);
    padding: var(--space-s);
    border-radius: calc(var(--radius-l) * 1.1);
    box-shadow: var(--shadow-l);
}
.week__day { display: flex; flex-direction: column; gap: var(--space-2xs); }
.week__name { padding: var(--space-3xs) 0 var(--space-2xs); font-size: var(--size--1); font-weight: 600; text-align: center; text-transform: uppercase; letter-spacing: 0.08em; line-height: var(--leading); color: var(--brand-on-soft); border-block-end: var(--border-width-s) solid var(--ring); }
.week__slot { display: flex; flex-direction: column; gap: var(--space-3xs); min-block-size: 6rem; padding: var(--space-xs) var(--space-2xs); color: var(--text-strong); border-radius: var(--radius-m); }
.week__slot--path { min-block-size: 4.4rem; background: var(--slot-path); }
.week__slot--psych { background: var(--slot-psych); }
.week__slot--social { background: var(--slot-social); }
.week__slot--physio { background: var(--slot-physio); }
.week__slot b { font-size: var(--size--1); font-weight: 600; line-height: var(--leading); overflow-wrap: anywhere; }
.week__slot i { font-size: var(--size--2); font-style: normal; line-height: var(--leading); color: var(--text-muted); }
.onsite-note { display: flex; gap: var(--space-s); align-items: center; padding: var(--space-s) var(--space-m); border-radius: var(--radius-pill); }
.onsite-note p { margin: 0; color: var(--text-strong); }
@media (max-width: 599px) { .onsite-note { border-radius: var(--radius-l); } .week { gap: var(--space-3xs); padding: var(--space-xs); } }

/* Team, as the design */
.staff-photo { aspect-ratio: auto; block-size: min(30vw, 25rem); min-block-size: 18.75rem; margin-block-end: var(--space-m); border-radius: var(--radius-l) calc(var(--radius-l) * 4) var(--radius-l) calc(var(--radius-l) * 4); }
#staff .name-list { margin-block: var(--space-m); }
#staff p { color: var(--text-muted); }
.doctor-card h3:first-child { margin-block-start: var(--space-2xl); }
.doctor-card .doctor-card__quals:empty + h3 { margin-block-start: var(--space-2xl); }
.after-hours p a { color: inherit; font-weight: inherit; }
.data-table { min-inline-size: min(35rem, 100%); }

/* Patient information, as the design */
.muted { color: var(--text-muted); }
.small-muted { margin-block-start: var(--space-s); font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); }
#appointments .standfirst, #appointments .muted { margin-block: 0 var(--space-s); }
#appointments .title + .standfirst { margin-block-start: var(--space-s); }
.card-soft--corner { border-start-end-radius: calc(var(--radius-l) * 4); }
.card-soft--tail { border-radius: var(--card-tail); padding: var(--space-m); gap: var(--space-2xs); }
.card-soft--tail h3 { font-size: var(--size-1); }
.card-soft--privacy { border-radius: var(--radius-l) var(--radius-l) calc(var(--radius-l) * 5) var(--radius-l) / var(--radius-l) var(--radius-l) calc(var(--radius-l) * 4) var(--radius-l); }
.card-soft.is-dark { background: var(--surface); }
.ticks--cols { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }
.pill-note { display: flex; gap: var(--space-s); align-items: center; padding: var(--space-s) var(--space-m) var(--space-s) var(--space-s); border-radius: var(--radius-pill); }
.pill-note p { margin: 0; font-size: var(--size--1); line-height: var(--leading); color: var(--text-muted); }
@media (max-width: 599px) { .pill-note { border-radius: var(--radius-l); } }
.np-photo { aspect-ratio: auto; block-size: min(32vw, 27.5rem); min-block-size: 20rem; border-radius: var(--leaf-r); }
.rings--tr { inset-inline-end: -6%; inset-inline-start: auto !important; inset-block-start: -10%; inset-block-end: auto !important; inline-size: min(36vw, 28.75rem) !important; transform: rotate(18deg) !important; }

/* The fees from the app: its list as the design's two tiles */
.fees-rich ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-s); margin: 0 0 var(--space-s); padding: 0; list-style: none; }
.fees-rich li {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xs);
    margin: 0;
    padding: var(--space-m);
    font-size: var(--size--1);
    font-weight: 600;
    line-height: var(--leading);
    color: var(--text-muted);
    background: var(--sand);
    border-radius: var(--radius-l) var(--radius-l) var(--radius-l) calc(var(--radius-l) * 3);
}
.fees-rich li:nth-child(2) { border-radius: var(--radius-l) calc(var(--radius-l) * 3) var(--radius-l) var(--radius-l); }
.fees-rich strong { font-family: var(--font-heading); font-size: var(--size-5); font-weight: 400; line-height: var(--leading-hero); color: var(--text-strong); }
.fees-rich p { color: var(--text-muted); }
.fees-rich p:last-child { font-size: var(--size--1); line-height: var(--leading); }

.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-s); align-items: stretch; }
.info-card { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-l); background: var(--surface); border-radius: var(--radius-l); scroll-margin-top: var(--space-l); }
.info-card--bl { border-end-start-radius: calc(var(--radius-l) * 4); }
.info-card--tr { border-start-end-radius: calc(var(--radius-l) * 4); }
.info-card h2 { margin: var(--space-3xs) 0 0; font-size: var(--size-2); letter-spacing: -0.01em; }
.info-card p { margin: 0; color: var(--text-muted); text-wrap: pretty; }

.call-pills { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.call-pill { flex: 1 1 15rem; display: flex; flex-direction: column; gap: var(--space-3xs); padding: var(--space-m); color: var(--text-strong); text-decoration: none; border-radius: var(--radius-pill); }
.call-pill span:first-child { font-size: var(--size--1); font-weight: 600; line-height: var(--leading); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.call-pill span:last-child { font-family: var(--font-heading); font-size: var(--size-4); line-height: var(--leading-hero); }
.call-pill:hover { color: var(--text-strong); box-shadow: var(--shadow-l); }

#feedback .blob, #privacy .blob { margin-block-end: var(--space-xs); }

/* A container inside the hero's column flexbox: auto side margins there make
 * it shrink to its content, so it is given the full width to fill (up to the
 * container's 1450px), lining the headline up with the logo and the hours
 * card with the end of the nav bar. */
.hero__inner { inline-size: 100%; }

/* ── Design fidelity: per-page details (audit against the design, Nov 2026) ── */
/* Shared helpers */
.title--m { font-size: var(--size-5); }
.measure { max-inline-size: 35rem; }
.measure--wide { max-inline-size: 40rem; }
.gap-above-m { margin-block-start: var(--space-m); }
.gap-above-xs { margin-block-start: var(--space-s); }
.note--plain { padding: 0; align-items: center; background: none; }
.is-dark .note--plain { background: none; box-shadow: none; }
.is-dark .note a { color: var(--tertiary-on-soft); font-weight: 600; text-decoration: none; }
.is-dark .note a:hover { text-decoration: underline; }
.band--wave-out { position: relative; }
.band--wave-out-c::after { -webkit-mask-image: var(--wave-c); mask-image: var(--wave-c); }

/* Home */
.hero--home .hero__lede { max-inline-size: 25em; }
.band--people .kicker { margin-block: var(--space-l) var(--space-xs); font-size: var(--size--1); line-height: var(--leading); }
.band--sand .btn--outline:hover { background: var(--surface); }
.visit-photo__note a[href="tel:000"] { color: var(--text-strong); }

/* About */
.collage--story { aspect-ratio: auto; block-size: max(32.5rem, min(52vw, 42.5rem)); max-block-size: none; }
.collage--story .collage__main { inset: 0 18% 16% 0; box-shadow: none; }
.band--how .how-photo:not(.how-photo--tall) { aspect-ratio: auto; block-size: max(20rem, min(30vw, 26.25rem)); margin-block-start: var(--space-m); }
.parking-pill { padding: var(--space-xs) var(--space-s) var(--space-xs) var(--space-xs); }
.parking-pill strong { font-size: var(--size-2); }
.milestones li { padding: var(--space-s); }
.milestones span { font-size: var(--size--1); line-height: var(--leading); }
.card-soft .accreditation { margin-block-start: auto; padding-block-start: var(--space-xs); }

/* Team */
#staff .rings { inset-inline: auto -8%; inset-block: 6% auto; inline-size: min(40vw, 32.5rem); transform: rotate(20deg); }
#staff .standfirst { font-size: var(--size-1); line-height: var(--leading); max-inline-size: 32em; }
#allied-health .card-soft { gap: var(--space-m); padding: var(--space-l-xl); border-radius: calc(var(--radius-l) * 1.25); }

/* Patient information */
.is-dark .ticks--check li::after { border-color: var(--surface); }
#after-hours .rings { inset-block-end: -10%; inline-size: min(40vw, 32.5rem); opacity: 0.14; }
.is-dark .rings--tr { opacity: 0.16; }
#fees .band__head { margin-block-end: var(--space-l-xl); }
#new-patients .chips li { padding: var(--space-2xs) var(--space-s); }
.call-pill.is-light:hover { background: var(--tertiary-soft); color: var(--tertiary-on-soft); }

/* Contact */
.call-tile:not(.call-tile--danger):hover { background: var(--tertiary-solid); color: var(--tertiary-on-solid); }
.form__note a { font-weight: 600; }
