/* The old site's design (old-base.css, old-components.css) carrying the new site's pages: the few parts the old site
   doesn't have, written in its own tokens (ink, lines, 8/10/14/16 radii, Figtree and Baskervville).
   Spacing inside sections uses one scale: 8, 16, 24, 32, 48 (and 96 between sections, set in old-base.css). */

:root { --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-5: 48px; }

/* skip link: hidden until focused */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-btn);
  background: var(--ink); color: #fff; text-decoration: none; font-size: var(--fs-title-sm); }
.skip-link:focus { top: 12px; }

/* ---------- section heading block: eyebrow, heading, line, button, then the content 48 below ---------- */
.sec-head > * { margin-top: 0; }
.sec-head > * + * { margin-top: var(--sp-2); }
.sec-head > .btn, .sec-head > .hero-cta, .sec-head > .story-links { margin-top: var(--sp-4); }
.sec-head > .eyebrow, .hero-copy > .eyebrow { display: flex; width: fit-content; }   /* block-level, so the gap below is the margin alone */
.sec-head > .eyebrow + * { margin-top: var(--sp-2); }
.sec-head + * { margin-top: var(--sp-5) !important; }
.sec-head .lede + .lede { margin-top: var(--sp-2); }

/* a text link on light ground (the old .link-dark, in ink) */
.link-ink { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; font-weight: 500;
  font-size: var(--fs-title-sm); display: inline-flex; gap: var(--sp-1); align-items: center; transition: border-color .15s ease; }
