/*
 * 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,
 *     --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-*,
 *     --space-*, --radius-*, --border-width-*. Never a hex, rgb(), hsl() or
 *     named colour, and never a px/rem length, anywhere else.
 *   - 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.2.0/docs/tokens.md. A
 *     gradient, a wash or a quiet coloured border is a pattern built from
 *     tokens (that reference, "Patterns"), never a token of its own.
 *     check-system.sh holds the section to _template's copy word for word,
 *     and fails a raw colour outside the dials block.
 */

/* ═══ Dials ═══ dials:begin ═════════════════════════════════════════════
 * Dials v0.3.0, 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.3.0 | 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.
   Default theme: Hi-Fi. Load its faces with:
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Michroma&family=Barlow:wght@400;700&family=Share+Tech+Mono&display=swap">
*/
/* ============================================================
   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:     #f39c12;  /* the main colour: links, focus, primary buttons */
  --secondary: #2ec4b6;  /* a second colour: highlights and secondary actions (was --accent) */
  --success:   #3fbf55;  /* status: done, saved, live */
  --warning:   #f2c230;  /* status: check this */
  --danger:    #e0322b;  /* status: errors and destructive actions */
  --info:      #3b82c4;  /* status: neutral news */
  --grey:      hsl(42 7% 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.04;         /* how much lighter the fills are in dark */
  --tint-strength: 8%;       /* 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.922;       /* page background in light */
  --paper-dark-lightness: 0.186;  /* page background in dark */
  --ink-lightness: 0.213;         /* strongest text in light */
  --ink-dark-lightness: 0.934;    /* 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, oklch(from var(--grey) var(--paper-lightness) calc(c * 0.12) h));
  --dl-paper-dark:  var(--paper-dark,  oklch(from var(--grey) var(--paper-dark-lightness) calc(c * 0.15) h));
  --dl-ink-light:   var(--ink-light,   oklch(from var(--grey) var(--ink-lightness) calc(c * 0.25) h));
  --dl-ink-dark:    var(--ink-dark,    oklch(from var(--grey) var(--ink-dark-lightness) calc(c * 0.12) h));
  --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: oklch(from var(--dl-paper) l 0 h);  /* 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:     oklch(from var(--brand)              calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
  --dl-secondary-base: oklch(from var(--dl-secondary-dial)  calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
  --dl-success-base:   oklch(from var(--success)            calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
  --dl-warning-base:   oklch(from var(--warning)            calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
  --dl-danger-base:    oklch(from var(--danger)             calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
  --dl-info-base:      oklch(from var(--info)               calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
  --dl-brand:     light-dark(var(--dl-brand-base), oklch(from var(--dl-brand-base) calc(l + var(--dark-lift)) c h));
  --dl-secondary: light-dark(var(--dl-secondary-base), oklch(from var(--dl-secondary-base) calc(l + var(--dark-lift)) c h));
  --dl-success:   light-dark(var(--dl-success-base), oklch(from var(--dl-success-base) calc(l + var(--dark-lift)) c h));
  --dl-warning:   light-dark(var(--dl-warning-base), oklch(from var(--dl-warning-base) calc(l + var(--dark-lift)) c h));
  --dl-danger:    light-dark(var(--dl-danger-base), oklch(from var(--dl-danger-base) calc(l + var(--dark-lift)) c h));
  --dl-info:      light-dark(var(--dl-info-base), oklch(from var(--dl-info-base) calc(l + var(--dark-lift)) c h));

  /* ---- Surfaces ---- */
  --surface:         var(--dl-paper);                                            /* the page background */
  --surface-raised:  oklch(from var(--dl-paper) calc(l + 0.03) calc(c * 0.5) h);  /* 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)). ---- */
  --mix-hover:  oklch(from currentColor calc(1 - l) c h) 12%;  /* hover: away from the text colour */
  --mix-active: oklch(from currentColor calc(1 - l) c h) 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
     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:     oklch(from color-mix(in oklab, light-dark(oklch(from var(--dl-brand) max(l, 0.7) c h), oklch(from var(--dl-brand) min(l, 0.6) c h)) var(--tint-strength), var(--dl-paper-grey)) l calc(c * var(--tint-vividness)) h);
  --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:     oklch(from color-mix(in oklab, light-dark(oklch(from var(--dl-secondary) max(l, 0.7) c h), oklch(from var(--dl-secondary) min(l, 0.6) c h)) var(--tint-strength), var(--dl-paper-grey)) l calc(c * var(--tint-vividness)) h);
  --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:     oklch(from color-mix(in oklab, light-dark(oklch(from var(--dl-success) max(l, 0.7) c h), oklch(from var(--dl-success) min(l, 0.6) c h)) var(--tint-strength), var(--dl-paper-grey)) l calc(c * var(--tint-vividness)) h);
  --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:     oklch(from color-mix(in oklab, light-dark(oklch(from var(--dl-warning) max(l, 0.7) c h), oklch(from var(--dl-warning) min(l, 0.6) c h)) var(--tint-strength), var(--dl-paper-grey)) l calc(c * var(--tint-vividness)) h);
  --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:     oklch(from color-mix(in oklab, light-dark(oklch(from var(--dl-danger) max(l, 0.7) c h), oklch(from var(--dl-danger) min(l, 0.6) c h)) var(--tint-strength), var(--dl-paper-grey)) l calc(c * var(--tint-vividness)) h);
  --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:     oklch(from color-mix(in oklab, light-dark(oklch(from var(--dl-info) max(l, 0.7) c h), oklch(from var(--dl-info) min(l, 0.6) c h)) var(--tint-strength), var(--dl-paper-grey)) l calc(c * var(--tint-vividness)) h);
  --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(oklch(from var(--brand-on-soft) calc(l - 0.08) c h), oklch(from var(--brand-on-soft) calc(l + 0.08) c h)) 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,
   tracking and weight are worked out the same way, for whatever size
   they're 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: 3;        /* 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: "Barlow", ui-sans-serif, system-ui, sans-serif;  /* body text and controls */
  --font-heading: "Michroma", ui-sans-serif, system-ui, sans-serif;  /* headings */
  --font-mono: "Share Tech 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, tracking, weight and line length: unset by default ---- */
  /* While none is set, dials-base.css keeps v0.2's type. Set them in your own file; the value
     shown is what Dials uses for any you leave unset once you've set another. */
  /* --leading-body: 1.6;      line height at body size (--size-0), unitless */
  /* --leading-display: 1.15;  line height at the h1 step (--size-5) and above, unitless; sizes in between slide in a straight line */
  /* --tracking-small: 0;      letter spacing at the smallest size (--size--2), in em without the unit: positive loosens captions */
  /* --tracking-display: 0;    letter spacing at the h1 step (--size-5) and above, in em without the unit: negative tightens display type */
  /* --tracking-caps: 0;       extra letter spacing for all caps and small caps, in em without the unit (0.05 to 0.12 is usual) */
  /* --weight-body: 400;       body text weight */
  /* --weight-heading: 600;    heading weight */
  /* --line-length: none;      the longest line of running text, e.g. 65ch; unset, lines run the full width */
  /* --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, tracking and weight: worked out for the size of the element they're used on ---- */
  /* --leading and --tracking are lengths: apply them on each element that sets a font size, never
     on body, where they'd inherit as one fixed length. */
  --dl-leading-body: var(--leading-body, 1.6);
  --dl-leading-display: var(--leading-display, 1.15);
  --dl-tracking-small: var(--tracking-small, 0);
  --dl-tracking-display: var(--tracking-display, 0);
  /* body size over the h1 step, as a number: tan(atan2(a, b)) is a / b for two lengths
     (Firefox has no typed division) */
  --dl-type-q: tan(atan2(var(--size-0), var(--size-5)));
  /* leading runs in a straight line in size, m * size + g, through leading-body at --size-0 and leading-display at --size-5, the h1 step */
  --dl-leading-m: calc((var(--dl-leading-display) - var(--dl-leading-body) * var(--dl-type-q)) / max(1 - var(--dl-type-q), 0.000001));
  --dl-leading-g: calc(var(--size-0) * (var(--dl-leading-body) - var(--dl-leading-m)));
  /* how far up the scale this size is, from --size-0 (0) to --size-5 (1), and down it to --size--2, evenly per step */
  --dl-type-up: clamp(0, log(tan(atan2(var(--size-0), 1em))) / min(log(var(--dl-type-q)), -0.000001), 1);
  --dl-type-down: clamp(0, log(tan(atan2(1em, var(--size-0)))) / min(log(tan(atan2(var(--size--2), var(--size-0)))), -0.000001), 1);
  --leading: clamp(min(var(--dl-leading-body), var(--dl-leading-display)) * 1em, var(--dl-leading-m) * 1em + var(--dl-leading-g), max(var(--dl-leading-body), var(--dl-leading-display)) * 1em);  /* line height for the size it's on, from --leading-body at body size to --leading-display at --size-5 (h1) and above */
  --tracking: calc(1em * (var(--dl-tracking-display) * var(--dl-type-up) + var(--dl-tracking-small) * var(--dl-type-down)));  /* letter spacing for the size it's on: 0 at body size, --tracking-small at --size--2 and below, --tracking-display at --size-5 (h1) and above */
  --tracking-caps-total: calc(var(--tracking) + 1em * var(--tracking-caps, 0));  /* letter spacing for text in capitals: --tracking plus --tracking-caps */
  --weight-strong: min(900, var(--weight-body, 400) + 200);  /* bold within body text, buttons and labels: the body weight plus 200 */
  /* dials-base.css reads these, so an untouched site keeps v0.2's type: each is valid only once one of its dials is set */
  --dl-weight-strong-on: calc(var(--weight-strong) + 0 * var(--weight-body));

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

/* The leading and tracking gates need tan(), atan2() and log() (Chrome 120, Firefox 118, Safari 15.4).
   Without them the gates stay undefined, so dials-base.css keeps headings at --leading-display (or 1.15)
   and leaves letter spacing alone. */
@supports (width: calc(1px * tan(atan2(1px, 1px)) * log(2))) {
  :root, [data-dials], :host {
    --dl-leading-on: calc(var(--leading) + 0px * var(--leading-body, var(--leading-display)));
    --dl-tracking-on: calc(var(--tracking) + 0em * var(--tracking-small, var(--tracking-display)));
  }
}
/* ============================================================
   Dials: the fallback (src/fallback.css, built into the end of dials.css)
   For browsers with color-mix() but without relative colour or
   light-dark(): Chrome and Edge 111-122, Safari 16.2-17, Firefox
   113-127. 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))) {
  /* ---- 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 93ca251ad22dc853): the Hi-Fi 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: #e6e5e3;
    --surface-raised: #efefee;
    --surface-lowered: #dcdcda;
    --surface-sunken: #d3d2d1;
    --surface-overlay: rgb(0 0 0 / 45%);
    --text-strong: #1a1916;
    --text: #32312e;
    --text-muted: #4f4e4c;
    --text-quiet: #5b5a58;
    --text-disabled: #91908e;
    --link: #875505;
    --link-hover: #663900;
    --border-quiet: #d5d5d3;
    --border: #c8c7c5;
    --border-strong: #807f7d;
    --focus: #875505;
    --selection: #ead6c0;
    --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: #f39c12;
    --brand-on-solid: #000000;
    --brand-soft: #e7e0d8;
    --brand-on-soft: #875505;
    --brand-line: #ac6d09;
    --secondary-solid: #2ec4b6;
    --secondary-on-solid: #000000;
    --secondary-soft: #dae3e1;
    --secondary-on-soft: #156b63;
    --secondary-line: #1d897f;
    --neutral-solid: #1a1916;
    --neutral-on-solid: #e6e5e3;
    --neutral-soft: #dcdcda;
    --neutral-on-soft: #32312e;
    --neutral-line: #c8c7c5;
    --success-solid: #3fbf55;
    --success-on-solid: #000000;
    --success-soft: #dae2da;
    --success-on-soft: #206e2e;
    --success-line: #2c8c3c;
    --warning-solid: #f2c230;
    --warning-on-solid: #000000;
    --warning-soft: #e6e3da;
    --warning-on-soft: #755d12;
    --warning-line: #95771a;
    --danger-solid: #e0322b;
    --danger-on-solid: #000000;
    --danger-soft: #eadbd9;
    --danger-on-soft: #b72721;
    --danger-line: #e0322b;
    --info-solid: #3b82c4;
    --info-on-solid: #000000;
    --info-soft: #dae0e6;
    --info-on-soft: #2b6396;
    --info-line: #397ebf;
    --accent-solid: #2ec4b6;
    --accent-on-solid: #000000;
    --accent-soft: #dae3e1;
    --accent-on-soft: #156b63;
    --accent-line: #1d897f;
  }
}
/* ═══ 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 {
    /* Colour dials, from the Deepdene Surgery design (Claude Design, 2026-11).
     * Each is a group with five roles: --brand-solid, --brand-on-solid,
     * --brand-soft, --brand-on-soft and --brand-line. */
    --brand: hsl(152 68% 28%);      /* #17784A surgery green: links, eyebrows, focus */
    --secondary: hsl(209 43% 25%);  /* #24405A signage navy: the hero and the dark bands */
    --tertiary: hsl(117 33% 70%);   /* #9CCB9A sage, the cross in the logo: every CTA button */
    --success: hsl(126 46% 33%);
    --warning: hsl(37 74% 54%);
    --danger: hsl(3 56% 48%);
    --info: hsl(202 64% 41%);
    --grey: hsl(208 32% 40%);       /* navy-slate: the design's body text, #5B6B78, and navy dark surfaces */

    /* Paper and ink, exact. Dark mode is the signage navy, the same ground
     * as the header and footer bands. */
    --paper-light: hsl(0 0% 100%);
    --paper-dark: hsl(206 38% 20%);  /* #1F3445 */
    --ink-light: hsl(206 38% 20%);   /* #1F3445: headings */
    --ink-dark: hsl(0 0% 100%);

    /* No lift in the navy bands: the signage navy stays exactly #24405A. */
    --dark-lift: 0;
    /* Soft tints at the design's strength: the services band's cool grey
     * (#EEF3F6) and the after-hours band's pale green (#F0F5F0). */
    --tint-strength: 14%;
    --text-contrast: 8;             /* quiet text and field borders up to 4.5:1 and 3:1 (they fell just short at 0) */

    /* Type and space: body text 17px on a 360px phone to 18px at 1440px (the
     * design's width), each step 1.2x (phone) to 1.25x (desktop) the last, so
     * the desktop steps land on the design's sizes: card copy 18, ledes 22.5,
     * h3 28, numbers 35, h2 44, hero 55. Measured against the design 2026-11. */
    --screen-min: 360;
    --screen-max: 1440;
    --size-min: 17;
    --size-max: 18;
    --ratio-min: 1.2;
    --ratio-max: 1.25;
    --space-min: 16;
    --space-max: 19;
    --space-density: 1;

    /* Corners: none. The design is square throughout (cards, buttons,
     * fields, photos); only avatars are round. */
    /* Type: line height, letter spacing and weight (Dials v0.3), set to
     * what the site used before: body text at 1.5, headings at 1.18 and a
     * touch tighter, capitals opened up, weights 400 and 700 (strong 600). */
    --leading-body: 1.5;
    --leading-display: 1.18;
    --tracking-small: 0;
    --tracking-display: -0.02;
    --tracking-caps: 0.04;
    --weight-body: 400;
    --weight-heading: 700;
    --line-length: 65ch;

    --radius-base: 0;
    --border-width-l: 4px;

    /* Faces: Montserrat for headings, Source Sans 3 for text (Google Fonts,
     * loaded in every page's <head>). */
    --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-heading: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Always light, as the design: the practice chose the Claude Design
     * version over a dark mode (2026-11). No switcher, no scheme-head. The
     * navy bands are .is-dark sections and stay navy. */
    color-scheme: light;
}

