/* Stalvo's website. One stylesheet, no JavaScript.
   Colours: slate #232A30 and amber #F5A524 are the brand; links and buttons are system blue #007AFF.
   Sizes follow the page's own width (container queries), so every page works from phone to desktop. */

/* ---------- Base ---------- */

@property --t {            /* a rest timer, in seconds */
  syntax: "<integer>";
  inherits: true;
  initial-value: 120;
}
@property --e {            /* the workout's time once the rest is over, in seconds */
  syntax: "<integer>";
  inherits: true;
  initial-value: 372;
}
/* The set card, each from 0 to 1: its three ticks, and how far it has folded. --folded is 1 once it has. --auto is 1
   while scrolling drives it. */
@property --s1 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --s2 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --s3 { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --fold { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --auto { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --folded { syntax: "<integer>"; inherits: true; initial-value: 0; }
/* The circuit: 2 and 3 are rounds, 4 is finished. */
@property --round { syntax: "<integer>"; inherits: true; initial-value: 2; }
@property --seen-circuit { syntax: "<integer>"; inherits: true; initial-value: 0; }
@property --logged {       /* 1 once scrolling has pressed Done on the Lock Screen */
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body { margin: 0; }

.page {
  container-type: inline-size;
  display: flex;                     /* the footer stays at the bottom of short pages */
  flex-direction: column;
  min-height: 100vh;
  background: #fff;
  color: #232A30;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.53;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

.home { line-height: 1.47; }

main { flex: 1 0 auto; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }

a { color: #007AFF; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
.tick input:focus-visible + span { outline: 3px solid #007AFF; outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 24px;
  background: #fff;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* A detail still to fill in. PLACEHOLDERS.md lists them all. */
.todo { padding: 0 5px; border-radius: 5px; background: #FFE9BF; color: #232A30; font-weight: 500; }

/* Before and after the App Store launch: change data-launch on <body> in index.html. */
[data-launch="before"] .launch-after,
[data-launch="after"] .launch-before { display: none; }

/* ---------- Header and footer ---------- */

.site-header { border-bottom: 1px solid rgba(35, 42, 48, .08); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.site-header a { display: flex; align-items: center; min-height: 44px; color: #232A30; }
.site-header nav { display: flex; gap: 28px; font-size: 15px; }
.site-header [aria-current] { font-weight: 600; }
/* Stalvo's logo. The edge sets its pale background apart from white. */
.mark { flex: none; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(35, 42, 48, .2); }

.site-header .brand { gap: 10px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }

.site-footer { padding: 32px 0 48px; background: #F2F2F7; color: #5B646C; font-size: 13px; line-height: 1.5; }
.site-footer .row-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 28px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #D9DCE0;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer nav a { display: flex; align-items: center; min-height: 44px; }

/* ---------- Type and buttons ---------- */

.h1, .h2, .h3 { font-weight: 700; text-wrap: balance; }
.h1 { font-size: clamp(52px, 7.8cqi, 104px); line-height: 1.02; letter-spacing: -.038em; }
.h2 { font-size: clamp(36px, 4.6cqi, 64px); line-height: 1.06; letter-spacing: -.026em; }
.h3 { font-size: clamp(28px, 2.6cqi, 36px); line-height: 1.12; letter-spacing: -.02em; }

.lede { margin-top: 20px; color: #5B646C; font-size: clamp(19px, 1.75cqi, 24px); line-height: 1.4; letter-spacing: -.01em; }
.home .lede { text-wrap: balance; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: #6C6C72; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 24px;
  background: #007AFF;
  color: #fff;
  font-weight: 600;
}
.pill:hover { background: #006FE6; text-decoration: none; }

.link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Home: layout ---------- */

.sec { padding: 112px 0; }
.sec-slate { padding: 104px 0; background: #232A30; color: #fff; }
.sec-grey { padding: 104px 0; background: #F2F2F7; }
.sec-tiles { padding-bottom: 20px; }
.sec-details { padding-top: 0; }
.sec-surfaces { padding-top: 128px; }
.sec-island { padding-top: 16px; padding-bottom: 128px; text-align: center; }
.sec.rise { padding-bottom: 0; }                /* a phone runs off the bottom of the section */
.rise .text { padding-bottom: 64px; }

.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 88px; align-items: center; }
.intro { max-width: 760px; margin: 0 auto; text-align: center; }

.hero { padding: 104px 0 72px; overflow: clip; text-align: center; }
.hero .lede { max-width: 640px; margin: 24px auto 0; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; margin-top: 32px; }
.hero .actions .launch-before { font-weight: 600; }

/* ---------- Home: devices ---------- */

.phone {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 58px;
  background: #000;
  box-shadow: inset 0 0 0 1.5px #4B5157, 0 30px 60px -20px rgba(35, 42, 48, .35);
}
.phone > img { display: block; width: 100%; height: auto; border-radius: 48px; }

.crop { height: 524px; overflow: clip; }
.crop.tall { height: 618px; }

.pair { display: flex; align-items: flex-start; justify-content: center; margin-top: 72px; padding: 0 12px 108px; }
.pair .phone { flex: none; width: 340px; margin: 0; }

/* The header's phones. The screenshots show how each phone ends up. The animation covers their changes, then
   uncovers them. The rest bar is drawn over the screenshot's own so its timer can run. */
.today, .before { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.today { fill: #E5E5EA; }
.today .count { fill: #fff; }
.bar {
  --u: calc(100cqi / 402);
  position: absolute;
  bottom: calc(38.3 * var(--u));
  left: calc(11.7 * var(--u));
  display: flex;
  align-items: center;
  width: calc(378.6 * var(--u));
  height: calc(68.7 * var(--u));
  padding: 0 calc(21 * var(--u)) 0 calc(14.8 * var(--u));
  border: 1px solid #fff;
  border-radius: calc(35 * var(--u));
  background: #F3FBFF;
  box-shadow: 0 calc(6 * var(--u)) calc(20 * var(--u)) rgba(0, 0, 0, .10);
  color: #000;
  font-size: calc(15 * var(--u));
  letter-spacing: -.015em;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
}
.bar b { flex: 1; margin-left: calc(13 * var(--u)); font-weight: 600; }
.bar i { color: #0088FF; font-size: calc(17 * var(--u)); font-style: normal; font-weight: 600; }
.bar-ring {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: calc(46.7 * var(--u));
  height: calc(46.7 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 600;
  letter-spacing: 0;
}
.bar-ring::after { --w: calc(2.8 * var(--u)); }
.touch.hero-touch {
  --u: calc(100cqi / 402);
  top: calc(269 * var(--u));
  right: calc(27 * var(--u));
  background: rgba(0, 0, 0, .18);
}
.pair .front { z-index: 1; }
.pair .back { margin: 100px 0 -100px -36px; }   /* low enough to keep its timer in view */

.duo { display: grid; grid-template-columns: 340px 260px; gap: 128px; align-items: center; justify-content: center; margin-top: 72px; }
.duo figure { text-align: center; isolation: isolate; }
.duo figcaption { margin-top: 28px; font-weight: 600; }
.sec-surfaces .note, .sec-island .note { max-width: 640px; margin: 48px auto 0; color: #5B646C; font-size: 15px; text-align: center; }
.sec-island .note { margin-top: 40px; padding: 0 24px; }
.sec-island .lede { max-width: 640px; margin-right: auto; margin-left: auto; }

/* The Live Activity and Dynamic Island are text, not images, so their timers can run. They copy
   SlateWidgets/SessionLiveActivity.swift in the app. --u is one iPhone point: every size below was measured on
   iPhone 18 Pro screenshots (402 points wide), so both keep their shape at any width. */

.badge { display: grid; place-items: center; border-radius: 50%; background: #30D158; }
.badge svg { display: block; width: 60%; height: auto; }
.clock { font-variant-numeric: tabular-nums; }

/* The Lock Screen: a real screenshot, with the Live Activity on top. */
.face { container: face / inline-size; position: relative; border-radius: 48px; overflow: clip; }
.face > img { display: block; width: 100%; height: auto; }
.act-box {
  --u: calc(100cqi / 402);
  position: absolute;
  right: calc(14 * var(--u));
  bottom: calc(128 * var(--u));
  left: calc(14 * var(--u));
  height: calc(89 * var(--u));
}
.act {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(74 * var(--u));
  border-radius: calc(27 * var(--u));
  background: #000;
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22);
  color: #fff;
  font-size: calc(17 * var(--u));
  line-height: calc(21 * var(--u));
  letter-spacing: -.016em;
  text-align: left;
  overflow: clip;
}
.act .badge {
  position: absolute;
  top: calc(50% - 19 * var(--u));
  left: calc(17 * var(--u));
  width: calc(38 * var(--u));
  height: calc(38 * var(--u));
}
.act-line {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: calc(68 * var(--u));
  white-space: nowrap;
}
.act-line small { color: #8E8E93; font-size: calc(13 * var(--u)); line-height: calc(16.6 * var(--u)); letter-spacing: -.006em; }
.act-line b { font-weight: 600; }
.act-line i {                                   /* Done and Skip */
  position: absolute;
  top: 50%;
  right: calc(17 * var(--u));
  width: calc(44 * var(--u));
  color: #0A84FF;
  font-size: calc(15 * var(--u));
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.015em;
  text-align: center;
  transform: translateY(-50%);
}
.act-rest, .act-next { opacity: 0; }
.touch {                                        /* where a finger would land */
  position: absolute;
  top: calc(50% - 20 * var(--u));
  right: calc(19 * var(--u));
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
  opacity: 0;
}

/* The Dynamic Island. .island is cut to the small or expanded shape; .isl holds the timer and gets shorter when
   the rest ends. */
.island {
  --u: min(1.7px, calc((100cqi - 24px) / 374));
  position: relative;
  width: calc(374 * var(--u));
  height: calc(146 * var(--u));
  margin: 56px auto 0;
  clip-path: inset(0px 0px 0px 0px round calc(47 * var(--u)));
  color: #fff;
  letter-spacing: -.015em;
  text-align: left;
  white-space: nowrap;
}
.isl { position: absolute; inset: 0; background: #000; clip-path: inset(0px 0px 0px 0px round calc(47 * var(--u))); }
.isl-small {
  position: absolute;
  top: 0;
  left: calc(95 * var(--u));
  width: calc(184 * var(--u));
  height: calc(36.7 * var(--u));
  padding-right: calc(7.7 * var(--u));
  font-size: calc(12.6 * var(--u));
  font-weight: 600;
  line-height: calc(36.7 * var(--u));
  text-align: right;
  opacity: 0;
}
.isl-small .badge {
  position: absolute;
  top: calc(6.3 * var(--u));
  left: calc(7 * var(--u));
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}
.elapsed { position: absolute; right: calc(7.7 * var(--u)); font-variant-numeric: tabular-nums; opacity: 0; }

.isl-big { position: absolute; inset: 0; transform-origin: 50% 0; }
.isl-big > div { position: absolute; inset: 0; }
.isl-big span { position: absolute; }
.isl-next { opacity: 0; }
.isl-name, .isl-count {
  top: calc(17.6 * var(--u));
  color: #8E8E93;
  font-size: calc(12 * var(--u));
  line-height: calc(16 * var(--u));
  letter-spacing: 0;
}
.isl-name, .isl-time, .isl-then, .isl-set, .isl-load { left: calc(24.6 * var(--u)); }
.isl-count { right: calc(24.2 * var(--u)); }
.isl-time {
  top: calc(42 * var(--u));
  color: #30D158;
  font-size: calc(40 * var(--u));
  font-weight: 600;
  line-height: calc(44 * var(--u));
  letter-spacing: 0;
}
.isl-btn {
  top: calc(42 * var(--u));
  right: calc(23.3 * var(--u));
  width: calc(64 * var(--u));
  height: calc(44 * var(--u));
  border-radius: calc(22 * var(--u));
  background: #292929;
  font-size: calc(15 * var(--u));
  font-weight: 600;
  line-height: calc(44 * var(--u));
  text-align: center;
}
.isl-btn.isl-add { right: calc(95.3 * var(--u)); width: calc(68.7 * var(--u)); }
.isl-btn.isl-log { top: calc(61 * var(--u)); width: calc(81 * var(--u)); background: #0A84FF; }
.isl-bar {
  top: calc(97 * var(--u));
  right: calc(23.4 * var(--u));
  left: calc(24.4 * var(--u));
  height: calc(4 * var(--u));
  border-radius: calc(2 * var(--u));
  background: #1C1C1E;
  overflow: clip;
}
.isl-bar span { inset: 0; border-radius: inherit; background: #30D158; transform: translateX(-10%); }
.isl-then, .isl-set { font-size: calc(15 * var(--u)); line-height: calc(20 * var(--u)); }
.isl-then { top: calc(109.4 * var(--u)); }
.isl-set { top: calc(36 * var(--u)); }
.isl-load { top: calc(63 * var(--u)); font-size: calc(30 * var(--u)); font-weight: 600; line-height: calc(40 * var(--u)); }

.watch {
  position: relative;
  width: 224px;
  margin: 72px auto 100px;
  padding: 13px;
  border-radius: 66px;
  background: #000;
  box-shadow: inset 0 0 0 1.5px #4B5157, 0 30px 60px -20px rgba(35, 42, 48, .35);
}
.watch img { display: block; width: 100%; height: auto; border-radius: 50px; }
.watch::before, .watch::after {                 /* the band */
  content: "";
  position: absolute;
  left: 50%;
  z-index: -1;
  width: 152px;
  height: 84px;
  margin-left: -76px;
  background: #39434B;
}
.watch::before { bottom: calc(100% - 12px); border-radius: 26px 26px 0 0; }
.watch::after { top: calc(100% - 12px); border-radius: 0 0 26px 26px; }
.crown { position: absolute; top: 29%; right: -7px; width: 9px; height: 46px; border-radius: 4px; background: #39434B; }

/* ---------- Home: the circuit ---------- */

/* Drawn over its screenshot so rounds can move. It copies CircuitSessionSection.swift in the app. --u is one iPhone
   point, as above. --round is 2 or 3, then 4 once the circuit is finished. */

.ck-crop { height: 540px; }
.ck { --u: calc(100cqi / 402); position: absolute; inset: 0; color: #000; font-size: calc(17 * var(--u)); line-height: calc(22 * var(--u)); letter-spacing: -.02em; text-align: left; white-space: nowrap; }
.ck small { color: #858588; font-size: calc(13 * var(--u)); line-height: calc(18 * var(--u)); letter-spacing: -.005em; }
.ck b { font-weight: 600; }
.ck-top { position: absolute; top: calc(87 * var(--u)); right: 0; left: 0; display: grid; justify-content: center; font-size: calc(12 * var(--u)); line-height: calc(16 * var(--u)); letter-spacing: 0; }
.ck-top span { grid-area: 1 / 1; padding: 0 calc(4 * var(--u)); background: #E7F6FF; color: #85898F; opacity: 0; }
.ck-list { position: absolute; inset: calc(130 * var(--u)) 0 0; padding: calc(8 * var(--u)) calc(16 * var(--u)) 0; background: #F2F2F7; }
.ck-card { position: relative; height: calc(492 * var(--u)); border-radius: calc(26 * var(--u)); background: #fff; overflow: clip; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
.ck-live, .ck-summary { position: absolute; top: 0; right: 0; left: 0; transition: opacity .25s; }
.ck-summary { opacity: 0; }

.ck-head { position: relative; height: calc(98 * var(--u)); padding: calc(20.3 * var(--u)) calc(20 * var(--u)) 0; background: #E6EDF7; }
.ck-head::after { content: ""; position: absolute; right: calc(20 * var(--u)); bottom: 0; left: calc(20 * var(--u)); height: 1px; background: #CED5DF; }
.ck-more { position: absolute; top: calc(21.3 * var(--u)); right: calc(22 * var(--u)); width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.ck-bars { position: absolute; top: calc(60 * var(--u)); right: calc(21 * var(--u)); left: calc(20 * var(--u)); display: flex; gap: calc(6 * var(--u)); align-items: center; }
.ck-seg { position: relative; flex: 1; height: calc(6 * var(--u)); border-radius: calc(3 * var(--u)); background: #34C759; overflow: clip; }
.ck-seg2 { background: #0088FF; }
.ck-seg3 { background: #E5E5EA; }
.ck-seg i { position: absolute; inset: 0; background: #34C759; transform: translateX(-101%); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.ck-seg3 i { background: #0088FF; }
.ck-count { display: flex; gap: .25em; justify-content: flex-end; min-width: calc(30 * var(--u)); margin-left: calc(2 * var(--u)); color: #77777C; font-size: calc(13 * var(--u)); font-weight: 600; font-variant-numeric: tabular-nums; line-height: calc(18 * var(--u)); letter-spacing: 0; }
.ck-digit { height: calc(18 * var(--u)); overflow: clip; }
.ck-digit span { display: block; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }

.ck-row { position: relative; display: flex; align-items: center; height: calc(89.4 * var(--u)); padding: 0 calc(20 * var(--u)); }
.ck-badge { flex: none; width: calc(28 * var(--u)); border-radius: calc(8 * var(--u)); background: #0088FF; color: #fff; font-size: calc(12 * var(--u)); font-weight: 700; line-height: calc(24 * var(--u)); letter-spacing: 0; text-align: center; }
.ck-name { flex: 1; display: grid; margin-left: calc(10.3 * var(--u)); }
.ck-field { display: grid; gap: calc(2 * var(--u)); width: calc(64 * var(--u)); margin-left: calc(10 * var(--u)); text-align: center; transform: translateY(calc(-6 * var(--u))); }
.ck .ck-field small { font-size: calc(11 * var(--u)); line-height: calc(14 * var(--u)); letter-spacing: .01em; }
.ck-val { height: calc(38 * var(--u)); padding-left: calc(13 * var(--u)); border-radius: calc(19 * var(--u)); background: #EFEFF0; color: #B9B9BC; line-height: calc(38 * var(--u)); text-align: left; overflow: clip; }
.ck-val span { display: block; }

.ck-actions { display: flex; gap: calc(10 * var(--u)); margin: calc(8 * var(--u)) calc(16 * var(--u)) 0; }
.ck-btn { position: relative; flex: 1; border-radius: calc(29 * var(--u)); background: #D1EAFF; color: #0088FF; font-weight: 600; line-height: calc(58 * var(--u)); text-align: center; }
.ck-go { display: grid; background: #0088FF; color: #fff; }
.ck-go > span { grid-area: 1 / 1; transition: opacity .2s; }
.ck-go > span:nth-child(2) { opacity: 0; }
.ck .touch { top: calc(9 * var(--u)); right: calc(62 * var(--u)); background: rgba(255, 255, 255, .5); }
.ck-edit { display: flex; align-items: center; height: calc(52 * var(--u)); margin-top: calc(8 * var(--u)); padding-left: calc(23 * var(--u)); color: #0088FF; }
.ck-pencil { width: calc(17 * var(--u)); margin-right: calc(20.5 * var(--u)); }

.ck-title { display: grid; gap: calc(1 * var(--u)); align-content: center; height: calc(69.7 * var(--u)); padding: 0 calc(20 * var(--u)); }
.ck .ck-title small, .ck .ck-done small { font-size: calc(15 * var(--u)); line-height: calc(20 * var(--u)); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.ck-done { position: relative; display: flex; align-items: center; height: calc(70.4 * var(--u)); padding: 0 calc(20 * var(--u)); }
.ck-title + .ck-done { height: calc(90.3 * var(--u)); }      /* its sets take two lines, as in the app */
.ck-done::before, .ck-summary .ck-edit::before { content: ""; position: absolute; top: 0; right: calc(20 * var(--u)); left: calc(62 * var(--u)); height: 1px; background: #E6E6E9; }
.ck-title + .ck-done::before { left: calc(20 * var(--u)); }
.ck-done .ck-name { gap: calc(1 * var(--u)); margin-left: calc(12 * var(--u)); }
.ck-tick { display: grid; flex: none; place-items: center; width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: calc(8 * var(--u)); background: #34C759; }
.ck-tick svg { width: 58%; }
.ck-chev { width: calc(7.5 * var(--u)); }
.ck-summary .ck-edit { position: relative; margin-top: 0; }
.ck-other { display: flex; align-items: center; height: calc(51 * var(--u)); margin-top: calc(13 * var(--u)); padding: 0 calc(20 * var(--u)); border-radius: calc(25.5 * var(--u)); background: #fff; color: #0088FF; }
.ck-plus { width: calc(22 * var(--u)); margin: 0 calc(17 * var(--u)) 0 calc(1 * var(--u)); }
.ck-discard { color: #FF383C; }

@container style(--round: 3) { .ck-go > span:nth-child(1) { opacity: 0; } .ck-go > span:nth-child(2) { opacity: 1; } }
@container style(--round: 4) {
  .ck-go > span:nth-child(1) { opacity: 0; }
  .ck-go > span:nth-child(2) { opacity: 1; }
  .ck-card { height: calc(352.5 * var(--u)); }
  .ck-live { opacity: 0; }
  .ck-summary { opacity: 1; }
  .ck-top span:nth-child(2) { opacity: 1; }
}
@container style(--round: 3) or style(--round: 4) {
  .ck-seg i { transform: none; }
  .ck-digit span { transform: translateY(-100%); }
}

/* ---------- Home: the set card ---------- */

/* Real checkboxes, so this needs no JavaScript. Every part of the card is worked out from --s1 to --s3 and --fold.
   Scrolling moves them, forwards or back. Ticking a set, or opening the folded card, takes over: :has() then sets
   them, with a short transition. Like the app, the card folds into one row after its last set. */

.stage-wrap { padding: 0 12px; }
.stage { max-width: 1240px; margin: 0 auto; padding: 88px 24px 72px; border-radius: 44px; background: #F2F2F7; overflow: clip; }
.stage .intro { margin-bottom: 20px; }
.demo {
  --rows: 236px;                                /* the heading row and three sets */
  --gap: 22px;
  --open: calc(96px + var(--gap) + var(--rows));
  --n: calc(var(--s1) + var(--s2) + var(--s3));
  --folded: round(down, calc(var(--fold) + .03), 1);
  max-width: 540px;
  margin: 0 auto;
  transform: translateY(calc(var(--fold) * (var(--open) - 86px) / 2));   /* folds toward its middle */
  transition: --s1 .2s, --s2 .2s, --s3 .2s, --fold .5s cubic-bezier(.2, .8, .2, 1);
}
.demo:has(.s1:checked) { --s1: 1; }
.demo:has(.s2:checked) { --s2: 1; }
.demo:has(.s3:checked) { --s3: 1; }
.demo:has(.s1:checked):has(.s2:checked):has(.s3:checked):not(:has(.open:checked)) {
  --fold: 1;
  transition-delay: 0s, 0s, 0s, .6s;            /* a moment after the last tick */
}

.deck { height: var(--open); }                  /* the open card's height, so folding never moves the page */
.card {
  position: relative;
  padding: calc(24px - 8px * var(--fold)) 0 calc(18px - 2px * var(--fold));
  border-radius: 30px;
  background: #fff;
  color: #000;
}
.card-head { display: flex; align-items: center; height: 54px; margin-bottom: calc(var(--gap) * (1 - var(--fold))); padding: 0 24px; }
.card-title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.names { flex: 1; min-width: 0; }
.subs { display: grid; font-variant-numeric: tabular-nums; }
.subs span { grid-area: 1 / 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* One line at a time: each has gone before the next appears, since scrolling can stop anywhere. */
.sub-0 { opacity: calc((max(0, 1 - 2 * var(--n)) + max(0, 2 * var(--n) - 5)) * (1 - 2 * var(--fold))); }
.sub-1 { opacity: calc(min(2 * var(--n) - 1, 3 - 2 * var(--n))); }
.sub-2 { opacity: calc(min(2 * var(--n) - 3, 5 - 2 * var(--n))); }
.sub-3 { opacity: calc(2 * var(--fold) - 1); }
.chevron { flex: none; margin-left: 12px; opacity: calc(var(--n) - 2); transform: rotate(calc(90deg * (1 - var(--fold)))); }
.done-mark {
  display: grid;
  justify-content: center;                      /* grows only as fast as its space, clear of the name */
  width: calc(38px * var(--fold));
  margin-right: calc(14px * var(--fold));
  opacity: var(--fold);
  transform: scale(min(1, 1.5 * var(--fold)));
}
.done-mark > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #34C759; color: #fff; }
.rows { height: calc(var(--rows) * (1 - var(--fold))); overflow: clip; }

/* Invisible controls over the card's name, there only when a tap does something. */
.head-tap { position: absolute; top: 0; left: 0; z-index: 1; display: none; width: 100%; height: 86px; margin: 0; opacity: 0; cursor: pointer; }
.demo:has(.s1:checked):has(.s2:checked):has(.s3:checked) .open { display: block; }
.card:has(.head-tap:focus-visible) { outline: 3px solid #007AFF; outline-offset: 3px; }
@container style(--folded: 1) {
  .rows { visibility: hidden; }                 /* out of reach of the keyboard too */
  .demo:not(:has(:checked)) .try { display: block; }
}

.set {
  display: grid;
  grid-template-columns: 44px 1.25fr 1fr 1fr 52px;
  gap: 10px;
  align-items: center;
  padding: 8px 24px;
  background: rgb(52 199 89 / calc(var(--on, 0) * .12));
}
.set-1 { --on: var(--s1); }
.set-2 { --on: var(--s2); }
.set-3 { --on: var(--s3); }
.cap { height: 32px; padding-top: 0; padding-bottom: 0; color: #6C6C72; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.val {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 16px;
  border-radius: 23px;
  background: rgba(120, 120, 128, .12);
  color: color-mix(in srgb, #000 calc(var(--on, 0) * 100%), #8E8E93);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.tick { position: relative; display: flex; align-items: center; justify-content: flex-end; width: 52px; height: 52px; cursor: pointer; }
.tick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tick span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid color-mix(in srgb, #34C759 calc(var(--on, 0) * 100%), #C7C7CC);
  border-radius: 10px;
  background: rgb(52 199 89 / var(--on, 0));
  color: rgb(255 255 255 / var(--on, 0));
  transform: scale(calc(1 + .48 * var(--on, 0) * (1 - var(--on, 0))));   /* a small pop halfway */
}
.tick::after {                                  /* where a finger would land, while scrolling drives the card */
  content: "";
  position: absolute;
  top: calc(50% - 22px);
  right: -3px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .2);
  opacity: calc(var(--auto) * 4 * var(--on, 0) * (1 - var(--on, 0)));
  pointer-events: none;
}
label.tick:active span { transform: scale(.94); }

.hint { display: grid; margin-bottom: 36px; color: #5B646C; text-align: center; }
.hint span { grid-area: 1 / 1; }
.hint-tick { opacity: calc(1 - 2 * var(--fold) * var(--auto)); }
.hint-open { opacity: calc((2 * var(--fold) - 1) * var(--auto)); }

.bar-ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#34C759 calc(var(--t) * 3deg), #E5E5EA 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--w, 3px)), #000 calc(100% - var(--w, 3px)));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--w, 3px)), #000 calc(100% - var(--w, 3px)));
}

/* ---------- Home: the rest of the page ---------- */

.sec-slate .lede { max-width: 420px; color: rgba(255, 255, 255, .74); }
/* The app icon, drawn like the header logo. Its stroke draws in as it scrolls into view. */
.icon-big { display: block; margin-top: 56px; border-radius: 22.5%; }
.types { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.type {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 24px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.type h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.type p { color: rgba(255, 255, 255, .7); }
.type .fifth { color: #F5A524; }

.sec-tiles .wrap { max-width: 1240px; padding: 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tile { padding: 56px 32px 0; border-radius: 36px; background: #F2F2F7; overflow: clip; text-align: center; }
.tile p { max-width: 380px; margin: 14px auto 40px; color: #5B646C; }

.sec-friends .h2 { max-width: 780px; }
.sec-friends .lede { max-width: 720px; margin-top: 24px; }
.sec-friends .more { margin-top: 24px; }
.sec-friends .tiles { margin-top: 64px; }

.sec-details .h3 { margin-bottom: 28px; }
.spec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 24px; padding: 22px 0; border-top: 1px solid #D9DCE0; }

dt { font-weight: 600; }

.pricing .h2 { max-width: 820px; }
.pricing .two { align-items: start; margin-top: 48px; }
.pricing table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pricing th, .pricing td { padding: 15px 0; border-top: 1px solid #D9DCE0; font-weight: 400; text-align: left; vertical-align: top; }
.pricing th + td, .pricing td + td, .pricing thead th + th { width: 27%; padding-left: 20px; }
.pricing thead th { border-top: 0; font-weight: 600; }
.price { margin-top: 40px; padding: 28px; border-radius: 28px; background: #fff; }
.price .amount { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.price .monthly { margin-top: 4px; color: #5B646C; }
.price .trial { margin-top: 16px; }
.pricing .small { margin-top: 20px; color: #5B646C; font-size: 14px; }
.pricing .caption { max-width: 340px; margin: 24px auto 0; color: #5B646C; text-align: center; }

.download { text-align: center; }
.download .h2, .download .launch-after { margin-top: 28px; }
.download .lede { margin-top: 16px; }
.download .needs { margin-top: 20px; color: #5B646C; }

/* ---------- Privacy Policy and Terms ---------- */

.legal main { padding: 96px 0 144px; }
.doc { max-width: 720px; }
.doc h1 { font-size: clamp(44px, 5.6cqi, 72px); font-weight: 700; line-height: 1.04; letter-spacing: -.034em; text-wrap: balance; }
.doc h2 { margin-top: 64px; font-size: clamp(28px, 2.5cqi, 34px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.doc h3 { margin-top: 28px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.doc p { margin-top: 14px; }
.doc ul { margin-top: 14px; padding-left: 22px; }
.doc li { margin-top: 8px; }
.doc .lede { margin-top: 20px; }
.doc .actions { margin-top: 28px; }
.doc .meta { color: #5B646C; font-size: 15px; }

.glance { margin-top: 56px; padding: 12px 32px; border-radius: 32px; background: #F2F2F7; }
.doc .glance { margin-top: 24px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 24px; padding: 20px 0; border-top: 1px solid #D9DCE0; }
.doc .row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); padding: 18px 0; }
.glance .row:first-child { border-top: 0; }

/* ---------- Support ---------- */

.support main { padding: 96px 0 72px; }
.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.topics a {
  display: flex;
  align-items: flex-end;
  min-height: 132px;
  padding: 22px;
  border-radius: 28px;
  background: #F2F2F7;
  color: #232A30;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
}
.topics a:hover { background: #E9E9EF; text-decoration: none; }
.topic-list { margin-top: 72px; border-bottom: 1px solid #D9DCE0; }
.topic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 56px; padding: 56px 0; border-top: 1px solid #D9DCE0; }
.topic h2 { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.topic h3 { margin-top: 28px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.topic p { margin-top: 12px; }
.topic ol { margin-top: 12px; padding-left: 24px; }
.topic li { margin-top: 6px; padding-left: 4px; }
.topic div > :first-child { margin-top: 0; }

/* ---------- Phones ---------- */

@container (max-width: 800px) {
  .two, .tiles, .duo, .spec, .row, .doc .row, .topic { grid-template-columns: minmax(0, 1fr); }
  .two { gap: 48px; }
  .sec-friends .tiles { margin-top: 40px; }
  .first { order: -1; }                         /* words before the phone */

  .hero, .sec, .sec-slate, .sec-grey, .sec-tiles, .sec-details, .sec-surfaces, .sec-island { padding-top: 88px; padding-bottom: 88px; }
  .sec.rise { padding-bottom: 0; }
  .rise .text { padding-bottom: 0; }

  .phone { max-width: 300px; border-radius: 51px; }
  .phone > img, .face { border-radius: 43px; }
  .crop { height: 456px; }
  .crop.tall { height: 544px; }
  .ck-crop { height: 480px; }

  .pair { margin-top: 48px; padding: 0 0 92px; }
  .pair .phone { width: 212px; padding: 5px; border-radius: 37px; }
  .pair .face { border-radius: 31px; }
  .pair .back { margin: 92px 0 -92px -52px; }

  .duo { gap: 56px; margin-top: 48px; }
  .island { margin-top: 40px; }

  .stage { padding: 28px 12px 28px; border-radius: 28px; }
  .demo { --rows: 196px; --gap: 18px; }
  .hint { margin-bottom: 28px; padding: 0 12px; }
  .card-head { padding: 0 16px; }
  .subs { font-size: 15px; }
  .set { grid-template-columns: 30px 1.15fr 1fr .8fr 44px; gap: 6px; padding: 6px 16px; }
  .cap { height: 28px; padding-top: 0; padding-bottom: 0; font-size: 11px; letter-spacing: .02em; }
  .val { height: 40px; padding: 0 10px; font-size: 17px; }
  .tick { width: 44px; height: 44px; }
  .tick span { width: 32px; height: 32px; border-radius: 9px; }

  .icon-big { width: 132px; height: auto; margin-top: 36px; }
  .spec { gap: 4px; }

  .legal main { padding: 56px 0 88px; }
  .glance { padding: 8px 22px; border-radius: 26px; }
  .row, .doc .row { gap: 2px; }

  .support main { padding: 56px 0 48px; }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
  .topics a { min-height: 112px; padding: 18px; border-radius: 24px; font-size: 18px; }
  .topic { gap: 16px; padding: 40px 0; }
}

/* Narrow phones: the header's three links need the room, so the logo shows only the icon. Its name stays for screen
   readers. */
@container (max-width: 480px) {
  .site-header .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .site-header nav { gap: 16px; font-size: 14px; }
}

/* ---------- Motion ---------- */

/* Never looping. Every element's normal style is how it looks without motion: the Lock Screen, set card and circuit
   before anything is tapped, and everything else finished. Browsers without these features, and people who use
   Reduce Motion, see that. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
  /* The hero's phones rise once, without fading, so they're never invisible. */
  @keyframes arrive { from { transform: translateY(40px); } }
  .pair .phone { animation: arrive .7s cubic-bezier(.2, .8, .2, 1) both; }
  .pair .front { animation-delay: .12s; }

  /* Then, once: Monday's bar and the month fill in on one phone. On the other, set 1 is ticked and its rest starts. */
  @keyframes cover { from { opacity: 1; } to { opacity: 1; } }
  @keyframes uncover { from { opacity: 1; } to { opacity: 0; } }
  @keyframes fill { from { opacity: 1; transform: none; } to { opacity: 1; transform: scaleY(0); } }
  @keyframes bar-in { from { opacity: 0; transform: translateY(40%); } to { opacity: 1; transform: none; } }
  @keyframes bar-out { to { opacity: 0; transform: translateY(40%); } }
  .today { opacity: 1; }
  .today rect { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
  .today .day { animation: fill .6s .9s cubic-bezier(.3, 0, .1, 1) both; visibility: visible; }
  .today .count { animation: uncover .3s 1.2s both; }
  .month rect { animation: uncover .25s calc(1.5s + var(--i) * 60ms) both; }
  .month rect:nth-child(1) { --i: 0; }
  .month rect:nth-child(2) { --i: 1; }
  .month rect:nth-child(3) { --i: 2; }
  .month rect:nth-child(4) { --i: 3; }
  .month rect:nth-child(5) { --i: 4; }
  .month rect:nth-child(6) { --i: 5; }
  .month rect:nth-child(7) { --i: 6; }
  .month rect:nth-child(8) { --i: 7; }
  .month rect:nth-child(9) { --i: 8; }
  .month rect:nth-child(10) { --i: 9; }
  .month rect:nth-child(11) { --i: 10; }
  .month rect:nth-child(12) { --i: 11; }

  @supports (width: round(down, 1px, 1px)) and (width: mod(1px, 1px)) {
    .before.under { opacity: 1; clip-path: inset(86% 0 0 0); }   /* hides the screenshot's own rest bar */
    .before:not(.under) { animation: uncover .25s 2.5s both; }
    .hero-touch { animation: touch .7s 2.1s ease-out both; }
    .bar { animation: bar-in .45s 2.55s cubic-bezier(.2, .8, .2, 1) both, bar-out .3s 122.55s forwards; }
    .bar-ring { animation: run-a 120s 2.55s steps(120) both; }
    .bar .clock { font-size: 0; }
    .bar .clock::before {
      counter-reset: m round(down, round(var(--t), 1) / 60, 1) s mod(round(var(--t), 1), 60);
      content: counter(m) ":" counter(s, decimal-leading-zero);
      font-size: calc(13 * var(--u));
    }
  }
  @keyframes touch { 0% { opacity: 0; transform: scale(1.5); } 35%, 60% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(1.25); } }

  @keyframes pop { 50% { transform: scale(1.12); } }

  /* A rest timer. Timers here change in whole seconds (steps) and are rounded before they're split into minutes and
     seconds. Safari can keep fractions, so without this 119.5 seconds shows as 1:60. */
  @keyframes run-a { from { --t: 120; } to { --t: 0; } }

  /* Tied to scrolling. Clipped boxes above use overflow: clip, not hidden, so these follow the page. */
  @supports (animation-timeline: view()) {
    @keyframes rise { from { transform: translateY(56px); } }
    .up { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 32%; }

    /* Four white strokes, then the amber one across them. */
    @keyframes draw {
      0% { stroke-dashoffset: 1; opacity: 0; }
      4% { opacity: 1; }
      100% { stroke-dashoffset: 0; opacity: 1; }
    }
    /* Done, then the rest. Scrolling the Live Activity into view sets --logged to 1. That starts the same 2-minute
       timer on the Lock Screen and in the island, so they always match. Scrolling back up resets both. */
    @keyframes arm { from { --logged: 0; } to { --logged: 1; } }
    @keyframes press { 50% { opacity: .35; } }
    @keyframes show { to { opacity: 1; } }
    @keyframes hide { to { opacity: 0; } }
    @keyframes grow { to { height: calc(89 * var(--u)); } }
    @keyframes shrink { from { height: calc(89 * var(--u)); } to { height: calc(74 * var(--u)); } }
    @keyframes elapsed { from { --e: 372; } to { --e: 3972; } }
    @keyframes drain { from { transform: none; } to { transform: translateX(-100%); } }
    @keyframes trim { to { clip-path: inset(0px 0px calc(24 * var(--u)) 0px round calc(47 * var(--u))); } }

    @supports (timeline-scope: --a) and (width: round(down, 1px, 1px)) and (width: mod(1px, 1px)) {
      .story { timeline-scope: --act; animation: arm linear both; animation-timeline: --act; animation-range: cover 20% cover 21%; }
      .act-box { view-timeline: --act block; }

      .act .clock, .isl .clock.clock { font-size: 0; }
      .story .clock::before {
        counter-reset: m round(down, round(var(--t), 1) / 60, 1) s mod(round(var(--t), 1), 60);
        content: counter(m) ":" counter(s, decimal-leading-zero);
      }
      .elapsed::before {
        counter-reset: m round(down, round(var(--e), 1) / 60, 1) s mod(round(var(--e), 1), 60);
        content: counter(m) ":" counter(s, decimal-leading-zero);
      }
      .act .clock::before { font-size: calc(17 * var(--u)); }
      .isl-small .clock::before { font-size: calc(12.6 * var(--u)); }
      .isl-time::before { font-size: calc(40 * var(--u)); }
      .isl-bar span { transform: none; }

      @container style(--logged: 1) {
        .touch { animation: touch .7s .4s ease-out; }
        .act-done i { animation: press .5s .55s ease-in-out; }
        .act {
          animation: grow .4s 1s cubic-bezier(.2, .8, .2, 1) forwards, run-a 120s 1s steps(120) both,
            shrink .4s 121s cubic-bezier(.2, .8, .2, 1) forwards;
        }
        .act-done { animation: hide .2s 1s forwards; }
        .act-rest { animation: show .25s 1.1s forwards, hide .2s 121s forwards; }
        .act-next { animation: show .25s 121.1s forwards; }

        .isl {
          animation: run-a 120s 1s steps(120) both, elapsed 3600s 121s steps(3600) both,
            trim .4s 121s cubic-bezier(.2, .8, .2, 1) forwards;
        }
        .isl-bar span { animation: drain 120s 1s linear both; }
        .isl-small .clock, .isl-rest { animation: hide .2s 121s forwards; }
        .elapsed, .isl-next { animation: show .25s 121.1s forwards; }
      }
    }

    /* The set card. It stays in place for 100vh of scrolling while its sets tick, then it folds. */
    @keyframes log-sets {
      0% { --auto: 1; --s1: 0; --s2: 0; --s3: 0; --fold: 0; }
      6% { --s1: 0; }
      15% { --s1: 1; }
      23% { --s2: 0; }
      32% { --s2: 1; }
      40% { --s3: 0; }
      49% { --s3: 1; }
      60% { --fold: 0; }
      92%, 100% { --auto: 1; --s1: 1; --s2: 1; --s3: 1; --fold: 1; }
    }
    @media (min-height: 600px) and (max-height: 1600px) {
      .run { --top: clamp(24px, calc(50vh - 230px), 340px); view-timeline: --run block; view-timeline-inset: var(--top) 0px; }
      .run::after { content: ""; display: block; height: 100vh; }
      .stick { position: sticky; top: var(--top); }
      .demo:not(:has(:checked)) { animation: log-sets linear both; animation-timeline: --run; animation-range: exit-crossing 0vh exit-crossing 100vh; }
    }

    /* The circuit: Next round, then Finish circuit. */
    @keyframes see-circuit { from { --seen-circuit: 0; } to { --seen-circuit: 1; } }
    @keyframes rounds { from { --round: 2; } 35% { --round: 3; } 80%, to { --round: 4; } }
    @keyframes refresh { 0% { opacity: 1; transform: none; } 45% { opacity: 0; transform: translateY(-40%); } 46% { opacity: 0; transform: translateY(40%); } }

    @supports (timeline-scope: --a) {
      /* No transitions until it's in view: while a page loads, Chromium can run them from its own unstyled
         defaults. */
      @container style(--seen-circuit: 0) { .ck, .ck * { transition: none !important; } }

      .sec-circuit { timeline-scope: --ck; animation: see-circuit linear both; animation-timeline: --ck; animation-range: cover 40% cover 41%; }
      .ck-crop { view-timeline: --ck block; }
      @container style(--seen-circuit: 1) {
        .ck { animation: rounds 5s .2s step-end both; }
        .ck-touch1 { animation: touch .7s 1.6s ease-out; }
        .ck-touch2 { animation: touch .7s 3.85s ease-out; }
      }
      @container style(--round: 3) {            /* values refresh from top to bottom, 40 ms apart */
        .ck-val span { animation: refresh .4s var(--d, 0s) ease-in-out; }
        .ck-2 { --d: 40ms; }
        .ck-3 { --d: 80ms; }
      }
      @container style(--round: 4) {
        .ck-tick { animation: pop .3s var(--d, .2s) ease-out; }
        .ck-done:nth-child(3) { --d: .28s; }
        .ck-done:nth-child(4) { --d: .36s; }
      }
    }

    /* The island stays in place for 75vh of scrolling while it opens. Very short or tall windows skip this and
       show it open. */
    @keyframes open { from { clip-path: inset(0px calc(95 * var(--u)) calc(109.3 * var(--u)) calc(95 * var(--u)) round calc(18.35 * var(--u))); } }
    @keyframes leave { from { opacity: 1; } to { opacity: 0; } }
    @keyframes appear { from { opacity: 0; } }
    @keyframes expand { from { opacity: 0; transform: scale(.72); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }

    @media (min-height: 600px) and (max-height: 1600px) {
      .pin { --top: clamp(40px, calc(50vh - 290px), 220px); view-timeline: --pin block; view-timeline-inset: var(--top) 0px; }
      .pin::after { content: ""; display: block; height: 75vh; }
      .hold { position: sticky; top: var(--top); }
      .island { animation: open ease-in-out both; animation-timeline: --pin; animation-range: exit-crossing 12vh exit-crossing 50vh; }
      .isl-small { animation: leave linear both; animation-timeline: --pin; animation-range: exit-crossing 12vh exit-crossing 24vh; }
      .isl-big { animation: expand ease-out both; animation-timeline: --pin; animation-range: exit-crossing 24vh exit-crossing 50vh; }
      .sec-island .note { animation: appear linear both; animation-timeline: --pin; animation-range: exit-crossing 36vh exit-crossing 52vh; }
    }

    .icon-big { view-timeline: --icon block; }
    .icon-big path { stroke-dasharray: 1; animation: draw linear both; animation-timeline: --icon; animation-range: cover 15% cover 35%; }
  }
}
