/* Healnet scroll story (proof of concept).
   Self-contained: every rule is under .hs, and the colours and sizes are set
   on .hs itself, so the section can be lifted into another page as it is.
   It expects the site's Montserrat and IBM Plex Sans (300) faces, declared in
   css/styles.css; the two extra faces it needs are declared here.

   Everything down to "motion" is the stills: every scene shown at its end
   state, which is what visitors with reduced motion or no JavaScript see. */

@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

.hs {
  /* Healx Design System. Teal is discovery: the whole of version 1.
     Blue is used once, for the programmes in the clinic at the close. */
  --hs-ink: #15202D;
  --hs-halo: 0 0 3px var(--hs-ink), 0 0 6px var(--hs-ink), 0 0 10px var(--hs-ink);
  --hs-panel: #1B2836;
  --hs-line: #2E3D50;
  --hs-text: #FFFFFF;
  --hs-muted: #D8DDE3;
  --hs-faint: #B3BBC5;
  --hs-teal: #66C1B0;
  --hs-teal-soft: #C5E4DD;
  --hs-teal-deep: #185249;
  --hs-teal-dark: #2B8375;
  --hs-blue: #377AB2;
  --hs-blue-mid: #8FBDE6;
  --hs-display: "Montserrat", system-ui, sans-serif;
  --hs-sans: "IBM Plex Sans", system-ui, sans-serif;
  --hs-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --hs-rail: 136px;
  --hs-stick: 60px;             /* phones: where the room for a held figure starts, under the rail's bar */
  --hs-h1: 34px;
  --hs-h2: 28px;
  --hs-stat: 34px;

  position: relative;
  background: var(--hs-ink);
  color: var(--hs-text);
  font-family: var(--hs-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
}
@media (min-width: 768px) { .hs { --hs-h1: 46px; --hs-h2: 34px; --hs-stat: 38px; } }
@media (min-width: 1200px) { .hs { --hs-h1: 56px; --hs-h2: 40px; --hs-stat: 40px; } }

.hs *, .hs *::before, .hs *::after { box-sizing: border-box; }
/* :where() keeps these resets weak, so any class below can set its own margins. */
.hs :where(h1, h2, p, ul, ol, dl, dd, figure) { margin: 0; padding: 0; }
.hs :where(ul, ol) { list-style: none; }
.hs img, .hs svg { display: block; max-width: 100%; }
.hs a { color: inherit; }
.hs a:focus-visible { outline: 2px solid var(--hs-teal); outline-offset: 3px; border-radius: 4px; }

/* ---------------------------------------------------------------- the rail */
/* Phones: a slim bar under the top of the screen, with the current stop named. */
.hs-rail { position: sticky; top: 0; z-index: 3; background: var(--hs-ink); padding: 0 8px; }
.hs-rail ol { display: flex; }
.hs-rail li { flex: 1 1 0; min-width: 0; }
.hs-rail a { position: relative; display: flex; flex-direction: column; align-items: center; height: 52px; padding-top: 14px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
/* The line between stops. */
.hs-rail a::before { content: ""; position: absolute; top: 18px; left: 0; right: 0; height: 2px; background: var(--hs-line); }
.hs-rail li:first-child a::before { left: 50%; }
.hs-rail li:last-child a::before { right: 50%; }
.hs-rail__dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--hs-line); box-shadow: 0 0 0 4px var(--hs-ink); }
/* Only the current stop's name shows. The other names are see-through, not
   hidden, so that a screen reader still has a name for every link. */
.hs-rail__label { margin-top: 6px; font-family: var(--hs-display); font-weight: 600; font-size: 12px; letter-spacing: .4px; color: var(--hs-faint); white-space: nowrap; opacity: 0; }
.hs-rail a:hover .hs-rail__dot, .hs-rail a:focus-visible .hs-rail__dot { background: var(--hs-faint); }
.hs-rail a[aria-current] .hs-rail__dot { background: var(--hs-teal); }
.hs-rail a[aria-current] .hs-rail__label { opacity: 1; color: var(--hs-teal); }
/* A stop reached with the keyboard shows its name too. The current stop's
   name steps back meanwhile, so that two names never overlap. */
