/* 健小将官网首页。颜色、字体、圆角取自应用的 DESIGN.md，保持同一个品牌。 */

/* MiSans is not shipped with this page (4.8 MB a weight): devices that have it installed use it, the rest use
   their own Chinese face. Barlow Condensed is cut down to the Latin and numerals the page sets in it. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("assets/fonts/BarlowCondensed-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --pitch: #192821;
  --lime: #c2f826;
  --page: #f5f7f8;
  --surface: #ffffff;
  --rule: #dfe5e8;
  --title: #171e25;
  --body: #3d4853;
  --note: #65717c;
  --run: #286889;
  --strength: #735091;
  --skill: #276d63;
  --on-pitch: #f5f7f8;
  --on-pitch-note: rgba(245, 247, 248, 0.66);
  --on-pitch-rule: rgba(245, 247, 248, 0.16);

  --gutter: clamp(20px, 5.5vw, 80px);
  --section: clamp(88px, 11vw, 160px);
  --nav-height: 64px;
  --font-text: "MiSans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "Barlow Condensed", "MiSans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.75;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.num {
  font-family: var(--font-num);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--title);
}
.skip:focus {
  top: 12px;
}

.phrase {
  display: inline-block;
}

.heading {
  max-width: 16em;
  color: var(--title);
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1.16;
}
.heading--light {
  color: var(--on-pitch);
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease;
}
.button:active {
  transform: scale(0.98);
}
.button--primary {
  background: var(--lime);
  color: var(--pitch);
}
.button--primary:hover {
  background: #cdfb4a;
}
.button--primary:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 12px;
}
.download .button--primary:focus-visible {
  outline-color: #435c09;
}

.textlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--title);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}
.textlink:hover {
  text-decoration-thickness: 2.5px;
}
.textlink--light {
  color: var(--on-pitch);
}

/* Navigation: solid by default; clear over the hero once the script has confirmed the hero is in view. */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  border-bottom: 1px solid var(--rule);
  background: rgba(245, 247, 248, 0.94);
  color: var(--title);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}
.js .nav:not(.is-solid) {
  border-bottom-color: transparent;
  background: transparent;
  color: var(--on-pitch);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--nav-height);
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav__links {
  display: none;
  gap: 36px;
  margin-left: auto;
  font-size: 15px;
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}
.nav__links a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}
.nav__login {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid currentColor;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.nav__login:hover {
  background: var(--title);
  border-color: var(--title);
  color: var(--page);
}
.js .nav.is-solid.is-dark {
  border-bottom-color: var(--on-pitch-rule);
  background: rgba(25, 40, 33, 0.88);
  color: var(--on-pitch);
}
.js .nav.is-dark .nav__login:hover,
.js .nav:not(.is-solid) .nav__login:hover {
  background: var(--on-pitch);
  border-color: var(--on-pitch);
  color: var(--pitch);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand__mark {
  border-radius: 8px;
}
.brand__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav__menu {
  position: relative;
  margin-left: -4px;
}
.nav__menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.nav__menu summary::-webkit-details-marker {
  display: none;
}
.nav__menu summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.nav__menu[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}
.nav__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--surface);
  color: var(--title);
}
.nav__panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 16px;
  text-decoration: none;
}
.nav__panel a:hover {
  background: var(--page);
}
@media (min-width: 800px) {
  .nav__inner {
    gap: 32px;
  }
  .nav__links {
    display: flex;
  }
  .nav__login {
    margin-left: 0;
  }
  .nav__menu {
    display: none;
  }
}

/* Hero: the lanes and the stopwatch are one drawing, so they scale together. */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: max(100svh, 720px);
  overflow: hidden;
  background: var(--pitch);
  color: var(--on-pitch);
}
.hero__copy {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding: calc(var(--nav-height) + 40px) var(--gutter) 0;
}
.hero__title {
  font-size: clamp(52px, 13vw, 104px);
  font-weight: 600;
  line-height: 1.1;
}
.hero__title .phrase {
  display: block;
}
.hero__lead {
  max-width: 24em;
  margin-top: 20px;
  color: var(--on-pitch-note);
  font-size: clamp(16px, 1.3vw, 19px);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 32px;
}