/* ── 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)) {
    :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:  oklch(from var(--tertiary) calc(l + (var(--fill-lightness) - l) * var(--balance)) c h);
    --tertiary-solid:     light-dark(var(--tpl-tertiary-base), oklch(from var(--tpl-tertiary-base) calc(l + var(--dark-lift)) c h));
    --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:      oklch(from color-mix(in oklab, light-dark(oklch(from var(--tertiary-solid) max(l, 0.7) c h), oklch(from var(--tertiary-solid) min(l, 0.6) c h)) var(--tint-strength), oklch(from var(--surface) l 0 h)) l calc(c * var(--tint-vividness)) h);
    --tpl-surfaces-y:     color-mix(in srgb-linear, color(from var(--surface-lowered) srgb-linear 0 calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0), color(from var(--surface-raised) srgb-linear 0 0 calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1))));
    --tpl-tertiary-under: color-mix(in srgb-linear, color(from var(--tertiary-soft) srgb-linear calc(0.2126 * clamp(0, r, 1) + 0.7152 * clamp(0, g, 1) + 0.0722 * clamp(0, b, 1)) 0 0), var(--tpl-surfaces-y));
    --tpl-tertiary-text:  color-mix(in srgb-linear, color(from var(--tpl-tertiary-base) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (4.5 + 0.1) - 0.05), 1))), color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, (4.5 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
    --tpl-tertiary-line:  color-mix(in srgb-linear, color(from var(--tertiary) srgb-linear clamp(0, r, 1) clamp(0, g, 1) clamp(0, b, 1) / 1), light-dark(color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, 3 * ((min(2 * r, 4 * g, 4 * b) + 0.05) / (3 + 0.1) - 0.05), 1))), color(from var(--tpl-tertiary-under) srgb-linear 0 0 0 / calc(clamp(0, (3 + 0.1) * (max(2 * r, 4 * g, 4 * b) + 0.05) - 0.05, 1)))));
    --tertiary-on-soft:   light-dark(color(from var(--tpl-tertiary-text) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--tpl-tertiary-text) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
    --tertiary-line:      light-dark(color(from var(--tpl-tertiary-line) srgb-linear calc(r * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(g * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) calc(b * 2 * alpha * min(1, (2 * alpha - 1) / 3 / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / 1), color(from color(from var(--tpl-tertiary-line) srgb-linear min(1, r * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, g * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) min(1, b * 2 * alpha * max(1, (2 * alpha - 1) / max(0.000001, 2 * alpha * (0.2126 * r + 0.7152 * g + 0.0722 * b)))) / alpha) srgb-linear calc(r + (1 - r) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(g + (1 - g) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) calc(b + (1 - b) * clamp(0, (2 * alpha - 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)) / max(0.000001, 1 - (0.2126 * r + 0.7152 * g + 0.0722 * b)), 1)) / 1));
}
.is-tertiary { --solid: var(--tertiary-solid); --on-solid: var(--tertiary-on-solid); --soft: var(--tertiary-soft); --on-soft: var(--tertiary-on-soft); --line: var(--tertiary-line); }
/* The tertiary group in older browsers: without relative colour or
 * light-dark() (iOS 16 and 17, Safari before 18, Chrome and Edge before 123,
 * Firefox before 128) the derivation above cannot be worked out, and Dials'
 * own fallback covers only Dials' groups. So, the way Dials' fallback does
 * its groups, under the same condition and with the same selectors as the
 * derivation: the five roles again with color-mix(in oklab, ...) alone, from
 * --tertiary and the paper (--surface) and ink (--text-strong) Dials'
 * fallback has already worked out. As in Dials v0.2.0's fallback, on-soft is
 * the colour mixed 26% into ink and the line 40% into ink; neither can move
 * only as far as it needs there, so both over-shoot for most colours. Text
 * on the fill is a fixed white, with the fill pulled towards black as Dials
 * pulls --brand (72%), so it keeps 4.5:1. A site with a very light
 * --tertiary checks it: check-contrast.mjs --fallback. */
@supports not ((color: oklch(from red l c h)) and (color: light-dark(red, red))) {
    :root, [data-dials], .is-light, .is-dark {
        --tertiary-solid:    color-mix(in oklab, var(--tertiary) 72%, black);
        --tertiary-on-solid: white;
        --tertiary-soft:     color-mix(in oklab, var(--tertiary) var(--tint-strength), var(--surface));
        --tertiary-on-soft:  color-mix(in oklab, var(--tertiary) 26%, var(--text-strong));
        --tertiary-line:     color-mix(in oklab, var(--tertiary) 40%, var(--text-strong));
    }
}

/* ── The template's own tokens ────────────────────────────────────────────
 * What Dials does not cover: the narrow measure, the grid, the shared control
 * corner, the tap target, layers and motion. None of them is a colour, a text
 * size, a space size or a type setting: line height, letter spacing and
 * weight are Dials' type dials and tokens since v0.3 (the template's old
 * --leading-*, --tracking-* and --weight-* are in "Old names" below). */
:root {
    /* --- Weight -------------------------------------------------------- */
    /* THREE WEIGHTS, DELIBERATELY, all from the dials: body (--weight-body),
     * emphasis (--weight-strong: nav, labels, buttons, eyebrows, strong) and
     * headline (--weight-heading). 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: var(--line-length);   /* body copy: the --line-length dial */
    --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(oklch(from var(--brand-solid) calc(l - 0.07) c h), oklch(from var(--brand-solid) calc(l + 0.07) c h));
    --primary-light: oklch(from var(--brand-solid) calc(l + 0.11) c h);
    --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(oklch(from var(--secondary-solid) calc(l - 0.07) c h), oklch(from var(--secondary-solid) calc(l + 0.07) c h));
    --secondary-light: oklch(from var(--secondary-solid) calc(l + 0.11) c h);
    --secondary-pale: var(--secondary-soft);
    --on-secondary: var(--secondary-on-solid);
    --tertiary-hover: light-dark(oklch(from var(--tertiary-solid) calc(l - 0.07) c h), oklch(from var(--tertiary-solid) calc(l + 0.07) c h));
    --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 the type dials, and the template reads none of them:
     * line height is var(--leading), letter spacing var(--tracking) (in
     * capitals var(--tracking-caps-total)), weight var(--weight-body),
     * var(--weight-strong) or var(--weight-heading). 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: var(--weight-400);
    line-height: var(--leading-l);
    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: var(--weight-700);
    line-height: var(--leading-s);
    letter-spacing: var(--tracking-xs);
    color: var(--text-strong);
    text-wrap: balance;
}

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

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

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

/* A highlighted phrase inside a heading. One mechanism, not three. */
:where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) em {
    font-style: italic;
    color: var(--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-m);
    color: var(--text-muted);
}

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

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

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

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);
    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: var(--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: var(--weight-body);           /* one weight wherever the field sits */
    --field-radius: var(--control-radius);        /* = the .btn radius, by construction; never set it */
    --field-textarea-radius: min(var(--field-radius), var(--radius-l));   /* a pill textarea is a capsule; cap it */
    --field-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(--weight-strong);
    line-height: var(--leading);
    letter-spacing: var(--tracking);
    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: var(--weight-600);
    line-height: var(--leading-s);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    min-block-size: var(--target-min);   /* 44px tap target, every size and variant */
    cursor: pointer;
    border: var(--border-width-s) solid transparent;
    border-radius: var(--control-radius);   /* shared with every field; set --control-radius, not this */
    transition: background var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out);
}

.btn--primary {
    background: var(--solid);
    color: var(--on-solid);
}
/* Hover and pressed mix the fill away from its text colour (Dials' --mix-*),
 * so they work on every group: <a class="btn btn--primary is-tertiary">. */
.btn--primary:hover { background: color-mix(in oklch, var(--solid), var(--mix-hover)); color: var(--on-solid); }
.btn--primary:active { background: color-mix(in oklch, var(--solid), var(--mix-active)); color: var(--on-solid); }

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

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

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

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

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

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

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

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

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

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

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

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

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

/*
 * Grid utilities. .u-container centres and pads; .u-grid lays out. Placement
 * within the grid is each layout's business — see refs/design/layouts.md.
 */
.u-container {
    max-width: var(--grid-max-width);
    margin-inline: auto;
    padding-inline: var(--grid-gutter);
}

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

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

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

/*
 * Scroll entrance.
 *
 * Native scroll-driven animation — no library, no IntersectionObserver, no
 * JS. Add .reveal for a plain fade, or one of the directional modifiers.
 *
 * WHY THE WHOLE BLOCK IS INSIDE prefers-reduced-motion: a reveal implemented
 * as `opacity: 0` plus an animation leaves reduced-motion users staring at
 * invisible content when the animation never runs. Scoping the rule means
 * they simply get the content, with no trap to fall into.
 *
 * Safari and Firefox do not support animation-timeline yet, so content there
 * is simply visible. That is the correct failure for a practice site: no
 * entrance effect is always better than content that never arrives.
 */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }

    .reveal--up { --reveal-from: translateY(var(--reveal-distance)); }
    .reveal--down { --reveal-from: translateY(calc(var(--reveal-distance) * -1)); }
    .reveal--left { --reveal-from: translateX(var(--reveal-distance)); }
    .reveal--right { --reveal-from: translateX(calc(var(--reveal-distance) * -1)); }
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: var(--reveal-from, none);
    }
}

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

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

/* The silhouette is an icon on the brand fill, so it is drawn in the fill's
 * own text colour, --brand-on-solid, through a mask (the shape only), and
 * keeps 3:1 in light and dark. A white silhouette fell to 2.8:1 on a dark
 * page, where the fill is lifted (mf-websites#431). */
.doctor-avatar::after {
    content: "";
    position: absolute;
    width: 40%;
    height: 40%;
    background-color: var(--brand-on-solid);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

/* ── 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))) {
    .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)) {
    :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: var(--weight-700);
    line-height: var(--leading-xs);
    margin: 0 0 var(--space-2xs);
    opacity: 0.55;
}
.notfound h1 { margin-top: 0; }
.notfound__lede { font-size: var(--size-1); line-height: var(--leading-l); margin-inline: auto; max-width: 40rem; }
.notfound__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-s);
    justify-content: center;
    margin-top: var(--space-l);
}
.notfound__links {
    margin-top: var(--space-xl);
    padding-top: var(--space-l);
    border-top: var(--border-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: var(--tracking-xl);
    margin: 0 0 var(--space-s);
}
.notfound__links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-l);
    justify-content: center;
}
.notfound__links a {
    display: inline-block;
    min-height: 24px;   /* WCAG 2.5.8 target size */
    line-height: var(--leading-l);
    font-weight: var(--weight-600);
}

/* ── 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: var(--weight-600);
    line-height: var(--leading-s);
    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-m);
    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: var(--weight-700);
    line-height: var(--leading-s);
    color: var(--text-strong);
}

.mf-search__excerpt {
    display: block;
    margin-top: var(--space-3xs);
    font-size: var(--size--1);
    line-height: var(--leading-m);
    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-s);
    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: var(--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: UNSTYLED, each site styles it ───────────────
 * Light, Dark or Match device (mf-websites#431), in partials/header.html:
 * a labelled group of three buttons, the current one aria-pressed="true".
 * Its script sits beside it in the header; partials/scheme-head.html, in
 * every page's <head>, applies a stored choice before first paint.
 *
 * What follows is the MINIMUM to make it usable and accessible: every
 * button a 44px target with a visible border, the pressed one filled and
 * bold (not by colour alone), the global focus ring. It is deliberately
 * plain. EVERY SITE STYLES IT to suit its header, in the site's own part
 * of this file, from tokens: replace these rules rather than adding to them.
 * Icons, a compact icon button that opens the group as a menu (the script
 * supports one: see the comment in partials/header.html), its place in the
 * header and in the mobile menu are all the site's to decide. What must
 * survive any styling:
 *   - the hiding rule below keeps winning: the switcher shows ONLY where
 *     the head script set data-scheme-ui, i.e. where the browser can draw a
 *     dark page (relative colour and light-dark(), Dials' condition) and
 *     scripts run. Never give it a display rule that outranks it;
 *   - a visible label or an accessible name for the group, aria-pressed on
 *     each choice, a 44px target, the global focus ring (never a focus rule
 *     of its own), and the pressed state shown by more than colour. */
/* ── 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)) {
    :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);
        }
    }
}

/* ═══════════════════════════════════════════════════════════════════════
 * DEEPDENE SURGERY
 *
 * Built from the Claude Design project "Deepdene Surgery" (homepage v2 and
 * its inner pages). Navy bands from the signage, the sage cross from the
 * logo, square corners throughout. Every value is a token; the look is the
 * dials block above.
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
    /* Fields and buttons share one corner: square, like the design. */
    --control-radius: var(--radius-s);
    /* Sections are 1450px wide (content), with the gutter outside it. */
    --grid-max-width: calc(90.625rem + var(--grid-gutter) * 2);
    /* The sage cross's size where it pins a photo's corner. */
    --cross-size: 5.25rem;
    /* The cross's outline is the ground it sits on, so it reads as cut out.
     * White here; each navy or tinted band sets its own (.hero, .values,
     * .after-hours ...). Declared on the ground, never on .crossed, or it
     * would overrule the band's. */
    --cross-gap: var(--surface);
}

/* ── Base tweaks ─────────────────────────────────────────────────────────
 * Montserrat's 600 is the design's heading weight; its 700 is too heavy. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { font-weight: var(--weight-600); }

.eyebrow {
    margin-bottom: var(--space-xs);
    font-family: var(--font-heading);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
}

.lede { color: var(--text-strong); }

/* A heading straight after its eyebrow sits close to it, as in the design. */
.eyebrow + :is(h1, h2, h3, .h1, .h2, .h3) { margin-top: 0; }

/* On the navy bands every eyebrow is sage, as in the design. */
.is-dark .eyebrow { color: var(--tertiary-on-soft); }

/* Buttons: uppercase, bold, tracked, as the design's sage CTAs. */
.btn {
    font-size: var(--size-0);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    padding: var(--space-xs) var(--space-m);
}
.btn--lg { padding: var(--space-s) var(--space-l); font-size: var(--size-0); }
/* On the narrowest phones a long button label wraps rather than overflow. */
@media (max-width: 479px) {
    .btn { white-space: normal; }
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

/* Section intro: eyebrow, heading and standfirst on the left, a CTA on the
 * right, wrapping under it on narrow screens. */
.section-intro {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-m) var(--space-2xl);
    margin-bottom: var(--space-xl);
}
.section-intro__text { flex: 1 1 26rem; max-width: 46rem; }
.section-intro__text > :last-child { margin-bottom: 0; }