.hs-rail a:focus-visible .hs-rail__label { opacity: 1; color: var(--hs-text); }
@media (max-width: 959px) { .hs-rail ol:has(a:focus-visible) a[aria-current]:not(:focus-visible) .hs-rail__label { opacity: 0; } }
/* Phones: the last stop's name (Portfolio) is wider than its slot, so it sits
   flush with the bar's right edge rather than centred under its dot. */
@media (max-width: 959px) { .hs-rail li:last-child .hs-rail__label { align-self: flex-end; } }

/* From 960px: a slim line down the left edge, every stop named. */
@media (min-width: 960px) {
  .hs { --hs-stick: 24px; display: grid; grid-template-columns: var(--hs-rail) minmax(0, 1fr); }
  .hs-rail { align-self: start; height: 100vh; display: flex; align-items: center; padding: 0 0 0 30px; background: none; }
  .hs-rail ol { flex-direction: column; }
  .hs-rail li { flex: none; }
  .hs-rail a { flex-direction: row; align-items: center; gap: 14px; height: 46px; padding: 0; }
  .hs-rail a::before { top: 0; bottom: 0; left: 4px; right: auto; width: 2px; height: auto; }
  .hs-rail li:first-child a::before { left: 4px; top: 50%; }
  .hs-rail li:last-child a::before { right: auto; bottom: 50%; }
  .hs-rail__label { margin: 0; opacity: 1; }
  .hs-rail a:hover .hs-rail__label, .hs-rail a:focus-visible .hs-rail__label { color: var(--hs-text); }
}

/* --------------------------------------------------------------- the scenes */
.hs-scenes { min-width: 0; }
.hs-scene { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 56px 20px 64px; scroll-margin-top: 52px; }
@media (min-width: 960px) {
  .hs-scene { gap: 44px; max-width: 760px; padding: 88px 48px 96px 20px; scroll-margin-top: 0; }
}
/* From 1160px: the copy on the left, the figure on the right, one screen each. */
@media (min-width: 1160px) {
  .hs-scene { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); align-items: center; gap: 56px; min-height: 100vh; max-width: 1304px; padding: 72px 48px 72px 20px; }
}

.hs-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.hs-eyebrow { font-family: var(--hs-display); font-weight: 600; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--hs-teal); }
.hs-headline { font-family: var(--hs-display); font-weight: 400; font-size: var(--hs-h2); line-height: 1.16; letter-spacing: -.3px; text-wrap: balance; }
.hs h1.hs-headline, .hs .hs-headline--lead { font-size: var(--hs-h1); line-height: 1.1; letter-spacing: -.5px; }
.hs-accent { color: var(--hs-teal); }
/* The problem a scene answers, above the headline that answers it. */
.hs-kicker { max-width: 30em; padding-left: 12px; border-left: 2px solid #576574; color: var(--hs-faint); font-weight: 500; font-size: 15.5px; line-height: 1.4; text-wrap: pretty; }
.hs-body { max-width: 34em; color: var(--hs-muted); font-size: 18px; text-wrap: pretty; }

/* Stat callouts: the number, one teal underline, a label and a source. */
.hs-stats { display: flex; flex-wrap: wrap; gap: 22px 32px; margin-top: 10px; }
.hs-stat { display: flex; flex-direction: column; gap: 8px; min-width: 104px; }
.hs-stat__num { align-self: flex-start; padding-bottom: 6px; border-bottom: 2px solid var(--hs-teal); font-family: var(--hs-display); font-weight: 500; font-size: var(--hs-stat); line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hs-stat__label { max-width: 15em; font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--hs-muted); }
.hs-source { font-family: var(--hs-mono); font-size: 11.5px; line-height: 1.4; color: var(--hs-faint); }

/* Buttons (the close). */
.hs-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hs-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 12px 24px; border-radius: 999px; background: var(--hs-teal); font-family: var(--hs-display); font-weight: 600; font-size: 15px; text-decoration: none; }
.hs-btn--quiet { background: var(--hs-line); }
/* Their text colours need the extra .hs to win over ".hs a { color: inherit }". */
.hs .hs-btn { color: var(--hs-ink); }
.hs .hs-btn--quiet { color: var(--hs-text); }