.hero__bar {
  position: absolute;
  inset: var(--nav-height) 0 auto;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  max-width: 1280px;
  margin-inline: auto;
  padding: 8px var(--gutter) 0;
}
.hero__motion {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--on-pitch-note);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}
.hero__motion:hover {
  color: var(--on-pitch);
}

.track {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 46%;
}
.track__lanes path,
.track__marks path {
  fill: none;
  stroke: var(--on-pitch-rule);
  stroke-width: 1.5;
}
.track__marks path {
  stroke: rgba(245, 247, 248, 0.42);
  stroke-width: 3;
}
.track__numbers text {
  fill: rgba(245, 247, 248, 0.42);
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 600;
  text-anchor: middle;
}
.track__route {
  fill: none;
  stroke: none;
}
.track__trail {
  fill: none;
  stroke: var(--on-pitch);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0 99999;
  opacity: 0.4;
}
.track__runner {
  fill: var(--on-pitch);
}
.watch__state {
  fill: var(--on-pitch-note);
  font-size: 22px;
}
.watch__time {
  fill: rgba(245, 247, 248, 0.72);
  font-family: var(--font-num);
  font-size: 128px;
  font-weight: 700;
  text-anchor: middle;
}
.watch__rule {
  stroke: var(--on-pitch-rule);
  stroke-width: 1.5;
}
.watch__lap {
  fill: var(--on-pitch-note);
  font-size: 20px;
}
.watch__split {
  fill: var(--on-pitch);
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 600;
  text-anchor: end;
}
.watch__rows g:nth-child(2) {
  opacity: 0.62;
}
.watch__rows g:nth-child(3) {
  opacity: 0.34;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .track__lanes path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: lane-in 600ms cubic-bezier(0.3, 0, 0.1, 1) forwards;
  }
  .track__lanes path:nth-child(2) { animation-delay: 20ms; }
  .track__lanes path:nth-child(3) { animation-delay: 40ms; }
  .track__lanes path:nth-child(4) { animation-delay: 60ms; }
  .track__lanes path:nth-child(5) { animation-delay: 80ms; }
  .track__lanes path:nth-child(6) { animation-delay: 100ms; }
  .track__marks,
  .track__numbers,
  .track__runner,
  .watch {
    opacity: 0;
    animation: fade-in 160ms ease 560ms forwards;
  }
}
@keyframes lane-in {
  to { stroke-dashoffset: 0; }
}
@keyframes fade-in {
  to { opacity: 1; }
}

/* Tablets: the drawing keeps its own proportions in the lower right, so the bend is not cut off. */
@media (min-width: 700px) {
  .track {
    width: auto;
    max-width: 100%;
    height: 62%;
    aspect-ratio: 1440 / 900;
  }
}

/* Wide, landscape screens: headline bottom left, the whole track on the right. */
@media (min-width: 1100px) and (min-aspect-ratio: 3/2) {
  .hero {
    justify-content: flex-end;
    min-height: max(100svh, 640px);
  }
  .hero__copy {
    padding-top: 0;
    padding-bottom: clamp(56px, 11vh, 120px);
  }
  .hero__title {
    font-size: clamp(72px, 6.6vw, 104px);
  }
  .hero__lead {
    margin-top: 28px;
  }
  .hero__actions {
    margin-top: 40px;
  }
  .track {
    top: 0;
    bottom: auto;
    width: auto;
    max-width: 100%;
    height: 100%;
    aspect-ratio: 1440 / 900;
  }
}

/* Workflow */

.flow {
  padding-block: var(--section);
}
.flow__body {
  margin-top: clamp(48px, 6vw, 88px);
}
.step + .step {
  margin-top: 72px;
}
.step__text h3 {
  color: var(--title);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
}
.step__text p {
  max-width: 24em;
  margin-top: 12px;
}
.step .scene {
  margin-top: 28px;
}