/* Two columns, image and text, collapsing to one. */
.split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: var(--space-xl) var(--space-2xl-3xl);
    align-items: start;
}
.split--center { align-items: center; }

/* ── The sage cross ──────────────────────────────────────────────────────
 * The cross from the logo, pinned to a photo's corner. It is decoration
 * (aria-hidden), filled with the sage fill and outlined in the ground it
 * sits on, --cross-gap, so it reads as cut out of the photo's corner. */
.crossed { position: relative; }
/* The design's offsets: the cross overhangs the photo's corner by a third
 * of its size (28px of an 84px cross; 36px of 112px in the hero). */
.crossed--bl { padding: 0 0 var(--space-m) var(--space-m); }
.crossed > img {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
}
.cross {
    position: absolute;
    inline-size: var(--cross-size);
    block-size: var(--cross-size);
    overflow: visible;
    z-index: var(--layer-base);
    pointer-events: none;
}
.cross path {
    fill: var(--tertiary-solid);
    stroke: var(--cross-gap);
    stroke-width: 0.3;
    paint-order: stroke;
}
.crossed--bl > .cross { inset-inline-start: 0; inset-block-end: 0; }
/* A panel's cross overhangs its bottom-right corner by a third of its size,
 * as the photo crosses do (the design's 24px of 64, 29px of 80). The size
 * is set on the panel, so the space kept for the overhang can follow it. */
.crossed--br { --cross-size: 4.5rem; }
.crossed--br > .cross {
    inset-inline-end: calc(var(--cross-size) / -3);
    inset-block-end: calc(var(--cross-size) / -3);
}
@media (max-width: 767px) {
    .crossed { --cross-size: 4rem; }
    .crossed--br { --cross-size: 3rem; }
    .hero__media > .cross { --cross-size: 4.5rem; }
}
.cross-mark { inline-size: 1.125rem; block-size: 1.125rem; flex: none; }
.cross-mark path { fill: var(--brand-line); }

@media (prefers-reduced-motion: no-preference) {
    .cross {
        animation: cross-in linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 100%;
    }
}
@keyframes cross-in {
    from { opacity: 0; transform: scale(0.55); }
}

/* A gentle lift on hover for cards that are links, with a shadow so it reads
 * as depth. */
.lift {
    transition: transform var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out);
}
@media (prefers-reduced-motion: no-preference) {
    .lift:hover { transform: translateY(calc(var(--space-3xs) * -1)); box-shadow: var(--shadow-m); }
}

/* ── Top strip ─────────────────────────────────────────────────────────── */
.topbar {
    /* The design's deepest navy (#172836): the footer's navy, a step darker. */
    --navy-deep: color-mix(in oklab, var(--surface), black 15%);
    background: var(--navy-deep);
    color: var(--text);
    font-size: var(--size--1);
}
.topbar__inner {
    display: flex;
    align-items: center;
    gap: var(--space-2xs) var(--space-m);
    min-block-size: calc(var(--target-min) + var(--space-xs));
}
.topbar__status {
    margin: 0 auto 0 0;
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--tertiary-on-soft);
}
.topbar__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2xs) var(--space-m);
}
.topbar__contact li,
.topbar__contact a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
}
.topbar__contact a {
    min-block-size: var(--target-min);
    color: var(--text-strong);
    text-decoration: none;
}
.topbar__contact a:hover { color: var(--tertiary-on-soft); }
.topbar__contact svg {
    inline-size: 1.125rem;
    block-size: 1.125rem;
    flex: none;
    color: var(--tertiary-line);
}
.topbar .search-trigger { min-inline-size: 15rem; }

@media (max-width: 1023px) {
    .topbar__contact .topbar__fax { display: none; }
}
@media (max-width: 767px) {
    .topbar__label { display: none; }
    .topbar__status { font-size: var(--size--2); letter-spacing: var(--tracking-l); }
    .topbar .search-trigger { min-inline-size: var(--target-min); }
}
@media (max-width: 479px) {
    .topbar__status { display: none; }
    .topbar__contact { margin-inline-end: auto; }
}

/* ── Header and main menu ──────────────────────────────────────────────────
 * Desktop from 1400px (where the seven items fit): logo, the menu in one row, Book. Below it: logo,
 * Book and a Menu button opening the menu as a panel. The swap is at ONE
 * width (1400px) for the menu and the booking button alike. */
.site-header {
    position: relative;
    z-index: var(--layer-nav);
    /* The signage navy (#24405A), as the design: the header and hero are the
     * secondary fill inside their dark band; the footer is the ink navy. */
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    border-bottom: var(--border-width-s) solid var(--border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-s) var(--space-m);
    padding-block: var(--space-s-m);
}
.site-header__logo { flex: none; margin-inline-end: auto; }
.site-header__logo img { inline-size: auto; block-size: 3.25rem; }
.site-header__book { flex: none; font-size: var(--size--1); }

.site-nav__list a,
.site-nav__sub-toggle { color: var(--text-strong); }

.site-nav__list > li > a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    font-family: var(--font-body);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav__list > li > a:hover { color: var(--tertiary-on-soft); }
.site-nav__list > li > a.active {
    color: var(--tertiary-on-soft);
    text-decoration: underline;
    text-decoration-thickness: var(--border-width-m);
    text-underline-offset: 0.6em;
}

.site-nav__has-sub { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.site-nav__sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: var(--target-min);
    block-size: var(--target-min);
}
.site-nav__sub-toggle svg {
    inline-size: 1.125rem;
    block-size: 1.125rem;
    transition: transform var(--duration-fast) var(--ease-out);
}
.site-nav__sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.site-nav__sub {
    display: none;
    padding: var(--space-2xs) 0;
    background: var(--surface);
    border-top: var(--border-width-l) solid var(--tertiary-line);
}
.site-nav__sub-toggle[aria-expanded="true"] + .site-nav__sub { display: block; }
.site-nav__sub a {
    display: flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding: var(--space-3xs) var(--space-m);
    font-weight: var(--weight-600);
    text-decoration: none;
}
.site-nav__sub a:hover { background: var(--secondary-soft); color: var(--tertiary-on-soft); }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    min-block-size: var(--target-min);
    min-inline-size: var(--target-min);
    padding-inline: var(--space-2xs);
    color: var(--text-strong);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    font-size: var(--size--1);
    border-radius: var(--control-radius);
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    inline-size: 1.375rem;
    block-size: var(--border-width-m);
    background: currentColor;
    transition: transform var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle__bars::before { transform: translateY(-0.4rem); }
.nav-toggle__bars::after { transform: translateY(0.4rem); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); background: currentColor; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: rotate(-45deg); background: currentColor; }

@media (min-width: 1400px) {
    .nav-toggle { display: none; }
    .site-nav { flex: 1 1 auto; display: flex; justify-content: center; }
    .site-nav__list {
        display: flex;
        align-items: center;
        gap: var(--space-3xs) var(--space-m);
    }
    .site-nav__sub-toggle { inline-size: var(--space-l); }
    .site-nav__sub {
        position: absolute;
        inset-block-start: 100%;
        inset-inline-start: calc(var(--space-m) * -1);
        z-index: var(--layer-overlay);
        min-inline-size: 18rem;
        box-shadow: var(--shadow-l);
    }
    /* Hover and keyboard focus open it too; the chevron is for touch. */
    .site-nav__has-sub:hover > .site-nav__sub,
    .site-nav__has-sub:focus-within > .site-nav__sub { display: block; }
}

@media (max-width: 1399px) {
    .site-header__logo { order: 0; }
    .site-header__book { order: 1; }
    .nav-toggle { order: 2; }
    .site-nav {
        display: none;
        position: absolute;
        inset-block-start: 100%;
        inset-inline: 0;
        max-block-size: calc(100dvh - 8rem);
        overflow-y: auto;
        background: var(--surface-raised);
        border-top: var(--border-width-s) solid var(--border);
        box-shadow: var(--shadow-l);
    }
    .site-nav.is-open { display: block; }
    .site-nav__list {
        max-inline-size: var(--grid-max-width);
        margin-inline: auto;
        padding: var(--space-xs) var(--grid-gutter) var(--space-m);
    }
    .site-nav__list > li { border-bottom: var(--border-width-s) solid var(--border); }
    .site-nav__list > li > a { flex: 1; min-block-size: calc(var(--target-min) + var(--space-2xs)); }
    .site-nav__sub { flex-basis: 100%; border-top: 0; background: transparent; padding-block-start: 0; }
}
@media (max-width: 559px) {
    .site-header__inner { gap: var(--space-2xs); }
    .site-header__logo { flex: 0 1 auto; min-inline-size: 0; }
    .site-header__logo img { block-size: auto; max-block-size: 2.5rem; max-inline-size: 100%; }
    .nav-toggle { gap: 0; }
    .site-header__book { padding-inline: var(--space-xs); font-size: var(--size--2); }
    .nav-toggle__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}


/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    --cross-gap: var(--secondary-solid);
    padding-block: var(--space-xl-2xl) calc(var(--space-3xl) + var(--space-xl));
}
.hero__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: var(--space-xl) var(--space-2xl);
    align-items: center;
}
.hero__title {
    margin-bottom: var(--space-m);
    font-size: var(--size-5);
    line-height: var(--leading-xs);
    letter-spacing: var(--tracking-xs);
}
.hero__lede {
    max-width: 34rem;
    margin-bottom: var(--space-l);
    font-size: var(--size-1);
    line-height: var(--leading-l);
    color: var(--text-strong);
}
.hero__media { padding: 0 0 var(--space-l) var(--space-l); }
.hero__media > img { aspect-ratio: 4 / 3; object-position: 60% 50%; }
.hero__media > .cross { --cross-size: 7rem; }

/* ── Quick actions: a white panel lifted over the hero's lower edge ──────── */
.quick {
    position: relative;
    z-index: var(--layer-raised);
    margin-top: calc(var(--space-3xl) * -1);
}
.quick__panel {
    background: var(--surface-raised);
    border-top: var(--border-width-l) solid var(--tertiary-line);
    box-shadow: var(--shadow-l);
}
.quick__head {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-m) var(--space-l);
    border-bottom: var(--border-width-s) solid var(--border);
}
.quick__head h2 { margin: 0; font-size: var(--size-1); }
.quick__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: var(--border-width-s);
    background: var(--border);
    counter-reset: quick;
}
.quick__grid > li { display: flex; counter-increment: quick; }
.quick__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-m) var(--space-l) var(--space-l);
    background: var(--surface-raised);
    color: var(--text);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out);
}
.quick__item:hover { background: var(--secondary-soft); color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
    .quick__item, .doctor-roll__item, .visiting__card {
        transition: transform var(--duration-base) var(--ease-out),
                    box-shadow var(--duration-base) var(--ease-out),
                    background-color var(--duration-fast) var(--ease-out),
                    color var(--duration-fast) var(--ease-out);
    }
    .quick__item:hover, .doctor-roll__item:hover, .visiting__card:hover {
        transform: translateY(calc(var(--space-3xs) * -1));
        box-shadow: var(--shadow-m);
    }
}
.quick__item::before {
    content: counter(quick, decimal-leading-zero);
    font-family: var(--font-heading);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    color: var(--brand-on-soft);
}
.quick__item h3 { margin: 0; font-size: var(--size-1); line-height: var(--leading-m); }
.quick__item p { flex: 1; margin: 0; max-width: var(--measure-tight); }
.quick__cta {
    margin-top: var(--space-2xs);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 0.25em;
    color: var(--link);
}
.quick__item:hover .quick__cta { color: var(--link-hover); }
.quick__note {
    margin: var(--space-s) 0 0;
    font-size: var(--size--1);
    color: var(--text-muted);
}

/* ── Welcome ───────────────────────────────────────────────────────────── */
.welcome { padding-block-start: var(--space-2xl-3xl); }
.welcome .split { align-items: stretch; }
.split__media { display: flex; min-block-size: 22rem; }
.split__media > img { object-position: 52% 38%; }
.split__text > :last-child { margin-bottom: 0; }
.accredited {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-m) var(--space-xl);
    margin-top: var(--space-l);
    padding-top: var(--space-l);
    border-top: var(--border-width-m) solid var(--tertiary-line);
}
.accredited p { flex: 1 1 15rem; margin: 0; font-size: var(--size--1); }
.accreditation-badge { inline-size: auto; block-size: 5.25rem; }

/* ── Services: the practice's own list from the app, as navy tiles ─────── */
.services-band {
    /* The design's cool grey (#EEF3F6): the navy's soft tint. Body text stays
     * --text, which holds 4.5:1 on every soft tint. */
    background: var(--secondary-soft);
    color: var(--text);
}
.service-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-s);
    margin: 0;
    padding: 0;
    list-style: none;
}
.service-list li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-s);
    margin: 0;
    padding: var(--space-l) var(--space-m) var(--space-l);
    border-top: var(--border-width-l) solid var(--tertiary-solid);
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-weight: var(--weight-600);
    line-height: var(--leading-s);
}
@media (prefers-reduced-motion: no-preference) {
    .service-list li { transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
    .service-list li:hover { transform: translateY(calc(var(--space-3xs) * -1)); box-shadow: var(--shadow-m); }
}
/* The cross as a bullet: an icon on the navy fill, in the sage fill. */
.service-list li::before {
    content: "";
    flex: none;
    inline-size: 2.5rem;
    block-size: 2.5rem;
    background: var(--tertiary-solid);
    clip-path: polygon(33.3% 0, 66.6% 0, 66.6% 33.3%, 100% 33.3%, 100% 66.6%, 66.6% 66.6%, 66.6% 100%, 33.3% 100%, 33.3% 66.6%, 0 66.6%, 0 33.3%, 33.3% 33.3%);
}
.service-list :is(p, a) { color: inherit; }
/* A service written in the app as a bold title then a sentence becomes the
 * design's card: title, then the description in body text. */
.service-list li strong { display: block; font-weight: var(--weight-600); }
.service-list li :is(p, span, br + *) {
    font-family: var(--font-body);
    font-size: var(--size--1);
    font-weight: var(--weight-400);
    line-height: var(--leading-l);
}
@media (min-width: 640px) {
    .service-list li { min-block-size: 12rem; }
}

/* ── Doctors roll (homepage) ───────────────────────────────────────────── */
.doctor-avatar--round {
    aspect-ratio: 1;
    border-radius: var(--radius-round);
}
/* Deepdene's fallback avatar is navy, as in the design: the secondary fill,
 * a step darker at one end, with its own text colour for the silhouette. */
.doctor-avatar {
    --avatar-navy-shade: color-mix(in oklab, var(--secondary-solid) 80%, black);
    background: linear-gradient(135deg, var(--avatar-navy-shade), var(--secondary-solid));
}
.doctor-avatar::after { background-color: var(--secondary-on-solid); }
.doctor-roll {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: var(--space-l) var(--space-s);
    margin-bottom: var(--space-2xl);
}
.doctor-roll__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-s) var(--space-xs);
    text-align: center;
    text-decoration: none;
    color: var(--text-strong);
    transition: background-color var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out);
}
.doctor-roll__item:hover { background: var(--secondary-soft); color: var(--brand-on-soft); }
.doctor-roll__item .doctor-avatar { inline-size: 100%; max-inline-size: 9.75rem; }
.doctor-roll__name {
    font-family: var(--font-heading);
    font-weight: var(--weight-600);
    line-height: var(--leading-m);
}

