/* A story's media, charts and typeset visuals (js/story/render.js and each story's typeset), on the
   story pages. The accent and greys are the story's: from its body's data-story (or a .s-host's). */

.story-page, .s-host { --accent: #0a00cc; --h-grey: #545454; --t-grey: #787878; --soft: #f5f5fa; }
/* each story's own accent: an all-clear green for the Health Check, a midnight violet for Cinderella's gallery */
[data-story="inline-health-check"] .story-page, .s-host[data-story="inline-health-check"] { --accent: #1f6b4a; }
[data-story="bundle-gallery"] .story-page, .s-host[data-story="bundle-gallery"] { --accent: #5424b0; }

/* ---------- media ---------- */
.s-media { margin: 0; display: grid; justify-items: center; align-content: start; gap: 14px; }
.s-media figcaption { font: 400 24px/1.1 var(--serif); color: #696969; text-align: center; }
.s-frame { position: relative; width: 100%; }
.s-frame img, .s-frame video { display: block; width: 100%; height: auto; }
.s-media.is-phone { width: 330px; max-width: 100%; }
.s-media.is-card { width: 330px; max-width: 100%; }
.s-media.is-wide { width: min(768px, 100%); }
.s-media.is-card .s-frame img, .s-media.is-card .s-frame video, .s-media.is-wide .s-frame img, .s-media.is-wide .s-frame video { border-radius: 14px; }
.s-media-note { max-width: 330px; margin: 0; font: 400 15px/1.4 var(--sans); color: var(--t-grey); }
.s-media-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(32px, 7vw, 96px); }

/* annotations on a shot: a label with a tick on the left, a bracket on the right */
.s-note { position: absolute; top: var(--y); white-space: nowrap; font: 600 13px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.s-note.is-left { right: calc(100% + 30px); translate: 0 -50%; }
.s-note.is-left::after { content: ''; position: absolute; left: calc(100% + 8px); top: 50%; width: 18px; border-top: 1px solid var(--accent); }
.s-note.is-right { left: calc(100% + 30px); top: var(--top); height: calc(var(--bottom) - var(--top)); display: flex; align-items: center; }
.s-note.is-right::before { content: ''; position: absolute; left: -18px; top: 0; bottom: 0; width: 8px; border: 1px solid var(--accent); border-left: 0; }

/* a part lifted off the shot (render.js lift()): once in view it rises off the page, leaving the
   empty slot it fills in the page, and its note follows it in */
.s-lift { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); container-type: inline-size; }
.s-slot, .s-part { position: absolute; pointer-events: none; }
/* the fill's spread covers the shadow baked into the shot under the part */
.s-slot { background: var(--fill); box-shadow: 0 2px 0 3px var(--fill); border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); opacity: 0; transition: opacity 0.3s ease 0.2s; }
.s-part { background-repeat: no-repeat; transition: translate 1.1s var(--ease) 0.2s, scale 1.1s var(--ease) 0.2s, box-shadow 1.1s var(--ease) 0.2s; }
.s-lift.is-in .s-slot { opacity: 1; }
.s-lift.is-in .s-part { translate: 0 -2%; scale: 1.05; box-shadow: 0 28px 56px -18px rgba(40, 16, 96, 0.45), 0 10px 20px -12px rgba(40, 16, 96, 0.3); }
.s-note.is-lifted { transition: opacity 0.6s ease 0.8s; }
.js .s-lift:not(.is-in) .s-note.is-lifted { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .s-slot, .s-part, .s-note.is-lifted { transition: none; } }

/* ---------- charts ---------- */
.s-chart { width: 100%; max-width: 1008px; margin: 0 auto; }
.s-chart figcaption { margin-bottom: 28px; }
.s-chart figcaption b { display: block; font: 500 28px/1.1 var(--serif); letter-spacing: 0.01em; text-transform: uppercase; color: var(--accent); }
.s-chart figcaption span { display: block; margin-top: 6px; font: 400 13px/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-grey); }
.s-bars ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.s-bars li { display: grid; grid-template-columns: 170px minmax(0, 1fr) 52px; align-items: center; gap: 16px; font: 400 16px/1.2 var(--sans); color: #2e2e2e; }
.s-bars li.is-hi { font-weight: 600; color: var(--accent); }
.s-bar-track { height: 10px; border-radius: 999px; background: #f1f1f5; overflow: hidden; }
.s-bar-track i { display: block; width: calc(var(--v) * 100%); height: 100%; border-radius: inherit; background: #c9c9d6; transform-origin: left; transform: scaleX(0); transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--n, 0) * 70ms); }
.s-bars li.is-hi .s-bar-track i { background: var(--accent); }
.s-chart.is-in .s-bar-track i { transform: scaleX(1); }
.s-bar-value { text-align: right; font-variant-numeric: tabular-nums; }
/* the verdict: Justice between the two rates, bold and level. Each rate stands over a straight
   meter that fills with its count; once they're done the pack's (A) dims and the trigger's (B) pops,
   then the change lands under her. Reduced motion shows where it ends */
.s-stats { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1); max-width: 1100px; }
.s-stats-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: clamp(16px, 3vw, 48px); }
.s-stat { position: relative; z-index: 2; text-align: center; opacity: 0; translate: 0 24px; transition: opacity 0.6s ease 0.2s, translate 0.9s var(--ease) 0.2s; }
.s-stat b { display: block; font: 700 clamp(72px, 10.5vw, 168px)/0.9 var(--serif); letter-spacing: -0.04em; color: #c3c3d3; }
.s-stat.is-hi b { color: var(--accent); }
.s-stat span { display: block; margin-top: 14px; font: 500 13px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--h-grey); }
.s-stat.is-hi span { color: var(--accent); }
/* her body is 40% across the image, so the image sits 10% right of its column to put her in the middle */
.s-stats-decor { position: relative; left: 10%; z-index: 1; height: clamp(280px, 36vw, 500px); aspect-ratio: 507 / 976; opacity: 0; scale: 0.94; transform-origin: 50% 100%; transition: opacity 0.8s ease, scale 1.2s var(--ease); }
.s-stats-decor img { position: relative; display: block; width: 100%; height: 100%; }
/* the pill, the hero's proportions (0.65), centred on her body, 40% across the image */
.s-decor-pill { position: absolute; top: 14%; bottom: 3%; left: 40%; aspect-ratio: 0.65; translate: -50% 0; border-radius: 999px; overflow: hidden; }
.s-decor-pill .gradient { border-radius: inherit; }
/* the meters: straight, level, filling with the count (same 0.3s start, 1.4s, ease-out cubic) */
.s-meter { position: relative; display: block; width: min(300px, 100%); height: 6px; margin: 18px auto 0; border-radius: 3px; background: #ececf2; overflow: hidden; }
.s-meter::after { content: ''; position: absolute; inset: 0; width: calc(var(--v) * 1%); border-radius: inherit; background: #c3c3d3; transform-origin: left; scale: 0 1; transition: scale 1.4s cubic-bezier(0.33, 1, 0.68, 1) 0.3s; }
.s-stat.is-hi .s-meter::after { background: var(--accent); }
.s-chart.is-in .s-stat, .s-chart.is-in .s-stats-decor { opacity: 1; translate: 0 0; scale: 1; }
.s-chart.is-in .s-meter::after { scale: 1 1; }
/* the verdict, once the count is done: the pack's side steps back, the trigger's number pops */
.s-stat-0 b, .s-stat-0 span { transition: opacity 0.6s ease 1.8s; }
.s-chart.is-in .s-stat-0 b, .s-chart.is-in .s-stat-0 span { opacity: 0.55; }
.s-chart.is-in .s-stat.is-hi b { animation: s-win 0.7s var(--spring) 1.8s both; }
@keyframes s-win { 50% { scale: 1.1; } }
/* the change, under her */
.s-delta { position: relative; z-index: 3; width: fit-content; margin: 40px auto 0; display: flex; align-items: center; gap: 14px; padding: 12px 26px 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--accent) 80%, #000); opacity: 0; scale: 0.6; transition: opacity 0.3s ease 2.5s, scale 0.7s var(--spring) 2.5s; }
.s-delta b { font: 700 clamp(40px, 4.4vw, 64px)/1 var(--serif); letter-spacing: -0.03em; }
.s-delta span { max-width: 12ch; font: 500 13px/1.25 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.s-chart.is-in .s-delta { opacity: 1; scale: 1; }
.s-stats .s-chart-note { opacity: 0; transition: opacity 0.6s ease 2.9s; }
.s-chart.is-in .s-chart-note { opacity: 1; }
@media (max-width: 767.98px) {
  /* a phone: Justice above, the rates side by side under her, the beam between them */
  .s-stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .s-stats-decor { grid-column: 1 / -1; grid-row: 1; justify-self: center; height: 280px; }
  .s-stat { grid-row: 2; }
  .s-stat b { font-size: 17vw; }
  .s-stat span { font-size: 11px; }
  .s-meter { margin-top: 12px; height: 4px; }
}
@media (prefers-reduced-motion: reduce) { .s-stats *, .s-stats *::after { transition: none !important; animation: none !important; } }
/* figures: the headline numbers side by side, each rising in turn and counting up (countUp()) */
.s-figs { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); }
.s-figs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); }
.s-fig { margin: 0; text-align: center; opacity: 0; translate: 0 24px; transition: opacity 0.6s ease calc(var(--n) * 0.15s), translate 0.9s var(--ease) calc(var(--n) * 0.15s); }
.s-fig b { display: block; font: 700 clamp(72px, 9vw, 136px)/0.9 var(--serif); letter-spacing: -0.04em; color: var(--accent); }
.s-fig span { display: block; max-width: 20ch; margin: 18px auto 0; font: 500 13px/1.35 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--h-grey); }
.s-chart.is-in .s-fig { opacity: 1; translate: 0 0; }
@media (max-width: 767.98px) { .s-figs-row { grid-template-columns: minmax(0, 1fr); gap: 40px; } .s-fig b { font-size: 88px; } }
@media (prefers-reduced-motion: reduce) { .s-fig { transition: none; } }
.s-chart-note { margin: 24px 0 0; text-align: center; font: 400 15px/1.4 var(--sans); color: var(--t-grey); }
.s-line svg { display: block; width: 100%; height: auto; overflow: visible; }
.s-grid line { stroke: #ececf2; }
.s-axis { font: 400 13px var(--sans); fill: #9a9aa6; }
.s-line-path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(0.4, 0, 0.2, 1); }
.s-chart.is-in .s-line-path { stroke-dashoffset: 0; }
.s-dot { fill: var(--paper); stroke: var(--accent); stroke-width: 2; opacity: 0; transition: opacity 0.3s ease calc(var(--i) * 0.2s + 0.2s); }
.s-dot.is-mark { fill: var(--accent); }
.s-chart.is-in .s-dot { opacity: 1; }

.s-end-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.s-end-links a { font: 300 18px/1.2 var(--sans); letter-spacing: -0.06em; color: var(--ink); }
.s-end-links a:first-child { color: var(--accent); }

/* ---------- admin screens, in a window ---------- */
.s-media.is-admin { width: min(1008px, 100%); }
.s-media.is-admin-tall { width: min(840px, 100%); }
.s-window { width: 100%; overflow: hidden; border-radius: 14px; background: var(--paper); border: 1px solid #e6e6ee; box-shadow: 0 30px 60px -32px rgba(10, 0, 80, 0.28), 0 2px 6px rgba(0, 0, 0, 0.04); }
.s-window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #f6f6f9; border-bottom: 1px solid #ececf2; }
.s-window-bar i { flex: none; width: 11px; height: 11px; border-radius: 50%; background: #dcdce4; }
.s-window-bar span { flex: 1; min-width: 0; margin-right: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font: 400 12px/1 var(--sans); color: #9a9aa6; }
/* the screen sits on Shopify admin's page colour, with room around it */
.s-window-body { padding: 40px; background: #f1f1f1; }
.s-window-body img, .s-window-body video { display: block; width: 100%; height: auto; }
.is-admin-tall .s-window-body .s-frame { max-width: 620px; margin: 0 auto; }
.s-media.is-bleed { width: min(840px, 100%); }
.s-media.is-bleed .s-window-body { padding: 0; }
.s-frame img, .s-frame video { cursor: zoom-in; }
.s-window .s-note { display: none; } /* no room beside a shot in a window: the lifted part speaks for itself */

/* ---------- typeset: the research, as real text ---------- */
.s-type-cap { font: 400 24px/1.1 var(--serif); color: #696969; }
.s-type { margin: 0; width: min(1008px, 100%); display: grid; justify-items: center; gap: 28px; text-align: center; }
/* competitors: the finding. Two patina pills (js/lib/liquid-gradient.js), shaped like the hero's,
   carry X and Y with an arrow between; BOGOS, Koala and Qikify's logos float around them. It plays
   in once, when it scrolls into view. Drawn in em on a 40 x 21em stage that scales with its width
   (stood on end on a phone). */
.t-stage { container-type: inline-size; width: min(960px, 100%); }
.tv { --lift: 0 1.4em 2.4em -1.2em rgba(0, 20, 40, 0.45); --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative; width: 40em; height: 21em; font-size: min(24px, 100cqw / 40); text-align: left; isolation: isolate; }
.js .t-stage:not(.is-in) .tv * { animation-play-state: paused; }

.p-a, .p-b { position: absolute; z-index: 1; top: 0.6em; width: 10.5em; height: 16em; border-radius: 999px; overflow: hidden; }
.p-a { left: 5.5em; }
.p-b { left: 24em; }
.p-a .gradient, .p-b .gradient { border-radius: inherit; }

/* the products, floating a little the whole time */
.p-x, .p-y { position: absolute; z-index: 2; top: 4.5em; width: 8em; height: 8em; border-radius: 1.1em; box-shadow: var(--lift); }
.p-x img, .p-y img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; animation: t-bob 2.3s ease-in-out infinite alternate; }
.p-y img { animation-delay: -1.1s; }
@keyframes t-bob { from { translate: 0 -0.25em; } to { translate: 0 0.25em; } }
.p-x { left: 6.75em; }
.p-y { left: 25.25em; }
.p-arrow { position: absolute; z-index: 3; left: 15.35em; top: 8.5em; width: 9.3em; height: 2px; background: var(--accent); }
.p-arrow::after { content: ''; position: absolute; right: 0; top: 50%; width: 0.6em; height: 0.6em; border: solid var(--accent); border-width: 2px 2px 0 0; translate: 0 -50%; rotate: 45deg; }

/* the apps that build a trigger */
.p-logo { position: absolute; z-index: 4; width: 3em; height: 3em; border-radius: 0.7em; box-shadow: 0 0.5em 1em -0.4em rgba(0, 20, 40, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.6); }
.p-logo-bogos { left: 3.4em; top: 1.4em; rotate: -8deg; }
.p-logo-koala { left: 33.4em; top: 1em; rotate: 7deg; }
.p-logo-qikify { left: 18.5em; top: 12.8em; rotate: -4deg; }

/* each pill's half of the offer, centred under it */
.p-l { position: absolute; top: calc(17.4em / 1.25); translate: -50% 0; margin: 0; display: grid; justify-items: center; gap: 0.5em; text-align: center; white-space: nowrap; font: 400 1.25em/1 var(--serif); color: var(--h-grey); }
.p-l-x { left: calc(10.75em / 1.25); }
.p-l-y { left: calc(29.25em / 1.25); }
.p-l small { font: 500 0.48em/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.p-l em { font-style: normal; font-weight: 700; color: var(--accent); }

/* the entrance, in reading order: X's pill, product and label; the arrow draws across; then Y's;
   the apps pop in last. Paused on its first frame until the stage is in view (above); transform,
   not translate, so it never fights the positioning */
.p-a, .p-b { animation: p-grow 0.9s var(--ease) both; }
.p-x, .p-y { animation: p-rise 0.8s var(--ease) both; }
.p-l { animation: p-rise 0.7s var(--ease) both; }
.p-a { animation-delay: 0s; } .p-x { animation-delay: 0.12s; } .p-l-x { animation-delay: 0.3s; }
.p-arrow { animation: p-draw 0.6s cubic-bezier(0.7, 0, 0.2, 1) 0.55s both; }
.p-b { animation-delay: 0.9s; } .p-y { animation-delay: 1.02s; } .p-l-y { animation-delay: 1.2s; }
.p-logo { animation: p-pop 0.6s var(--spring) both; }
.p-logo-bogos { animation-delay: 1.4s; } .p-logo-qikify { animation-delay: 1.5s; } .p-logo-koala { animation-delay: 1.6s; }
@keyframes p-grow { from { opacity: 0; transform: scale(0.8); } }
@keyframes p-rise { from { opacity: 0; transform: translateY(0.8em); } }
@keyframes p-draw { from { clip-path: inset(-1em 100% -1em 0); } to { clip-path: inset(-1em 0 -1em 0); } }
@keyframes p-pop { from { opacity: 0; transform: scale(0.3); } }

/* a phone: the same stood on end, X above and Y below, each label beside its pill, on a 24 x 33em stage */
@container (max-width: 560px) {
  .tv { width: 24em; height: 33em; font-size: calc(100cqw / 24); }
  .p-a, .p-b { left: 1.5em; width: 9.5em; height: 14em; }
  .p-a { top: 0.5em; }
  .p-b { top: 17.5em; }
  .p-x, .p-y { left: 2.75em; width: 7em; height: 7em; border-radius: 1em; }
  .p-x { top: 4em; }
  .p-y { top: 21em; }
  .p-arrow { left: 6.25em; top: 11.6em; width: 8.8em; transform-origin: 0 50%; rotate: 90deg; }
  .p-logo { width: 2.6em; height: 2.6em; border-radius: 0.6em; }
  .p-logo-bogos { left: 0.3em; top: 1.2em; }
  .p-logo-koala { left: 8.8em; top: 18.2em; }
  .p-logo-qikify { left: 8.4em; top: 14.6em; }
  .p-l { left: calc(12.75em / 1.2); translate: 0 -50%; justify-items: start; text-align: left; font-size: 1.2em; }
  .p-l-x { top: calc(7.5em / 1.2); }
  .p-l-y { top: calc(24.5em / 1.2); }
  .p-l small { font-size: 0.6em; }
}

@media (prefers-reduced-motion: reduce) { .tv * { animation: none !important; } }
.t-dots i { display: block; background: #e6e6ee; }
.t-dots i.on { background: var(--accent); }
/* data: what merchants built, as one stacked bar. The one color with meaning is the accent: the
   add-on's shape (a single X). A lighter step of it is the same shape with more than one Y; grey is
   everything else. */
.dv { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --tint: color-mix(in srgb, var(--accent) 38%, #fff); --rest: #dcdce6; width: 100%; display: grid; justify-items: center; }
.dv b { font-variant-numeric: tabular-nums; }

/* stacked bar: the month's offers as one whole, the single-X share bracketed over it */
.b-chart { width: min(760px, 100%); display: grid; gap: 10px; text-align: left; }
.b-brace { width: 83%; margin: 0; text-align: center; font: 400 22px/1.2 var(--serif); color: var(--h-grey); transition: opacity 0.5s ease 0.9s; }
.b-brace b { font-weight: 700; color: var(--accent); }
.b-brace::after { content: ''; display: block; height: 10px; margin-top: 10px; border: 1.5px solid var(--h-grey); border-bottom: 0; border-radius: 4px 4px 0 0; }
.b-bar { display: flex; gap: 2px; height: 64px; }
.b-seg { position: relative; flex: var(--v) 1 0; display: flex; align-items: center; padding: 0 14px; border-radius: 4px; background: var(--rest); font-style: normal; outline: none; clip-path: inset(-4em -12em -4em -12em); transition: clip-path 0.9s var(--ease) calc(var(--n) * 0.18s); }
.b-seg:first-child { border-radius: 10px 4px 4px 10px; }
.b-seg:last-child { border-radius: 4px 10px 10px 4px; }
.b-seg.is-a { background: var(--accent); color: #fff; }
.b-seg.is-b { background: var(--tint); color: var(--ink); }
.b-seg span { font: 600 15px/1 var(--sans); }
.b-seg.is-c span { color: var(--h-grey); }
.b-seg::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 4px; padding: 7px 10px; border-radius: 6px; background: var(--ink); white-space: nowrap; font: 500 13px/1 var(--sans); color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.15s ease, translate 0.15s ease; }
.b-seg:hover::after, .b-seg:focus-visible::after { opacity: 1; translate: -50% 0; }
.b-seg:focus-visible { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.b-key { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 70fr 13fr 17fr; gap: 2px; }
.b-key li { display: flex; align-items: flex-start; gap: 7px; padding-right: 8px; font: 400 13px/1.3 var(--sans); color: var(--t-grey); }
.b-key i { flex: none; width: 10px; height: 10px; margin-top: 2px; border-radius: 3px; background: var(--rest); }
.b-key .is-a i { background: var(--accent); }
.b-key .is-b i { background: var(--tint); }
.b-foot { margin: 36px 0 0; font: 400 22px/1.3 var(--serif); color: var(--h-grey); }
.b-foot b { font-weight: 700; color: var(--accent); }
.js .dv-bar:not(.is-in) .b-seg { clip-path: inset(0 100% 0 0); }
.js .dv-bar:not(.is-in) .b-brace { opacity: 0; }

@media (max-width: 767.98px) {
  .b-brace, .b-foot { font-size: 18px; }
  .b-key { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .b-bar { height: 52px; }
  .b-seg { padding: 0 6px; }
  .b-seg span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .dv *, .dv *::after, .dv *::before { transition: none !important; } }
/* support: the 40 threads as counts over a dot for each, the 27 the add-on served in the accent, the
   13 that needed an extension in its lighter step; then four of the threads, tagged */
.dv-support { gap: 28px; }
.t-count { display: flex; justify-content: center; gap: 48px; }
.t-count p { max-width: 14ch; margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; font: 400 20px/1.2 var(--serif); color: var(--h-grey); }
.t-count b { font: 400 72px/1 var(--serif); color: var(--ink); }
.t-count .is-on b { color: var(--accent); }
.t-count .is-ext span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--tint); }
.t-count .is-on span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--accent); }
.t-dots { display: grid; grid-template-columns: repeat(20, 12px); gap: 6px; margin-top: -8px; }
.t-dots i { width: 12px; height: 12px; border-radius: 50%; transition: scale 0.35s var(--ease) calc(0.3s + var(--i) * 18ms); }
.t-dots i.ext { background: var(--tint); }
.t-bubbles { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; text-align: left; }
.t-bubble { padding: 18px 20px; border-radius: 16px; background: var(--paper); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.04); font: 400 15px/1.45 var(--sans); color: #333; transition: opacity 0.6s ease, translate 0.8s var(--ease); }
.t-bubble small { display: block; margin-bottom: 10px; font: 500 11px/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.t-bubble:nth-child(odd) { rotate: -0.6deg; }
.t-bubble:nth-child(even) { rotate: 0.5deg; margin-top: 18px; }
.t-bubble:nth-child(2) { transition-delay: 1.2s; } .t-bubble:nth-child(1) { transition-delay: 1.1s; }
.t-bubble:nth-child(3) { transition-delay: 1.3s; } .t-bubble:nth-child(4) { transition-delay: 1.4s; }
.t-bubble p { margin: 0 0 10px; }
.t-bubble p:last-child { margin: 0; }
.t-bubble ul { margin: 0; padding-left: 18px; }
.t-count p { transition: opacity 0.6s ease calc(var(--n) * 0.12s), translate 0.8s var(--ease) calc(var(--n) * 0.12s); }
.js .dv-support:not(.is-in) .t-count p, .js .dv-support:not(.is-in) .t-bubble { opacity: 0; translate: 0 16px; }
.js .dv-support:not(.is-in) .t-dots i { scale: 0; }

/* interviews: the three merchants rise in turn; where a quote names the trigger, a highlighter in
   the accent's tint runs under it once the quote is in */
.t-people { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; text-align: left; }
.t-people li { display: grid; align-content: start; gap: 12px; transition: opacity 0.6s ease calc(var(--n) * 0.15s), translate 0.8s var(--ease) calc(var(--n) * 0.15s); }
.t-people img { width: 96px; height: 96px; border-radius: 18px; background: var(--paper); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.35); }
.t-people b { font: 400 36px/1 var(--serif); color: var(--h-grey); }
.t-people p { margin: 0; font: 400 16px/1.45 var(--sans); color: var(--h-grey); }
.t-people mark { background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 100% 0.6em; color: var(--ink); --hl: color-mix(in srgb, var(--accent) 16%, #fff); transition: background-size 0.8s var(--ease) calc(0.7s + var(--n) * 0.15s); }
.js .dv-people:not(.is-in) li { opacity: 0; translate: 0 20px; }
.js .dv-people:not(.is-in) mark { background-size: 0 0.6em; }

/* ---------- typeset: the Health Check's flow and loop ---------- */
/* the flow after Save, as small wireframes of the admin's pages: they rise in turn, the arrows draw
   between them, and the detour's exit drops out last */
.fl { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --tint: color-mix(in srgb, var(--accent) 8%, #fff); display: flex; justify-content: center; align-items: flex-start; font-size: clamp(12px, 1.2vw, 16px); }
.fl-step { width: 13em; transition: opacity 0.6s ease calc(var(--n) * 0.22s), translate 0.8s var(--ease) calc(var(--n) * 0.22s); }
.fl-card { height: 10.5em; box-sizing: border-box; padding: 1.1em 1.2em; display: grid; align-content: start; gap: 0.6em; border-radius: 0.9em; background: var(--paper); border: 1px solid #e6e6ee; box-shadow: 0 1.4em 2.6em -1.8em rgba(0, 0, 0, 0.35); text-align: left; }
.fl-card small { margin-bottom: 0.2em; font: 600 0.82em/1.2 var(--sans); color: var(--h-grey); }
.fl-line { display: block; height: 0.5em; border-radius: 0.25em; background: #ececf2; }
.fl-line:nth-of-type(2n) { width: 72%; }
.fl-line:nth-of-type(3n) { width: 86%; }
.fl-btn { justify-self: end; margin-top: 0.6em; padding: 0.45em 1em; border-radius: 0.5em; background: #303030; font: 600 0.75em/1 var(--sans); color: #fff; }
.fl-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4em; }
.fl-checks li { padding: 0.5em 0.65em; border-radius: 0.5em; background: var(--tint); font: 500 0.74em/1.15 var(--sans); color: var(--accent); }
.fl-step.is-hc .fl-card { border-color: color-mix(in srgb, var(--accent) 35%, #fff); box-shadow: 0 1.4em 2.6em -1.6em color-mix(in srgb, var(--accent) 45%, transparent); }
.fl-step > p { margin: 0.9em 0 0; text-align: center; font: 400 1.3em/1.2 var(--serif); color: var(--h-grey); }
.fl-step.is-far { opacity: 0.4; }
.fl-arrow { position: relative; flex: 0 0 6.5em; height: 10.5em; transition: clip-path 0.5s cubic-bezier(0.7, 0, 0.2, 1) calc(var(--n) * 0.22s); clip-path: inset(-2em 0 -2em 0); }
.fl-arrow::before { content: ''; position: absolute; left: 0.9em; right: 0.9em; top: 50%; border-top: 2px solid #c9c9d6; }
.fl-arrow::after { content: ''; position: absolute; right: 0.95em; top: 50%; width: 0.55em; height: 0.55em; border: solid #c9c9d6; border-width: 2px 2px 0 0; translate: 0 -50%; rotate: 45deg; margin-top: 1px; }
.fl-arrow span { position: absolute; left: 0; right: 0; bottom: calc(50% + 0.7em); text-align: center; font: 500 0.66em/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-grey); }
.fl-arrow.is-far { opacity: 0.4; }
.fl-exit { margin: 1.1em 0 0; display: grid; justify-items: center; gap: 0.5em; transition: opacity 0.5s ease 1.3s; }
.fl-exit i { position: relative; width: 0; height: 2.6em; border-left: 2px dashed var(--accent); transform-origin: top; transition: scale 0.6s var(--ease) 1.3s; }
.fl-exit i::after { content: ''; position: absolute; left: -0.36em; bottom: -1px; width: 0.55em; height: 0.55em; border: solid var(--accent); border-width: 0 2px 2px 0; rotate: 45deg; margin-left: -1px; }
.fl-exit span { max-width: 12em; text-align: center; font: 600 0.72em/1.3 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.js .fl:not(.is-in) .fl-step { opacity: 0; translate: 0 1em; }
.js .fl:not(.is-in) .fl-arrow { clip-path: inset(-2em 100% -2em 0); }
.js .fl:not(.is-in) .fl-exit { opacity: 0; }
.js .fl:not(.is-in) .fl-exit i { scale: 1 0; }
.js .fl-detour.is-in .fl-step.is-far { opacity: 0.4; }
@media (max-width: 767.98px) {
  /* stood on end: the pages one above the other, the arrows pointing down */
  .fl { flex-direction: column; align-items: center; font-size: 14px; }
  .fl-step { width: min(21em, 100%); }
  .fl-arrow { flex-basis: 4.2em; width: 10em; height: 4.2em; }
  .fl-arrow::before { left: 50%; right: auto; top: 0.8em; bottom: 0.8em; border-top: 0; border-left: 2px solid #c9c9d6; }
  .fl-arrow::after { right: auto; left: 50%; top: auto; bottom: 0.85em; translate: -50% 0; rotate: 135deg; margin: 0 0 0 1px; }
  .fl-arrow span { left: calc(50% + 1em); right: auto; bottom: auto; top: 50%; translate: 0 -50%; text-align: left; }
  .js .fl:not(.is-in) .fl-arrow { clip-path: inset(0 -6em 100% -6em); }
  .fl-arrow { clip-path: inset(0 -6em 0 -6em); }
}

/* the growth loop: the ring draws round from the top, each stop arriving as the line reaches it, then a
   dot keeps going round. Around the ring on a wide screen; the stops as a list under it on a phone */
.lp { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); width: 100%; }
.lp-ring { position: relative; width: 300px; aspect-ratio: 1; margin: 88px auto; }
.lp-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lp-track, .lp-path { fill: none; stroke-width: 1.5; }
.lp-track { stroke: #ececf2; }
.lp-path { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 100px 100px; transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.3, 1) 0.2s; }
.lp-orbit { transform-origin: 100px 100px; animation: lp-spin 9s linear infinite; }
.lp-orbit circle { fill: var(--accent); }
@keyframes lp-spin { to { rotate: 360deg; } }
.lp-mk circle { fill: var(--paper); stroke: var(--accent); stroke-width: 1.5; }
.lp-mk text { text-anchor: middle; font: 600 9px var(--sans); fill: var(--accent); }
.lp-mk, .lp-n { transition: opacity 0.5s ease calc(0.2s + var(--n) * 0.45s); }
.lp-n { position: absolute; width: 13em; margin: 0; display: grid; align-content: start; gap: 6px; }
.lp-n b { font: 400 24px/1.1 var(--serif); color: var(--h-grey); }
.lp-n-0 b { color: var(--accent); }
.lp-n span { font: 400 14px/1.35 var(--sans); color: var(--t-grey); }
.lp-n-0 { bottom: calc(92% + 26px); left: 50%; translate: -50% 0; justify-items: center; text-align: center; }
.lp-n-1 { left: calc(92% + 30px); top: 50%; translate: 0 -50%; }
.lp-n-2 { top: calc(92% + 26px); left: 50%; translate: -50% 0; justify-items: center; text-align: center; }
.lp-n-3 { right: calc(92% + 30px); top: 50%; translate: 0 -50%; justify-items: end; text-align: right; }
.js .lp:not(.is-in) .lp-path { stroke-dashoffset: 1; }
.js .lp:not(.is-in) .lp-mk, .js .lp:not(.is-in) .lp-n, .js .lp:not(.is-in) .lp-orbit { opacity: 0; }
.js .lp:not(.is-in) .lp-orbit { animation-play-state: paused; }
.lp-orbit { transition: opacity 0.5s ease 2s; }
@media (max-width: 767.98px) {
  .lp-ring { width: 100%; aspect-ratio: auto; margin: 24px 0 0; padding-top: calc(min(62vw, 260px) + 36px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .lp-ring svg { inset: 0 auto auto 50%; width: min(62vw, 260px); height: auto; aspect-ratio: 1; translate: -50% 0; }
  .lp-n, .lp-n-0, .lp-n-1, .lp-n-2, .lp-n-3 { position: static; width: auto; translate: none; justify-items: start; text-align: left; }
  /* each stop carries its number from the ring */
  .lp-ring { counter-reset: lp; }
  .lp-n { counter-increment: lp; }
  .lp-n::before { content: counter(lp); width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--accent); font: 600 11px/17px var(--sans); text-align: center; color: var(--accent); }
  .lp-n b { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .fl *, .lp *, .fl-arrow { transition: none !important; } .lp-orbit { animation: none; } }

/* ---------- typeset: the gallery's templates, test and measure ---------- */
/* the Volume Discounts templates, rising in turn */
.tg { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); width: min(960px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tg img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.05); transition: opacity 0.6s ease calc(var(--n) * 0.1s), translate 0.8s var(--ease) calc(var(--n) * 0.1s); }
.js .tg:not(.is-in) img { opacity: 0; translate: 0 20px; }

/* the A/B test: merchants at Choose Type fork into the two variants, each a wireframe of what they saw,
   over the five weeks it ran */
.ab { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --tint: color-mix(in srgb, var(--accent) 12%, #fff); width: min(760px, 100%); }
.ab > * { transition: opacity 0.6s ease, translate 0.8s var(--ease); }
.ab-src { margin: 0; padding: 11px 22px; border-radius: 999px; border: 1px solid #e6e6ee; background: var(--paper); font: 500 12px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--h-grey); }
.ab-fork { display: block; width: 100%; height: 48px; overflow: visible; clip-path: inset(-2px); transition: clip-path 0.8s cubic-bezier(0.45, 0, 0.3, 1) 0.3s; }
.ab-fork path { fill: none; stroke: #c9c9d6; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ab-lanes { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 14px; }
.ab-lane { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; text-align: center; transition: opacity 0.6s ease 0.7s, translate 0.8s var(--ease) 0.7s; }
.ab-lane.is-hi { transition-delay: 0.85s; }
.ab-lane small { font: 500 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-grey); }
.ab-lane.is-hi small { color: var(--accent); }
.ab-lane p { margin: 0; font: 400 22px/1.2 var(--serif); color: var(--h-grey); }
.ab-card { box-sizing: border-box; width: min(300px, 100%); aspect-ratio: 3 / 2; padding: 16px; display: grid; gap: 8px; align-content: start; border-radius: 14px; background: var(--paper); border: 1px solid #e6e6ee; box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.35); }
.ab-lane.is-hi .ab-card { border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.ab-text i { display: block; height: 18px; border-radius: 6px; background: linear-gradient(#dcdce4, #dcdce4) no-repeat 10px 50% / calc(40% + var(--k) * 7%) 5px, #f4f4f7; }
.ab-visual { grid-template-columns: 38% minmax(0, 1fr); gap: 10px; align-content: stretch; }
.ab-list { display: grid; gap: 6px; align-content: start; }
.ab-list i { display: block; height: 15px; border-radius: 5px; border: 1px solid #ececf2; background: #fafafc; }
.ab-list i:first-child { border-color: color-mix(in srgb, var(--accent) 30%, #fff); background: var(--tint); }
.ab-shot { padding: 8px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 8px) 1fr; gap: 6px; border-radius: 10px; background: #f1f1f4; }
.ab-shot b { grid-row: 1 / -1; border-radius: 6px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, #fff), color-mix(in srgb, var(--accent) 60%, #fff)); }
.ab-shot i { display: block; border-radius: 3px; background: #dcdce4; }
.ab-shot i:nth-of-type(2) { width: 70%; }
.ab-shot u { align-self: end; height: 12px; border-radius: 4px; background: var(--accent); }
.ab-time { width: 100%; margin-top: 44px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; font: 500 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--h-grey); transition: opacity 0.6s ease 1.1s; }
.ab-time i { position: relative; height: 4px; border-radius: 2px; background: #ececf2; }
.ab-time b { position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform-origin: left; transition: scale 1.6s cubic-bezier(0.45, 0, 0.3, 1) 1.2s; }
.ab-time i::after { content: attr(data-label); position: absolute; top: 14px; left: 50%; translate: -50% 0; white-space: nowrap; font: 400 12px/1 var(--sans); letter-spacing: 0.12em; color: var(--t-grey); }
.js .ab:not(.is-in) .ab-src, .js .ab:not(.is-in) .ab-lane { opacity: 0; translate: 0 16px; }
.js .ab:not(.is-in) .ab-fork { clip-path: inset(-2px -2px 100% -2px); }
.js .ab:not(.is-in) .ab-time { opacity: 0; }
.js .ab:not(.is-in) .ab-time b { scale: 0 1; }
@media (max-width: 767.98px) {
  .ab-lanes { gap: 14px; }
  .ab-card { padding: 10px; gap: 6px; }
  .ab-lane p { font-size: 17px; }
  .ab-shot { padding: 5px; gap: 4px; grid-template-rows: repeat(3, 6px) 1fr; }
}

/* what we measured: the path from the pick to keeping the bundle live, drawn along; the last stop is
   the one the test was judged by */
.ms { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); width: min(900px, 100%); }
.ms ol { position: relative; list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ms ol::before, .ms ol::after { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: #ececf2; }
.ms ol::after { background: linear-gradient(to right, #c9c9d6, var(--accent)); transform-origin: left; transition: scale 1.4s cubic-bezier(0.45, 0, 0.3, 1) 0.2s; }
.ms li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; text-align: center; }
.ms li i { width: 20px; height: 20px; box-sizing: border-box; border-radius: 50%; border: 2px solid #c9c9d6; background: var(--paper); transition: scale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.2s + var(--n) * 0.35s); }
.ms li span { max-width: 11ch; font: 400 22px/1.15 var(--serif); color: var(--t-grey); }
.ms li.is-hi i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 14%, transparent); }
.ms li.is-hi span { color: var(--accent); }
.ms-note { max-width: 36ch; margin: 44px 0 0; text-align: center; font: 400 18px/1.4 var(--sans); color: var(--t-grey); transition: opacity 0.6s ease 1.6s; }
.ms-note b { display: block; margin-bottom: 8px; font: 600 12px/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.js .ms:not(.is-in) ol::after { scale: 0 1; }
.js .ms:not(.is-in) li i { scale: 0; }
.js .ms:not(.is-in) .ms-note { opacity: 0; }
@media (max-width: 767.98px) {
  .tg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tg img { border-radius: 10px; }
  /* the path runs down the left */
  .ms ol { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 0; }
  .ms ol::before, .ms ol::after { left: 9px; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .ms ol::after { background: linear-gradient(#c9c9d6, var(--accent)); transform-origin: top; }
  .js .ms:not(.is-in) ol::after { scale: 1 0; }
  .ms li { grid-template-columns: 20px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; }
  .ms li span { max-width: none; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .tg *, .ab *, .ab > *, .ms *, .ms ol::after { transition: none !important; } }

/* ---------- phone ---------- */
@media (max-width: 767.98px) {
  .s-media figcaption { font-size: 20px; }
  .s-media.is-phone, .s-media.is-card { width: min(260px, 72vw); }
  .s-note { padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.3); font-size: 10px; }
  .s-note.is-left { right: auto; left: 8px; }
  .s-note.is-left::after, .s-note.is-right::before { display: none; }
  .s-note.is-right { left: auto; right: 8px; height: auto; top: calc((var(--top) + var(--bottom)) / 2); translate: 0 -50%; }
  .s-bars li { grid-template-columns: 104px minmax(0, 1fr) 40px; gap: 10px; font-size: 13px; }
  .s-chart figcaption b { font-size: 22px; }
  .s-media.is-admin-tall { width: 100%; }
  .s-window-bar span { display: none; }
  .s-window-body { padding: 12px; }
  .t-bubbles, .t-people { grid-template-columns: minmax(0, 1fr); }
  .t-bubble:nth-child(even) { margin-top: 0; }
  .t-dots { grid-template-columns: repeat(10, 12px); }
  .t-count { gap: 20px; }
  .t-count p { font-size: 16px; }
  .t-count b { font-size: 56px; }
}