.scene {
  width: 100%;
  max-width: 460px;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 24px;
  background: var(--surface);
  color: var(--body);
  font-size: 15px;
  line-height: 1.5;
}
.scene__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--note);
  font-size: 14px;
}
.scene__head strong {
  color: var(--title);
  font-size: 17px;
  font-weight: 600;
}

.clock {
  margin-top: 18px;
  color: var(--title);
  font-size: 76px;
  font-weight: 700;
  line-height: 1;
}
.splits {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
}
.splits th {
  padding-bottom: 8px;
  color: var(--note);
  font-size: 13px;
  font-weight: 400;
  text-align: right;
}
.splits th:first-child,
.splits td:first-child {
  text-align: left;
}
.splits td {
  padding-block: 11px;
  border-top: 1px solid var(--rule);
  color: var(--title);
  text-align: right;
}
.splits td.num {
  font-size: 20px;
}
.splits td:first-child {
  color: var(--note);
}
.splits__pick {
  display: inline-block;
  padding: 3px 12px;
  border: 1px dashed var(--note);
  border-radius: 12px;
  color: var(--note);
  font-size: 14px;
}
.scene__foot {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--note);
  font-size: 14px;
}
.scene__foot b {
  color: var(--title);
  font-size: 18px;
}
.scene__foot--link {
  color: var(--title);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.feedback > div {
  padding-block: 16px;
  border-bottom: 1px solid var(--rule);
}
.feedback > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.feedback dt {
  color: var(--note);
  font-size: 13px;
}
.feedback dd {
  margin-top: 6px;
  color: var(--title);
  font-size: 17px;
}
.feedback dd b {
  font-size: 26px;
}
.rpe {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
  margin-top: 4px;
}
.rpe i {
  height: 28px;
  border-radius: 6px;
  background: var(--page);
}
.rpe i:nth-child(-n + 8) {
  background: #cfdad4;
}
.rpe i.rpe__on {
  background: var(--pitch);
}
.rpe__value {
  display: block;
  margin-top: 8px;
  color: var(--note);
  font-size: 14px;
}
.rpe__value b {
  color: var(--title);
}

/* Our own numbers: the execution score and the weekly load. */

.score {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-top: 18px;
}
.score__value {
  color: var(--title);
  font-size: 72px;
  line-height: 1;
}
.score__value b {
  font-weight: 700;
}
.score__value span {
  margin-left: 2px;
  font-size: 0.5em;
}
.score__label {
  color: var(--note);
  font-size: 14px;
}
.chart {
  width: 100%;
  height: auto;
  margin-top: 14px;
  overflow: visible;
}
.chart__labels text {
  fill: var(--note);
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 600;
}
.chart__labels text {
  text-anchor: middle;
}
.weeks__band {
  fill: #e6eee9;
  stroke: #7d9187;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.chart__legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--note);
  font-size: 13px;
}
.chart__swatch {
  flex: none;
  width: 16px;
  height: 12px;
  border: 1px dashed #7d9187;
  border-radius: 3px;
  background: #e6eee9;
}
.weeks__bars rect {
  fill: #9fb1a8;
}
.weeks__nums text {
  fill: var(--title);
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}
.weeks__bars .weeks__last {
  fill: var(--pitch);
}
.weeks__value {
  fill: var(--title);
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 700;
  text-anchor: middle;
}

@media (prefers-reduced-motion: no-preference) {
  .js .weeks__bars rect {
    transform-box: fill-box;
    transform-origin: center bottom;
    transform: scaleY(0);
    transition: transform 560ms cubic-bezier(0.2, 0.7, 0.1, 1);
  }
  .js .weeks__nums,
  .js .weeks__value {
    opacity: 0;
    transition: opacity 300ms ease;
  }
  .js .scene.is-active .weeks__bars rect { transform: scaleY(1); }
  .js .scene.is-active .weeks__nums,
  .js .scene.is-active .weeks__value {
    opacity: 1;
    transition-delay: 620ms;
  }
  .js .scene.is-active .weeks__bars rect:nth-child(1) { transition-delay: 80ms; }
  .js .scene.is-active .weeks__bars rect:nth-child(2) { transition-delay: 160ms; }
  .js .scene.is-active .weeks__bars rect:nth-child(3) { transition-delay: 240ms; }
  .js .scene.is-active .weeks__bars rect:nth-child(4) { transition-delay: 320ms; }
  .js .scene.is-active .weeks__bars rect:nth-child(5) { transition-delay: 440ms; }
}

/* Recovery map: the centrepiece for the numbers only we compute. */

.recovery {
  padding-block: var(--section);
  background: var(--pitch);
  color: var(--on-pitch-note);
}
.recovery__demo {
  margin-top: clamp(40px, 5vw, 72px);
}
.recovery__demo:empty {
  display: none;
}

/* Scenario blocks: what you send on one side, what the assistant gives back on the other. */

.case {
  padding-block: var(--section);
}
.case__grid {
  display: grid;
  gap: 48px;
}
.case .heading {
  font-size: clamp(32px, 3.6vw, 52px);
}
.case__lead {
  margin-top: 20px;
  font-size: clamp(17px, 1.5vw, 21px);
}
.case__visual {
  display: grid;
  justify-items: center;
  gap: 20px;
}
.bubble {
  justify-self: end;
  max-width: 300px;
  padding: 16px 18px;
  border-radius: 20px 20px 4px 20px;
  background: #e6eee9;
  color: var(--title);
  font-size: 15px;
  line-height: 1.6;
}
.note {
  display: grid;
  gap: 5px;
  width: 190px;
  margin: 2px auto 14px;
  padding: 16px 14px 20px;
  border-radius: 3px;
  background: #f4efe0;
  color: #4d4a42;
  font-family: "KaiTi", "STKaiti", "Kaiti SC", cursive;
  font-size: 13px;
  line-height: 1.5;
  transform: rotate(-2.5deg);
}
.note span:first-child {
  margin-bottom: 4px;
}
.case__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pitch) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f7f8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.draft {
  justify-self: start;
  max-width: 380px;
}
.draft__rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 13px;
  border-bottom: 1px solid var(--rule);
  color: var(--title);
}
.draft__rows li:last-child,
.draft__checks li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.draft__rows small {
  display: block;
  color: var(--note);
  font-size: 13px;
}
.draft__rows b {
  flex: none;
  font-size: 19px;
}
.draft__checks li {
  position: relative;
  padding: 13px 0 13px 30px;
  border-bottom: 1px solid var(--rule);
  color: var(--title);
}
.draft__checks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 19px;
  width: 12px;
  height: 6px;
  border-left: 2px solid var(--pitch);
  border-bottom: 2px solid var(--pitch);
  transform: rotate(-45deg);
}
@media (min-width: 960px) {
  .case__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(40px, 5vw, 88px);
  }
  .case--flip .case__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .case--flip .case__text {
    order: 2;
  }
  .case__visual {
    grid-template-columns: minmax(0, 250px) auto minmax(0, 1fr);
    align-items: center;
    gap: 24px;
  }
  .case__arrow {
    transform: rotate(-90deg);
  }
  .bubble,
  .draft {
    justify-self: stretch;
  }
}