.visiting {
    margin-inline-end: var(--space-l);
    margin-block-end: var(--space-l);
    padding: var(--space-xl) var(--space-l) var(--space-l);
    background: var(--secondary-soft);
    color: var(--text);
}
.visiting h3 { font-size: var(--size-1); }
.visiting__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-s);
}
.visiting__card {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: var(--space-s);
    align-items: start;
    padding: var(--space-s);
    background: var(--surface-raised);
    font-size: var(--size--1);
    line-height: var(--leading-m);
}
.visiting__body { display: flex; flex-direction: column; gap: var(--space-3xs); }
.visiting__name { font-size: var(--size-0); font-weight: var(--weight-700); color: var(--text-strong); }
.visiting__role { font-weight: var(--weight-600); color: var(--brand-on-soft); }
.visiting__note { margin: var(--space-m) 0 0; font-size: var(--size--1); }
.visiting .doctor-avatar::after { width: 50%; height: 50%; }

/* ── Values: a navy band ───────────────────────────────────────────────── */
.values {
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    --cross-gap: var(--secondary-solid);
}
.values__media { margin-top: var(--space-xl); }
.values__media > img { aspect-ratio: 4 / 3; }
.values__list {
    counter-reset: value;
    border-bottom: var(--border-width-m) solid var(--tertiary-line);
}
.values__list > li {
    counter-increment: value;
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: var(--space-2xs) var(--space-m);
    padding-block: var(--space-l);
    border-top: var(--border-width-m) solid var(--tertiary-line);
}
.values__list > li::before {
    content: counter(value, decimal-leading-zero);
    grid-row: span 2;
    font-family: var(--font-heading);
    font-size: var(--size-3);
    font-weight: var(--weight-700);
    line-height: var(--leading-xs);
    color: var(--tertiary-line);
}
.values__list h3 { margin: 0; font-size: var(--size-2); }
.values__list p { margin: 0; max-width: 33rem; }

/* ── After hours ───────────────────────────────────────────────────────── */
.after-hours {
    background: var(--tertiary-soft);
    color: var(--tertiary-on-soft);
}
.after-hours__box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: var(--space-xl) var(--space-2xl-3xl);
    align-items: center;
    padding: var(--space-xl-2xl);
    background: var(--surface);
    color: var(--text);
}
.after-hours .crossed { margin-inline-end: var(--space-l); --cross-gap: var(--tertiary-soft); }
.after-hours__text > :last-child { margin-bottom: 0; }

.call-list { border-top: 0; }
.call-list li + li { border-top: var(--border-width-m) solid var(--tertiary-line); }
.call-list a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xs) var(--space-m);
    padding-block: var(--space-m);
    color: var(--text);
    text-decoration: none;
}
.call-list a > span { max-width: 16rem; }
.call-list__number {
    font-family: var(--font-heading);
    font-size: var(--size-3);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-s);
    color: var(--text-strong);
}
.call-list__number--sage { color: var(--tertiary-line); }
.call-list a:hover .call-list__number { text-decoration: underline; text-decoration-thickness: var(--border-width-m); }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--surface);
    color: var(--text);
}
.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: var(--space-xl) var(--space-2xl);
    padding-block: var(--space-2xl) var(--space-xl);
}
.site-footer__logo { inline-size: auto; block-size: 3rem; margin-bottom: var(--space-m); }
.site-footer__address {
    margin-bottom: var(--space-m);
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-style: normal;
    font-weight: var(--weight-600);
    line-height: var(--leading-m);
    color: var(--text-strong);
}
.site-footer__title {
    margin: 0 0 var(--space-s);
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--tertiary-on-soft);
}
.site-footer__title:not(:first-child) { margin-top: var(--space-l); }
.site-footer a:not(.btn) { color: var(--text-strong); }
.site-footer a:not(.btn):hover { color: var(--tertiary-on-soft); }

.hours { margin: 0; font-size: var(--size--1); }
.hours__row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-s);
    padding-block: var(--space-2xs);
    border-bottom: var(--border-width-s) solid var(--border);
}
.hours__row dt { font-weight: var(--weight-400); }
.hours__row dd { margin: 0; white-space: nowrap; text-align: end; }
.site-footer__note { margin: var(--space-s) 0 0; font-size: var(--size--1); color: var(--text-muted); }

.site-footer__contact li,
.site-footer__contact a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}
.site-footer__contact a { min-block-size: var(--target-min); text-decoration: none; }
.site-footer__contact svg { inline-size: 1.25rem; block-size: 1.25rem; flex: none; color: var(--tertiary-line); }
.site-footer__contact li:not(:has(a)) { min-block-size: var(--target-min); }

.site-footer__social { display: flex; gap: var(--space-xs); }
.site-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 3rem;
    block-size: 3rem;
    border: var(--border-width-s) solid var(--border-strong);
}
.site-footer__social a:hover { background: var(--tertiary-solid); color: var(--tertiary-on-solid); border-color: var(--tertiary-solid); }
.site-footer__social svg { inline-size: 1.375rem; block-size: 1.375rem; }
.site-footer__handle { margin: var(--space-xs) 0 0; font-size: var(--size--1); color: var(--text-muted); }

.site-footer__map { margin-bottom: var(--space-xs); border-radius: 0; }
.site-footer__directions { display: inline-flex; align-items: center; min-block-size: var(--target-min); }

.site-footer__base {
    --navy-deep: color-mix(in oklab, var(--surface), black 15%);
    background: var(--navy-deep);
    color: var(--text-muted);
    font-size: var(--size--1);
}
/* Three columns: copyright left, Powered by centred, the legal links right.
 * Every item is one 44px box with its text centred in it, so all three sit
 * on one line at one height. Phones stack them, centred. */
.site-footer__base-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2xs) var(--space-l);
    padding-block: var(--space-xs);
}
.site-footer__base-inner > * { display: flex; align-items: center; min-block-size: var(--target-min); }
.site-footer__base-inner > .powered-by { justify-content: center; }
.site-footer__base-inner > .site-footer__legal { justify-content: flex-end; }
@media (max-width: 767px) {
    .site-footer__base-inner { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
    .site-footer__base-inner > * { justify-content: center; }
    .site-footer__base-inner > .site-footer__legal { justify-content: center; }
}
.site-footer__base-inner p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-s); }
.site-footer__legal li + li { display: flex; align-items: center; gap: var(--space-s); }
.site-footer__legal li + li::before {
    content: "";
    inline-size: var(--border-width-s);
    block-size: 1rem;
    background: var(--tertiary-line);
}
.site-footer__legal a { display: inline-flex; align-items: center; min-block-size: var(--target-min); }
/* The legal links are a menu: no underline, sage on hover like the rest of
 * the footer. */
.site-footer .site-footer__legal a { text-decoration: none; transition: color var(--duration-base) var(--ease-out); }
.site-footer .site-footer__legal a:hover { color: var(--tertiary-on-soft); }
.powered-by { display: flex; align-items: center; gap: var(--space-2xs); }
.powered-by a { display: inline-flex; }
.powered-by img { inline-size: 6rem; block-size: auto; }

/* ── Inner pages: the navy page hero ──────────────────────────────────── */
.page-hero {
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    padding-block: var(--space-xl) var(--space-2xl);
}
.page-hero h1 {
    max-width: 22ch;
    margin-bottom: var(--space-s);
    font-size: var(--size-5);
    line-height: var(--leading-xs);
    letter-spacing: var(--tracking-xs);
}
.page-hero .lede { max-width: 40rem; margin-bottom: 0; color: var(--text-strong); }
.page-hero .button-row { margin-top: var(--space-l); }
/* A row of in-page links under the heading. */
.page-hero__jump {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs) var(--space-m);
    margin-top: var(--space-l);
    padding-top: var(--space-m);
    border-top: var(--border-width-s) solid var(--border);
}
.page-hero__jump a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    font-size: var(--size--1);
    color: var(--text-strong);
}
.page-hero__jump a:hover { color: var(--tertiary-on-soft); }

/* Breadcrumb at the top of an inner page's hero, as in the design. */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--space-2xs);
    margin: 0 0 var(--space-s);
    padding: 0;
    list-style: none;
    font-size: var(--size--1);
    color: var(--text-muted);
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before {
    content: "/";
    margin-inline-end: var(--space-2xs);
    color: var(--text-muted);
}
.breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    color: var(--text-strong);
}
.breadcrumb a:hover { color: var(--tertiary-on-soft); }
/* A second hero paragraph, under the lede. */
.page-hero__more {
    max-width: 46rem;
    margin: var(--space-s) 0 0;
    font-size: var(--size-0);
    color: var(--text-strong);
}


/* Rich text from the app (about, fees, policies): readable prose. */
.prose { max-width: var(--measure); }
.prose > :last-child { margin-bottom: 0; }
.prose :is(h2, h3, h4) { font-size: var(--size-1); }

/* ── About ─────────────────────────────────────────────────────────────── */
/* Hero lede: sage, in the heading face, as in the design. */
.page-hero .about-hero__lede {
    max-width: 46rem;
    font-family: var(--font-heading);
    font-weight: var(--weight-600);
    font-size: var(--size-1);
    line-height: var(--leading-m);
    color: var(--tertiary-on-soft);
}

/* Our story: the photo stretches to the height of the practice's own text. */
.about-story { align-items: stretch; }
.about-story .split__text { align-self: center; }

/* How our practice works: the sage-tinted band. */
.about-how {
    background: var(--tertiary-soft);
    color: var(--tertiary-on-soft);
}
.about-how p:not(.eyebrow) { color: var(--text); }
.about-how .eyebrow { color: var(--brand-on-soft); }
.about-how h2 { color: var(--text-strong); }
.about-how .about-how__lead { color: var(--text-strong); }

/* How our practice works: heading and standfirst side by side, then three cards. */
.about-how__intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: var(--space-s) var(--space-2xl-3xl);
    align-items: end;
    margin-bottom: var(--space-xl);
}
.about-how__intro > * { margin-bottom: 0; }
.about-how__intro h2 { margin-bottom: 0; }
.about-how__lead {
    margin-bottom: var(--space-s);
    font-weight: var(--weight-600);
    color: var(--text-strong);
}
.about-how__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--space-m);
}
.about-how__card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-l);
    background: var(--surface-raised);
    color: var(--text);
}
.about-how__card h3 { margin: 0; font-size: var(--size-1); }
.about-how__card p { margin: 0; }
.about-how__icon {
    inline-size: 2.5rem;
    block-size: 2.5rem;
    color: var(--brand-line);
}
.about-how__cta { margin-top: var(--space-xl); }

/* Values: the design's photo slot under the intro (needs a photo), a quiet
 * panel with the sage cross pinned to its corner, cut out of the navy. */
.about-values__media { margin-top: var(--space-l); --cross-gap: var(--secondary-solid); }
/* The empty slot: the band's navy, lifted a touch towards its text colour. */
.about-values__slot {
    --about-slot-fill: color-mix(in oklab, var(--surface) 94%, var(--text));
    aspect-ratio: 4 / 3;
    background: var(--about-slot-fill);
    color: var(--text);
    border: var(--border-width-s) dashed var(--border);
}

/* Accreditation and affiliations: three cards, the artwork on a quiet panel. */
.about-certs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: var(--space-m);
}
.about-cert {
    display: flex;
    flex-direction: column;
    background: var(--surface-raised);
    color: var(--text);
    border: var(--border-width-m) solid var(--border);
}
@media (prefers-reduced-motion: no-preference) {
    .about-cert { transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
    .about-cert:hover { transform: translateY(calc(var(--space-3xs) * -1)); box-shadow: var(--shadow-m); }
}
.about-cert__media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: var(--space-m);
    background: var(--tertiary-soft);
    color: var(--tertiary-on-soft);
}
.about-cert__media--badge { padding: var(--space-l); }
.about-cert__media { overflow: hidden; }
.about-cert__media img {
    display: block;
    inline-size: 100%;
    block-size: 100%;
    min-block-size: 0;
    object-fit: contain;
}
.about-cert__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-m) var(--space-l) var(--space-l);
}
.about-cert__body h3 { margin: 0; font-size: var(--size-1); line-height: var(--leading-m); }
.about-cert__body p { flex: 1; margin: 0; font-size: var(--size--1); }
.about-cert__more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
}

/* ── Services ──────────────────────────────────────────────────────────── */
/* The hero's two paragraphs side by side on wide screens. */
.svc-hero__copy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: var(--space-s) var(--space-2xl);
    max-width: 75rem;
}
.svc-hero__copy > * { margin-bottom: 0; font-size: var(--size-1); line-height: var(--leading-l); color: var(--text-strong); }
.svc-hero__phone {
    font-weight: var(--weight-700);
    white-space: nowrap;
    color: var(--tertiary-on-soft);
}
.svc-hero__phone:hover { color: var(--text-strong); }

/* GP services: the cool-tinted band; each {{services}} item is the design's
 * navy card (two across), the sage cross in the icon column, then the title.
 * The design's per-service photo and blurb are not in the app's list. */
.svc-services {
    background: var(--secondary-soft);
    color: var(--secondary-on-soft);
}
.svc-services .section-intro__text p:not(.eyebrow) { color: var(--text); }
.svc-services .eyebrow { color: var(--brand-on-soft); }
.svc-services h2 { color: var(--text-strong); }
.svc-services .service-list ul {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
    gap: var(--space-m);
}
.svc-services .service-list li {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    align-items: center;
    gap: var(--space-xs) var(--space-m);
    min-block-size: 0;
    padding: var(--space-l) var(--space-xl);
    border-top: 0;
    font-size: var(--size-1);
}
.svc-services .service-list li::before { inline-size: 2.75rem; block-size: 2.75rem; }

/* Visiting practitioners: a ruled list, read as a table on wide screens. */
.svc-visiting__head,
.svc-visiting__row {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr);
    gap: var(--space-m);
    align-items: center;
}
.svc-visiting__head {
    padding-bottom: var(--space-xs);
    border-bottom: var(--border-width-m) solid var(--border-strong);
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--text-muted);
}
.svc-visiting__row {
    padding-block: var(--space-s);
    border-bottom: var(--border-width-m) solid var(--tertiary-line);
}
.svc-visiting .doctor-avatar { inline-size: 4rem; }
.svc-visiting .doctor-avatar::after { width: 50%; height: 50%; }
.svc-visiting__name { font-weight: var(--weight-700); color: var(--text-strong); }
.svc-visiting__role { font-weight: var(--weight-600); color: var(--brand-on-soft); }

@media (max-width: 767px) {
    .svc-visiting__head { display: none; }
    .svc-visiting__row {
        grid-template-columns: 4rem 1fr;
        gap: var(--space-3xs) var(--space-s);
        align-items: start;
    }
    .svc-visiting__row .doctor-avatar { grid-row: span 3; }
    .svc-visiting__days { font-size: var(--size--1); }
}

/* A quiet note under the list. */
.svc-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-s);
    align-items: start;
    margin-top: var(--space-l);
    padding: var(--space-m) var(--space-l);
    background: var(--secondary-soft);
    color: var(--secondary-on-soft);
}
.svc-note p { color: var(--text); }
.svc-note svg { inline-size: 1.625rem; block-size: 1.625rem; color: var(--brand-line); }
.svc-note p { margin: 0; }
.svc-note strong { color: var(--text-strong); }