/* -------------------------------------------------------------- shared parts */
/* A figure arranges itself by its own width (container queries), not the window's,
   so it holds up in a narrow column on a small laptop as well as on a phone. */
.hs-figure { container-type: inline-size; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 24px; }

/* The atlas: one still, reused in every scene that shows it, with what that
   scene adds laid over it. */
.hs-atlas { position: relative; width: 100%; max-width: var(--atlas, 440px); aspect-ratio: 1; flex: none; }
.hs-atlas img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hs-atlas--dim .hs-atlas__base { opacity: .55; }

/* An illustration: the badge, and its pill label in the item's key colour. */
.hs-ill { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hs-ill img { width: var(--ill, 64px); height: var(--ill, 64px); }
.hs-pill { position: relative; margin-top: -6px; max-width: 12.5em; padding: 2px 9px 3px; border-radius: 10px; background: var(--pill, var(--hs-teal)); color: var(--pill-text, var(--hs-ink)); font-family: var(--hs-display); font-weight: 600; font-size: 11px; line-height: 1.22; text-wrap: balance; }
.hs-ill[data-key="lavender"] { --pill: #B7B0E3; }
.hs-ill[data-key="orange"] { --pill: #F1863B; }
.hs-ill[data-key="yellow"] { --pill: #EDB700; }
.hs-ill[data-key="blue"] { --pill: #8FBDE6; }
.hs-ill[data-key="coral"] { --pill: #FF9591; }
.hs-ill[data-key="dark-teal"] { --pill: #2B8375; --pill-text: #FFFFFF; }
.hs-ill[data-key="neutral"] { --pill: #D8DDE3; --pill-text: #2E3D50; }
/* Badge beside its label, for tight rows. */
.hs-ill--row { flex-direction: row; gap: 10px; text-align: left; }
.hs-ill--row .hs-pill { margin-top: 0; max-width: none; white-space: nowrap; font-size: 12px; }

/* ------------------------------------------------- the frame: opening and close */
/* The opening and the close each have two parts, a screen apiece in
   the still: the challenge, then the turn to Healnet; the portfolio, then the
   line the story ends on. Both run full width, under the rail, on the field. */
.hs-frame { position: relative; display: block; padding: 0; overflow: hidden; }
.hs-frame__part { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center; padding: 72px 20px 96px; }
.hs-frame .hs-copy { position: relative; align-items: center; max-width: 820px; }
@media (min-width: 960px) {
  .hs-frame { max-width: none; margin-left: calc(-1 * var(--hs-rail)); padding: 0 var(--hs-rail); }
}

/* ------------------------------------------------------------- the opening */
.hs-opening__field { position: absolute; inset: 0; background: url("static/field.svg") center / cover no-repeat; }
.hs-opening__point { position: relative; flex: none; width: 14px; height: 14px; margin-bottom: 40px; border-radius: 50%; background: var(--hs-teal); }
/* The challenge fills the first screen, less the site's header (124px on a phone,
   80px from 960px), so that the scroll cue is on it. */
.hs-challenge { min-height: calc(100vh - 124px); min-height: calc(100svh - 124px); padding-bottom: 136px; }
.hs-turn { min-height: 100vh; min-height: 100svh; }
.hs-challenge .hs-headline { max-width: 15em; }
.hs-challenge .hs-stats { position: relative; z-index: 0; justify-content: center; gap: 22px 40px; }
.hs-challenge .hs-stat { align-items: center; }
.hs-challenge .hs-stat__num { align-self: center; }
.hs-challenge .hs-stat__label { text-align: center; }
/* What the field's points mean, with motion only: in the still nothing dims. */
.hs-field-key { display: none; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-family: var(--hs-mono); font-size: 12px; color: var(--hs-faint); }
.hs-field-key i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--hs-muted); vertical-align: 1px; }
.hs-field-key span + span i { background: #3B4757; }
.hs-live .hs-field-key { display: flex; }
.hs-opening .hs-body { position: relative; z-index: 0; max-width: 30em; text-wrap: balance; }
/* A soft scrim in the page's colour, so the field's points don't break up the line. */
.hs-opening .hs-body::before, .hs-challenge .hs-stats::before, .hs-end__line::before { content: ""; position: absolute; inset: -28px -72px; z-index: -1; background: radial-gradient(closest-side, rgb(21 32 45 / .94) 62%, rgb(21 32 45 / 0)); }
/* Pinned, the numbers' scrim arrives with the first of them (--hs-scrim): until
   then the field is whole under the headline, with no empty dark patch. */
.hs-challenge .hs-stats::before { opacity: var(--hs-scrim, 1); }
/* The scroll cue: said in words, since few read the line above it, over a disc
   with an arrow that nudges downwards. */
.hs-cue { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 12px; color: var(--hs-muted); font-family: var(--hs-sans); font-weight: 500; font-size: 14px; letter-spacing: .4px; text-decoration: none; white-space: nowrap; }
.hs-cue__disc { width: 44px; height: 44px; border-radius: 50%; background: var(--hs-line); display: flex; align-items: center; justify-content: center; transition: background-color .2s; }
.hs-cue__disc::before { content: ""; width: 11px; height: 11px; margin-top: -6px; border-right: 2px solid var(--hs-teal); border-bottom: 2px solid var(--hs-teal); transform: rotate(45deg); }
/* "or click" shows only where a click steps the story on (.hs-clicks: see stepper in the motion script). */
.hs-cue__or { display: none; }
.hs-clicks .hs-cue__or { display: inline; }
.hs-cue:hover { color: var(--hs-text); }
.hs-cue:hover .hs-cue__disc { background: var(--hs-teal-deep); }
@media (min-width: 960px) {
  .hs-challenge { min-height: calc(100vh - 80px); min-height: calc(100svh - 80px); }
}
/* The cue's disc nudges downwards three times, inside five seconds, then rests. */
@media (prefers-reduced-motion: no-preference) {
  .hs-cue__disc { animation: hs-cue 1.4s ease-in-out .9s 3; }
}
@keyframes hs-cue { 0%, 100% { transform: none; } 45% { transform: translateY(8px); } }

/* --------------------------------------------------------------- the close */
.hs-delivered { min-height: 100vh; gap: 36px; }
.hs-delivered .hs-copy { gap: 14px; }
.hs-fig-portfolio { width: 100%; }
.hs-pipe { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); width: 100%; max-width: 640px; }
.hs-pipe__stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 8px 0; border-top: 2px solid var(--hs-line); }
/* Each stage's line in its own colour, deeper than its dots: teal for discovery, blue for the clinic (20 November). */
.hs-pipe__stage:not(.hs-pipe__stage--clinic) { border-top-color: var(--hs-teal-dark); }
.hs-pipe__stage--clinic { border-top-color: var(--hs-blue); }
.hs-pipe__dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; min-height: 44px; max-width: 260px; }
.hs-pipe__dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--hs-teal); }
.hs-pipe__dots b { font-family: var(--hs-display); font-weight: 500; font-size: 20px; line-height: 1; color: var(--hs-teal); }
.hs-pipe__stage--clinic .hs-pipe__dots i { width: 20px; height: 20px; background: var(--hs-blue-mid); }
.hs-pipe__name { font-family: var(--hs-mono); font-size: 12px; color: var(--hs-faint); }
/* Phones: the nine dots and their "+" stay on one line. */
@media (max-width: 767px) {
  .hs-pipe__dots { gap: 6px; }
  .hs-pipe__dots i { width: 11px; height: 11px; }
  .hs-pipe__stage--clinic .hs-pipe__dots i { width: 16px; height: 16px; }
}
/* Each number sits under its own stage: the same two columns as the pipeline above (20 November). */
.hs-frame .hs-copy--portfolio { width: 100%; max-width: 640px; }
.hs-copy--portfolio .hs-stats { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0; width: 100%; margin-top: 0; }
.hs-copy--portfolio .hs-stat { min-width: 0; padding: 0 8px; }
.hs-copy--portfolio .hs-stat { align-items: center; }
.hs-copy--portfolio .hs-stat__num { align-self: center; }
.hs-copy--portfolio .hs-stat__label { text-align: center; }
.hs-end { min-height: 100vh; gap: 28px; padding-top: 96px; }
.hs-end__field { position: absolute; inset: 0; background: url("static/field.svg") center / cover no-repeat; }
/* Full width, as the opening's field: out over the frame's padding, under the rail. */
@media (min-width: 960px) { .hs-end__field { left: calc(-1 * var(--hs-rail)); right: calc(-1 * var(--hs-rail)); } }
.hs-end .hs-opening__point { margin-bottom: 4px; }
.hs-end__line { position: relative; z-index: 0; max-width: 17em; font-family: var(--hs-display); font-weight: 400; font-size: var(--hs-h1); line-height: 1.12; letter-spacing: -.5px; text-wrap: balance; }
/* "AI will change that." on a line of its own, as on the slides and the home page. */
.hs-end__line .hs-accent { display: block; }
.hs-end .hs-links { position: relative; justify-content: center; margin-top: 0; }

/* --------------------------------------------------------------- the atlas */
.hs-atlas-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* Phones: the atlas still has empty corners, so the rows around it sit closer. */
.hs-fig-atlas .hs-atlas { margin: -5% 0; }
.hs-sources { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-family: var(--hs-mono); font-size: 12.5px; color: var(--hs-faint); }
.hs-layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; width: 100%; }
.hs-layers .hs-pill { white-space: nowrap; }
.hs-own { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hs-own li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 6px 10px; border-radius: 999px; background: var(--hs-teal-deep); color: var(--hs-teal-soft); font-weight: 500; font-size: 13.5px; line-height: 1.3; }
.hs-own li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hs-teal); }
@container (min-width: 600px) {
  .hs-layers { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* The six kinds of source stand either side of the atlas, where they came in. */
  .hs-atlas-wrap { position: relative; max-width: 680px; flex-direction: row; justify-content: center; gap: 0; }
  .hs-fig-atlas .hs-atlas { margin: 0; }
  .hs-sources { position: absolute; inset: 0; display: block; }
  .hs-sources li { position: absolute; display: flex; align-items: center; gap: 10px; transform: translateY(-50%); }
  .hs-sources li::after { content: ""; width: 28px; height: 1px; background: var(--hs-line); }
  .hs-sources li:nth-child(n+4) { right: 0; flex-direction: row-reverse; }
  .hs-sources li:nth-child(-n+3) { left: 0; }
  .hs-sources li:nth-child(3n+1) { top: 22%; }
  .hs-sources li:nth-child(3n+2) { top: 50%; }
  .hs-sources li:nth-child(3n) { top: 78%; }
}

/* ---------------------------------------------- breakthrough therapies */
.hs-fig-predict { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 48px; }
/* Phones: two across, with the seventh centred under them. */
.hs-methods { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 18px; width: 100%; }
.hs-methods li { width: 50%; padding: 0 4px; }
.hs-methods .hs-ill { --ill: 56px; }
.hs-ring { flex: 1 1 380px; max-width: 480px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hs-result { flex: 1 1 100%; display: flex; flex-direction: column; align-items: center; }
/* The three outputs, in a row under the ring (one column on a narrow phone). */
.hs-outputs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.hs-outputs .hs-ill { --ill: 56px; }
@container (min-width: 520px) {
  /* The seven methods stand in a ring around the disease. */
  .hs-ring { position: relative; display: block; flex: 0 1 480px; aspect-ratio: 1; }
  .hs-ring .hs-atlas { position: absolute; left: 19%; top: 20%; width: 62%; }
  .hs-methods { display: block; position: absolute; inset: 0; }
  .hs-methods li { position: absolute; width: 136px; padding: 0; transform: translate(-50%, -50%); }
  .hs-methods li:nth-child(1) { left: 50%; top: 9%; }
  .hs-methods li:nth-child(2) { left: 83%; top: 25%; }
  .hs-methods li:nth-child(3) { left: 90%; top: 60%; }
  .hs-methods li:nth-child(4) { left: 68%; top: 89%; }
  .hs-methods li:nth-child(5) { left: 32%; top: 89%; }
  .hs-methods li:nth-child(6) { left: 10%; top: 60%; }
  .hs-methods li:nth-child(7) { left: 17%; top: 25%; }
}

/* ==================================================================== motion
   Nothing below changes a still. The script adds .hs-live to
   a scene it animates, and .hs-pinned as well where the screen is wide and
   tall enough to hold the scene in place while its timeline plays. It does
   neither for visitors who ask for reduced motion, or if anything fails to
   load; the canvases, the inlined illustrations and the SVG
   shapes below are its own. */

/* The atlas, drawn from graph.json, in place of the still image. */
.hs-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.hs-live .hs-figure, .hs-live .hs-atlas-wrap, .hs-live .hs-ring { position: relative; }
.hs-live .hs-atlas img { visibility: hidden; }

/* An illustration, inlined beside its <img> so that its named parts can move. */
.hs-ill__art { display: none; flex: none; width: var(--ill, 64px); height: var(--ill, 64px); }
.hs-ill__art svg { width: 100%; height: 100%; overflow: visible; }
.hs-live .hs-ill--inline > img { display: none; }
.hs-live .hs-ill--inline > .hs-ill__art { display: block; }

/* A stat's single teal underline draws once its number has arrived. */
.hs-live .hs-stat__num { position: relative; border-bottom-color: transparent; }
.hs-live .hs-stat__num::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--hs-teal); transform: scaleX(var(--hs-u, 1)); transform-origin: 0 50%; }
/* Where the scenes stack, the stats sit under the figure that explains them. */
.hs-copy--after { gap: 14px; }