/* Working principle */

.rules {
  padding-block: var(--section);
  background: var(--pitch);
  color: var(--on-pitch-note);
}
.rules__grid {
  display: grid;
  gap: 32px;
  margin-top: clamp(40px, 5vw, 72px);
}
.rules__grid li {
  padding-top: 20px;
  border-top: 2px solid var(--on-pitch);
}
.rules__grid h3 {
  color: var(--on-pitch);
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 600;
  line-height: 1.35;
}
.rules__grid p {
  margin-top: 10px;
  font-size: 16px;
}
@media (min-width: 640px) {
  .rules__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px clamp(24px, 3vw, 48px);
  }
}
@media (min-width: 1100px) {
  .rules__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Ability pentagon */

.radar__grid polygon,
.radar__grid path {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}
.radar__shape {
  fill: rgba(40, 104, 137, 0.16);
  stroke: var(--run);
  stroke-width: 2;
  stroke-linejoin: round;
}
.radar__figure circle {
  fill: var(--run);
}
.radar__labels text {
  fill: var(--title);
  font-size: 14px;
  font-weight: 600;
  text-anchor: middle;
}
.radar__labels .radar__start { text-anchor: start; }
.radar__labels .radar__end { text-anchor: end; }
.grades {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.grades span {
  display: block;
  color: var(--note);
  font-size: 13px;
}
.grades b {
  color: var(--title);
  font-size: 20px;
}
.grades b:not(.num) {
  color: var(--note);
  font-size: 14px;
  font-weight: 400;
}
@media (prefers-reduced-motion: no-preference) {
  .js .radar__figure {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0.2);
    opacity: 0;
    transition: transform 600ms cubic-bezier(0.2, 0.7, 0.1, 1) 120ms, opacity 300ms ease 120ms;
  }
  .js .scene.is-active .radar__figure {
    transform: none;
    opacity: 1;
  }
}

/* Wide screens with script: the scene stays put while the four steps scroll past. */
@media (min-width: 960px) {
  .flow.is-staged .flow__body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(40px, 6vw, 96px);
    margin-top: 0;
  }
  .flow.is-staged .step {
    display: flex;
    align-items: center;
    min-height: 68vh;
    margin-top: 0;
  }
  /* The current step is marked by a bar in the margin; the others stay readable. */
  .flow.is-staged .step__text {
    margin-left: -27px;
    padding-left: 24px;
    border-left: 3px solid transparent;
    transition: border-color 300ms ease;
  }
  .flow.is-staged .step.is-active .step__text {
    border-left-color: var(--pitch);
  }
  .flow.is-staged .step:not(.is-active) .step__text h3,
  .flow.is-staged .step:not(.is-active) .step__text p {
    color: var(--note);
  }
  .flow.is-staged .step__text h3 {
    font-size: clamp(32px, 3vw, 44px);
  }
  .flow.is-staged .step__text p {
    margin-top: 16px;
    font-size: 19px;
  }
  .flow.is-staged .scene {
    max-width: 500px;
  }
  .flow.is-staged .flow__stage {
    /* Same height as one step and centred in the window, so the scene lines up with the first and last step too. */
    position: sticky;
    top: 16vh;
    display: grid;
    align-items: center;
    justify-items: end;
    height: 68vh;
  }
  .flow.is-staged .flow__stage .scene {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 320ms ease, transform 320ms ease;
  }
  .flow.is-staged .flow__stage .scene.is-active {
    opacity: 1;
    transform: none;
  }
}

