/* Section 02, Health assessment (27 Oct, v3 visual overview). The portal reveals the blood-draw photo; over its last
   steps a Starlight wash turns it into a bright canvas (the hero's .next and this section's .as-scrim share --as-scrim,
   both at opacity --as-k, so the hand-over stays matched). On the canvas: the 120-minute headline with five image tiles
   that settle around it, eight image-led overview cards (3 / 2 / 1 columns), and one "Explore assessment details"
   disclosure with every test. Void type on Starlight; no Gold on Starlight. Motion: opacity/transform only (no height
   change), tiles settle once the section is in place, cards stagger in; none with reduced motion or without script. */
:root { --as-scrim: var(--star); }
/* Phones and upright screens see a narrow slice of the portal photo: frame on the patient and the blood draw (portal image
   and section background together, so the hand-over stays exact; portal-glass.js reads this too). */
@media (max-width: 759px), (max-aspect-ratio: 6/5) {
  .hero .portal-img img, .assess .as-bg img { object-position: 36% 50%; }
}

.assess { position: relative; z-index: 6; color: var(--void); background: var(--star);
  --as-gap: clamp(24px, 3vw, 48px); --as-line: rgba(14, 14, 15, 0.12); --as-h: 100vh; }
@supports (height: 100lvh) { .assess { --as-h: 100lvh; } }
/* With the portal running, the section sits exactly over the pinned hero's final position and only shows once the portal
   has filled the screen (portal.js adds .is-shown at p 0.95 and holds it in place), so it matches the hero frame under it. */
html.portal-on .assess { margin-top: calc(-1 * var(--as-h)); }
html.portal-on .assess:not(.is-shown) { visibility: hidden; }
/* Held over the pinned hero by the browser itself: while its natural place is still below, sticky pulls it up to the top
   of the screen (bottom inset = screen height - section height, so a section taller than the screen sticks by its top).
   The scroll thread does this, so it can never lag the fixed hero the way a scroll-handler translate did. */
html.portal-on .assess { position: sticky; bottom: var(--as-stick, 0px); }

/* Background: the portal's photo, held full screen, under the Starlight wash (--as-k); same framing as the portal image. */
.as-bg { position: sticky; top: 0; height: var(--as-h); overflow: hidden; }
.as-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.as-scrim { position: absolute; inset: 0; background: var(--as-scrim); opacity: var(--as-k, 1); } /* --as-k: portal.js, = the hero's .next */

.as-content { position: relative; margin-top: calc(-1 * var(--as-h)); min-height: var(--as-h);
  padding: calc(var(--hdr-h) + env(safe-area-inset-top) + clamp(24px, 4vh, 56px)) var(--m) calc(clamp(64px, 7vw, 112px) + env(safe-area-inset-bottom)); }
/* Content reveal as the portal settles, tied to the scroll (no timed fade, no pop on the way back). Opacity only: an offset
   here made the page taller while the section waited and the scroll snapped back when it showed (27 Oct glitch). */
html.portal-on .as-content { opacity: var(--as-c, 1); } /* --as-c: portal.js, follows the scroll both ways */

/* Introduction: centred headline and line, image tiles placed around it on wide screens. */
.as-top { position: relative; padding: clamp(40px, 7vw, 112px) 0 clamp(16px, 2vw, 32px); text-align: center; }
/* Section titles share one scale, a step below the hero headline. */
.as-h { position: relative; z-index: 1; margin: 0 auto; max-width: 11em; font-size: clamp(32px, 3.4vw, 54px); line-height: 1.02; letter-spacing: -0.04em; color: var(--void); text-wrap: balance; }
.as-h:focus { outline: none; }
.as-em { color: var(--void); }
.as-lead { position: relative; z-index: 1; margin: 18px auto 0; max-width: 30em; font-size: var(--t-lead); line-height: 1.5; color: rgba(14, 14, 15, 0.7); text-wrap: pretty; }
.as-tiles { position: absolute; inset: 0; pointer-events: none; }
.as-tile { position: absolute; display: block; overflow: hidden; border-radius: 18px; background: rgba(14, 14, 15, 0.06);
  box-shadow: 0 14px 34px rgba(14, 14, 15, 0.12); transform: var(--to); }