/* The prediction: the method ring's track and spokes are SVG. */
.hs .hs-ring__svg { display: none; position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* Its viewBox is 100 units across, so these widths are about 1px and 1.5px on screen. */
.hs-ring__svg * { fill: none; stroke-linecap: round; }
.hs-ring__track { stroke: var(--hs-line); stroke-width: .2; }
.hs-ring__spoke { stroke-width: .3; }
@container (min-width: 520px) { .hs .hs-ring__svg { display: block; } }

/* The fade a rail jump passes through (the motion script adds it). Over the
   scenes, under the rail, so the reader sees where they are going. */
.hs-veil { position: fixed; inset: 0; z-index: 2; background: var(--hs-ink); opacity: 0; pointer-events: none; }

/* The opening: the points that fade in on load are a canvas over the field. The
   still field moves to a layer of its own, so that it can dim with the
   canvas's points when the challenge's last number arrives (--hs-field). */
.hs-opening.hs-live .hs-opening__field { background: none; }
.hs-opening.hs-live .hs-opening__field::before { content: ""; position: absolute; inset: 0; background: url("static/field.svg") center / cover no-repeat; opacity: var(--hs-field, 1); }

/* Stacked scenes (phones, small tablets): a figure that fits the screen is held
   in place while its animation plays. The script wraps the figure in a track,
   makes the track taller by the length of the hold (--hs-hold) and says where
   the figure rests (--hs-top, the middle of the room between the rail and the
   bottom of the screen). --hs-stick, on .hs, is where that room starts. */
.hs-track { min-width: 0; }
/* The extra height is a block inside the track, not padding: a sticky box
   only travels within its parent's content, and padding is outside that. */
.hs-track.is-held::after { content: ""; display: block; height: var(--hs-hold, 0px); }
.hs .hs-track.is-held > .hs-figure { position: sticky; top: var(--hs-top, 60px); }
/* What the held figure is: the scene's eyebrow and headline, just above it, once
   the copy has scrolled away and where there is room (the script says when). */
.hs-caption { position: absolute; left: 0; right: 0; bottom: calc(100% + 14px); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; opacity: 0; transition: opacity .3s; pointer-events: none; }
.hs-track.has-caption.show-caption .hs-caption { opacity: 1; }
.hs-caption__eyebrow { font-family: var(--hs-display); font-weight: 600; font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--hs-teal); }
.hs-caption__title { max-width: 30em; font-family: var(--hs-display); font-weight: 400; font-size: 17px; line-height: 1.25; color: var(--hs-text); text-wrap: balance; }