/* Sports */

.sports {
  padding-block: var(--section);
  background: var(--pitch);
  color: var(--on-pitch-note);
}
.sports__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(24px, 3.4vw, 52px);
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--on-pitch-rule);
  color: var(--on-pitch);
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 600;
  line-height: 1.4;
}
.sports__feature {
  display: grid;
  gap: 40px;
  margin-top: clamp(64px, 8vw, 120px);
}
.sports__board {
  width: 100%;
  max-width: 620px;
}
.sports__board:empty {
  display: none;
}
.sports__text h3 {
  color: var(--on-pitch);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.3;
}
.sports__text h3:not(:first-child) {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--on-pitch-rule);
}
.sports__text p {
  max-width: 26em;
  margin-top: 12px;
}
@media (min-width: 960px) {
  .sports__feature {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(48px, 7vw, 112px);
  }
}

/* Download */

.download {
  padding-block: var(--section);
}
.platforms {
  margin-top: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.platforms li {
  display: grid;
  gap: 8px 32px;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}
.platforms h3 {
  color: var(--title);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}
.platforms .button,
.platforms .textlink {
  justify-self: start;
  margin-top: 8px;
}
@media (min-width: 800px) {
  .platforms li {
    grid-template-columns: 220px 1fr auto;
    align-items: center;
    min-height: 108px;
  }
  .platforms .button,
  .platforms .textlink {
    justify-self: end;
    margin-top: 0;
  }
}

/* Footer */

.footer {
  padding-block: 40px;
  background: var(--pitch);
  color: var(--on-pitch-note);
  font-size: 14px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
}
.footer .brand {
  color: var(--on-pitch);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.footer__links a {
  text-decoration: none;
}
.footer__links a:hover {
  color: var(--on-pitch);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* AI scheduling: the page's centrepiece. Wide screens pin the stage while four steps scroll past;
   narrow screens give each step its own stage. */

.ai {
  padding-top: var(--section);
  background: var(--pitch);
  color: var(--on-pitch-note);
}
.ai__heading {
  margin-bottom: 40px;
  font-size: clamp(32px, 3.5vw, 50px);
}
.ai__scroll {
  padding-bottom: var(--section);
}
.ai__beat + .ai__beat {
  margin-top: 72px;
}
.ai__beat h3 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--on-pitch);
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 600;
  line-height: 1.25;
}
.ai__num {
  flex: none;
  color: var(--on-pitch-note);
  font-size: 0.62em;
}
.ai__beat p {
  max-width: 23em;
  margin-top: 14px;
  font-size: 17px;
}
.ai__slot {
  margin-top: 28px;
  max-width: 560px;
}
.ai__note {
  margin-top: 32px;
  font-size: 13px;
}
.ai__stage,
.ai__progress {
  display: none;
}

@media (min-width: 960px) {
  .js .ai {
    padding-top: 0;
  }
  .js .ai__scroll {
    height: 340vh;
    padding: 0;
  }
  .js .ai__heading {
    margin-bottom: 32px;
  }
  .js .ai__sticky {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
    padding-top: var(--nav-height);
  }
  .js .ai__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: clamp(40px, 5vw, 88px);
  }
  .js .ai__progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-width: 240px;
    margin-bottom: 40px;
  }
  .js .ai__progress span {
    height: 3px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--on-pitch-rule);
  }
  .js .ai__progress i {
    display: block;
    height: 100%;
    background: var(--on-pitch);
    transform: scaleX(0);
    transform-origin: left center;
  }
  .js .ai__beats {
    display: grid;
  }
  .js .ai__beat {
    grid-area: 1 / 1;
    margin: 0;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 420ms ease, transform 560ms cubic-bezier(0.2, 0.7, 0.1, 1);
    pointer-events: none;
  }
  .js .ai__beat.is-past {
    transform: translateY(-28px);
  }
  .js .ai__beat.is-active {
    opacity: 1;
    transform: none;
    transition-delay: 80ms;
    pointer-events: auto;
  }
  .js .ai__slot {
    display: none;
  }
  .js .ai__stage {
    display: block;
    width: 100%;
    max-width: 680px;
    justify-self: end;
  }
}

/* Motion: headings rise out of their own line, once, as they come into view. */

@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] .phrase {
    clip-path: inset(100% -0.2em -0.3em -0.2em);
    transform: translateY(0.45em);
  }
  .js [data-rise].rise-self {
    opacity: 0;
    transform: translateY(18px);
  }
  .js [data-rise].is-in .phrase {
    clip-path: inset(-0.3em -0.2em -0.3em -0.2em);
    transform: none;
    transition:
      clip-path 640ms cubic-bezier(0.2, 0.7, 0.1, 1) calc(var(--i, 0) * 70ms + var(--delay, 0ms)),
      transform 640ms cubic-bezier(0.2, 0.7, 0.1, 1) calc(var(--i, 0) * 70ms + var(--delay, 0ms));
  }
  .js [data-rise].rise-self.is-in {
    opacity: 1;
    transform: none;
    transition:
      opacity 520ms ease var(--delay, 0ms),
      transform 640ms cubic-bezier(0.2, 0.7, 0.1, 1) var(--delay, 0ms);
  }
  .hero__copy,
  .track {
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
