/* 4 Nov (Shali): site-wide consistency pass, measured against nekohealth.com (idea only; our fonts and colours).
   Builds on Codex's site-consistency.css tokens. Loaded last on every page. */

/* 1. Headings: one weight (400) and one tracking rule (-0.02em at the 100 px display size, -0.035em for section and
      card titles); sizes on the shared scale (desktop 100 / 68 / 44 / 32 / 24, phone 54 / 40 / 32 / 28 / 20). */
html body #quiet-story.da #beyond .bh-h, html body #beyond .bh-h { font-weight: 400 !important; letter-spacing: -.035em !important; }
html body.yl-detail-page #diagnostics-title { font-weight: 400; letter-spacing: -.02em; }
html body.yl-detail-page #stations .dd-station-heading h3 { font-size: 44px; line-height: 52px; font-weight: 400; letter-spacing: -.035em; }
html body :is(#programs .pg-t, #about article h3), html body.yl-detail-page .dd-pathway h3 { letter-spacing: -.035em; }
html body #myhealth .mh-connected h3 { font-size: 24px !important; line-height: 28px !important; letter-spacing: -.02em !important; }
/* Privacy, terms and thank-you: the section-heading step for the title, the card-title step for sub-headings */
html body:not(:has(#quiet-story, #diagnostics-title)) h1 { font-size: var(--site-heading-size, 68px); line-height: var(--site-heading-line, 80px); font-weight: 400; letter-spacing: -.035em; }
html body:not(:has(#quiet-story, #diagnostics-title)) main h2 { font-size: var(--site-card-size, 32px); line-height: var(--site-card-line, 40px); font-weight: 400; letter-spacing: -.035em; }
@media (max-width: 767px) {
  html body.yl-detail-page #stations .dd-station-heading h3 { font-size: 32px; line-height: 40px; }
  html body #myhealth .mh-connected h3 { font-size: 20px !important; line-height: 24px !important; }
  html body:not(:has(#quiet-story, #diagnostics-title)) h1 { font-size: 40px; line-height: 44px; }
  html body:not(:has(#quiet-story, #diagnostics-title)) main h2 { font-size: 28px; line-height: 32px; }
}

/* 2. Buttons: one size and shape for every action button (desktop 60 px, 18 px medium; phone 48 px, 16 px medium;
      the shared small-card corner, which reads as a pill at these heights). Gold = register; dark = learn more.
      Header buttons (homepage, /diagnostics/, legal pages) keep the compact header size, now the same everywhere.
      Chips, tabs and round arrow buttons are separate controls and are unchanged. !important because several
      section stylesheets set these with id selectors. */
html body :is(#beyond .qs-more, #care .cf-register, #programs .pg-cta, #final-cta .btn, #register-dialog .reg-submit, .mnav-cta),
html body.yl-detail-page :is(.dd-pathway .dd-button, .dd-next .dd-button),
html body main .home-button {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 10px;
  min-height: 60px !important; height: auto !important; padding: 0 28px !important; box-sizing: border-box;
  border-radius: var(--site-small-radius, 32px) !important; corner-shape: var(--site-corner-shape, round);
  font-size: 18px !important; line-height: 1.2 !important; font-weight: 500 !important; letter-spacing: -.005em !important; text-decoration: none;
}
html body :is(#care .cf-register, #programs .pg-cta) { background: var(--gold, #e7c089) !important; color: var(--void, #0e0e0f) !important; border-color: transparent !important; }
html body.yl-detail-page .dd-pathway .dd-button, html body #register-dialog .reg-submit, html body .mnav-cta { display: flex !important; width: 100% !important; }
@media (hover: hover) {
  html body :is(#care .cf-register, #programs .pg-cta):hover { background: #edcb9c !important; }
}
@media (max-width: 767px) {
  html body :is(#beyond .qs-more, #care .cf-register, #programs .pg-cta, #final-cta .btn, #register-dialog .reg-submit, .mnav-cta),
  html body.yl-detail-page :is(.dd-pathway .dd-button, .dd-next .dd-button),
  html body main .home-button {
    min-height: 48px !important; padding: 0 24px !important; font-size: 16px !important;
  }
}
/* the /diagnostics/ header picker matches the homepage header button */
html body.yl-detail-page .dd-register-picker > summary { min-height: 48px; height: 48px; padding: 0 22px; border-radius: 16px; font-size: 14px; font-weight: 400; }
@media (max-width: 479px) { html body.yl-detail-page .dd-register-picker > summary { padding: 0 11px; font-size: 13px; } }

/* 3. Phones: the assessment-area tabs stick directly under the header, and to the very top once the header slides
      away (they kept 54 px free for a section menu that is not sticky on phones). */
@media (max-width: 759px) {
  html body.yl-detail-page .dd-station-toolbar { top: var(--dd-nav-top, 0px); }
}

/* 4. Body text: three styles instead of eleven (Neko keeps two, plus fine print).
      Lead 18/24 (phone 16/24): section intros and the main paragraph of a section.
      Body 16/24 (phone 16/24): card copy, lists, answers and summaries.
      Fine print 14/20: notes, guidance and footer lines. */
html body :is(#top .hero-text, #quiet-story .quiet-body-one, #care .cf-d, #about article p, #final-cta .fc-lead),
html body.yl-detail-page :is(.dd-hero .dd-lead, .dd-next p, .dd-section-head > p) {
  font-size: var(--site-lead-size, 18px) !important; line-height: var(--site-lead-line, 24px) !important;
}
html body :is(#myhealth .mh-connected p, #faq .faq-a p, #programs .pg-d, #myhealth .mh-cd),
html body.yl-detail-page :is(.dd-pathway-summary, .dd-difference li, .dd-station-overview, .dd-station dd li, .dd-addon-copy > p:first-child) {
  font-size: 16px !important; line-height: 24px !important;
}
html body :is(#programs .pg-note, footer .ft-group, footer .ft-copy, footer .ft-group a, footer .ft-copy a, footer .ft-policy-links a),
html body.yl-detail-page #diagnostic-addons .dd-note,
html body.yl-detail-page :is(.dd-brief-note, .dd-assessment-guidance, .dd-note, .dd-vitamin-note) {
  font-size: 14px !important; line-height: 20px !important;
}

/* 5. Smallest text is 14 px (Neko's floor). Raised: optional-test pills (12-13 px), the /diagnostics/ photo captions
      (10 px), hero figure labels (12 px), header picker options (12-13 px) and the phone Horizon and area tabs
      (13 px). The header button and announcement bar keep 13 px on phones (approved 3 Nov: no room). The
      "Yoda Longevity" kicker above the legal titles is removed (no eyebrows). */
html body :is(#beyond, #diagnostic-addons) .yl-addon-card :is(.dd-addon-category, .dd-focus) { font-size: 14px !important; line-height: 20px !important; }
html body.yl-detail-page #stations .dd-station-image figcaption { font-size: 14px !important; line-height: 20px !important; }
html body.yl-detail-page .dd-hero :is(dd, small) { font-size: 14px !important; line-height: 20px !important; }
html body.yl-detail-page :is(.dd-register-options, .dd-booking-product) :is(span, small) { font-size: 14px !important; line-height: 20px !important; }
html body.yl-detail-page :is(.ht-tabs button, .dd-station-nav .dd-station-label) { font-size: 14px !important; }
html body:not(:has(#quiet-story, #diagnostics-title)) main .eyebrow { display: none; }
@media (max-width: 359px) { html body.yl-detail-page .dd-booking-product :is(span, small) { font-size: 13px !important; line-height: 18px !important; } }

/* 6. Corners: cards already share Codex's two sizes (large 64 / phone 29; small 32 / phone 20, superellipse where
      supported). The last odd ones follow: the register dialog (22-24 px), the /diagnostics/ header menu (24 px) and
      the clinical note (one-sided 12 px with a gold side stripe, now a plain panel like its neighbours). */
html body #register-dialog { border-radius: var(--site-small-radius, 32px); corner-shape: var(--site-corner-shape, round); }
@media (max-width: 759px) {
  html body #register-dialog { border-radius: var(--site-small-radius, 20px) var(--site-small-radius, 20px) 0 0; }
}
html body.yl-detail-page .dd-register-options { border-radius: var(--site-small-radius, 32px) !important; corner-shape: var(--site-corner-shape, round); }
html body.yl-detail-page .dd-brief-note { border: 0 !important; border-radius: var(--site-small-radius, 20px) !important; corner-shape: var(--site-corner-shape, round); padding: 16px 20px !important; }

/* 7. Section rhythm: Neko leaves the same space between every section, 200 px on desktop and 100 px on phones.
      Every section here already does, except around Beyond the Horizon: 148 / 90 px above it (its own margin) and
      164 / 114 px from "Know more details" to Care (64 px bottom padding). */
html[data-s2] body #quiet-story.da.da-direct #beyond.da-piece { margin-top: 0 !important; padding-top: 200px !important; padding-bottom: 100px !important; }
@media (max-width: 767px) {
  html[data-s2] body #quiet-story.da.da-direct #beyond.da-piece { padding-top: 100px !important; padding-bottom: 50px !important; }
}

/* 8. Motion: two timings, as on Neko. Controls (buttons, links, chips, tabs, fields) answer in 0.2 s on one curve;
      scroll reveals (headings, intros, cards) settle in 0.7 s with one ease-out; their stagger delays stay. In-page
      links glide on both pages (the homepage jumped). The loader, header, logo intro, hero/closing video and the
      MyHealth phone keep their own choreography. Reduced motion: no glide, no transition. */
:root { --site-ease-ui: cubic-bezier(.4, 0, .2, 1); --site-ease-reveal: cubic-bezier(0, 0, .2, 1); }
html body :is(main, footer, #register-dialog, .mnav) :is(a, button, summary, input, select, textarea, .cf-chip, .faq-q, .faq-ic, .dd-pathway, .dd-addon-cta, .dd-text-button, .mh-btn, .care-card-register):not(.hdr-logo) {
  transition-duration: .2s !important; transition-timing-function: var(--site-ease-ui) !important;
}
html body :is(.cf-h, .cf-intro, .cf-tile, .pg-h, .pg-intro, .pg-foot, .mh-lead, .neo-enter, .faq-item, .ar-h, .ar-item, .ar-foot, .jr-text, .neo-word) {
  transition-duration: .7s !important; transition-timing-function: var(--site-ease-reveal) !important;
}
@media (prefers-reduced-motion: reduce) {
  html body :is(main, footer, #register-dialog, .mnav) :is(a, button, summary, input, .cf-chip, .faq-q),
  html body :is(.cf-h, .cf-intro, .cf-tile, .pg-h, .pg-intro, .pg-foot, .mh-lead, .neo-enter, .faq-item, .ar-h, .ar-item, .ar-foot, .jr-text, .neo-word) { transition-duration: .01s !important; }
}

/* Mobile weight (4 Nov): photos wrapped in <picture> for phone crops lay out exactly as the bare <img> did. */
html body :is(#top, .dd-hero-scene) picture { display: contents; }

/* Mobile 3 (4 Nov): the /diagnostics/ booking bar steps aside while reading, like Neko's: scrolling down slides it below
   the screen together with the header (html.hdr-hidden), scrolling up brings both back. It stays while its picker is
   open or it holds focus. */
@media (max-width: 767px) {
  html body.yl-detail-page .dd-booking { transition: translate .3s var(--site-ease-ui, ease), opacity .3s var(--site-ease-ui, ease) !important; }
  html.hdr-hidden body.yl-detail-page .dd-booking:not(:has(details[open]), :focus-within) { translate: 0 calc(100% + 12px) !important; opacity: 0 !important; pointer-events: none !important; }
}

/* Mobile 4 (4 Nov): /diagnostics/ small details. The area tabs settle on a tab edge when swiped (proximity, so the
   script that brings the active tab into view is never fought); the footer's Privacy and Terms links get a 44 px tap
   height (they were 22 px). The page now also uses viewport-fit=cover like the homepage, so the booking bar's
   safe-area padding clears the iPhone home indicator. */
html body.yl-detail-page #stations .dd-station-nav { scroll-snap-type: x proximity; scroll-padding-inline: var(--site-gutter, 20px); }
html body.yl-detail-page #stations .dd-station-nav > * { scroll-snap-align: start; }
html body.yl-detail-page footer a[href="/privacy-policy.html"], html body.yl-detail-page footer a[href="/terms-of-use.html"] { display: inline-flex; align-items: center; min-height: 44px; }

/* 4 Nov (Shali: "too much gaps in these cards"): Programmes cards fit their content, as Neko's short cards do. They
   were stretched to a fixed 340 / 300 / 260 px, which left 70-110 px of empty card. Desktop: icon, 32 px, title,
   12 px, description. Phones: icon beside the title (3 Nov fix), description 12 px below. */
html body #programs.pg .pg-card { min-height: 0 !important; height: auto !important; grid-template-rows: auto !important; row-gap: 0 !important; align-content: start !important; }
html body #programs.pg .pg-card .pg-t { margin: 32px 0 0 !important; min-height: 0 !important; }
html body #programs.pg .pg-card .pg-d { margin: 12px 0 0 !important; min-height: 0 !important; }
@media (max-width: 759px) {
  html body #programs.pg .pg-card { padding: 24px !important; row-gap: 12px !important; column-gap: 14px !important; }
  html body #programs.pg .pg-card .pg-t { margin: 0 !important; }
  html body #programs.pg .pg-card .pg-d { margin: 0 !important; }
}

/* 4 Nov (Shali, after Neko's phone hero): on phones the header is the logo (larger) and the menu button only; the hero
   holds just the title on two lines, with one button to the assessment page at its foot. No capsule, no description,
   no shrink-and-gold-symbol sequence (home-reference.js / home-gold-scroll.js skip it under 768 px). */
html body .hero-assess { display: none; }
@media (max-width: 767px) {
  html body:not(.yl-detail-page) .masthead .hdr .hdr-cta { display: none !important; }
  html body .masthead .hdr .hdr-logo, html body .masthead .hdr .hdr-logo :is(img, svg) { width: 188px !important; height: auto; }
  html body:not(.yl-detail-page) #top .lens { display: none !important; visibility: hidden !important; }
  html body:not(.yl-detail-page) #top .hero-foot { display: none !important; }
  html body:not(.yl-detail-page) #top .hero-inner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 var(--site-gutter, 20px); }
  html body:not(.yl-detail-page) #top #hero-h { font-size: min(54px, 11vw) !important; line-height: 1.04 !important; max-width: 100%; margin: 0; text-wrap: balance; text-align: center; }
  html body .hero-assess {
    position: absolute; z-index: 6; left: 50%; bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)); transform: translateX(-50%);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
    min-height: 48px; padding: 0 22px; border-radius: var(--site-small-radius, 20px); corner-shape: var(--site-corner-shape, round);
    background: var(--star, #f4f2ed); color: var(--void, #0e0e0f); font: 500 16px/1.2 var(--f-text); letter-spacing: -.005em; text-decoration: none;
    box-shadow: 0 10px 30px rgba(14, 14, 15, .18); transition: background-color .2s cubic-bezier(.4, 0, .2, 1);
  }
  html body .hero-assess svg { width: 22px; height: 22px; }
  html body .hero-assess:active { background: #e9e4da; }
}
@media (max-width: 374px) { html body .masthead .hdr .hdr-logo, html body .masthead .hdr .hdr-logo :is(img, svg) { width: 160px !important; } }

/* 4 Nov (Shali): Programmes on phones as one swipeable row, like Neko's card rails: each card about 80% of the screen
   so the next one shows, snapping card by card, first card on the page gutter, all cards the same height. */
@media (max-width: 759px) {
  html body #programs.pg .pg-list {
    display: flex !important; grid-template-columns: none !important; gap: 12px !important; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--site-gutter, 20px); scrollbar-width: none;
    margin-inline: calc(-1 * var(--site-gutter, 20px)) !important; padding: 0 var(--site-gutter, 20px) 4px !important;
    align-items: stretch;
  }
  html body #programs.pg .pg-list::-webkit-scrollbar { display: none; }
  html body #programs.pg .pg-list > .pg-card { flex: 0 0 min(300px, 80%); scroll-snap-align: start; grid-template-columns: 40px minmax(0, 1fr) !important; align-content: start !important; }
}

/* 4 Nov (Shali): the footer on a soft warm linear gradient, on every page. The /diagnostics/ footer sits in the page
   column, so its gradient is drawn full width behind it. */
html body :is(footer.ft, footer.legal-footer) { background: linear-gradient(180deg, #f4f2ed 0%, #efe7d9 55%, #e8dbc4 100%) !important; }
html body.yl-detail-page footer.dd-footer { position: relative; isolation: isolate; }
html body.yl-detail-page footer.dd-footer::before {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: linear-gradient(180deg, #f4f2ed 0%, #efe7d9 55%, #e8dbc4 100%);
}
html body.yl-detail-page:has(footer.dd-footer) { overflow-x: clip; }
/* 4 Nov (Shali): the phone headline sits at the foot of the hero, just above the button, not in the centre. */
@media (max-width: 767px) {
  html body:not(.yl-detail-page) #top .hero-inner { justify-content: flex-end !important; padding-bottom: calc(max(28px, env(safe-area-inset-bottom) + 20px) + 48px + 28px) !important; }
}
/* 4 Nov (Shali): the phone bar that keeps "View the Horizon Assessment" at the foot of the screen after the hero */
html body .home-assess-bar { display: none; }
@media (max-width: 767px) {
  html body .hero-assess.home-assess-bar {
    display: inline-flex; position: fixed; z-index: 60; opacity: 0; pointer-events: none;
    transform: translate(-50%, calc(100% + 32px)); transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 10px 30px rgba(14, 14, 15, .16), 0 0 0 1px rgba(14, 14, 15, .06);
  }
  html body .hero-assess.home-assess-bar.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) { html body .hero-assess.home-assess-bar { transition: none; } }
@media (max-width: 767px) {
  /* the sticky copy is dark (Neko's sticky button), so it holds on the light sections below the hero */
  html body .hero-assess.home-assess-bar { background: var(--void, #0e0e0f); color: var(--star, #f4f2ed); box-shadow: 0 12px 32px rgba(14, 14, 15, .22); }
  html body .hero-assess.home-assess-bar:active { background: #26262a; }
}

/* 4 Nov (Shali): MyHealth cards on soft gradients from the Longevity palette (starlight cream, sand, gold), each card
   leaning a little differently; the floating glass cards over the phones become dark glass. Their inner content is the
   Figma export with inline colours, so light fills clear and dark text turns starlight; green and amber accents stay. */
html body #myhealth.mh-pastel .mh-card { background: linear-gradient(158deg, #f4f2ed 0%, #efe6d6 52%, #e8d3ad 118%) !important; }
html body #myhealth.mh-pastel .mh-card:nth-child(3n+2) { background: linear-gradient(158deg, #f4f2ed 0%, #ece6db 50%, #dccdb4 116%) !important; }
html body #myhealth.mh-pastel .mh-card:nth-child(3n) { background: linear-gradient(158deg, #f6f0e4 0%, #f0e2c8 55%, #e7c089 135%) !important; }
html body #myhealth.mh-pastel .mh-float {
  background: rgba(14, 14, 15, .74) !important; border: 1px solid rgba(244, 242, 237, .14) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 18px 40px rgba(14, 14, 15, .28) !important; color: #f4f2ed;
}
html body #myhealth .mh-float .mh-fragment :is([style*="background-color:white"], [style*="background-color:#f5f4f3"], [style*="background-color:#f3f2f0"], [style*="background-color:#edeeea"], [style*="background-color:#e8e7e5"], [style*="background-color:#ffffff"], [style*="background-color:#fff;"]) { background-color: transparent !important; }
html body #myhealth .mh-float .mh-fragment :is([style*="color:#1c1f1a"], [style*="color:#434640"]) { color: #f4f2ed !important; }
html body #myhealth .mh-float .mh-fragment :is([style*="color:#65655f"], [style*="color:#4f6148"]) { color: rgba(244, 242, 237, .64) !important; }
html body #myhealth .mh-float .mh-fragment [style*="background-color:#e5f4ed"] { background-color: rgba(56, 176, 72, .2) !important; }
html body #myhealth .mh-float .mh-fragment [style*="color:#0b7a3e"] { color: #8ad69a !important; }
html body #myhealth .mh-float .mh-fragment :is(img, svg) { filter: invert(1) brightness(1.08); }

/* 4 Nov (Shali, Neko's Health Scan phone hero): /diagnostics/ on phones. Title and one paragraph, then the lounge as a
   tall card inset by the gutter with rounded top corners that opens to the full screen width as it scrolls up
   (--dd-open, dd-hero-expand-1104.js); the time and price live in the booking bar below, as on Neko. On arrival the
   title, paragraph and card rise in turn. */
@keyframes dd-rise { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
  html body.yl-detail-page .dd-hero { padding-bottom: 0 !important; }
  html body.yl-detail-page .dd-hero :is(.dd-scan-price, .dd-facts) { display: none !important; }
  html body.yl-detail-page .dd-hero .dd-hero-grid { gap: 0 !important; }
  html body.yl-detail-page .dd-hero .dd-lead { margin: 20px 0 0 !important; }
  html body.yl-detail-page .dd-hero .dd-hero-scene {
    --dd-r: var(--site-card-radius, 29px); --dd-gutter: var(--site-gutter, 20px);
    height: 100svh !important; aspect-ratio: auto !important; margin-top: 32px !important;
    margin-inline: calc(-1 * var(--dd-gutter) * var(--dd-open, 0)) !important;
    width: calc(100% + 2 * var(--dd-gutter) * var(--dd-open, 0)) !important;
    border-radius: calc(var(--dd-r) * (1 - var(--dd-open, 0))) calc(var(--dd-r) * (1 - var(--dd-open, 0))) 0 0 !important;
    overflow: hidden;
  }
  html body.yl-detail-page .dd-hero .dd-hero-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
  html body.yl-detail-page .dd-hero :is(#diagnostics-title, .dd-lead, .dd-hero-scene) { animation: dd-rise .8s cubic-bezier(0, 0, .2, 1) both; }
  html body.yl-detail-page .dd-hero .dd-lead { animation-delay: .12s; }
  html body.yl-detail-page .dd-hero .dd-hero-scene { animation-delay: .24s; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  html body.yl-detail-page .dd-hero :is(#diagnostics-title, .dd-lead, .dd-hero-scene) { animation: none; }
}

/* 4 Nov (Shali): /diagnostics/ Horizon switch on phones: one line ("Men", "Women", "Children"; the full name stays
   the accessible label), and docked at the foot of the screen while reading "Inside your assessment", above the
   booking bar when that is showing (ht-tabs-dock-1104.js). */
@media (max-width: 767px) {
  html body.yl-detail-page #stations .ht-tabs .ht-pre { display: none; }
  html body.yl-detail-page #stations .ht-tabs { display: flex; flex-wrap: nowrap; }
  html body.yl-detail-page #stations .ht-tabs button { flex: 1 1 0; white-space: nowrap; min-height: 48px; padding: 0 8px; }
  html body.yl-detail-page #stations.ht-docked .ht-tabs {
    position: fixed; z-index: 55; left: var(--site-gutter, 20px); right: var(--site-gutter, 20px); margin: 0 !important;
    bottom: calc(var(--dd-booking-h, 72px) + 12px);
    background: rgba(233, 228, 218, .94); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 12px 32px rgba(14, 14, 15, .16), 0 0 0 1px rgba(14, 14, 15, .05);
    transition: bottom .3s cubic-bezier(.4, 0, .2, 1);
  }
  html.hdr-hidden body.yl-detail-page #stations.ht-docked .ht-tabs { bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px)); }
}
@media (max-width: 767px) {
  html body.yl-detail-page #stations.ht-docked .ht-tabs { width: auto !important; max-width: none !important; }
  /* the scrolled phone header on /diagnostics/ is the homepage's frosted bar, so it never sits bare over the text */
  /* drawn on a layer behind the bar: a blur on the bar itself would become the frame for the fixed booking bar inside it */
  html body.yl-detail-page .masthead.has-bar .hdr { position: relative; isolation: isolate; height: 56px !important; min-height: 56px !important; padding: 5px 5px 5px 18px !important; }
  html body.yl-detail-page .masthead.has-bar .hdr::before {
    content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 21px; pointer-events: none;
    background: rgba(233, 228, 218, .78); -webkit-backdrop-filter: blur(20px) saturate(1.15); backdrop-filter: blur(20px) saturate(1.15);
    box-shadow: inset 0 0 0 1px rgba(14, 14, 15, .08), 0 10px 30px rgba(14, 14, 15, .08);
  }
}
@media (max-width: 767px) {
  /* while the area tabs sit under the header, the strip between them is filled with the page colour, so no text
     shows around the frosted header (as on the homepage, where the header floats over a clean ground) */
  html body.yl-detail-page #stations .dd-station-toolbar::before {
    content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--dd-nav-top, 0px);
    background: rgb(244, 242, 237); pointer-events: none;
  }
}
@media (max-width: 767px) {
  /* the frosted layer leaves with the logo and menu when the header steps aside, and the empty bar never takes taps */
  html body.yl-detail-page .masthead.has-bar .hdr::before { transition: opacity .3s cubic-bezier(.4, 0, .2, 1); }
  html.hdr-hidden body.yl-detail-page .masthead .hdr::before { opacity: 0; }
  html.hdr-hidden body.yl-detail-page .masthead .hdr { pointer-events: none; }
  html.hdr-hidden body.yl-detail-page .masthead .dd-booking:has(details[open]) { pointer-events: auto !important; }
}

/* 4 Nov (Shali): desktop hero holds just the title and the "View the Horizon Assessment" button; and as the gold O
   zooms, the Assessment section is seen through its opening (home-reference.js: --home-hole, home-portal) instead
   of a fade to black. The section rises beneath the held hero, on the section's own ground. */
@media (min-width: 768px) {
  html body:not(.yl-detail-page) #top .hero-foot { display: none !important; }
  html body .hero-assess {
    position: absolute; z-index: 6; left: 50%; bottom: 56px; transform: translateX(-50%);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
    min-height: 60px; padding: 0 28px; border-radius: var(--site-small-radius, 32px); corner-shape: var(--site-corner-shape, round);
    background: var(--star, #f4f2ed); color: var(--void, #0e0e0f); font: 500 18px/1.2 var(--f-text); letter-spacing: -.005em; text-decoration: none;
    box-shadow: 0 10px 30px rgba(14, 14, 15, .18); transition: background-color .2s cubic-bezier(.4, 0, .2, 1);
    opacity: var(--home-copy-opacity, 1);
  }
  html body .hero-assess svg { width: 24px; height: 24px; }
  html body .hero-assess:hover { background: #fff; }
  html body:not(.yl-detail-page) #top .hero-inner { padding-bottom: calc(56px + 60px + 32px) !important; }
  /* the track lies over the rising section without hiding it; the section's own ground continues above its top edge,
     so the opening never shows the dark page; once open, taps go straight to the section */
  html body .home-hero-track.home-has-portal { position: relative; z-index: 7; background: linear-gradient(to bottom, var(--void, #0e0e0f) calc(100% - 100vh), transparent calc(100% - 100vh)); pointer-events: none; }
  html body .home-hero-track.home-has-portal #top:not(.home-portal) { pointer-events: auto; }
  html body .home-hero-track.home-has-portal:has(#top.home-portal) {
    background: linear-gradient(to bottom, rgb(244, 242, 237) calc(100% - 100vh), transparent calc(100% - 100vh));
  }
  /* the hole goes through the photos, their shade and the copy, never through the gold ring above them */
  html body #top.home-portal { background: transparent; }
  html body #top.home-portal :is(.hero-photo, .hero-inner), html body #top.home-portal::after {
    -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--home-hole, 0px), #000 calc(var(--home-hole, 0px) + 1px));
    mask-image: radial-gradient(circle at 50% 50%, transparent var(--home-hole, 0px), #000 calc(var(--home-hole, 0px) + 1px));
  }
  html body #top.home-portal-open { visibility: hidden; }
  html body #top.home-portal, html body #top.home-portal * { pointer-events: none; }
}

/* 4 Nov (Shali): "Follow us" in every footer: Instagram, LinkedIn, YouTube and X as 44 px round icon buttons in the
   footer ink. Until the profile URLs arrive the icons carry no link (aria-disabled). */
html body .ft-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
html body .ft-social-link {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(14, 14, 15, .06); color: var(--void, #0e0e0f); text-decoration: none;
  transition: background-color .2s cubic-bezier(.4, 0, .2, 1), color .2s cubic-bezier(.4, 0, .2, 1);
}
html body .ft-social-link svg { width: 18px; height: 18px; display: block; }
html body .ft-social-link[href]:hover { background: var(--void, #0e0e0f); color: var(--star, #f4f2ed); }
html body .ft-social-link[href]:focus-visible { outline: 2px solid #806039; outline-offset: 3px; }
html body .ft-social-link[aria-disabled="true"] { cursor: default; }
html body footer.ft .ft-follow .ft-social { margin-top: 16px; }
html body :is(footer.dd-footer, footer.legal-footer) .ft-follow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
html body :is(footer.dd-footer, footer.legal-footer) .ft-follow-label { margin: 0; font: 500 14px/20px var(--f-text); color: var(--void, #0e0e0f); }
@media (min-width: 1300px) { html body footer.ft .ft-cols { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 1299px) { html body footer.ft .ft-cols .ft-follow { grid-column: 1 / -1; } }
html body footer.ft .ft-follow .ft-social { flex-wrap: nowrap; gap: 6px; }

/* 4 Nov (Shali): "Your health brought together." on a light ground like the rest of the page: starlight cream,
   a shade apart from the cream cards so they still read as cards; ink heading, soft ink copy and controls. The dark
   glass cards over the phones stay dark. */
html body #myhealth.mh { background: #e9e4da !important; color: var(--void, #0e0e0f) !important; }
html body #myhealth.mh :is(.mh-h, .mh-h .neo-word, .mh-connected h3, .mh-status, .mh-counter b) { color: var(--void, #0e0e0f) !important; }
html body #myhealth.mh :is(.mh-lead, .mh-connected p) { color: rgba(14, 14, 15, .64) !important; }
html body #myhealth.mh .mh-counter, html body #myhealth.mh .mh-counter :not(b) { color: rgba(14, 14, 15, .5) !important; }
html body #myhealth.mh .mh-btn { color: var(--void, #0e0e0f) !important; border-color: rgba(14, 14, 15, .2) !important; }
html body #myhealth.mh .mh-btn .sl { background-color: currentColor !important; }
html body #myhealth.mh .mh-btn:hover { background: rgba(14, 14, 15, .06) !important; }
html body #myhealth.mh .mh-btn[disabled], html body #myhealth.mh .mh-btn[aria-disabled="true"] { opacity: .35; }
html body #myhealth.mh ::selection { background: var(--void, #0e0e0f); color: var(--star, #f4f2ed); }
html body #myhealth.mh :is(.mh-track, .mh-btn):focus-visible { outline-color: #806039 !important; }

/* Reviewed figure videos align to the still's rendered box and blend into its card. */
html body .fig-turn { mix-blend-mode:multiply; }
html body .fig-turn img, html body .fig-turn .fig-turn-video { mix-blend-mode:normal; }
html body .fig-turn img { transition:none; }
html body .fig-turn .fig-turn-video { position:absolute; z-index:1; object-fit:contain; object-position:50% 0; opacity:0; pointer-events:none; transition:none; }
html body .fig-turn.is-turning .fig-turn-video { opacity:1; }
html body .fig-turn.is-turning img { opacity:0; }
html body.yl-detail-page .dd-pathway .fig-turn img { transform:translateX(-50%); transition:none; }
@media(prefers-reduced-motion:reduce) {
  html body .fig-turn .fig-turn-video { display:none; }
  html body .fig-turn.is-turning img { opacity:1; }
}

/* 6 Nov: the Children card now lists four focus points (Chaitanya's 5 Nov update). The shared three-row subgrid stacked the
   fourth on top of the third, so this one list keeps its own rows. */
html body.yl-detail-page #junior-horizon .dd-difference ul { grid-template-rows: none; grid-auto-rows: auto; align-content: start; }