/* Pinned: the scene is exactly one screen, so its figure sizes to the height.
   overflow-anchor: a browser that anchors the scroll to what is on screen
   must not anchor to a pinned scene. When a jump lands part-way into one (a
   rail stop, an address ending #hs-predict) the scene snaps to the top of the
   screen, Safari's engine takes that for content moving and "corrects" the
   scroll, and the reader ends up past the scene. */
.hs-scene.hs-pinned { overflow-anchor: none; height: 100vh; min-height: 0; padding-top: 32px; padding-bottom: 32px; gap: 48px; grid-template-columns: minmax(0, 400px) minmax(600px, 1fr); }
.hs-pinned .hs-fig-atlas { gap: 18px; }
/* The atlas takes what the screen allows, leaving room either side for the source labels. */
.hs-pinned .hs-atlas-wrap { --atlas: clamp(300px, min(100vh - 270px, 100cqw - 200px), 560px); max-width: calc(var(--atlas) + 240px); }
/* The frame, pinned: one screen, its two parts laid over each other, and the
   timeline passes from the first to the second.
   A pin sizes the scene to the story's column and drops its negative margin,
   so pinned, the scene keeps to the column and its fields reach back under
   the rail instead; the right-hand padding keeps the parts centred on the
   screen, as in the still. */