.as-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.as-tile.t1 { left: 1%;  top: 4%;  width: clamp(76px, 8.4vw, 124px); aspect-ratio: 1; --to: rotate(-5deg); --from: translate(-36px, -24px) rotate(-12deg) scale(0.86); }
.as-tile.t2 { right: 3%; top: 0;   width: clamp(68px, 7.2vw, 108px); aspect-ratio: 1; --to: rotate(4deg);  --from: translate(36px, -28px) rotate(10deg) scale(0.86); }
.as-tile.t3 { left: 9%;  bottom: 2%; width: clamp(64px, 6.6vw, 98px); aspect-ratio: 1; --to: rotate(3deg);  --from: translate(-30px, 30px) rotate(9deg) scale(0.86); }
.as-tile.t4 { right: 10%; bottom: 6%; width: clamp(80px, 8.8vw, 132px); aspect-ratio: 1; --to: rotate(-3deg); --from: translate(34px, 30px) rotate(-10deg) scale(0.86); }
.as-tile.t5 { left: 21%; top: 14%; width: clamp(52px, 5.2vw, 78px); aspect-ratio: 1; --to: rotate(-2deg); --from: translate(-40px, 0) rotate(-8deg) scale(0.86); }
html.js .as-tile { opacity: 0; transform: var(--from); transition: opacity 0.9s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
html.js .as-top.is-in .as-tile { opacity: 1; transform: var(--to); }
html.js .as-top.is-in .t2 { transition-delay: 0.08s; } html.js .as-top.is-in .t3 { transition-delay: 0.16s; }
html.js .as-top.is-in .t4 { transition-delay: 0.12s; } html.js .as-top.is-in .t5 { transition-delay: 0.22s; }

/* Overview cards: thumbnail, name, one sentence. Not links; the thumbnail eases a touch on hover. */
.as-grid { list-style: none; margin: clamp(40px, 5vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px var(--as-gap); }
.as-card { display: grid; grid-template-columns: clamp(80px, 6.6vw, 104px) 1fr; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--as-line); }
.as-thumb { display: block; width: 100%; aspect-ratio: 1; height: auto; border-radius: 14px; object-fit: cover; background: rgba(14, 14, 15, 0.06);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.as-thumb-ph { display: grid; place-items: center; }
.as-thumb-ph svg { width: 42%; height: 42%; fill: rgba(14, 14, 15, 0.42); }
@media (hover: hover) { .as-card:hover .as-thumb { transform: scale(1.04); } }
.as-ct { margin: 0; font: 400 clamp(19px, 1.5vw, 22px)/1.2 var(--f-display); letter-spacing: -0.015em; color: var(--void); }
.as-cd { margin: 5px 0 0; font-size: 15px; line-height: 1.45; color: rgba(14, 14, 15, 0.7); text-wrap: pretty; }
html.js .as-card { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: calc(var(--i, 0) * 60ms); }
html.js .as-grid.is-in .as-card { opacity: 1; transform: none; }
.as-card:nth-child(2) { --i: 1; } .as-card:nth-child(3) { --i: 2; } .as-card:nth-child(4) { --i: 3; } .as-card:nth-child(5) { --i: 4; }
.as-card:nth-child(6) { --i: 5; } .as-card:nth-child(7) { --i: 6; } .as-card:nth-child(8) { --i: 7; }

/* Complete details: one native disclosure (keyboard and screen-reader ready, open without script). */
.as-details { margin-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--as-line); padding-top: 24px; }
.as-sum { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px 0 18px; border-radius: 12px; cursor: pointer; list-style: none;
  box-shadow: inset 0 0 0 1px rgba(14, 14, 15, 0.22); font: 500 15px/1.2 var(--f-text); color: var(--void); transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.as-sum::-webkit-details-marker { display: none; }
.as-sum:hover { background: rgba(14, 14, 15, 0.05); box-shadow: inset 0 0 0 1px rgba(14, 14, 15, 0.4); }
.as-sum:focus-visible { outline: 2px solid var(--void); outline-offset: 3px; }
.as-sum-ic { width: 22px; height: 22px; fill: currentColor; transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.as-details[open] .as-sum-ic { transform: rotate(180deg); }
.as-dgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--as-gap); margin-top: 28px; }
.as-details[open] .as-dgrid { animation: as-open 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes as-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.as-dh { margin: 0 0 10px; font: 500 15px/1.35 var(--f-text); color: var(--void); }
.as-dl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--as-line); }
.as-dl li { padding: 9px 0; border-bottom: 1px solid var(--as-line); font-size: 15px; line-height: 1.45; color: rgba(14, 14, 15, 0.76); }