/* Book: the buttons sit to the right of the text on wide screens. */
.svc-book__actions { justify-content: flex-end; }
@media (max-width: 767px) {
    .svc-book__actions { justify-content: flex-start; }
}

/* ═══ Doctors page (doctors.html) ═══════════════════════════════════════
 * The GPs from the app as long profiles, a "Jump to a GP" strip lifted over
 * the hero's edge, and the visiting practitioners as a table-like list. */

/* Hero: the two intro paragraphs side by side, wrapping on narrow screens. */
.doc-hero__intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: var(--space-s) var(--space-2xl);
    max-width: 75rem;
}
.doc-hero__intro .lede { max-width: none; }
.doc-hero__intro a { font-weight: var(--weight-700); color: var(--tertiary-on-soft); }
.doc-hero__intro a:hover { color: var(--text-strong); }

/* Jump to a GP: a white panel over the hero's lower edge, like the
 * homepage's quick actions. */
.doc-jump {
    position: relative;
    z-index: var(--layer-raised);
    margin-top: calc(var(--space-xl) * -1);
}
.doc-jump__panel {
    padding: var(--space-m) var(--space-l);
    background: var(--surface-raised);
    color: var(--text);
    border-top: var(--border-width-l) solid var(--tertiary-line);
    box-shadow: var(--shadow-l);
}
.doc-jump__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
}
.doc-jump__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    min-block-size: var(--target-min);
    padding: var(--space-3xs) var(--space-s) var(--space-3xs) var(--space-3xs);
    border: var(--border-width-s) solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-strong);
    font-weight: var(--weight-600);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.doc-jump__link:hover { background: var(--secondary-soft); border-color: var(--tertiary-line); color: var(--text-strong); }
.doc-jump__link .doctor-avatar { inline-size: 2.5rem; flex: none; }

/* Our GPs: one profile per doctor, ruled off in sage. */
.doc-gps h2 { margin-bottom: var(--space-l); }
.doc-profile {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-l) var(--space-2xl);
    padding-block: var(--space-xl);
    border-top: var(--border-width-m) solid var(--tertiary-line);
    scroll-margin-top: var(--space-l);
}
.doc-profile__media {
    flex: none;
    align-self: flex-start;
    inline-size: 13.75rem;
}
.doc-profile__media > .cross {
    --cross-size: 3.5rem;
    inset-inline-end: 0;
    inset-block-end: 0;
}
.doc-profile__body {
    flex: 1 1 32rem;
    min-inline-size: 0;
    max-inline-size: 55rem;
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}
.doc-profile__head h3 { margin: 0 0 var(--space-3xs); font-size: var(--size-3); line-height: var(--leading-s); }
.doc-profile__meta {
    margin: 0;
    font-weight: var(--weight-600);
    color: var(--brand-on-soft);
}
/* Profession and qualifications, with a dot between only when both exist. */
.doc-profile__meta span:empty { display: none; }
.doc-profile__meta span:not(:empty) + span:not(:empty)::before { content: "· "; }
.doc-profile__bio.prose { max-width: none; line-height: var(--leading-xl); }
.doc-profile__bio:empty { display: none; }
/* No bio in the app yet: a quiet "coming soon" note in its place. */
.doc-profile__soon {
    display: none;
    margin: 0;
    padding: var(--space-s) var(--space-m);
    background: var(--secondary-soft);
    color: var(--text);
}
.doc-profile__bio:empty + .doc-profile__soon { display: block; }
/* Interests: one comma-separated field from the app, set as a single chip line. */
.doc-profile__interests { display: flex; flex-direction: column; gap: var(--space-2xs); padding-top: var(--space-3xs); }
.doc-profile__interests:has(.doc-profile__chips:empty) { display: none; }
.doc-profile__label {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--text-muted);
}
.doc-profile__chips {
    align-self: flex-start;
    margin: 0;
    padding: var(--space-3xs) var(--space-xs);
    background: var(--secondary-soft);
    color: var(--text-strong);
    font-size: var(--size--1);
    font-weight: var(--weight-600);
    line-height: var(--leading-l);
}
.doc-profile .button-row { margin-top: var(--space-2xs); }
.doc-gps { padding-bottom: var(--space-l); }


/* Visiting practitioners: on the page, rows like a table. */
.doc-visiting__intro { max-width: 46rem; margin-bottom: var(--space-l); }
.doc-visiting__intro > :last-child { margin-bottom: 0; }
.doc-visiting__head,
.doc-visiting__row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr);
    gap: var(--space-m);
    align-items: center;
}
.doc-visiting__head {
    padding-block-end: var(--space-xs);
    border-bottom: var(--border-width-m) solid var(--text-strong);
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    color: var(--text-muted);
}
.doc-visiting__row {
    padding-block: var(--space-s);
    border-bottom: var(--border-width-m) solid var(--tertiary-line);
}
.doc-visiting__row .doctor-avatar { inline-size: 4rem; }
.doc-visiting__row .doctor-avatar::after { width: 50%; height: 50%; }
.doc-visiting__name { font-weight: var(--weight-700); color: var(--text-strong); }
.doc-visiting__role { font-weight: var(--weight-600); color: var(--brand-on-soft); }

@media (max-width: 767px) {
    .doc-visiting__head { display: none; }
    .doc-visiting__row {
        grid-template-columns: 4rem 1fr;
        gap: var(--space-3xs) var(--space-s);
        align-items: start;
    }
    .doc-visiting__row .doctor-avatar { grid-row: span 3; }
}

/* A note with an icon, on the lowered surface. */
.doc-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-s);
    align-items: start;
    margin-top: var(--space-l);
    padding: var(--space-m) var(--space-l);
    background: var(--secondary-soft);
    color: var(--text);
}
.doc-note svg { inline-size: 1.625rem; block-size: 1.625rem; color: var(--brand-line); }
.doc-note p { margin: 0; }
.doc-note strong { color: var(--text-strong); }


/* ═══ Contact page (contact.html) ═══════════════════════════════════════
 * Contact cards and the opening hours, a quick guide, the after-hours block
 * (design option 1a), getting here with a map, and the message form. */

/* The design's sage washes: a light one for the contact cards and the quick
 * guide band, a stronger one for the 000 tile. Patterns built from the
 * tertiary fill over the page. In dark they fall back to Dials' own tertiary
 * soft tint, where the green labels keep 4.5:1. Text on them is the page's
 * own text tokens. */
:root, [data-dials], .is-light, .is-dark {
    --contact-wash: light-dark(color-mix(in oklab, var(--tertiary-solid) 14%, var(--surface)), var(--tertiary-soft));
    --contact-wash-hover: light-dark(color-mix(in oklab, var(--tertiary-solid) 24%, var(--surface)), color-mix(in oklab, var(--tertiary-solid) 6%, var(--tertiary-soft)));
    --contact-wash-strong: light-dark(color-mix(in oklab, var(--tertiary-solid) 28%, var(--surface)), var(--tertiary-soft));
}

.contact-hero__lede {
    max-width: 52rem;
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-weight: var(--weight-600);
    line-height: var(--leading-m);
    color: var(--tertiary-on-soft);
}

/* A plain section on the lowered surface, between the white ones. */
.contact-band {
    background: var(--secondary-soft);
    color: var(--text);
}
.contact-band--sage { background: var(--contact-wash); }

/* Details: the cards beside the navy hours panel. */
.contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl) var(--space-2xl);
    align-items: stretch;
}
.contact-details__main { flex: 2 1 36rem; min-inline-size: 0; }
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-s);
    margin-top: var(--space-l);
}
.contact-cards > li { display: flex; }
.contact-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    min-inline-size: 0;
    padding: var(--space-l);
    background: var(--contact-wash);
    color: var(--text);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out);
}
a.contact-card:hover { background: var(--contact-wash-hover); color: var(--text); }
.contact-card__icon { inline-size: 2rem; block-size: 2rem; margin-bottom: var(--space-3xs); color: var(--brand-line); }
.contact-card__label {
    color: var(--brand-on-soft);
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
}
.contact-card__value {
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-weight: var(--weight-600);
    line-height: var(--leading-s);
    color: var(--text-strong);
    overflow-wrap: anywhere;
}
a.contact-card:hover .contact-card__value { text-decoration: underline; text-decoration-thickness: var(--border-width-m); }
.contact-card__social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin-top: var(--space-2xs);
}
.contact-card__social a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    min-block-size: var(--target-min);
    padding: var(--space-3xs) var(--space-xs);
    background: var(--surface-raised);
    color: var(--text-strong);
    border: var(--border-width-m) solid var(--surface-raised);
    font-weight: var(--weight-700);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.contact-card__social a:hover { background: var(--contact-wash-hover); border-color: var(--tertiary-line); color: var(--link); }
.contact-card__social svg { inline-size: 1.375rem; block-size: 1.375rem; flex: none; color: var(--brand-line); }

.contact-hours-wrap {
    flex: 1 1 22rem;
    min-inline-size: 0;
    margin-inline-end: var(--space-l);
    margin-block-end: var(--space-l);
}
.contact-hours {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    block-size: 100%;
    padding: var(--space-xl) var(--space-l);
    background: var(--surface);
    color: var(--text);
}
.contact-hours__title {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin: 0;
    font-size: var(--size-2);
}
.contact-hours__title svg { inline-size: 1.75rem; block-size: 1.75rem; flex: none; color: var(--tertiary-line); }
.contact-hours__list { font-size: var(--size-0); border-top: var(--border-width-s) solid var(--border); }
.contact-hours__list .hours__row { padding-block: var(--space-xs); }
.contact-hours__note { margin: auto 0 0; font-size: var(--size--1); color: var(--text-muted); }

/* Quick guide: a two-column table of needs and the best way to meet them. */
.contact-guide {
    margin-top: var(--space-l);
    background: var(--surface-raised);
    color: var(--text);
}
.contact-guide__head,
.contact-guide__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: var(--space-2xs) var(--space-m);
    padding: var(--space-s) var(--space-l);
}
/* The head is a dark band (navy in light and dark), its labels in sage. */
.contact-guide__head {
    background: var(--surface);
    color: var(--tertiary-on-soft);
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
}
.contact-guide__list { margin: 0; }
.contact-guide__row { border-bottom: var(--border-width-s) solid var(--border); }
.contact-guide__row dt { font-weight: var(--weight-700); color: var(--text-strong); }
.contact-guide__row dd { margin: 0; color: var(--text); }
@media (max-width: 599px) {
    .contact-guide__head { display: none; }
    .contact-guide__row { grid-template-columns: 1fr; }
}

.contact-alert {
    display: flex;
    gap: var(--space-s);
    align-items: flex-start;
    margin-top: var(--space-m);
    padding: var(--space-m) var(--space-l);
    background: var(--surface-raised);
    color: var(--text-strong);
    border-inline-start: var(--border-width-l) solid var(--tertiary-line);
}
.contact-alert svg { inline-size: 1.625rem; block-size: 1.625rem; flex: none; color: var(--brand-line); }
.contact-alert p { margin: 0; }

/* After hours (design option 1a): a sage 000 tile beside a navy panel. */
.contact-ah { margin-inline-end: var(--space-l); margin-block-end: var(--space-l); }
.contact-ah__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.contact-ah__emergency {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-m);
    padding: var(--space-xl);
    background: var(--contact-wash-strong);
    color: var(--text-strong);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out);
}
.contact-ah__emergency:hover { background: var(--contact-wash-hover); color: var(--text-strong); }
.contact-ah__emergency .eyebrow { margin: 0; }
.contact-ah__000 {
    font-family: var(--font-heading);
    font-size: calc(var(--size-6) * 1.75);
    font-weight: var(--weight-700);
    line-height: var(--leading-xs);
    color: var(--text-strong);
}
.contact-ah__emergency:hover .contact-ah__000 { text-decoration: underline; text-decoration-thickness: var(--border-width-l); }
.contact-ah__emergency > span:last-child { font-weight: var(--weight-600); }
.contact-ah__panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    padding: var(--space-xl);
    background: var(--surface);
    color: var(--text);
}
.contact-ah__panel h2 { margin: 0; font-size: var(--size-3); }
.contact-ah__practice:empty { display: none; }
.contact-ah__call {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-m);
    padding-block: var(--space-s);
    border-block: var(--border-width-m) solid var(--tertiary-line);
    color: var(--text);
    text-decoration: none;
}
.contact-ah__call:hover { color: var(--text); }
.contact-ah__number {
    font-family: var(--font-heading);
    font-size: var(--size-4);
    font-weight: var(--weight-700);
    line-height: var(--leading-xs);
    color: var(--tertiary-line);
}
.contact-ah__call:hover .contact-ah__number { text-decoration: underline; text-decoration-thickness: var(--border-width-m); }
.contact-ah__hospitals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: var(--space-m);
}
.contact-ah__hospitals p { margin: 0; color: var(--text-strong); }
.contact-ah__hospitals .contact-ah__label { color: var(--text-muted); }

/* Finding us: notes with icons beside the map. */
.contact-finding > :last-child { margin-bottom: 0; }
.contact-finding__intro { font-size: var(--size-0); line-height: var(--leading-xl); color: var(--text); }
.contact-message__lede { margin-bottom: 0; font-size: var(--size-0); line-height: var(--leading-xl); color: var(--text); }
.contact-ways {
    display: grid;
    gap: var(--space-s);
    margin-block: var(--space-m) var(--space-l);
}
.contact-ways li {
    display: grid;
    grid-template-columns: 1.75rem 1fr;
    gap: var(--space-s);
    align-items: start;
}
.contact-ways svg { inline-size: 1.625rem; block-size: 1.625rem; color: var(--brand-line); }
.contact-ways p { margin: 0; }
.contact-ways strong { color: var(--text-strong); }
.contact-map { inline-size: 100%; }

/* Message: the intro with a photo beside the form. */

.contact-message__media {
    margin-top: var(--space-l);
    margin-inline-end: var(--space-l);
    margin-block-end: var(--space-l);
}
.contact-message__media > img { aspect-ratio: 16 / 10; object-position: 52% 38%; }
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
}
.contact-form__pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    gap: var(--space-m);
}
.contact-form label { font-size: var(--size--1); font-weight: var(--weight-600); color: var(--text-strong); }
.contact-form button[type="submit"] { align-self: flex-start; }
.contact-form__privacy { margin: 0; font-size: var(--size--1); color: var(--text-muted); }
.contact-form [data-mf-feedback] { margin-top: var(--space-m); padding: var(--space-s) var(--space-m); }
.contact-form [data-mf-feedback][data-status="success"] {
    background: var(--success-soft);
    color: var(--success-on-soft);
    border-inline-start: var(--border-width-l) solid var(--success-line);
}
.contact-form [data-mf-feedback][data-status="error"] {
    background: var(--danger-soft);
    color: var(--danger-on-soft);
    border-inline-start: var(--border-width-l) solid var(--danger-line);
}

/* ── Patient information and Patient resources ──────────────────────────
 * .pi-* is patient-information.html; .res-* is resources.html; .pr-* is
 * shared by both (breadcrumb, a navy call-out, a lead paragraph, the sage
 * tint, the cross's margin). */