.hs-frame.hs-pinned { display: block; height: 100vh; min-height: 0; margin-left: 0; padding: 0; overflow: visible; }
.hs-frame.hs-pinned .hs-frame__part { position: absolute; inset: 0; min-height: 0; padding: 32px var(--hs-rail) 32px 0; }
.hs-frame.hs-pinned .hs-opening__field, .hs-frame.hs-pinned .hs-end__field { left: calc(-1 * var(--hs-rail)); right: 0; }
/* At the top of the page the site's header (80px) sits above the opening, and
   the cue must be on the first screen. */
/* Pinned, the part spans the story's column, not the screen: the cue is centred
   on the screen, under the headline, as its padding centres the copy. It sits
   above Healnet's part, which shares the screen unseen until its turn: under
   it the cue took no hover and no click (fixed 23 November). */
.hs-opening.hs-pinned .hs-cue { bottom: 104px; left: calc(50% - var(--hs-rail) / 2); z-index: 2; }
/* "Scroll to continue": over both parts of the opening, and only a sign (the script adds it). */
.hs-opening .hs-cue--more { z-index: 2; pointer-events: none; opacity: 0; }
.hs-close.hs-pinned .hs-delivered { gap: 32px; }
/* Six layers in one row: on a narrow figure the labels step down a size, to stay clear of each other. */
@container (max-width: 780px) { .hs-pinned .hs-layers .hs-pill { padding: 2px 7px 3px; font-size: 10px; } }
/* Its figure is a stage: the ring in the middle, the outputs in a row under it (since 19 November; a funnel stood beside it before). */
.hs-pinned .hs-fig-predict { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 20px; height: min(calc(100vh - 64px), 700px); }
/* The ring is as large as the stage allows while still leaving the outputs their row. */
.hs-pinned .hs-ring { --hs-ring: min(560px, calc(100vh - 230px), 100cqw); flex: none; width: var(--hs-ring); height: var(--hs-ring); max-width: none; }
.hs-pinned .hs-result { flex: none; }
/* A short screen: the copy steps down a size so that it still fits beside the figure. */
@media (max-height: 780px) {
  .hs-scene.hs-pinned { --hs-h2: 32px; --hs-stat: 32px; }
  .hs-scene.hs-pinned .hs-copy { gap: 14px; }
  .hs-scene.hs-pinned .hs-body { font-size: 16.5px; }
  .hs-scene.hs-pinned .hs-kicker { font-size: 14.5px; }
  .hs-scene.hs-pinned .hs-stats { gap: 16px 28px; margin-top: 6px; }
}