/* Tablets: two columns of cards and details. */
@media (max-width: 1099px) {
  .as-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Not enough room beside the centred headline: the tiles sit as a small row above it (as on phones). */
  .as-top { padding-top: clamp(16px, 3vw, 40px); }
  .as-tiles { position: static; display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; }
  .as-tile, .as-tile.t1, .as-tile.t2, .as-tile.t3, .as-tile.t4, .as-tile.t5 { position: relative; inset: auto; width: 64px; border-radius: 14px; box-shadow: 0 8px 20px rgba(14, 14, 15, 0.12); }
  .as-tile.t1, .as-tile.t3, .as-tile.t5 { --from: translateY(16px) rotate(-6deg) scale(0.9); }
  .as-tile.t2, .as-tile.t4 { --from: translateY(16px) rotate(6deg) scale(0.9); }
}
/* Phones: the tiles sit as a small row above the headline; full-width card rows with 16 px descriptions. */
@media (max-width: 759px) {
  .as-content { padding-top: calc(var(--hdr-h) + env(safe-area-inset-top) + 28px); padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .as-top { padding: 0; }
  .as-tiles { gap: 8px; margin-bottom: 24px; }
  .as-tile, .as-tile.t1, .as-tile.t2, .as-tile.t3, .as-tile.t4, .as-tile.t5 { width: 56px; }
  .as-h { font-size: clamp(28px, 7.8vw, 32px); line-height: 1.06; }
  .as-lead { font-size: 16px; margin-top: 12px; }
  .as-grid { grid-template-columns: 1fr; margin-top: 32px; gap: 0; }
  .as-card { grid-template-columns: 72px 1fr; gap: 14px; padding: 12px 0; }
  .as-ct { font-size: 19px; }
  .as-cd { font-size: 16px; }
  .as-dgrid { grid-template-columns: 1fr; gap: 24px; }
  .as-dl li { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .as-tile, html.js .as-card { opacity: 1; transform: var(--to, none); transition: none; }
  html.js .as-card { transform: none; }
  .as-thumb, .as-sum-ic, .as-sum { transition: none; }
  .as-details[open] .as-dgrid { animation: none; }
}

/* Click-to-explore assessment drawers, 27 Oct. Official, self-hosted Google Material Symbols Rounded. */
@font-face { font-family: 'Yoda Material Symbols'; font-style: normal; font-weight: 400; font-display: block; src: url('../fonts/material-symbols-rounded-assessment-v2.woff2') format('woff2'), url('../fonts/material-symbols-rounded-assessment.ttf') format('truetype'); /* v2 (28 Oct) adds face, eyeglasses */ }
.msr { font-family: 'Yoda Material Symbols'; font-weight: 400; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; flex: none; }
.as-card { display: block; padding: 0; border: 0; }
.as-card-button { position: relative; display: grid; grid-template-columns: clamp(80px,6.6vw,104px) 1fr 16px; align-items: center; gap: 14px; width: 100%; min-height: 112px; padding: 14px 4px 14px 0; border: 0; border-top: 1px solid var(--as-line); border-radius: 0; background: transparent; color: var(--void); text-align: left; font: inherit; cursor: pointer; transition: background-color .25s ease; }
.as-ct, .as-cd { display: block; }
.as-card-arrow { font-size: 20px; opacity: .42; transition: opacity .25s ease, transform .25s ease; }
.as-card-button:focus-visible { outline: 2px solid var(--void); outline-offset: 5px; border-radius: 12px; }
.as-card-button:focus-visible .as-card-arrow { opacity: 1; }
.as-thumb-ph .msr { font-size: 34px; color: rgba(14,14,15,.5); }
@media (hover:hover) and (pointer:fine) {
  .as-card-button:hover { background: rgba(255,255,255,.22); }
  .as-card-button:hover .as-card-arrow { opacity: 1; transform: translateX(3px); }
}
.assessment-drawer { position: fixed; inset: 0 0 0 auto; width: min(540px,100%); height: 100dvh; max-width: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 24px 0 0 24px; background: var(--star); color: var(--void); overflow: hidden; box-shadow: -18px 0 70px rgba(14,14,15,.15); transform: translateX(100%); transition: transform .26s cubic-bezier(.22,1,.36,1); }
.assessment-drawer[open] { display: flex; flex-direction: column; }
.assessment-drawer.is-open { transform: translateX(0); }
.assessment-drawer::backdrop { background: rgba(14,14,15,.3); backdrop-filter: blur(3px); }
.ad-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 28px 32px 16px; }
.ad-category-image { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 16px; background: rgba(14,14,15,.06); }
.ad-close { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(14,14,15,.13); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; transition: background-color .2s ease; }
.ad-close:hover { background: rgba(255,255,255,.5); }
.ad-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 32px 32px; }
#assessment-drawer-title { margin: 0; max-width: 12em; font: 400 clamp(32px,3vw,42px)/1.06 var(--f-display); letter-spacing: -.035em; text-wrap: balance; }
#assessment-drawer-description { margin: 16px 0 0; font: 400 16px/1.55 var(--f-text); color: rgba(14,14,15,.72); }
.ad-label { margin: 32px 0 14px; font: 500 16px/1.4 var(--f-text); }
.ad-tests { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ad-tests li { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 14px; padding: 14px; border: 1px solid rgba(14,14,15,.07); border-radius: 16px; background: rgba(255,255,255,.38); font: 400 16px/1.45 var(--f-text); }
/* Equipment (27 Oct): a plain list under the tests, one fine rule per item (generic names; models in the project notes). */
.ad-equip { list-style: none; padding: 0; margin: 0; }
.ad-equip li { padding: 12px 0; border-top: 1px solid rgba(14,14,15,.1); font: 400 16px/1.45 var(--f-text); color: var(--y-ink-primary, #27272c); }
.ad-equip li:last-child { border-bottom: 1px solid rgba(14,14,15,.1); }
.ad-test-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.65); color: rgba(14,14,15,.75); }
.ad-test-icon .msr { font-size: 23px; }
.ad-foot { flex: none; padding: 20px 32px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(14,14,15,.1); background: var(--star); }
.ad-register { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--void); border-radius: 12px; padding: 14px 18px; background: var(--void); color: var(--star); font: 500 16px/1.35 var(--f-text); cursor: pointer; transition: background-color .2s ease, transform .2s ease; }
.ad-register:hover { background: #29292a; }
.ad-register:active { transform: scale(.985); }
.ad-close:focus-visible,.ad-register:focus-visible { outline: 2px solid var(--void); outline-offset: 4px; }
.as-noscript { margin-top: 36px; }
/* No-script content (28 Oct): all nine categories from the drawer data, readable as a plain list. */
.as-noscript section { padding: 20px 0; border-top: 1px solid var(--as-line); }
.as-noscript h3 { margin: 0; font: 400 22px/1.25 var(--f-display); color: var(--void); }
.as-noscript h4 { margin: 14px 0 6px; font: 500 15px/1.4 var(--f-text); color: var(--void); }
.as-noscript p { margin: 6px 0 0; font: 400 15px/1.5 var(--f-text); color: rgba(14,14,15,.7); }
.as-noscript ul { list-style: disc; margin: 10px 0 0; padding-left: 18px; font: 400 15px/1.55 var(--f-text); color: var(--void); }
@media (max-width:759px) {
 .as-card-button { grid-template-columns: 72px 1fr 16px; gap: 12px; min-height: 104px; padding: 12px 2px 12px 0; }
 .assessment-drawer { width: 100%; border-radius: 0; }
 .ad-head { padding: calc(20px + env(safe-area-inset-top)) 24px 12px; }
 .ad-scroll { padding: 12px 24px 24px; }
 .ad-foot { padding: 16px 24px calc(20px + env(safe-area-inset-bottom)); }
 .ad-tests li { padding: 12px; gap: 12px; }
}
@media(prefers-reduced-motion:reduce) { .assessment-drawer,.as-card-arrow,.ad-register,.as-card-button { transition: none; } }

.ad-scroll:focus-visible { outline: 2px solid rgba(14,14,15,.35); outline-offset: -7px; border-radius: 12px; }

/* Equipment rows (28 Oct): optional compact product photo, then the name and one line (assessment.js). Rows without a
   photo have no image box. Photo tiles use the drawer's light card fill, contained, never cropped. */
.ad-equip li { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 14px; align-items: center; }
.ad-equip li.has-photo { grid-template-columns: 64px minmax(0, 1fr); }
.ad-eq-photo { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: rgba(255,255,255,.65); overflow: hidden; }
.ad-eq-photo img { display: block; width: 56px; height: 56px; object-fit: contain; }
.ad-eq-body { display: grid; row-gap: 2px; min-width: 0; }
.ad-eq-type { font: 500 16px/1.4 var(--f-text); color: var(--y-ink-primary, #27272c); }
.ad-eq-use { font: 400 15px/1.5 var(--f-text); color: rgba(14,14,15,.66); }
/* Phones (28 Oct polish): slightly larger, clearer photos; name and line stay compact. */
@media (max-width: 759px) {
  .ad-equip li.has-photo { grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; }
  .ad-eq-photo { width: 72px; height: 72px; border-radius: 14px; }
  .ad-eq-photo img { width: 64px; height: 64px; }
  .ad-eq-type { font-size: 15px; line-height: 1.35; }
  .ad-eq-use { font-size: 14px; line-height: 1.45; }
}

/* Who a test applies to (28 Oct), under the test name, e.g. "For women, where clinically appropriate". */
.ad-applies { display: block; margin-top: 2px; font: 400 14px/1.45 var(--f-text); color: rgba(14,14,15,.62); }
/* No script (28 Oct): the cards cannot open their drawers, so they are not shown; the full nine-category list below is. */
html:not(.js) .as-grid { display: none; }
html:not(.js) .as-noscript { margin-top: 8px; }