.link-ink:hover { border-color: var(--ink); }
.link-ink svg { width: 14px; height: 14px; flex: 0 0 auto; }
.link-ink:focus-visible, .link-dark:focus-visible, .tile:focus-visible, .flow-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.link-dark:focus-visible { outline-color: #fff; }

/* ---------- Box: the site's card ----------
   The grey card from "Available on desktop and mobile" (Oct 23), used for every card on the site.
   .box          grey ground, 1px line, 16 corners, 32 padding (24 on phones). Text starts at the top left.
   .box-lg       48 padding (24 on phones): boxes half the row wide or wider.
   .box-media    a photo or device fills one side of the box to its edges; the text part keeps its own padding.
   .box-dark     the dark ground with white text, for the one box a page wants to stand out (Home: the price).
   Boxes in a row sit 16 apart at equal heights, and the parts they share (text, a device) line up across the row.
   Photos next to boxes use the same 16 corners. Line icons in a box sit on a white tile. */
.box { background-color: var(--ground-2); background-image: none; border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: var(--sp-4); color: var(--ink); box-shadow: none; }
.box-lg { padding: var(--sp-5); }
.box-media { padding: 0; overflow: hidden; }
.box-dark { background-color: var(--dark); background-image: var(--dark-grad); border-color: var(--dark); color: #fff; }
.box .ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.box .ico svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* ---------- 01 · hero ----------
   Home: full width, filling the first screen under the header. The text sits on the old dark ground at left, lined up
   with the header's content edge; the photo fills the right half to the window's edge. Phones: the text, then the photo. */
:root { --head-h: 65px; }
main > section.hero.hero-split { padding: 0 !important; }
.hero-split { display: grid; min-height: clamp(560px, calc(100svh - var(--head-h)), 860px);
  grid-template-columns: [edge] minmax(var(--gutter), 1fr) [text] minmax(0, calc(var(--maxw) / 2 - var(--gutter))) [mid] minmax(0, calc(var(--maxw) / 2 - var(--gutter))) minmax(var(--gutter), 1fr) [end];
  background-color: var(--dark); background-image: var(--dark-grad); color: #fff; }
.hs-copy { grid-column: text / mid; grid-row: 1; display: flex; align-items: center; padding: var(--sp-5) var(--sp-5) var(--sp-5) 0; }
.hs-in { width: 100%; max-width: 580px; }
.hs-in > * { margin-top: 0; }
.hero-split .eyebrow { display: flex; width: fit-content; color: var(--on-dark-2); }
.hero-split h1 { margin-top: var(--sp-3); max-width: 16ch; color: #fff; font-size: var(--fs-display-xl); }
.hero-split h1 .serif { background: var(--spectrum-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent; padding-right: .06em; }
.hero-split .lede { margin-top: var(--sp-3); max-width: 40ch; color: var(--on-dark-2); }
.hero-split .hero-cta { margin-top: var(--sp-4); gap: 12px; }
.hero-split .hero-fine { margin-top: var(--sp-3); max-width: none; color: var(--on-dark-3); }
.hs-photo { grid-column: mid / end; grid-row: 1; position: relative; min-height: 320px; background: var(--dark-2); }
.hs-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 48% 35%; }

/* ---------- 01 · Home hero (Oct 24): main's approved hero component (Figma "Hero video" 53148:5327) in the old design.
   The words centred on a soft grey that fades to the white page (main: blue-grey to beige), the video below in a 16px
   rounded frame as wide as the content, main's 80px play button as the old design's round white control. ---------- */
main > section.hero.hero-play, main > section.hero.hero-centre { padding: 72px 0 var(--sp-5) !important; background: linear-gradient(180deg, #eeeff2 0%, #fff 100%); }
.hp-copy { display: flex; flex-direction: column; align-items: center; max-width: 820px; margin-inline: auto; text-align: center; }
.hp-copy > * { margin-top: 0; }
.hero-play .eyebrow, .hero-centre .eyebrow { display: flex; width: fit-content; color: var(--ink-3); }
.hero-play h1, .hero-centre h1 { margin-top: var(--sp-3); max-width: 22ch; color: var(--ink); font-size: var(--fs-display-xl); line-height: 1.04; letter-spacing: -.025em; font-weight: 400; text-wrap: balance; }
.hero-play h1 .serif, .hero-centre h1 .serif { background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
.hero-play .lede, .hero-centre .lede { margin-top: var(--sp-3); max-width: 46ch; color: var(--ink-2); }
.hero-play .hero-cta, .hero-centre .hero-cta { justify-content: center; margin-top: var(--sp-4); gap: 12px; }
.hero-play .hero-fine, .hero-centre .hero-fine { margin-top: var(--sp-3); max-width: none; color: var(--ink-3); }
/* the same hero on the Who it's for pages and the visit overviews (Oct 24: main's wif-hero, gp-hero and sv-hero): the
   page's photo in a rounded frame up to 912 wide at 2:1, cropped as on main (--y); the overviews have no photo */
.hc-photo { max-width: 912px; margin: var(--sp-5) auto 0; aspect-ratio: 2 / 1; border-radius: var(--r-panel); overflow: hidden; background: var(--ground-3); }
.hc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--y, 50%); }
/* Oct 24 (2nd pass): 16:9, from the wide originals of the same photos (the stock files and the old site's own), so the
   whole scene shows with nothing zoomed in; up to 912 wide, the content width on phones */
.hc-photo { aspect-ratio: 16 / 9; max-width: 912px; }
.hc-photo img { object-position: 50% 50%; }
.hp-video { position: relative; margin-top: var(--sp-5); aspect-ratio: 16 / 9; border-radius: var(--r-panel); overflow: hidden; background: var(--dark-2); }
.hp-media { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the button: main's size and behaviour; the old site's round white control with a hairline and soft shadow */
.hv-btn { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ink); cursor: pointer;
  box-shadow: 0 8px 24px rgba(36, 37, 41, .18); transition: background-color .2s ease, color .2s ease, opacity .2s ease; }
.hv-btn svg { width: 28px; height: 28px; stroke-width: 2; }
.hv-btn .ic-play svg { margin-left: 3px; }
.hv-btn .ic-pause { display: none; }
.hv-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.hv-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hp-video.is-playing .hv-btn { opacity: 0; }
.hp-video.is-playing .hv-btn .ic-play { display: none; }
.hp-video.is-playing .hv-btn .ic-pause { display: block; }
.hp-video.is-playing:hover .hv-btn, .hp-video.is-playing .hv-btn:focus-visible { opacity: 1; }

/* the old dark hero panel (service pages): spacing on the scale */
.hero-panel .hero-copy { padding: var(--sp-5); }
.hero-panel .hero-copy > * { margin-top: 0; }
.hero-panel .hero-copy h1 { margin-top: var(--sp-3); }
.hero-panel .hero-copy .lede { margin-top: var(--sp-3); max-width: 40ch; }
.hero-panel .hero-copy .hero-cta { margin-top: var(--sp-4); gap: 12px; }
.hero-panel .hero-fine { margin-top: var(--sp-3); max-width: none; }

/* ---------- 02 · story: the old case-study card: Dr. Ruth Johnson's photo, the story, the practice count at its foot ---------- */
.story-cs { min-height: 0; }                                          /* .box .box-media */
.story-cs .cs-photo { flex: 0 0 42%; }
.story-cs .cs-photo img { object-position: 50% 30%; }
.story-cs:hover .cs-photo img { transform: none; }                    /* the card itself isn't a link */
.story-cs .cs-body { padding: var(--sp-5); gap: var(--sp-5); justify-content: center; }   /* Oct 24: one short paragraph now, centred beside the photo */
.story-cs .sec-head + * { margin-top: 0 !important; }
.story-cs .cs-body p { margin: 0; max-width: none; }
.story-cs .cs-body .sec-head > p { margin-top: var(--sp-2); }
.story-cs .cs-body p.lede { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); max-width: 52ch; color: var(--ink-2); }
.story-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.story-press img { display: block; width: auto; height: 16px; }
.story-press { white-space: nowrap; }
.story-press span { margin-left: 4px; }
/* the practice count was removed from Home (Oct 24); kept here unused */
.story-count { display: flex; align-items: center; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.story-count b { flex: 0 0 auto; font-size: var(--fs-display-xl); line-height: 1; letter-spacing: -.025em; font-weight: 400; font-variant-numeric: tabular-nums; }
.story-cs .story-count p { font-size: var(--fs-body-sm); line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.story-cs .story-count p + p { margin-top: var(--sp-1); font-size: var(--fs-caption); color: var(--ink-3); }

/* ---------- 03 · promises: three boxes with a line icon; their titles are this section's headings ---------- */
.promises .wf { margin-top: 0; }
.wf-card :is(h2, h3) { margin-top: var(--sp-3); font-size: var(--fs-headline-sm); line-height: 1.25; letter-spacing: -.01em; font-weight: 500; }
.wf-card p { margin-top: var(--sp-1); }

/* ---------- 04 · steps: hairline tabs over a photo and its text ----------
   With the script (old-site.js) one step shows at a time. When the window is tall enough the tabs and the step hold
   under the header while the page scrolls through the five steps (down moves on, up goes back); each tab's bar fills
   with the scrolling. Without the script the five steps show one under the other. */
.flow-tabs { display: none; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 var(--sp-2); }
.flow.is-tabs .flow-tabs { display: grid; }
.flow-tab { position: relative; appearance: none; background: none; border: 0; margin: 0; padding: var(--sp-3) 0 0;
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  font: inherit; font-size: var(--fs-headline-sm); line-height: 1.25; letter-spacing: -.01em; font-weight: 500; color: var(--ink-3);
  transition: color .2s ease; }
.flow-tab::before, .flow-tab::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; }
.flow-tab::before { background: var(--line); }
.flow-tab::after { background: var(--ink); transform-origin: left center; transform: scaleX(var(--fill, 0)); }
.flow-tab b { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: var(--fs-label-md); font-weight: 600;
  letter-spacing: .04em; line-height: 1.3; background: var(--fill); color: var(--ink-3); font-variant-numeric: tabular-nums;
  transition: background-color .2s ease, color .2s ease; }
.flow-tab:hover { color: var(--ink-2); }
.flow-tab[aria-selected="true"] { color: var(--ink); }
.flow-tab[aria-selected="true"] b { background: var(--tint-pink); color: var(--tint-pink-ink); }
.flow-panels { display: grid; gap: var(--sp-2); }
.flow.is-tabs .flow-panels { margin-top: var(--sp-4); }
.flow-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-2); }
.flow-panel img { display: block; width: 100%; height: 100%; aspect-ratio: 564 / 420; object-fit: cover; border-radius: var(--r-panel); }
.flow-card { display: flex; flex-direction: column; justify-content: flex-end; }   /* .box .box-lg */
.flow-card > * { margin-top: 0; }
.flow-card h3 { margin-top: var(--sp-2); }
.flow-card h3 + p { margin-top: var(--sp-2); color: var(--ink-2); max-width: 44ch; }
.flow-card .stage-no::before { content: none; }
/* one step at a time, cross-fading */
.flow.is-tabs .flow-panel { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.flow.is-tabs .flow-panel.is-on { opacity: 1; visibility: visible; transition: opacity .5s ease; }
/* held on screen while the page scrolls (the script sets the track's height: the stage plus 75% of the window per step) */
.flow.is-scrolly .flow-stage { position: sticky; top: calc(var(--head-h) + var(--sp-3)); }
.flow.is-scrolly .flow-panel { height: clamp(300px, calc(100svh - var(--head-h) - 180px), 540px); }
.flow.is-scrolly .flow-panel img { aspect-ratio: auto; }
.flow.is-scrolly .flow-card { justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .flow.is-tabs .flow-panel, .flow.is-tabs .flow-panel.is-on, .flow-tab, .flow-tab b { transition: none; }
}

/* ---------- 05 · photo left, text right ---------- */
.media-split-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); align-items: center; }
.media-split-in > img { display: block; width: 100%; height: auto; aspect-ratio: 564 / 600; object-fit: cover; border-radius: var(--r-panel); }
.media-split .sec-head { max-width: 46ch; }

/* ---------- 06 · practice photos as links (old-site.js pauses the strip under the pointer or keyboard focus) ---------- */
.mq.mq-links { pointer-events: auto; }
a.tile { display: block; color: #fff; text-decoration: none; }
.mq-links .tile { border-radius: var(--r-panel); }
a.tile span { transition: background-color .15s ease; }
a.tile:hover span { background: rgba(20, 27, 25, .62); }
.practices-cta { margin-top: var(--sp-4); }

/* ---------- 07 · price: photo and the dark price card ---------- */
.price-row { display: grid; grid-template-columns: minmax(0, 688fr) minmax(0, 448fr); gap: var(--sp-2); }
.price-row > img { display: block; width: 100%; height: 100%; aspect-ratio: 688 / 520; object-fit: cover; border-radius: var(--r-panel); }
.price-row .card.price { min-height: 0; justify-content: space-between; gap: var(--sp-4); }   /* .box .box-lg .box-dark */
.price-row .card.price .big { font-size: var(--fs-display-xl); line-height: 1; letter-spacing: -.025em; color: #fff; }
.price-row .card.price p:not(.big) { font-size: var(--fs-body-lg); line-height: var(--lh-body-lg); color: var(--on-dark-2); }
.price-note { margin-top: var(--sp-3); font-size: var(--fs-body-sm); color: var(--ink-2); }

/* ---------- 08 · safeguards: heading and line on top, the shield badges and the link at the bottom ---------- */
.safeguards .sec-photo { justify-content: space-between; padding: var(--sp-5); }
.safe-top > * { margin-top: 0; }
.safe-top .sec-title { max-width: 18ch; }
.safe-top .sec-title .serif { font-size: 1.07em; }
.safe-top .sec-intro { margin-top: var(--sp-3); max-width: 34ch; color: rgba(255, 255, 255, .86); }
.safeguards .badges { list-style: none; padding: 0; margin: 0; gap: 12px; }
.safeguards .badge { width: 148px; height: 124px; }
.safeguards .badge.is-mark b { padding-inline: 10px; line-height: 1.25; margin-bottom: 26px; }
.safeguards .sec-bottom { align-items: flex-end; gap: var(--sp-3); }

/* ---------- 09 · devices: two boxes. Their text rows share one height and their device stages start on one line
   (subgrid), so the laptop and the phone tops line up; both devices run off the box's bottom edge. The stage is as
   tall as the laptop at the box's full width (capped at 340), and the phone is sized to fill the same height. ---------- */
/* the row is the size container (a box can't be both a subgrid and a container): --box-w is one box's inner width */
.devices-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto; column-gap: var(--sp-2);
  container-type: inline-size; --box-w: calc((100cqi - var(--sp-2)) / 2 - 2 * var(--sp-5) - 2px); }
.device { grid-row: span 2; display: grid; grid-template-rows: subgrid; row-gap: 0; }
.device.box { padding-bottom: 0; }
.device-text { padding-bottom: var(--sp-5); }
.device-text > * { margin-top: 0; }
.device-os { margin-top: var(--sp-2) !important; display: flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-body-sm); font-weight: 500; color: var(--ink); }
.device-os svg { width: 16px; height: 16px; stroke-width: 1.6; }
.device-line { margin-top: var(--sp-1) !important; color: var(--ink-2); }
.store-badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-2) !important; }
.store-badges img { display: block; width: auto; height: 40px; }
.device-stage { --stage-h: min(340px, calc(var(--box-w) * .5625 - 1.25px)); height: var(--stage-h); overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start; }
.device-stage .laptop { width: 100%; margin: 0; }
.device .laptop-shell { border-radius: 18px 18px 0 0; padding: 10px 10px 0; }
.device .screen { height: auto; aspect-ratio: 16 / 9; border-radius: 9px 9px 0 0; }
.handset { flex: 0 0 auto; width: calc(var(--stage-h) * .74); position: relative; padding: 10px 10px 0;
  background: #121415; border-radius: 34px 34px 0 0; }
.handset::before { content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 64px; height: 18px; border-radius: 10px; background: #121415; z-index: 2; }
.handset .shot { display: block; width: 100%; height: auto; aspect-ratio: 390 / 588; object-fit: cover; object-position: top; border-radius: 26px 26px 0 0;
  border-top: 28px solid #fff; background: #fff; }   /* a white status bar under the notch, so the notch clears the page header */
/* Oct 24: iOS and Android side by side (the box says "iOS and Android"), both showing the app's patient portal. The
   status bar takes the app header's dark green. The iPhone keeps its island; the Android phone has slimmer bezels,
   squarer corners, a graphite frame and a punch-hole camera. Each phone is as wide as fits two in the box. */
.device-stage .phones { display: flex; gap: var(--sp-2); align-items: flex-start; justify-content: center;
  --pw: min(calc(var(--stage-h) * .74), calc((var(--box-w) - var(--sp-2)) / 2)); }
.phones .handset { width: var(--pw); }
.phones .handset .shot { border-top-color: #1c2b29; background: #1c2b29; }
.handset.is-android { padding: 7px 7px 0; border-radius: 24px 24px 0 0; background: #2b2d31; }
.handset.is-android::before { top: 15px; width: 10px; height: 10px; border-radius: 50%; background: #0c0d0e; box-shadow: 0 0 0 2px #24262a; }
.handset.is-android .shot { border-radius: 18px 18px 0 0; border-top-width: 24px; }

/* ---------- 10 · closing: two buttons side by side, the note below; room above the footer ---------- */
.closing-plain h2 { max-width: 20ch; }
.closing-plain .lede { margin-top: var(--sp-2); }
.closing-plain .close-cta { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: var(--sp-4); }
.closing-plain .close-cta .btn { border-radius: var(--r-btn); padding: 15px 22px; }
.closing-note { margin-top: var(--sp-3); color: var(--ink-3); }
main > section.closing.closing-plain { padding-bottom: 72px !important; }   /* + the footer's 24 = 96 */

/* ---------- footer: the lines the old footer didn't have (address, two links, copyright) ---------- */
.foot > div:first-child > p:not(.foot-brand) { color: var(--on-dark-2); font-size: 13px; line-height: 1.5; margin-top: var(--sp-1); max-width: 34ch; }
.foot > div:first-child > p.foot-main { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-3); }
.foot-main a { font-size: 15px; }
.foot-copy { margin-top: var(--sp-5); color: var(--on-dark-3); font-size: 13px; }
.foot-copy + .foot-rule { margin-top: var(--sp-3); }

/* ---------- tablets and phones ---------- */
@media (max-width: 980px) {
  .media-split-in { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .media-split-in > img { aspect-ratio: 4 / 3; }
  .price-row { grid-template-columns: minmax(0, 1fr); }
  .price-row > img { height: auto; aspect-ratio: 4 / 3; }
  .devices-row { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-2); --box-w: calc(100cqi - 2 * var(--sp-5) - 2px); }
  .device-stage:has(.handset) { --stage-h: 300px; }       /* stacked: the phone box no longer lines up with the laptop */
  .device-stage:has(.phones) { --stage-h: min(300px, calc((var(--box-w) - var(--sp-2)) / 2 / .74)); }   /* two phones: as tall as their width allows, running off the box */
}
@media (max-width: 900px) {
  main > section.hero + section { padding-top: 64px !important; }   /* the same 64 as between the other sections */
  .hero-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hs-copy { grid-column: 1; grid-row: 1; padding: var(--sp-5) var(--gutter); }
  .hs-photo { grid-column: 1; grid-row: 2; min-height: 0; aspect-ratio: 4 / 3; }
  .hero-panel .hero-copy { padding: var(--sp-4) var(--sp-3) 0; }
  .hero-panel .hero-job { margin: var(--sp-3); }
  /* steps: the photo above its text */
  .flow-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; }
  .flow-panel img { height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-panel) var(--r-panel) 0 0; }
  .flow-card.box { border-top: 0; border-radius: 0 0 var(--r-panel) var(--r-panel); padding: var(--sp-3); justify-content: flex-start; }
  .flow.is-scrolly .flow-panel { height: auto; }
  .flow.is-scrolly .flow-panel img { height: clamp(160px, 30svh, 300px); }
}
@media (max-width: 640px) {
  main > section.hero.hero-play, main > section.hero.hero-centre { padding-top: 40px !important; }
  .hero-play h1, .hero-centre h1 { font-size: clamp(2.375rem, 9vw, 3rem); }
  .hero-play .hero-cta, .hero-centre .hero-cta { width: 100%; }
  .hero-play .hero-cta .btn, .hero-centre .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .hp-video { margin-top: var(--sp-4); aspect-ratio: 3 / 2; }                     /* main: 361 / 240 */
  .hc-photo { margin-top: var(--sp-4); }
  .hv-btn { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .hv-btn svg { width: 22px; height: 22px; }
  /* no hover on phones: a small pause button stays in the corner (main; the old site's control sat there too) */
  .hp-video.is-playing .hv-btn { opacity: 1; width: 40px; height: 40px; margin: 0; left: auto; top: auto; right: 12px; bottom: 12px; }
  .hp-video.is-playing .hv-btn svg { width: 16px; height: 16px; }
  :root { --head-h: 61px; }
  .box, .box-lg { padding: var(--sp-3); }
  .box-media { padding: 0; }
  .device.box { padding-bottom: 0; }
  .device-text { padding-bottom: var(--sp-3); }
  .devices-row { --box-w: calc(100cqi - 2 * var(--sp-3) - 2px); }
  .sec-head + * { margin-top: var(--sp-4) !important; }
  .hero-split h1, .hero-split .lede { margin-top: var(--sp-2); }
  .hero-split .hero-cta { margin-top: var(--sp-3); }
  .hero-split .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .hero-split .hero-fine { margin-top: var(--sp-2); }
  .story-cs .cs-photo { aspect-ratio: 4 / 3; }
  .story-cs .cs-body { padding: var(--sp-3); gap: var(--sp-4); }
  .story-count b { font-size: var(--fs-display-lg); }
  .story-press img { height: 14px; }
  .flow.is-scrolly .flow-stage { top: calc(var(--head-h) + var(--sp-2)); }
  .flow-tabs { gap: 0 var(--sp-1); }
  .flow-tab { padding-top: var(--sp-2); }
  .flow-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* the numbers only; the card names the step */
  .flow.is-tabs .flow-panels { margin-top: var(--sp-3); }
  .sec-head > .btn, .sec-head > .story-links { margin-top: var(--sp-3); }
  .wf-card :is(h2, h3) { margin-top: var(--sp-2); }
  .safeguards .sec-photo { padding: var(--sp-3); gap: var(--sp-4); }
  .safeguards .sec-bottom { flex-direction: column; align-items: flex-start; }
  .safeguards .badges { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .safeguards .badge { width: auto; height: 116px; padding: 12px 4px 0; }
  .safeguards .badge-ring { width: 38px; height: 38px; }
  .safeguards .badge-ring svg { width: 20px; height: 20px; }
  .safeguards .badge.is-mark b { padding-inline: 4px; font-size: .6875rem; margin-bottom: 22px; }
  .safe-top .sec-intro { margin-top: var(--sp-2); }
  .closing-plain .close-cta .btn { flex: 1 1 auto; justify-content: center; }
  main > section.closing.closing-plain { padding-bottom: 40px !important; }   /* + the footer's 24 = 64 */
  .foot-panel::after { height: min(14%, 140px); }   /* the wedge stays under the wordmark, clear of the copyright line */
}
@media (max-width: 380px) {
  .story-press { white-space: normal; }   /* the narrowest phones: the press link may wrap, without its arrow */
  .story-press svg { display: none; }
}
.page-home .hero-split h1 { max-width: 14ch; }   /* Home's approved line breaks (Oct 23) */

/* Oct 24: links to the Pre-visit, Visit and Post-visit overview pages. Footer: the column titles keep their look and
   underline on hover. Phone menu: an "overview" link at the top of each stage, styled like the menu's own links. */
.foot h4 a { color: inherit; text-decoration: none; }
.foot h4 a:hover, .foot h4 a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.dr-overview { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 4px; color: var(--ink); font-size: var(--fs-title-sm);
  font-weight: 500; text-decoration: none; }
.dr-overview svg { width: 11px; height: 11px; color: var(--ink-3); }
.dr-overview:hover { text-decoration: underline; text-underline-offset: 3px; }
.dr-overview[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