/* The design's light sage panel: the raised surface washed with the sage
 * fill. Text on it keeps the plain text tokens (it stays near-white in light
 * and near-navy in dark). */
:root, .is-light, .is-dark {
    --pr-sage-tint: color-mix(in oklab, var(--surface-raised), var(--tertiary-solid) 15%);
}

/* Shared: a lead paragraph (the design sets these a touch above body). */
.pr-intro {
    font-size: var(--size-0);
    line-height: var(--leading-l);
    color: var(--text);
}
.pr-intro > :last-child { margin-bottom: 0; }

/* Shared: a note on the light sage panel. */
.pr-tint {
    padding: var(--space-s) var(--space-m);
    background: var(--pr-sage-tint);
    color: var(--text);
}

/* Shared: a bottom-right cross needs room beside and below its box. */
.pr-crossed {
    margin-inline-end: calc(var(--cross-size) / 3);
    margin-block-end: calc(var(--cross-size) / 3 + var(--space-xs));
}

/* Shared: a navy panel that is one big tel: link, number on the right. */
.pr-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s) var(--space-l);
    padding: var(--space-l) var(--space-l-xl);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out);
}
.pr-callout > span { max-width: 26rem; }
.pr-callout:hover { background: var(--surface-raised); color: var(--text); }
.pr-callout:hover .call-list__number { text-decoration: underline; text-decoration-thickness: var(--border-width-m); }
.pr-callout .call-list__number { white-space: nowrap; }

/* ── Patient information: a sticky "On this page" list beside the sections */
.pi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-m) var(--space-2xl-3xl);
    padding-block: var(--space-l) var(--space-2xl-3xl);
}
@media (min-width: 1024px) {
    .pi-layout {
        grid-template-columns: minmax(13rem, 17rem) minmax(0, 56rem);
        align-items: start;
    }
    .pi-toc {
        position: sticky;
        inset-block-start: var(--space-l);
        padding-block-start: var(--space-xl-2xl);
    }
}

.pi-toc__list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-inline-start: var(--border-width-m) solid var(--border);
}
.pi-toc__list a {
    display: flex;
    align-items: center;
    min-block-size: var(--target-min);
    margin-inline-start: calc(var(--border-width-m) * -1);
    padding: var(--space-3xs) 0 var(--space-3xs) var(--space-m);
    border-inline-start: var(--border-width-m) solid transparent;
    font-weight: var(--weight-600);
    line-height: var(--leading-m);
    color: var(--text-strong);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.pi-toc__list a:hover { color: var(--link); }
.pi-toc__list a[aria-current] {
    border-inline-start-color: var(--tertiary-line);
    color: var(--link);
    font-weight: var(--weight-700);
}

/* Each section: eyebrow, heading, then an even flow; a sage rule between. */
.pi-section {
    padding-block: var(--space-xl-2xl);
    scroll-margin-block-start: var(--space-l);
}
.pi-section + .pi-section { border-top: var(--border-width-m) solid var(--tertiary-line); }
.pi-section > * { margin-block: 0; }
.pi-section > * + * { margin-block-start: var(--space-m); }
.pi-section > .eyebrow + * { margin-block-start: var(--space-xs); }
.pi-section > .pr-crossed { margin-block-end: calc(var(--space-l) + var(--space-xs)); }
.pi-section h3 { font-size: var(--size-1); line-height: var(--leading-m); }
/* The design's text runs the full column: no prose measure here. */
.pi-section .prose { max-width: none; }

/* The GPs, as the design's row of name chips; each opens the GP's profile. */
.pi-gps ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    margin: 0;
    padding: 0;
    list-style: none;
}
.pi-gps a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding: var(--space-2xs) var(--space-s);
    border: var(--border-width-m) solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-strong);
    font-weight: var(--weight-700);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.pi-gps a:hover {
    border-color: var(--text-strong);
    background: var(--secondary-soft);
    color: var(--text-strong);
}

/* The grey GP panel under the chips: booking details from the app. */
.pi-gp-panel {
    padding: var(--space-l) var(--space-l-xl);
    background: var(--secondary-soft);
    color: var(--text);
}
.pi-gp-panel > * { margin-block: 0; }
.pi-gp-panel > * + * { margin-block-start: var(--space-xs); }
.pi-gp-panel .button-row { align-items: center; margin-block-start: var(--space-s); }
.pi-gp-panel__call {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding-inline: var(--space-xs);
    font-weight: var(--weight-700);
}

/* The new-patient status, from the app. */
.pi-status {
    display: inline-block;
    padding: var(--space-3xs) var(--space-s);
    background: var(--tertiary-soft);
    color: var(--tertiary-on-soft);
    font-family: var(--font-heading);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
}

.pi-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: var(--space-m);
    padding: 0;
    list-style: none;
}
.pi-section > .pi-cols--wide { gap: var(--space-l) var(--space-xl); margin-block-start: var(--space-l); }
.pi-col > * { margin-block: 0; }
.pi-col > * + * { margin-block-start: var(--space-m); }

/* Lists with the logo's cross as the bullet, in the brand green. */
.pi-ticks,
.pi-section .prose ul {
    display: grid;
    gap: var(--space-xs);
    margin: 0;
    padding: 0;
    list-style: none;
}
.pi-ticks li,
.pi-section .prose ul li {
    display: grid;
    grid-template-columns: 0.75rem minmax(0, 1fr);
    gap: var(--space-xs);
    align-items: start;
    margin: 0;
}
.pi-ticks li::before,
.pi-section .prose ul li::before {
    content: "";
    inline-size: 0.75rem;
    block-size: 0.75rem;
    margin-block-start: var(--space-2xs);
    background: var(--brand-line);
    clip-path: polygon(33.3% 0, 66.6% 0, 66.6% 33.3%, 100% 33.3%, 100% 66.6%, 66.6% 66.6%, 66.6% 100%, 33.3% 100%, 33.3% 66.6%, 0 66.6%, 0 33.3%, 33.3% 33.3%);
}

/* The design's ruled tables: a heavy rule under the column labels, a quiet
 * rule under each row. */
.pi-table {
    inline-size: 100%;
    border-collapse: collapse;
}
.pi-table td {
    padding: var(--space-s) var(--space-s) var(--space-s) 0;
    border-bottom: var(--border-width-s) solid var(--border);
    vertical-align: top;
    color: var(--text-strong);
}
.pi-table td + td { color: var(--text); }
.pi-table :is(th, td):last-child { padding-inline-end: 0; }
.pi-table th:first-child:not(:last-child),
.pi-table td:first-child:not(:last-child) { inline-size: 58%; }
.pi-note-line { font-size: var(--size--1); }

/* The facility-fee procedures: the table's ruled rows, in two columns where
 * there is room (no amounts, so no fee column). */
.pi-rows__head,
.pi-table th {
    margin: 0;
    padding: 0 var(--space-s) var(--space-xs) 0;
    border-bottom: var(--border-width-m) solid var(--text-strong);
    font-family: var(--font-heading);
    font-size: var(--size--2);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-xl);
    text-transform: uppercase;
    text-align: start;
    color: var(--text-muted);
}
.pi-rows ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    column-gap: var(--space-xl);
    margin: 0;
    padding: 0;
    list-style: none;
}
.pi-rows li {
    padding-block: var(--space-s);
    border-bottom: var(--border-width-s) solid var(--border);
    color: var(--text-strong);
}
.pi-small { font-size: var(--size--1); }

.pi-lead-in { font-weight: var(--weight-600); color: var(--text-strong); }
.pi-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-m) var(--space-l);
    border: var(--border-width-m) solid var(--tertiary-line);
}
.pi-section .pi-contact h3 { margin: 0 0 var(--space-3xs); font-size: var(--size-0); font-family: var(--font-body); font-weight: var(--weight-700); }
.pi-contact a { display: inline-flex; align-items: center; min-block-size: var(--target-min); }

/* The patient privacy policy behind a disclosure; the summary is a button. */
.pi-policy > summary {
    inline-size: fit-content;
    list-style: none;
    cursor: pointer;
}
.pi-policy > summary::-webkit-details-marker { display: none; }
.pi-policy__body {
    margin-block-start: var(--space-m);
    padding-inline-start: var(--space-m);
    border-inline-start: var(--border-width-m) solid var(--tertiary-line);
}

.pi-note {
    padding: var(--space-l) var(--space-l-xl) var(--space-xl);
    background: var(--secondary-soft);
    color: var(--text);
}
.pi-note > * { margin-block: 0; }
.pi-note > * + * { margin-block-start: var(--space-xs); }
.pi-note a { display: inline-flex; align-items: center; min-block-size: var(--target-min); font-weight: var(--weight-700); }

/* ── Patient resources ───────────────────────────────────────────────── */
.page-hero .res-lede { max-width: 56rem; }

.res-emergency { padding-block-start: var(--space-l); }
.res-emergency__link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    min-block-size: var(--target-min);
    padding: var(--space-s) var(--space-m);
    border: var(--border-width-m) solid var(--tertiary-line);
    font-weight: var(--weight-700);
    color: var(--text-strong);
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-out);
}
.res-emergency__link:hover { background: var(--pr-sage-tint); color: var(--text-strong); }
.res-emergency__link svg { inline-size: 1.5rem; block-size: 1.5rem; flex: none; color: var(--brand-line); }

.res-fv .section-intro { align-items: flex-start; }

/* Quick exit: the design's navy button with a sage icon. */
.res-exit {
    gap: var(--space-2xs);
    background: var(--surface);
    color: var(--text-strong);
}
.res-exit:hover { background: var(--surface-raised); color: var(--text-strong); }
.res-exit svg { inline-size: 1.375rem; block-size: 1.375rem; flex: none; color: var(--tertiary-line); }

.res-fv-intro { margin-block-end: var(--space-l); align-items: center; }
.res-fv-intro .pr-intro { margin: 0; }
.res-fv-intro .pr-callout { padding: var(--space-m) var(--space-l); }

.res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: var(--space-m);
}
.res-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }

/* Family violence panels sit on the light sage tint; health-link panels are
 * white cards on the lowered band. */
.res-panel {
    padding: var(--space-l);
    background: var(--pr-sage-tint);
    color: var(--text);
}
.res-panel--raised { background: var(--surface-raised); color: var(--text); }

.res-panel__head { display: flex; align-items: center; gap: var(--space-xs); }
.res-panel__head h3 { margin: 0; font-size: var(--size-1); line-height: var(--leading-m); color: var(--text-strong); }
.res-panel__head svg { inline-size: 1.75rem; block-size: 1.75rem; flex: none; color: var(--brand-line); }
.res-panel__note { margin: var(--space-3xs) 0 0; font-size: var(--size--1); }

.res-list { margin: var(--space-2xs) 0 0; padding: 0; list-style: none; }
.res-list li {
    display: flex;
    flex-direction: column;
    padding-block: var(--space-xs);
    border-bottom: var(--border-width-s) solid var(--border);
}
.res-list li > a,
.res-list__row > a:first-child {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-block-size: var(--target-min);
    font-weight: var(--weight-700);
}
/* On the sage panels the service names are ink, as in the design. */
.res-panel:not(.res-panel--raised) .res-list__row > a:first-child { color: var(--text-strong); }
.res-panel:not(.res-panel--raised) .res-list__row > a:first-child:hover { color: var(--link); }
.res-list p { margin: 0; font-size: var(--size--1); line-height: var(--leading-l); }
.res-list__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 var(--space-s);
}
.res-list__phone {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    font-family: var(--font-heading);
    font-size: var(--size-1);
    font-weight: var(--weight-700);
    white-space: nowrap;
    text-decoration: none;
    color: var(--link);
}
.res-list__phone:hover { text-decoration: underline; color: var(--link-hover); }

.res-behaviour {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s) var(--space-xl);
    margin-block-start: var(--space-l);
    padding: var(--space-m) var(--space-l);
    border: var(--border-width-m) solid var(--border);
}
.res-behaviour__text { flex: 1 1 20rem; }
.res-behaviour__text h3 { margin: 0 0 var(--space-3xs); font-size: var(--size-1); }
.res-behaviour__text p { margin: 0; }
.res-behaviour__phone { font-size: var(--size-2); }

/* The travel band: the design's lighter signage navy, a sage plane icon. */
.res-travel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-m) var(--space-xl);
    margin-block-start: var(--space-l);
    padding: var(--space-l) var(--space-l-xl);
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
.res-travel__text { display: flex; align-items: flex-start; gap: var(--space-s); flex: 1 1 24rem; max-width: 52rem; }
.res-travel__text svg { inline-size: 1.75rem; block-size: 1.75rem; flex: none; color: var(--tertiary-line); }
.res-travel p { margin: 0; }
.res-travel strong { color: inherit; }

/* In dark mode the page is the same navy as these is-dark boxes: a quiet
 * edge keeps them visible there (and barely shows on the light page). */
.pr-callout,
.res-exit { border: var(--border-width-s) solid var(--border); }

/* ── Homepage service cards ────────────────────────────────────────────────
 * The design's eight cards, hand-written on the homepage (see the comment in
 * index.html): navy cards, a sage icon, the title and one line of copy. */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-l) var(--space-m);
}
.service-card {
    display: flex;
    flex-direction: column;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
/* The design's 3:2 photo across the top of each card. */
.service-card__photo {
    inline-size: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
.service-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    padding: var(--space-m) var(--space-m) var(--space-l);
}
.service-card__icon {
    inline-size: 2.5rem;
    block-size: 2.5rem;
    margin-bottom: var(--space-xs);
    color: var(--tertiary-solid);
}
.service-card h3 {
    margin: 0;
    font-size: var(--size-0);
    line-height: var(--leading-m);
    color: inherit;
}
.service-card p { margin: 0; font-size: var(--size--1); }
@media (prefers-reduced-motion: no-preference) {
    .service-card { transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
    .service-card:hover { transform: translateY(calc(var(--space-3xs) * -1)); box-shadow: var(--shadow-m); }
}

/* A doctor without a photo: the design's navy circle with their initials. */
.initials-avatar-wrap { display: block; inline-size: 100%; max-inline-size: 9.75rem; }
.initials-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: var(--radius-round);
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    font-family: var(--font-heading);
    font-size: var(--size-4);
    font-weight: var(--weight-700);
}
.doctor-roll__item .doctor-avatar img { border-radius: var(--radius-round); }
.visiting__photo {
    inline-size: 4rem;
    block-size: 4rem;
    border-radius: var(--radius-round);
    object-fit: cover;
    background: var(--secondary-soft);
}
.site-footer__brand .btn { font-size: var(--size--1); }

/* about-services: literal-design pass (merged into style.css by the lead) */

/* ── About ─────────────────────────────────────────────────────────────── */
/* Our story: the design's four paragraphs, a step up from body text. */
.about-story__copy p { font-size: var(--size-0); }

/* ── Services ──────────────────────────────────────────────────────────── */
/* GP services: the design's eight cards, two across: a 16:9 photo, then a
 * signage-navy panel (an .is-dark card, as the page hero) with the sage icon in its own
 * column beside the title, the copy and, on one card, a link. */
.svc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 32rem), 1fr));
    gap: var(--space-m);
    margin: 0;
    padding: 0;
    list-style: none;
}
.svc-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
@media (prefers-reduced-motion: no-preference) {
    .svc-card { transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
    .svc-card:hover { transform: translateY(calc(var(--space-3xs) * -1)); box-shadow: var(--shadow-m); }
}
.svc-card__photo {
    display: block;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 50% 40%;
}
.svc-card__body {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    gap: var(--space-xs) var(--space-m);
    align-items: start;
    padding: var(--space-l);
}
.svc-card__icon {
    grid-row: span 3;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    color: var(--tertiary-line);
}
.svc-card h3 {
    grid-column: 2;
    margin: 0;
    font-size: var(--size-1);
    line-height: var(--leading-m);
    color: var(--text-strong);
}
.svc-card p {
    grid-column: 2;
    margin: 0;
    color: var(--text);
}
.svc-card__link {
    grid-column: 2;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
    letter-spacing: var(--tracking-l);
    text-transform: uppercase;
    color: var(--tertiary-on-soft);
}
.svc-card__link:hover { color: var(--text-strong); }


/* doctors-contact: literal-design pass (merged into style.css by the lead) */

/* ── Doctors page: the design's text written in ─────────────────────────── */
.doc-profile__para { margin: 0; line-height: var(--leading-xl); }
/* The "coming soon" note is written in only where the design shows it. */
.doc-profile__soon { display: block; }
/* A doctor's own billing note, ruled in sage. */
.doc-profile__note {
    margin: 0;
    padding: var(--space-3xs) 0 var(--space-3xs) var(--space-s);
    border-inline-start: var(--border-width-l) solid var(--tertiary-line);
    color: var(--text-strong);
    font-size: var(--size--1);
}
/* Interests: one chip each. */
.doc-profile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
    align-self: stretch;
    margin: 0;
    padding: 0;
    background: none;
    list-style: none;
}
.doc-profile__chips li {
    margin: 0;
    padding: var(--space-3xs) var(--space-xs);
    background: var(--secondary-soft);
    color: var(--text-strong);
}
/* A doctor with no photo: their initials on the navy avatar, as the design. */
.doc-initials {
    color: var(--secondary-on-solid);
    font-family: var(--font-heading);
    font-weight: var(--weight-700);
    font-size: var(--size-5);
    line-height: var(--leading-xs);
}
.doc-initials::after { content: none; }
.doc-jump__link .doc-initials { font-size: var(--size--2); }
/* A visiting practitioner with no photo shows the practice's circle logo on
 * the light grey of the design, not the navy fallback. */
.doc-avatar-logo {
    background: var(--secondary-soft);
    color: var(--text);
}
.doc-avatar-logo::after { content: none; }

/* patient-resources: literal-design pass (merged into style.css by the lead) */

/* ── Patient information: the design's per-GP billing selector ───────────
 * A row of GP names (tabs, revealed by the page's script) over one grey
 * panel per GP. Without script the tabs stay hidden and the panels stack.
 * Replaces .pi-gps, .pi-gp-panel, .pi-gp-panel__call, .pi-status and
 * .pi-rows* in style.css, which no page uses any more. */
.pi-gp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xs);
}
.pi-gp-tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    padding: var(--space-2xs) var(--space-s);
    border: var(--border-width-m) solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-strong);
    font-family: var(--font-body);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
    line-height: var(--leading-s);
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.pi-gp-tabs [role="tab"]:hover {
    border-color: var(--text-strong);
    background: var(--secondary-soft);
    color: var(--text-strong);
}
.pi-gp-tabs [role="tab"][aria-selected="true"] {
    border-color: var(--secondary-solid);
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}

.pi-gp-panels > .pi-gp + .pi-gp { margin-block-start: var(--space-s); }
.pi-gp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-m) var(--space-l);
    padding: var(--space-l) var(--space-l-xl);
    background: var(--secondary-soft);
    color: var(--text);
}
.pi-gp[hidden] { display: none; }
.pi-gp__photo,
.pi-gp__initials {
    flex: none;
    inline-size: 7rem;
    block-size: 7rem;
    border-radius: var(--radius-round);
}
.pi-gp__photo {
    display: block;
    object-fit: cover;
    background: var(--surface-raised);
}
/* Dr Theophilos has no photo: the design's navy initials circle. */
.pi-gp__initials {
    display: grid;
    place-items: center;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    font-family: var(--font-heading);
    font-size: var(--size-3);
    font-weight: var(--weight-700);
}
.pi-gp__text { flex: 1 1 17rem; min-inline-size: 0; }
.pi-gp__text > * { margin-block: 0; }
.pi-gp__text > * + * { margin-block-start: var(--space-2xs); }
.pi-gp__text > a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    font-size: var(--size--1);
    font-weight: var(--weight-700);
}
.pi-gp__note {
    padding: var(--space-3xs) 0 var(--space-3xs) var(--space-s);
    border-inline-start: var(--border-width-l) solid var(--tertiary-line);
    color: var(--text-strong);
}

/* ── Patient information: the price tables ───────────────────────────────
 * The amount column sits on the right, bold, in tabular figures. */
.pi-table--fees th:last-child,
.pi-table--prices th:last-child { text-align: end; }
.pi-table--fees td:last-child,
.pi-table--prices td:last-child {
    text-align: end;
    font-weight: var(--weight-700);
    font-variant-numeric: tabular-nums;
    color: var(--text-strong);
}
.pi-table--fees th:first-child,
.pi-table--fees td:first-child { inline-size: auto; }
.pi-table--prices th:first-child,
.pi-table--prices td:first-child { inline-size: 53%; }
.pi-table--prices th:last-child,
.pi-table--prices td:last-child { inline-size: 4.5rem; white-space: nowrap; }

/* Shared tweaks after the literal-design pass. */
.page-hero__more { font-size: var(--size-0); }
/* One accreditation card on its own does not stretch the full page width. */
.about-certs:has(> :only-child) { max-width: 36rem; }
/* Visiting practitioners' names link to their information sheet. */
a.visiting__name, .doc-visiting__name a { color: var(--text-strong); text-decoration: underline; text-underline-offset: 0.2em; }
a.visiting__name:hover, .doc-visiting__name a:hover { color: var(--link); }

/* The sage CTA, exactly as the design: #9CCB9A with navy (#1F3445) text,
 * #B7DBB5 on hover, on every ground. A navy band works its tokens out in the
 * dark scheme, which lifts the fill and turns its text black; the button
 * keeps the light scheme for itself, so the sage is the dial's own colour
 * and the text is the ink. */
.btn--primary.is-tertiary,
.on-dark .btn--primary.is-tertiary {
    color-scheme: light;
    /* the design's hover: the sage, 30% towards the page */
    --cta-hover: color-mix(in oklab, var(--tertiary-solid), var(--surface) 30%);
    background: var(--tertiary-solid);
    color: var(--neutral-solid);
}
.btn--primary.is-tertiary:hover,
.on-dark .btn--primary.is-tertiary:hover {
    background: var(--cta-hover);
    color: var(--neutral-solid);
}

/* ── Hover effects, as the design ──────────────────────────────────────── */
/* Phone numbers and emergency numbers never underline: the row or card
 * changes colour instead. */
.call-list a:hover .call-list__number,
a.contact-card:hover .contact-card__value,
.contact-ah__emergency:hover .contact-ah__000,
.contact-ah__call:hover .contact-ah__number,
.pr-callout:hover .call-list__number,
.res-list__phone:hover { text-decoration: none; }
.call-list a:hover .call-list__number { color: var(--tertiary-on-soft); }
.call-list a:hover .call-list__number--sage { color: var(--text-strong); }

/* Cards lift 6px with a soft, long shadow, over the design's 0.4s. */
:root {
    --lift-distance: calc(var(--space-3xs) * -1.25);
    --lift-shadow: 0 var(--space-m) var(--space-l) calc(var(--space-m) * -1) var(--shadow-color);
}
@media (prefers-reduced-motion: no-preference) {
    .quick__item, .doctor-roll__item, .visiting__card, .service-card, .svc-card, .about-cert, .lift {
        transition: transform var(--duration-slow) var(--ease-out),
                    box-shadow var(--duration-slow) var(--ease-out),
                    background-color var(--duration-base) var(--ease-out),
                    color var(--duration-base) var(--ease-out);
    }
    .quick__item:hover, .doctor-roll__item:hover, .visiting__card:hover,
    .service-card:hover, .svc-card:hover, .about-cert:hover, .lift:hover {
        transform: translateY(var(--lift-distance));
        box-shadow: var(--lift-shadow);
    }
}

/* The Patient information menu opens as a white panel on desktop, its rows
 * grey with green text on hover, as the design. */
@media (min-width: 1400px) {
    .site-nav__sub {
        color-scheme: light;
        background: var(--surface);
        color: var(--text-strong);
    }
    .site-nav__sub a { color: var(--text-strong); }
    .site-nav__sub a:hover { background: var(--secondary-soft); color: var(--brand-on-soft); }
}

/* Footer social buttons fill sage with a navy icon. */
.site-footer__social a:hover {
    color-scheme: light;
    background: var(--tertiary-solid);
    border-color: var(--tertiary-solid);
    color: var(--neutral-solid);
}

/* Quick exit darkens to the deepest navy. */
.res-exit:hover {
    --navy-deep: color-mix(in oklab, var(--surface), black 15%);
    background: var(--navy-deep);
}

/* The contact form sits in a light green panel (#F0F5F0, the sage's soft
 * tint) with a sage rule across the top; the white fields stand out on it.
 * Body text stays --text, which holds 4.5:1 on every soft tint. */
.contact-form {
    padding: var(--space-l-xl);
    background: var(--tertiary-soft);
    color: var(--text);
    border-top: var(--border-width-l) solid var(--tertiary-line);
}

/* ── Text sizes, measured against the design (2026-11) ─────────────────────
 * Long paragraphs (About's story, the values intro, the second hero
 * paragraph) are body size, not lede size: the design sets them at 20px, a
 * hair over body. Card and list copy is body size too (the design's
 * 17–18px), never the small step; only notes and chips stay small. */
.values__intro .lede { font-size: var(--size-0); }
.service-card__body p,
.about-cert__body p,
.accredited p,
.visiting__body,
.doc-profile__note,
.pi-note-line,
.res-list p { font-size: var(--size-0); }

/* Inner-page heroes: a large sage cross on the right, faint, so the navy band
 * isn't plain. Drawn with clip-path (no markup, no image), cut off by the
 * band's right edge, and behind the text. Decoration only. */
.page-hero { position: relative; overflow: hidden; isolation: isolate; }
.page-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block-start: 50%;
    inset-inline-end: -4rem;
    inline-size: min(26rem, 60vw);
    aspect-ratio: 1;
    translate: 0 -50%;
    background: var(--tertiary-solid);
    opacity: 0.12;
    clip-path: polygon(33.333% 0, 66.667% 0, 66.667% 33.333%, 100% 33.333%, 100% 66.667%, 66.667% 66.667%, 66.667% 100%, 33.333% 100%, 33.333% 66.667%, 0 66.667%, 0 33.333%, 33.333% 33.333%);
    pointer-events: none;
}
@media (max-width: 767px) {
    .page-hero::after { inset-inline-end: -6rem; opacity: 0.08; }
}

/* Quick actions: four across on desktop, two by two on tablets, one column
 * on phones; never three and a lone fourth. */
.quick__grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .quick__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .quick__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── Website privacy and terms: the Patient information layout ──────────
 * "On this page" on the left (sticky on desktop), the policy beside it,
 * aligned with the page heading; headings land below the top when jumped to. */
.legal-section { padding-block-start: 0; }
.legal { max-inline-size: 48rem; margin: 0; padding-block-start: var(--space-xl-2xl); }
.legal > :first-child { margin-block-start: 0; }
.legal .lede { font-size: var(--size-0); font-weight: var(--weight-600); color: var(--text-strong); }
.legal h2 {
    scroll-margin-block-start: var(--space-l);
    margin-block-start: var(--space-xl);
    padding-block-start: var(--space-l);
    border-top: var(--border-width-s) solid var(--border);
}
@media (max-width: 1023px) {
    .legal-layout .pi-toc { padding-block-start: var(--space-l); }
}

/* ── Emergency panels on hover ─────────────────────────────────────────────
 * Each panel shifts within its own colour, never to grey: navy panels to a
 * brighter signage blue (the design's #2E4E66), sage panels to a deeper sage
 * (the design's #D9E9D8). The after-hours rows get the same navy shift, each
 * row padded out to the box's edges so the colour fills it evenly. */
:root {
    /* the signage navy, lifted a touch: #2E4E66 */
    --navy-hover: oklch(from var(--secondary-solid) calc(l + 0.04) calc(c * 1.08) h);
    /* the sage wash, deepened: #D9E9D8 */
    --sage-hover: color-mix(in oklab, var(--tertiary-solid) 38%, var(--paper-light));
}
.call-list a {
    margin-inline: calc(var(--space-s) * -1);
    padding-inline: var(--space-s);
    transition: background-color var(--duration-base) var(--ease-out);
}
.call-list a:hover { background: var(--navy-hover); color: var(--text); }
.pr-callout { transition: background-color var(--duration-base) var(--ease-out); }
.pr-callout:hover { background: var(--navy-hover); color: var(--text); }
.contact-ah__emergency { transition: background-color var(--duration-base) var(--ease-out); }
.contact-ah__emergency:hover { background: var(--sage-hover); color: var(--text-strong); }

/* Health links: three across on desktop at every width, so the five boxes
 * are always two rows (three, then Cancer and screening and Travel). */
@media (min-width: 1100px) {
    .res-grid--links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── Services: GP service tiles (Option B from the review, 2026-11) ───────
 * A photo fills each tile; the navy title bar (icon, title, count) slides up
 * over it to show the full list on hover or keyboard focus where there is a
 * pointer, and on tap (the bar is a button; script in services.html). Every
 * bar is one height, title and count centred in it. */
.svc-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
    gap: var(--space-m);
    margin: 0;
    padding: 0;
    list-style: none;
}
.svc-tile {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
.svc-tile > img {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}
.svc-tile__panel {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    max-block-size: 100%;
    overflow: auto;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
.svc-tile__head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 var(--space-xs);
    align-items: center;
    align-content: center;
    inline-size: 100%;
    /* room for a two-line title and the count, so every bar is one height */
    min-block-size: calc(var(--space-s) * 2 + var(--size-1) * var(--leading-s) * 2 + var(--size--1) * var(--leading-m) + var(--space-3xs));
    padding: var(--space-s) var(--space-m);
    border: 0;
    background: none;
    font: inherit;
    text-align: start;
    color: inherit;
    cursor: pointer;
}
.svc-tile__head svg { grid-row: span 2; inline-size: 1.75rem; block-size: 1.75rem; color: var(--tertiary-line); }
.svc-tile__title { font-family: var(--font-heading); font-weight: var(--weight-700); font-size: var(--size-1); line-height: var(--leading-s); }
.svc-tile__count { font-size: var(--size--1); color: var(--text-muted); }

/* The list grows from 0fr to 1fr rows; padding sits inside the inner
 * wrapper's last child so a closed tile shows nothing of it. */
.svc-reveal {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows var(--duration-slow) var(--ease-out);
}
.svc-reveal__inner { min-block-size: 0; overflow: hidden; padding-inline: var(--space-m); }
.svc-reveal__inner > :last-child { margin: 0; padding-block-end: var(--space-m); }
.svc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-3xs); }
.svc-list li { display: flex; gap: var(--space-2xs); align-items: baseline; }
.svc-list li::before {
    content: "";
    flex: none;
    inline-size: 0.6em;
    aspect-ratio: 1;
    background: var(--tertiary-line);
    clip-path: polygon(33.333% 0, 66.667% 0, 66.667% 33.333%, 100% 33.333%, 100% 66.667%, 66.667% 66.667%, 66.667% 100%, 33.333% 100%, 33.333% 66.667%, 0 66.667%, 0 33.333%, 33.333% 33.333%);
}
.svc-reveal__inner > .svc-list:not(:last-child) { margin-block-end: var(--space-s); }
.svc-tile__link { display: inline-block; font-size: var(--size--1); font-weight: var(--weight-700); color: var(--tertiary-on-soft); }
.svc-tile__link:hover { color: var(--text-strong); }

.svc-tile.is-open .svc-reveal { grid-template-rows: 1fr; }
@media (hover: hover) {
    .svc-tile:hover .svc-reveal,
    .svc-tile:focus-within .svc-reveal { grid-template-rows: 1fr; }
}
@keyframes svc-item-in { from { opacity: 0; transform: translateY(var(--space-2xs)); } }
@media (prefers-reduced-motion: no-preference) {
    .svc-tile.is-open .svc-list li { animation: svc-item-in var(--duration-slow) var(--ease-out) both; animation-delay: calc(60ms * var(--i) - 4ms * var(--i) * var(--i)); }
    .svc-tile:hover > img, .svc-tile:focus-within > img, .svc-tile.is-open > img { transform: scale(1.05); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .svc-tile:hover .svc-list li,
    .svc-tile:focus-within .svc-list li { animation: svc-item-in var(--duration-slow) var(--ease-out) both; animation-delay: calc(60ms * var(--i) - 4ms * var(--i) * var(--i)); }
}
@media (prefers-reduced-motion: reduce) {
    .svc-reveal, .svc-tile > img { transition: none; }
}
/* Phones: square tiles, which still fit the longest list, so the section
 * isn't eight screens long. */
@media (max-width: 559px) { .svc-tile { aspect-ratio: 1; } }
@media (max-width: 389px) { .svc-tile { aspect-ratio: 3 / 4; } }

/* Patient information columns: space between a heading and the list or
 * paragraph under it (the lists' own margin: 0 otherwise wins). */
.pi-col > :is(h2, h3) + * { margin-block-start: var(--space-s); }

/* Complaints contacts: an icon per line (phone, email, website), no
 * underline, a tighter card. Each line keeps the 44px tap height. */
.pi-contact { padding: var(--space-s) var(--space-m); }
.pi-contact h3 { margin: 0 0 var(--space-3xs); }
.pi-contact__lines { margin: 0; padding: 0; list-style: none; }
.pi-contact__lines li { display: flex; align-items: center; gap: var(--space-xs); }
.pi-contact__lines svg { flex: none; inline-size: 1.125rem; block-size: 1.125rem; color: var(--tertiary-line); }
.pi-contact__lines a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-min);
    color: var(--text-strong);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color var(--duration-base) var(--ease-out);
}
.pi-contact__lines a:hover { color: var(--link); }

/* About values: intro and the three values on the left, the photo on the
 * right, filling the column's height (stacked under them on phones). */
.values .split { align-items: stretch; }
.values__intro .values__list { margin-block-start: var(--space-l); }
.about-values__media--side { margin-top: 0; display: flex; }
.about-values__media--side .about-values__slot { flex: 1; min-block-size: 18rem; aspect-ratio: auto; }

/* Health links: a photo slot completing the last row (three across: 3 + 3;
 * two across: 2 + 2 + 2). Until there is a photo it is a navy panel with a
 * large, faint sage cross. Hidden when the boxes stack one per row. */
.res-photo {
    position: relative;
    overflow: hidden;
    min-block-size: 14rem;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
}
.res-photo::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    inline-size: 60%;
    aspect-ratio: 1;
    translate: -50% -50%;
    background: var(--tertiary-solid);
    opacity: 0.18;
    clip-path: polygon(33.333% 0, 66.667% 0, 66.667% 33.333%, 100% 33.333%, 100% 66.667%, 66.667% 66.667%, 66.667% 100%, 33.333% 100%, 33.333% 66.667%, 0 66.667%, 0 33.333%, 33.333% 33.333%);
}
img.res-photo { inline-size: 100%; block-size: 100%; object-fit: cover; }
/* Explicit columns, so the slot always completes a row: one column below
 * 720px (slot hidden), two to 1099px, three from 1100px. */
.res-grid--links { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 719px) { .res-photo { display: none; } }
@media (min-width: 720px) { .res-grid--links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .res-grid--links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Values on phones: a narrower number column, so the text gets the width. */
@media (max-width: 559px) {
    .values__list > li { grid-template-columns: 2.75rem 1fr; gap: var(--space-3xs) var(--space-s); }
}

/* Patient information's after-hours box: the homepage's box, tightened to
 * sit in a page section (less padding, a smaller gap, slimmer number rows). */
.pi-section .after-hours__box { grid-template-columns: minmax(0, 1fr); padding: var(--space-l) var(--space-l-xl); gap: var(--space-s); }
.pi-section .after-hours__box .call-list a { padding-block: var(--space-s); }
.pi-section > .pr-crossed:last-child { margin-block-end: var(--space-m); }

/* ── Visiting practitioners ───────────────────────────────────────────────
 * Doctors page: in the GPs' profile layout, with their consulting days. */
.doc-profile__when { margin: 0; color: var(--text); }
.doc-profile__when strong { color: var(--text-strong); }

/* Homepage: the whole card is the link (the information sheet, or the
 * profile where there is none); the card tints and lifts on hover. */
a.visiting__card {
    color: var(--text);
    text-decoration: none;
    transition: background-color var(--duration-base) var(--ease-out), transform var(--duration-slow) var(--ease-out), box-shadow var(--duration-slow) var(--ease-out);
}
a.visiting__card:hover { background: var(--tertiary-soft); color: var(--text); }
a.visiting__card:hover .visiting__name { color: var(--brand-on-soft); }
.visiting__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-solid);
    color: var(--secondary-on-solid);
    font-family: var(--font-heading);
    font-weight: var(--weight-700);
    font-size: var(--size-0);
}

/* Fees: the visiting practitioners' tabs carry their role, and each panel
 * says what they do and when. */
.pi-gp-tabs__role { margin-inline-start: var(--space-3xs); font-weight: var(--weight-400); color: var(--text-muted); }
[aria-selected="true"] > .pi-gp-tabs__role { color: inherit; }
.pi-gp__role { margin: 0; font-weight: var(--weight-600); color: var(--brand-on-soft); }
/* Each card fills its grid cell, so a row's cards are one height. */
.visiting__grid { grid-auto-rows: 1fr; }
.visiting__grid > li { display: flex; }
.visiting__grid > li > .visiting__card { flex: 1; }

/* Phones: the hero's cross at 72px (the desktop size is set later in the
 * file than the shared phone rule, so it is restated here). */
@media (max-width: 767px) {
    .hero__media > .cross { --cross-size: 4.5rem; }
    .hero__media { padding: 0 0 var(--space-m) var(--space-m); }
}

/* ── Icons instead of numbers ─────────────────────────────────────────────
 * "How can we help today?": a line icon in a sage square, where "01" was. */
.quick__item::before { content: none; }
.quick__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    background: var(--tertiary-soft);
    color: var(--brand-on-soft);
}
.quick__icon svg { inline-size: 1.5rem; block-size: 1.5rem; }

/* Values (homepage and About): a sage line icon where the number was. */
.values__list > li::before { content: none; }
.values__list > li { grid-template-columns: 3rem 1fr; }
.values__icon { grid-row: span 2; color: var(--tertiary-line); }
.values__icon svg { inline-size: 2.25rem; block-size: 2.25rem; }
@media (max-width: 559px) {
    .values__list > li { grid-template-columns: 2.5rem 1fr; }
    .values__icon svg { inline-size: 1.75rem; block-size: 1.75rem; }
}

/* Homepage values: the intro and the values on the left, the photo right. */
.values .values__intro > .values__list { margin-block-start: var(--space-l); }
.values .split > .values__media { margin-top: 0; }

/* About values: the consultation photo fills the right-hand column. */
.about-values__photo { flex: 1; inline-size: 100%; min-block-size: 18rem; object-fit: cover; object-position: 15% 50%; /* keep both the patient and the GP in frame */ }

/* Doctors page introduction: room under the heading, a body-like line
 * height, and space before the "Jump to a GP" panel. */
.doc-hero__intro { margin-block: var(--space-m) var(--space-l); }
.doc-hero__intro .lede { line-height: var(--leading); }

/* GP service tiles: a gentler open. The panel rises over 0.6s on an
 * in-out ease (the shared ease-out did most of the move in its first
 * frames, which read as a jump); the list fades in as it rises; a hover
 * waits a moment before opening, so passing the mouse over a row of tiles
 * doesn't flick them open; the photo zooms less, as slowly. */
.svc-tiles {
    --svc-open: calc(var(--duration-slow) * 1.75);   /* 0.7s */
    --svc-wait: var(--duration-fast);
    /* the browser's own in-out: gentler than the template's steep curve,
     * which crowded the movement into a fifth of a second */
    --svc-ease: ease-in-out;
}
.svc-reveal { transition: grid-template-rows var(--svc-open) var(--svc-ease); }
.svc-reveal__inner { opacity: 0; transition: opacity var(--svc-open) var(--svc-ease); }
.svc-tile.is-open .svc-reveal__inner { opacity: 1; }
@media (hover: hover) {
    .svc-tile:hover .svc-reveal,
    .svc-tile:hover .svc-reveal__inner { transition-delay: var(--svc-wait); }
    .svc-tile:hover .svc-reveal__inner,
    .svc-tile:focus-within .svc-reveal__inner { opacity: 1; }
}
.svc-tile > img { transition: transform calc(var(--svc-open) * 1.5) var(--svc-ease); }
@media (prefers-reduced-motion: no-preference) {
    .svc-tile:hover > img, .svc-tile:focus-within > img, .svc-tile.is-open > img { transform: scale(1.03); }
    .svc-tile.is-open .svc-list li,
    .svc-tile:hover .svc-list li,
    .svc-tile:focus-within .svc-list li {
        animation-duration: var(--svc-open);
        animation-timing-function: var(--svc-ease);
        animation-delay: calc(var(--svc-wait) + 70ms * var(--i) - 5ms * var(--i) * var(--i));
    }
}
@media (prefers-reduced-motion: reduce) {
    .svc-reveal, .svc-reveal__inner, .svc-tile > img { transition: none; }
}

/* Homepage values photo: crop towards the right of the hallway, where the
 * people and reception are, rather than the bare wall on the left. */
.values__media > img.values__photo--hallway { object-fit: cover; object-position: 90% 50%; }
@media (max-width: 1023px) {
    /* Phones and tablets show nearly the whole width: crop square, so the people fill more of it. */
    .values__media > img.values__photo--hallway { aspect-ratio: 1; }
}

/* Practitioners from the app (partials/practitioners.html). Before the script
 * runs, or without it, a bio keeps its paragraph breaks; a photo hides the
 * initials drawn beside it for a practitioner who has none. */
[data-paras] { white-space: pre-line; }
.visiting__card:has(img.visiting__photo) .visiting__initials,
.pi-gp:has(.pi-gp__photo) .pi-gp__initials { display: none; }
/* A visiting practitioner with no photo in the app: the practice's circle logo. */
.svc-visiting .doctor-avatar:not(:has(img)) {
    background: var(--secondary-soft) url("/assets/images/deepdene-surgery-circle-logo.99213aab79.webp") center / cover no-repeat;
    color: var(--secondary-on-soft);
}
.svc-visiting .doctor-avatar:not(:has(img))::after { content: none; }

/* HotDoc's lightbox script adds <div class="hotdoc-lightbox"><p><a hidden …></p></div>
 * at the end of <body>; the paragraph's margin left a blank strip under the footer. */
.hotdoc-lightbox > p { margin: 0; }

/* Complaints contacts (Patient information): light sage panels, as the contact form's. */
.pi-contact {
    background: var(--tertiary-soft);
    color: var(--tertiary-on-soft);
    border: none;
}
.pi-section .pi-contact h3 { color: var(--text-strong); }

/* Price tables: the column titles sit in a light sage band instead of over a
 * heavy rule, so the header reads apart from the rows' dividers. Cells get
 * inline padding to line up with the band's text. */
/* The header band: the logo's sage, strong enough to read as a panel on white. */
.pi-table { --table-head-wash: color-mix(in oklab, var(--tertiary-solid) 45%, var(--surface)); }
.pi-table th {
    padding: var(--space-xs) var(--space-s);
    background: var(--table-head-wash);
    color: var(--text-strong);
    border-bottom: none;
}
.pi-table td:first-child { padding-inline-start: var(--space-s); }
.pi-table th:last-child,
.pi-table td:last-child { padding-inline-end: var(--space-s); }

/* Contact: the photo ends level with the form panel beside it. The columns
 * stretch; the photo fills the rest of its column (cropped to fit, never
 * shorter than 16rem) and the panel stops short by the photo's bottom margin
 * (room for its cross). The message box is the template's textarea minimum.
 * Stacked on phones, the photo keeps a 16rem band. */
#send-message .split { align-items: stretch; }
.contact-message__intro { display: flex; flex-direction: column; }
.contact-message__media { flex: 1; position: relative; min-block-size: 16rem; }
.contact-message__media > img {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: 25% 60%;   /* keep the window's DEEPDENE lettering in a narrow crop */
}
#send-message .contact-form {
    display: flex;
    flex-direction: column;
    margin-block-end: var(--space-l);
}
.contact-form form { flex: 1; gap: var(--space-s); }
.contact-form__pair { gap: var(--space-s); }
.contact-form form > .contact-form__field:has(textarea) { flex: 1; display: flex; flex-direction: column; }
.contact-form textarea { flex: 1; }

/* Stacked (one column: narrower than 983px, measured, where .split's two
 * 26rem columns and their gap no longer fit), a section that leads with its
 * photo on desktop puts the text first: the heading is what a phone reader
 * should meet. If the gutter, gap or column minimum changes, re-measure. */
@media (width < 61.4375rem) {
    .split > .split__media:first-child { order: 1; }
}
/* The smallest phones: tighter cell padding so the three-column price table fits. */
@media (width < 25rem) {
    .pi-table th { padding-inline: var(--space-2xs); }
    .pi-table td:first-child { padding-inline-start: var(--space-2xs); }
    .pi-table th:last-child,
    .pi-table td:last-child { padding-inline-end: var(--space-2xs); }
}
/* Service photos: each sets its subject as --focal (inline, "x% y%"), so the
 * landscape homepage card and the Services tile crop around the faces. The
 * tile's photo stops at its closed title bar (--svc-head, measured by the
 * page's script; a quarter of the tile without it); the tile's navy ground
 * shows through behind the bar when it opens. */
.service-card__photo { object-position: var(--focal, 50% 50%); }
.svc-tile > img {
    inset: 0 0 auto;
    block-size: calc(100% - var(--svc-head, 25%));
    object-position: var(--focal, 50% 50%);
}
