/* Onvoice — Studio Light.
   Tokens mirror the app (constants/colors.ts, DESIGN.md).
   Rules carried over from the app:
   - Teal is light, not paint: only on what is live, selected or in progress.
   - Headers are Instrument Serif, never bold; emphasis is one italic word.
   - Body and controls are Inter. Buttons and links are ink, never teal.
   - One cool grey family. One shadow (under the orb). */

:root {
  --bg: #ffffff;
  --wall: #edf1f1;
  --card: #ffffff;
  --hairline: rgba(15, 40, 44, 0.1);
  --divider: rgba(15, 40, 44, 0.11);
  --fill: #e3e9ea;
  --fill-strong: #d7dfe0;
  --ink: #0f1617;
  --ink-2: #52605f;
  --ink-3: #5f6c6d;
  --ink-dim: #9aa5a6;
  --btn: #141b1c;
  --on-btn: #ffffff;
  --teal: #00a7c1;
  --teal-ink: #00788a;
  --teal-bed: rgba(0, 167, 193, 0.14);
  --orb: #00788a;
  --orb-light: #22a9bb;
  --orb-deep: #005866;
  --on-orb: #ffffff;
  --lit: #00a7c1;
  --on-lit: #06262b;
  --orb-shadow: 0 10px 28px rgba(0, 120, 138, 0.28);

  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;

  --gutter: clamp(20px, 4vw, 40px);
  --measure: 1160px;
  --r-xs: 6px;
  --r-sm: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101415;
    --wall: #161b1c;
    --card: #191f20;
    --hairline: rgba(220, 240, 242, 0.09);
    --divider: rgba(220, 240, 242, 0.1);
    --fill: #20282a;
    --fill-strong: #263031;
    --ink: #eaf0f0;
    --ink-2: #9aa6a7;
    --ink-3: #7d898a;
    --ink-dim: #4f5a5b;
    --btn: #eaf0f0;
    --on-btn: #0f1617;
    --teal: #3ccfe4;
    --teal-ink: #3ccfe4;
    --teal-bed: rgba(60, 207, 228, 0.16);
    --orb: #3ccfe4;
    --orb-light: #86e8f4;
    --orb-deep: #1a9fb4;
    --on-orb: #032a31;
    --lit: #2fc3d9;
    --on-lit: #04252a;
    --orb-shadow: 0 10px 30px rgba(60, 207, 228, 0.22);
  }
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--measure));
  margin-inline: auto;
}

/* ---------- Type ---------- */

.serif,
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
}

.display {
  font-size: clamp(3.5rem, 8.6vw, 7.25rem);
  line-height: 0.94;
  letter-spacing: -0.022em;
}

.title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.018em;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.prose {
  color: var(--ink-2);
  text-wrap: pretty;
}

.fine {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.012em;
  transition: transform 0.18s var(--ease), opacity 0.18s;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.98);
}

.btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

/* The second call to action: a button too, but light, so the black one still leads. */
.btn--quiet {
  gap: 8px;
  background: var(--fill);
  color: var(--ink);
  transition: transform 0.18s var(--ease), background-color 0.18s;
}

.btn--quiet:hover {
  opacity: 1;
  background: var(--fill-strong);
}

.btn--quiet span {
  font-size: 0.9em;
  font-weight: 500;
  transition: transform 0.18s var(--ease);
}

.btn--quiet:hover span {
  transform: translate(1px, -1px);
}

.textlink {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 2px;
  transition: color 0.18s, border-color 0.18s;
}

.textlink:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- Logo and orb ---------- */

.orb {
  position: relative;
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 45%),
    linear-gradient(152deg, var(--orb-light) 0%, var(--orb) 55%, var(--orb-deep) 100%);
}

.orb svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--on-orb);
  stroke: var(--on-orb);
  display: none;
}

/* The mascot's face. It shows with data-brand="mascot" on <html>; "plain" gives the bare orb. */
html[data-brand="mascot"] .orb svg {
  display: block;
}

.logo {
  display: inline-flex;
  align-items: flex-end;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.logo .orb {
  font-size: 0.89em;
  margin: 0 0.05em 0.07em 0;
  transform: rotate(14deg);
}

.logo__word {
  /* Instrument Serif has one weight; a hair of stroke sets it a touch heavy, as in the app. */
  -webkit-text-stroke: 0.014em currentColor;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.nav.is-stuck {
  border-bottom-color: var(--hairline);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__links a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink-3);
  transition: color 0.18s;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--ink);
}

.nav__cta {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink) !important;
}

.nav__cta span {
  font-size: 12px;
  transition: transform 0.18s var(--ease);
}

.nav__cta:hover span {
  transform: translate(1px, -1px);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 9vw, 128px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.hero__copy .lede {
  max-width: 30em;
  margin-top: 28px;
}

.hero__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 26px;
  margin-top: 36px;
}

.hero__meta {
  margin-top: 30px;
}

/* The stage: a studio wall, with the phone standing on it. */

.stage {
  position: relative;
  background: var(--wall);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 36px) 0;
  overflow: hidden;
}

.phone {
  position: relative;
  width: min(100%, 360px);
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: 46px 46px 0 0;
  padding: 22px 22px 0;
  height: 560px;
  display: flex;
  flex-direction: column;
}

.phone__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 14px;
}

.lamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--lit);
  color: var(--on-lit);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lamp i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: breathe 2.4s ease-in-out infinite;
}

.phone__title {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink-3);
}

.transcript {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 4px 18px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22%);
}

.line {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  background: var(--fill);
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge--you {
  background: var(--btn);
  color: var(--on-btn);
}

.line p {
  font-family: var(--system);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.w {
  transition: color 0.3s;
}

.w.is-tail {
  color: var(--teal-ink);
}

.wake {
  background: var(--teal-bed);
  border-radius: 6px;
  padding: 1px 5px;
  margin: 0 -3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.result {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  background: var(--card);
  display: grid;
  gap: 4px;
}

.result__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.result__title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.15;
}

.result__body {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.tick {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--btn);
  display: inline-grid;
  place-items: center;
}

.tick::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 1.6px solid var(--on-btn);
  border-bottom: 1.6px solid var(--on-btn);
  transform: translateY(-1px) rotate(-45deg);
}

.enter {
  animation: enter 0.5s var(--ease) both;
}

.phone__dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 16px 0 26px;
  border-top: 1px solid var(--divider);
}

.stop {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--fill);
  display: grid;
  place-items: center;
}

.stop::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--ink);
}

.dock__orb {
  position: relative;
  font-size: 68px;
  line-height: 0;
}

.dock__orb .orb {
  box-shadow: var(--orb-shadow);
}

.dock__orb::before,
.dock__orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  opacity: 0;
  animation: ring 3.2s ease-out infinite;
}

.dock__orb::after {
  animation-delay: 1.6s;
}

.dock__orb.is-heard .orb {
  animation: heard 0.5s var(--ease);
}

.dock__spacer {
  width: 46px;
}

@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}

@keyframes heard {
  40% {
    transform: scale(1.1);
  }
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--divider);
  padding: 44px 0 56px;
}

.foot__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
}

.foot__brand {
  display: grid;
  gap: 12px;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 14px;
  color: var(--ink-2);
}

.foot__links a:hover {
  color: var(--ink);
}

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}


.js .reveal {
  transition-delay: calc(var(--d, 0) * 90ms);
}

/* ---------- Home: one screen, no scroll ---------- */

html.home,
html.home body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.home body {
  display: flex;
  flex-direction: column;
}

html.home .nav {
  position: relative;
  flex: none;
}

html.home main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
}

html.home .hero {
  width: 100%;
  padding: 0 0 clamp(16px, 4svh, 48px);
}

html.home .display {
  font-size: clamp(3.25rem, min(8.6vw, 12.5svh), 7.25rem);
}

/* The wake phrase in the headline, in the teal the app marks it with. */
.hero__wake {
  color: var(--teal-ink);
}

html.home .hero__copy .lede {
  margin-top: clamp(16px, 3svh, 28px);
}

html.home .hero__cta {
  margin-top: clamp(20px, 4svh, 36px);
  gap: 12px;
}

html.home .hero__meta {
  margin-top: clamp(16px, 3svh, 30px);
}

/* On the landing page the page links are the way in, so they read well up in size. */
html.home .nav__links {
  gap: 40px;
}

html.home .nav__links a {
  font-size: 18px;
}

html.home .nav__cta span {
  font-size: 15px;
}

/* The wall takes the height that's left, and the phone stands in it. */
html.home .stage {
  height: min(660px, calc(100svh - 72px - clamp(16px, 4svh, 48px) - 24px));
  display: flex;
  flex-direction: column;
}

html.home .phone {
  flex: 1;
  min-height: 0;
  height: auto;
}

/* ---------- Pages ---------- */

html:not(.home) body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}


/* Privacy */

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

/* ---------- Privacy: one request, down the stack ----------
   Resting state (no script, reduced motion, too short to pin): every layer finished, the
   diagram sticky beside the seven notes. With .stack--live the section pins and main.js marks
   each part .is-live or .is-done from the step the scroll is on (data-step 0 to 6). */

.stack {
  position: relative;
}

.stack__pin {
  padding: clamp(8px, 2svh, 24px) 0 clamp(64px, 12svh, 128px);
}

.stack__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(36px, 6vw, 104px);
  align-items: start;
}

.stack__fig {
  position: sticky;
  top: calc(var(--nav) + 24px);
  display: grid;
}

.stack__notes {
  display: grid;
  gap: clamp(48px, 9svh, 96px);
  padding-top: 8px;
}

.stack__note {
  display: grid;
  gap: 14px;
  max-width: 25rem;
}

.stack__note h3 {
  font-size: clamp(1.875rem, 3vw, 2.75rem);
  line-height: 1.02;
}

.stack__note p {
  color: var(--ink-2);
  text-wrap: pretty;
}

.stack__ticks {
  display: none;
}

/* The phone: a device outline holding the layers that know you. */
.device {
  position: relative;
  padding: 14px 14px 22px;
  border-radius: 36px;
  background: var(--wall);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.device__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 2px 10px 14px;
  font-size: 13px;
  color: var(--ink-2);
}

.device__island {
  width: 72px;
  height: 22px;
  border-radius: 999px;
  background: #050808;
}

.device__seal {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.device__edge {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--hairline);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  transform: translate(-50%, 50%);
}

.lock {
  flex: none;
  width: 14px;
  height: 14px;
  overflow: visible;
}

.lock__shackle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.lock__body {
  fill: currentColor;
}

.layers {
  display: grid;
  gap: 8px;
}

.layer {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  column-gap: 14px;
  min-height: 64px;
  padding: 10px 16px 10px 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--hairline);
  transition: box-shadow 0.4s var(--ease);
}

/* A rail from layer to layer that fills in as the request moves down. */
.layer:not(:last-child)::before,
.layer:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(50% + 9px);
  left: 24px;
  width: 2px;
  height: calc(100% - 10px);
  border-radius: 1px;
  background: var(--divider);
}

.layer:not(:last-child)::after {
  background: var(--ink-3);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.6s var(--ease);
}

.layer.is-done:not(:last-child)::after {
  transform: none;
}

.layer__node {
  position: relative;
  z-index: 3;
  justify-self: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fill-strong);
  transition: background 0.4s;
}

.layer.is-done .layer__node {
  background: var(--ink);
}

.layer.is-live {
  box-shadow: 0 0 0 1.5px var(--teal);
}

.layer.is-live .layer__node {
  background: var(--teal);
  animation: breathe 2.4s ease-in-out infinite;
}

.layer__id,
.far__id {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.layer__id b,
.far__id b {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  transition: color 0.4s;
}

.layer__id > span,
.far__id > span {
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-3);
}

.layer__slot,
.far__slot {
  display: grid;
  align-items: center;
  justify-items: start;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
}

.layer__slot > *,
.far__slot > * {
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}

/* Not reached yet: named, but empty. */
.stack--live .layer:not(.is-done):not(.is-live) .layer__id b,
.stack--live .far:not(.is-done):not(.is-live) .far__id b {
  color: var(--ink-3);
}

.stack--live .layer:not(.is-done):not(.is-live) .layer__slot > *,
.stack--live .far:not(.is-done):not(.is-live) .far__slot > * {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes slot-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes lock-shut {
  from {
    transform: translateY(-3px);
  }
}

/* Hear: a waveform that turns into words, then goes. */
.slot-hear > * {
  grid-area: 1 / 1;
}

.slot-hear__wave,
.far__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.slot-hear__wave {
  opacity: 0;
}

.slot-hear__wave i,
.far__wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleY(0.3);
}

.slot-hear__wave i:nth-child(3n),
.far__wave i:nth-child(3n) { height: 60%; }
.slot-hear__wave i:nth-child(4n + 1),
.far__wave i:nth-child(4n + 1) { height: 82%; }
.slot-hear__wave i:nth-child(5n + 2),
.far__wave i:nth-child(5n + 2) { height: 45%; }

.slot-hear__text,
.far__line {
  color: var(--ink);
  text-wrap: pretty;
}

.layer.is-live .slot-hear__wave {
  animation: hear-wave 1.8s linear both;
}

.layer.is-live .slot-hear__wave i,
.far.is-live .far__wave i {
  animation: la-bar 0.9s ease-in-out infinite;
}

.layer.is-live .slot-hear__wave i:nth-child(2n),
.far.is-live .far__wave i:nth-child(2n) { animation-delay: -0.3s; }
.layer.is-live .slot-hear__wave i:nth-child(3n),
.far.is-live .far__wave i:nth-child(3n) { animation-delay: -0.55s; }

.layer.is-live .slot-hear__text {
  animation: slot-in 0.6s var(--ease) 1.45s both;
}

@keyframes hear-wave {
  0% { opacity: 0; }
  10%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

/* Memory: one thing it knows, read here, locked here. */
.slot-mem__hit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--fill);
}

.slot-mem__hit b {
  font-weight: 500;
}

.slot-mem small,
.slot-anon__key {
  font-size: 12px;
  color: var(--ink-3);
}

.layer.is-live .slot-mem__hit { animation: slot-in 0.5s var(--ease) 0.25s both; }
.layer.is-live .slot-mem small { animation: slot-in 0.5s var(--ease) 0.55s both; }
.layer.is-live .slot-mem .lock__shackle { animation: lock-shut 0.45s var(--ease) 0.9s both; }

/* Route: two ways out of the layer, and the one it picks. */
.slot-route {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.slot-route__opt {
  position: relative;
  isolation: isolate;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-2);
  white-space: nowrap;
}

.slot-route__opt--go::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--teal-bed);
  box-shadow: inset 0 0 0 1px var(--teal);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.layer.is-done .slot-route__opt--go::before {
  opacity: 1;
  transform: none;
}

.layer.is-done .slot-route__opt--go,
.layer.is-live .slot-route__opt--go {
  color: var(--teal-ink);
}

.layer.is-done .slot-route__opt:not(.slot-route__opt--go) {
  opacity: 0.45;
}

.layer.is-live .slot-route__opt { animation: slot-in 0.5s var(--ease) 0.2s both, route-dim 0.4s var(--ease) 1s forwards; }
.layer.is-live .slot-route__opt--go { animation: slot-in 0.5s var(--ease) 0.3s both; }
.layer.is-live .slot-route__opt--go::before { animation: route-pick 0.5s var(--ease) 1s both; }

@keyframes route-dim {
  to {
    opacity: 0.45;
  }
}

@keyframes route-pick {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Anonymize: each name turns into a placeholder; at the very end they turn back. */
.slot-anon__job {
  color: var(--ink);
}

.swap {
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--fill-strong);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  vertical-align: 1px;
  overflow: hidden;
}

.swap > span {
  grid-area: 1 / 1;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}

.swap > span:last-child {
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(70%);
}

.layer.is-done .swap > span:first-child,
.layer.is-live .swap > span:first-child {
  opacity: 0;
  transform: translateY(-70%);
}

.layer.is-done .swap > span:last-child,
.layer.is-live .swap > span:last-child {
  opacity: 1;
  transform: none;
}

.layer.is-live .swap > span { transition-delay: 0.75s; }
.layer.is-live .swap:nth-of-type(2) > span { transition-delay: 0.95s; }

.stack[data-step="6"] .swap > span:first-child {
  opacity: 1;
  transform: none;
  transition-delay: 0.2s;
}

.stack[data-step="6"] .swap > span:last-child {
  opacity: 0;
  transform: translateY(70%);
  transition-delay: 0.2s;
}

.slot-anon__key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.layer.is-live .slot-anon__job { animation: slot-in 0.5s var(--ease) 0.2s both; }
.layer.is-live .slot-anon__key { animation: slot-in 0.5s var(--ease) 1.25s both; }
.layer.is-live .slot-anon__key .lock__shackle { animation: lock-shut 0.45s var(--ease) 1.6s both; }

/* Across the edge: two wires, each carrying one thing. */
.cross {
  --wire: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: var(--wire);
}

.wire {
  position: relative;
  justify-self: center;
  width: 2px;
  height: 100%;
}

.wire::before,
.wire::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1px;
  background: var(--divider);
}

.wire::after {
  background: var(--ink-3);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.7s var(--ease);
}

.wire.is-done::after,
.wire.is-live::after {
  transform: none;
}

.wire__tag {
  position: absolute;
  top: 50%;
  left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  transform: translateY(-50%);
  transition: opacity 0.4s var(--ease);
}

.stack--live .wire:not(.is-done):not(.is-live) .wire__tag {
  opacity: 0;
}

.wire__dot {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0;
}

.wire.is-live .wire__dot--down { animation: wire-down 1.1s var(--ease) 0.45s both; }
.wire.is-live .wire__dot--up { animation: wire-up 1.1s var(--ease) 2.3s both; }

@keyframes wire-down {
  0% { opacity: 0; transform: translateY(0); }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(var(--wire)); }
}

@keyframes wire-up {
  0% { opacity: 0; transform: translateY(var(--wire)); }
  15%, 85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(0); }
}

/* Off the phone: what each one is given. */
.cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.far {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 132px;
  padding: 14px 16px 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--hairline);
  transition: box-shadow 0.4s var(--ease);
}

.far.is-live {
  box-shadow: 0 0 0 1.5px var(--teal);
}

.far__in {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--fill);
  color: var(--ink-2);
}

.far__out::before {
  content: "↳ ";
  color: var(--ink-3);
}

.far.is-live .far__in { animation: slot-in 0.5s var(--ease) 1.45s both; }
.far.is-live .far__out { animation: slot-in 0.5s var(--ease) 2s both; }
.far.is-live .far__wave { animation: slot-in 0.4s var(--ease) 1.45s both; }
.far.is-live .far__line { animation: slot-in 0.6s var(--ease) 1.8s both; }

/* Pinned */

.stack--live {
  height: 560svh;
}

.stack--live .stack__pin {
  position: sticky;
  top: var(--nav);
  height: calc(100svh - var(--nav));
  display: flex;
  align-items: center;
  padding: 0;
}

.stack--live .stack__grid {
  align-items: center;
}

.stack--live .stack__fig {
  position: relative;
  top: auto;
}

.stack--live .stack__notes {
  gap: 0;
  padding: 0;
}

.stack--live .stack__note {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}

.stack--live .stack__note.is-done {
  transform: translateY(-18px);
}

.stack--live .stack__note.is-live {
  opacity: 1;
  transform: none;
  transition-delay: 0.14s;
}

.stack--live .stack__ticks {
  display: flex;
  gap: 8px;
  margin-top: clamp(28px, 5svh, 48px);
}

.stack__ticks i {
  position: relative;
  width: 24px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--fill-strong);
}

.stack__ticks i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}

.stack__ticks i.is-live::after,
.stack__ticks i.is-done::after {
  transform: scaleX(1);
}

/* ---------- Privacy: the whole map ---------- */

.where {
  padding-top: clamp(96px, 16svh, 184px);
}

.where__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: end;
  margin-bottom: clamp(40px, 7svh, 72px);
}

.where__title {
  grid-column: 1 / span 7;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  line-height: 1;
}

.where__head .prose {
  grid-column: 9 / -1;
  max-width: 22em;
}

.where__map {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  row-gap: 24px;
  align-items: stretch;
}

.keep {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--r-xl);
  background: var(--wall);
}

.keep__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  line-height: 1.1;
}

.keep__head .lock {
  width: 20px;
  height: 20px;
}

.keep__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keep__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 11px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--hairline);
  font-size: 14px;
  line-height: 1.3;
}

.keep__lock {
  flex: none;
  width: 13px;
  height: 13px;
  color: var(--ink-2);
}

.keep__foot {
  margin-top: auto;
  padding-top: 24px;
  font-size: 14px;
  color: var(--ink-2);
}

.js .keep__list li {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.js .keep.is-in .keep__list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i) * 70ms + 0.3s);
}

.dest {
  grid-column: 7 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dest li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 18px 20px 20px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 0 0 1px var(--hairline);
}

.dest b {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.dest p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.aside {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(48px, 9svh, 88px) 0 clamp(72px, 13svh, 136px);
  font-size: 15px;
  color: var(--ink-2);
}

.aside .orb {
  font-size: 30px;
}

/* Pilot */

.pilot {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(40px, 8svh, 96px) 0 clamp(56px, 10svh, 112px);
}

.pilot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.pilot__title {
  font-size: clamp(3.5rem, 8.6vw, 7.25rem);
}

.pilot__lede {
  max-width: 28em;
  margin-top: clamp(24px, 4svh, 36px);
}

.pilot__act {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: clamp(28px, 5svh, 44px);
}

.pilot__orb {
  position: relative;
  margin-right: clamp(0px, 5vw, 72px);
  font-size: clamp(120px, 15vw, 210px);
  line-height: 0;
}

.pilot__orb .orb {
  box-shadow: var(--orb-shadow);
  animation: bob 6s ease-in-out infinite;
}

.pilot__orb::before,
.pilot__orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  opacity: 0;
  animation: ring 3.6s ease-out infinite;
}

.pilot__orb::after {
  animation-delay: 1.8s;
}

@keyframes bob {
  0%,
  100% {
    transform: rotate(14deg) translateY(0);
  }
  50% {
    transform: rotate(10deg) translateY(-6px);
  }
}

.foot--min {
  padding: 28px 0 36px;
}

.foot--min .foot__row {
  align-items: center;
}

/* ---------- Page lead (Product, A day) ---------- */

.lead {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  padding: clamp(56px, 12svh, 136px) 0 clamp(48px, 9svh, 104px);
}

.lead__title {
  grid-column: 1 / span 10;
  font-size: clamp(3.25rem, 8vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.024em;
}

.lead__lede {
  grid-column: 7 / -1;
  max-width: 27em;
  margin-top: clamp(28px, 5svh, 48px);
}

.js .lead__title {
  animation: lift 1s var(--ease) both;
}

.js .lead__lede {
  animation: lift 1s var(--ease) 0.14s both;
}

@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ---------- Product: one sentence, taken apart ----------
   Resting state (no script, reduced motion, too short to pin): the finished
   conversation, sticky beside the four notes. With .seq--live the section is
   pinned and data-step (0 to 3) follows the scroll. */

.seq {
  position: relative;
}

.seq__pin {
  padding: clamp(8px, 2svh, 24px) 0 clamp(64px, 12svh, 128px);
}

.seq__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: clamp(36px, 6vw, 104px);
  align-items: start;
}

.seq__stage {
  position: sticky;
  top: calc(var(--nav) + 24px);
  background: var(--wall);
  border-radius: var(--r-xl);
  padding: clamp(22px, 3vw, 36px) clamp(22px, 3vw, 40px) clamp(100px, 11vw, 124px);
}

.seq__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(28px, 5svh, 52px);
}

.seq__room {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-3);
}

.seq__talk {
  position: relative;
  display: grid;
  gap: clamp(18px, 3svh, 28px);
}

.seq__line {
  display: grid;
  gap: 8px;
  justify-items: start;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}

.seq__line p {
  max-width: 21em;
  font-family: var(--system);
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.022em;
}

.seq .d {
  transition: opacity 0.5s var(--ease);
}

.seq__wake {
  background: var(--teal-bed);
  border-radius: 6px;
  padding: 1px 5px;
  margin: 0 -3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.ref {
  position: relative;
  white-space: nowrap;
}

.ref::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.1em;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s var(--ease), opacity 0.4s;
}

.ref--who::after {
  transition-delay: 0.3s;
}

.seq__link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}

.seq__link path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.seq__result {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  max-width: 26rem;
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease);
}

.seq__result .result__label,
.seq__result .result__title {
  grid-column: 1;
}

.seq__undo {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.seq__orb {
  position: absolute;
  right: clamp(22px, 3vw, 40px);
  bottom: clamp(22px, 3vw, 34px);
  font-size: 60px;
  line-height: 0;
}

.seq__orb .orb {
  box-shadow: var(--orb-shadow);
}

.seq__orb::before,
.seq__orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  opacity: 0;
  animation: ring 3.2s ease-out infinite;
}

.seq__orb::after {
  animation-delay: 1.6s;
}

.seq__orb.is-heard .orb {
  animation: heard 0.5s var(--ease);
}

.seq__notes {
  display: grid;
  gap: clamp(56px, 10svh, 112px);
  padding-top: 8px;
}

.seq__note {
  display: grid;
  gap: 16px;
  max-width: 25rem;
}

.seq__note h2 {
  font-size: clamp(2rem, 3.3vw, 3rem);
  line-height: 1.02;
}

.seq__note p {
  color: var(--ink-2);
  text-wrap: pretty;
}

.seq__ticks {
  display: none;
}

/* Pinned */

.seq--live {
  height: 380svh;
}

.seq--live .seq__pin {
  position: sticky;
  top: var(--nav);
  height: calc(100svh - var(--nav));
  display: flex;
  align-items: center;
  padding: 0;
}

.seq--live .seq__grid {
  align-items: center;
}

.seq--live .seq__stage {
  position: relative;
  top: auto;
}

.seq--live .seq__notes {
  gap: 0;
}

.seq--live .seq__note {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}

.seq--live[data-step="1"] .seq__note:nth-child(-n + 1),
.seq--live[data-step="2"] .seq__note:nth-child(-n + 2),
.seq--live[data-step="3"] .seq__note:nth-child(-n + 3) {
  transform: translateY(-18px);
}

.seq--live[data-step="0"] .seq__note:nth-child(1),
.seq--live[data-step="1"] .seq__note:nth-child(2),
.seq--live[data-step="2"] .seq__note:nth-child(3),
.seq--live[data-step="3"] .seq__note:nth-child(4) {
  opacity: 1;
  transform: none;
  transition-delay: 0.14s;
}

.seq--live .seq__ticks {
  display: flex;
  gap: 8px;
  margin-top: clamp(28px, 5svh, 48px);
}

.seq__ticks i {
  position: relative;
  width: 32px;
  height: 2px;
  border-radius: 2px;
  background: var(--fill-strong);
  overflow: hidden;
}

.seq__ticks i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease);
}

.seq--live[data-step="0"] .seq__ticks i:nth-child(-n + 1)::after,
.seq--live[data-step="1"] .seq__ticks i:nth-child(-n + 2)::after,
.seq--live[data-step="2"] .seq__ticks i:nth-child(-n + 3)::after,
.seq--live[data-step="3"] .seq__ticks i:nth-child(-n + 4)::after {
  transform: scaleX(1);
}

/* The four steps */

.seq--live[data-step="0"] .seq__line--b {
  opacity: 0;
  transform: translateY(12px);
}

.seq--live[data-step="1"] .seq__line--a {
  opacity: 0.4;
}

.seq--live[data-step="2"] .d {
  opacity: 0.24;
}

.seq--live[data-step="2"] .ref::after,
.seq--live[data-step="3"] .ref::after {
  transform: scaleX(1);
}

.seq--live[data-step="3"] .ref::after {
  opacity: 0.3;
}

.seq--live[data-step="2"] .seq__link {
  opacity: 1;
}

.seq--live:not([data-step="3"]) .seq__result {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}

.seq--live[data-step="3"] .seq__result .tick {
  animation: tick-pop 0.55s var(--ease) 0.2s both;
}

@keyframes tick-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 1;
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Product: asked, done ---------- */

.said {
  padding: clamp(96px, 16svh, 184px) 0 clamp(64px, 11svh, 128px);
}

.said__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: end;
  margin-bottom: clamp(40px, 7svh, 72px);
}

.said__title {
  grid-column: 1 / span 7;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  line-height: 1;
}

.said__head .prose {
  grid-column: 9 / -1;
  max-width: 22em;
}

/* Seven asks beside what each one leaves behind. One plays at a time; a tap picks one. */
.asks {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: center;
}

.asks__list {
  grid-column: 1 / span 6;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.asks__item {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 0 16px;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.asks__item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.asks__text {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.15vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.asks__wake {
  font-style: italic;
  color: var(--ink-3);
}

.asks__done {
  font-size: 14px;
  color: var(--ink-2);
}

.asks__bar {
  display: none;
}

.asks__stage {
  grid-column: 8 / -1;
  display: grid;
  align-items: center;
  min-height: clamp(400px, 36vw, 460px);
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-xl);
  background: var(--wall);
}

html:not(.js) .asks__stage {
  display: none;
}

html:not(.js) .asks__list {
  grid-column: 1 / -1;
  gap: 18px;
}

.js .asks__done {
  display: none;
}

.js .asks__text {
  color: var(--ink-dim);
  transition: color 0.45s var(--ease);
}

.js .asks__item:hover .asks__text {
  color: var(--ink-2);
}

.js .asks__item[aria-pressed="true"] .asks__text {
  color: var(--ink);
}

.js .asks__wake {
  color: inherit;
  transition: color 0.45s var(--ease);
}

.js .asks__item[aria-pressed="true"] .asks__wake {
  color: var(--teal-ink);
}

/* How long this ask has left on screen, in teal while it plays. */
.js .asks__bar {
  display: block;
  position: absolute;
  left: 0;
  bottom: 6px;
  width: min(100%, 22rem);
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--fill);
  opacity: 0;
  transition: opacity 0.3s;
}

.js .asks__item[aria-pressed="true"] .asks__bar {
  opacity: 1;
}

.js .asks__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
}

.js .asks.is-playing .asks__item[aria-pressed="true"] .asks__bar::after {
  animation: asks-fill 5s linear forwards;
}

.js .asks.is-paused .asks__item[aria-pressed="true"] .asks__bar::after {
  animation-play-state: paused;
}

.js .asks.is-static .asks__item[aria-pressed="true"] .asks__bar::after {
  transform: scaleX(1);
}

@keyframes asks-fill {
  to {
    transform: scaleX(1);
  }
}

/* One result at a time, all in the same place, so nothing on the page moves. */
.out {
  grid-area: 1 / 1;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
  min-width: 0;
}

.out__ask {
  display: none;
}

.js .out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}

.js .out.is-on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease) 0.08s, visibility 0s;
}

.js .out > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}

.js .out.is-on > * {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--k, 0) * 110ms + 0.1s);
}

.out__said {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

.out__orb {
  font-size: 26px;
}

.cal,
.rem,
.list,
.sheet,
.hand {
  width: 100%;
  max-width: 25rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--card);
}

/* On a narrow screen the list folds into seven segments above the stage, story style,
   and each panel shows its own ask. */
@media (max-width: 980px) {
  .asks {
    display: block;
  }

  .js .asks__list {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
  }

  .js .asks__item {
    padding: 20px 0;
  }

  .js .asks__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .js .asks__bar {
    position: relative;
    bottom: auto;
    width: 100%;
    height: 3px;
    opacity: 1;
  }

  .js .asks__item.is-past .asks__bar::after {
    transform: scaleX(1);
  }

  .asks__stage {
    min-height: 0;
  }

  .js .out__ask {
    display: block;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.5rem, 6.4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.012em;
    text-wrap: balance;
  }

  .js .out__ask .asks__wake {
    font-style: italic;
    color: var(--teal-ink);
  }
}

/* A day view with the new lunch dropped in at noon. */
.cal {
  padding: 16px 18px 18px;
}

.cal__day {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-3);
}

.cal__day b {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
}

.cal__hours {
  --row: 46px;
  position: relative;
  display: grid;
  grid-template-rows: repeat(4, var(--row));
}

.cal__h {
  padding-top: 3px;
  border-top: 1px solid var(--hairline);
  font-size: 11px;
  line-height: 1;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.cal__ev,
.cal__busy {
  position: absolute;
  left: 30px;
  right: 0;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.cal__busy {
  top: calc(var(--row) * var(--from) + 3px);
  height: calc(var(--row) * var(--len) - 6px);
  background: var(--fill);
  color: var(--ink-3);
}

.cal__ev {
  top: calc(var(--row) + 3px);
  height: calc(var(--row) - 6px);
  background: var(--teal-bed);
  box-shadow: inset 3px 0 0 var(--teal);
}

.cal__ev b {
  font-weight: 500;
}

.cal__ev span {
  font-size: 12px;
  color: var(--ink-2);
}

.js .cal__ev {
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}

.js .out.is-on .cal__ev {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}

/* A reminder whose clock winds round to three. */
.rem {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px 14px 14px;
}

.rem__dial {
  position: relative;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wall);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.rem__dial::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--ink);
}

.rem__hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--ink);
  transform-origin: 50% 100%;
}

.rem__hand--h {
  height: 15px;
  transform: rotate(90deg);
}

.rem__hand--m {
  height: 22px;
  background: var(--teal);
}

.js .rem__hand {
  transition: transform 1.6s var(--ease);
}

.js .rem__hand--h {
  transform: rotate(-30deg);
}

.js .rem__hand--m {
  transform: rotate(-1440deg);
}

.js .out.is-on .rem__hand--h {
  transform: rotate(90deg);
  transition-delay: 0.35s;
}

.js .out.is-on .rem__hand--m {
  transform: rotate(0deg);
  transition-delay: 0.35s;
}

.rem__text {
  display: grid;
  gap: 2px;
}

.rem__text b {
  font-size: 17px;
  font-weight: 500;
}

.rem__text span {
  font-size: 14px;
  color: var(--ink-2);
}

/* The to-do ticks itself and is struck through. */
.list {
  margin: 0;
  padding: 6px 18px;
  list-style: none;
}

.list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 16px;
}

.list__box {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ink-dim);
}

.list__item--done .list__box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--btn);
}

.list__item--done .list__box::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  width: 8px;
  height: 4px;
  border-left: 1.6px solid var(--on-btn);
  border-bottom: 1.6px solid var(--on-btn);
  transform: rotate(-45deg);
}

.list__text {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.list__item--done .list__text {
  color: var(--ink-3);
}

.list__item--done .list__text::after {
  content: "";
  position: absolute;
  top: 52%;
  left: -2px;
  right: -2px;
  height: 1.5px;
  background: currentColor;
  transform-origin: left center;
}

.js .list__item--done .list__box::before,
.js .list__item--done .list__box::after {
  transform: scale(0);
  transition: transform 0.45s var(--ease);
}

.js .list__item--done .list__box::after {
  transform: rotate(-45deg) scale(0);
}

.js .list__item--done .list__text {
  color: var(--ink);
  transition: color 0.5s var(--ease);
}

.js .list__item--done .list__text::after {
  transform: scaleX(0);
  transition: transform 0.6s var(--ease);
}

.js .out.is-on .list__item--done .list__box::before {
  transform: none;
  transition-delay: 0.6s;
}

.js .out.is-on .list__item--done .list__box::after {
  transform: rotate(-45deg);
  transition-delay: 0.72s;
}

.js .out.is-on .list__item--done .list__text {
  color: var(--ink-3);
  transition-delay: 0.9s;
}

.js .out.is-on .list__item--done .list__text::after {
  transform: none;
  transition-delay: 0.85s;
}

/* A doc, written line by line. */
.sheet {
  padding: 22px 24px 20px;
  box-shadow: 0 22px 44px -30px rgba(6, 30, 34, 0.35);
}

.sheet h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.05;
}

.sheet__meta {
  margin: 6px 0 12px;
  font-size: 12px;
  color: var(--ink-3);
}

.sheet p:not(.sheet__meta) {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}

.sheet b {
  font-weight: 500;
  color: var(--ink);
}

.js .sheet > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}

.js .out.is-on .sheet > * {
  opacity: 1;
  transform: none;
}

.js .out.is-on .sheet > :nth-child(1) { transition-delay: 0.25s; }
.js .out.is-on .sheet > :nth-child(2) { transition-delay: 0.35s; }
.js .out.is-on .sheet > :nth-child(3) { transition-delay: 0.6s; }
.js .out.is-on .sheet > :nth-child(4) { transition-delay: 0.85s; }
.js .out.is-on .sheet > :nth-child(5) { transition-delay: 1.1s; }

/* A week of recording, the bars growing in. */
.bars {
  width: 100%;
  max-width: 25rem;
  margin: 0;
}

.bars figcaption {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 20px;
}

.bars figcaption b {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.bars figcaption span {
  font-size: 14px;
  color: var(--ink-2);
}

.bars__plot {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 1.2vw, 12px);
  align-items: end;
  height: 180px;
}

.bars__plot span {
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.bars__plot i {
  display: block;
  width: 100%;
  height: max(4px, calc(var(--v) * 150px));
  border-radius: 7px 7px 3px 3px;
  background: var(--fill-strong);
  transform-origin: 50% 100%;
}

.bars__plot .is-top i {
  background: var(--btn);
}

.bars__plot .is-top {
  color: var(--ink);
  font-weight: 500;
}

.js .bars__plot i {
  transform: scaleY(0);
  transition: transform 0.9s var(--ease);
}

.js .out.is-on .bars__plot i {
  transform: none;
  transition-delay: calc(var(--i) * 70ms + 0.3s);
}

/* An answer, read aloud. */
.spoken {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 12px;
  align-items: center;
  width: 100%;
  max-width: 26rem;
}

.spoken__orb {
  grid-row: 1 / span 2;
  align-self: start;
  font-size: 54px;
}

.spoken__line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.875rem, 2.8vw, 2.5rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.spoken__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.spoken__wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleY(0.25);
}

.spoken__wave i:nth-child(3n) { height: 60%; }
.spoken__wave i:nth-child(4n + 1) { height: 80%; }
.spoken__wave i:nth-child(5n + 2) { height: 45%; }

.js .out.is-on .spoken__wave i {
  animation: la-bar 1.1s ease-in-out infinite;
}

.js .out.is-on .spoken__wave i:nth-child(2n) { animation-delay: -0.3s; }
.js .out.is-on .spoken__wave i:nth-child(3n) { animation-delay: -0.6s; }
.js .out.is-on .spoken__wave i:nth-child(5n) { animation-delay: -0.85s; }

.spoken__from {
  grid-column: 2;
  display: flex;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

.spoken__from span + span::before {
  content: "·";
  margin-right: 8px;
}

/* A hand-off, written as a brief and sent on. */
.hand {
  padding: 18px 20px 18px;
}

.hand__to {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
}

.hand__arrow {
  position: relative;
  width: 44px;
  height: 1.5px;
  background: var(--ink);
  transform-origin: left center;
}

.hand__arrow::after {
  content: "";
  position: absolute;
  top: -3.5px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid var(--ink);
  border-right: 1.5px solid var(--ink);
  transform: rotate(45deg);
}

.hand__body {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.hand__how {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.js .hand__arrow {
  transform: scaleX(0);
  transition: transform 0.7s var(--ease);
}

.js .out.is-on .hand__arrow {
  transform: none;
  transition-delay: 0.5s;
}

/* ---------- Product: follow-ups ---------- */

.more {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: start;
  padding: clamp(64px, 11svh, 128px) 0;
}

.more__copy {
  grid-column: 1 / span 4;
  position: sticky;
  top: calc(var(--nav) + 40px);
  display: grid;
  gap: 20px;
}

.more__title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.02;
}

.convo {
  grid-column: 6 / -1;
  display: grid;
  gap: 24px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-xl);
  background: var(--wall);
}

.convo__line {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.convo__line p {
  font-family: var(--system);
  font-size: clamp(1.125rem, 1.7vw, 1.375rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.convo__aside {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--ink-3);
  vertical-align: 2px;
}

.convo__reply {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.convo__orb {
  font-size: 34px;
  line-height: 0;
  margin-top: 2px;
}

.convo__reply p {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.12;
  text-wrap: balance;
}

.convo__reply small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-3);
}

.convo__wait {
  display: grid;
  gap: 10px;
  justify-items: start;
}

/* The window for a follow-up, closing. */
.convo__wait::after {
  content: "";
  width: 150px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
  transform-origin: left center;
}

.js .convo > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.7s var(--ease);
}

.js .convo > .is-on {
  opacity: 1;
  transform: none;
}

.js .convo > .convo__wait.is-done {
  opacity: 0.45;
}

.js .convo__wait.is-on::after {
  animation: window 1.4s linear both;
}

.js .convo__reply.is-on .orb {
  animation: heard 0.5s var(--ease) 0.1s;
}

@keyframes window {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0.36);
  }
}

/* ---------- Closing line (Product, A day) ---------- */

.close {
  display: grid;
  justify-items: start;
  gap: 32px;
  padding: clamp(96px, 16svh, 180px) 0 clamp(72px, 12svh, 128px);
}

.close__line {
  max-width: 13em;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5.4vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.close__line em {
  font-style: italic;
}

.close__act {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 26px;
}

.textlink--fine {
  margin-left: 6px;
  font-size: 13px;
}

/* ---------- A day ---------- */

.day {
  --spine: 28px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

/* The moments line up with the lede above; their timeline hangs in the gutter. */
.moments {
  grid-column: 7 / -1;
  margin-left: calc(var(--spine) * -1);
}

.day__aside {
  grid-column: 1 / span 4;
  position: sticky;
  top: calc(var(--nav) + clamp(24px, 6svh, 64px));
  display: grid;
  gap: clamp(28px, 5svh, 44px);
}

/* The clock: each digit is a strip of numerals that rolls to its place. */
.clock {
  --lh: 1.08em;
  --dw: 0.36em;
  display: flex;
  align-items: flex-start;
  font-family: var(--serif);
  font-size: clamp(4rem, 6.4vw, 6rem);
  line-height: var(--lh);
  letter-spacing: -0.02em;
  transition: transform 0.8s var(--ease);
}

.clock.is-short {
  transform: translateX(calc(var(--dw) * -1));
}

.clock__d {
  display: inline-block;
  height: var(--lh);
  overflow: hidden;
  text-align: center;
}

.clock__strip {
  display: block;
  transform: translateY(calc(var(--n, 0) * -1 * var(--lh)));
  transition: transform 0.9s var(--ease);
}

.clock__strip i {
  display: block;
  height: var(--lh);
  font-style: normal;
}

[data-slot="m1"] .clock__strip {
  transition-delay: 0.05s;
}

[data-slot="h2"] .clock__strip {
  transition-delay: 0.1s;
}

[data-slot="h1"] .clock__strip {
  transition-delay: 0.15s;
}

.clock__colon {
  margin: 0 0.03em;
  transform: translateY(-0.05em);
}

.clock__ampm {
  display: grid;
  margin: 0.34em 0 0 0.14em;
  font-size: 0.3em;
  font-style: italic;
  line-height: 1;
  color: var(--ink-3);
}

.clock__ampm span {
  grid-area: 1 / 1;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.clock[data-ampm="am"] [data-ampm="pm"],
.clock[data-ampm="pm"] [data-ampm="am"] {
  opacity: 0;
  transform: translateY(0.6em);
}

.ruler {
  position: relative;
  height: clamp(150px, 24svh, 230px);
  margin-left: 5px;
}

.ruler__track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--divider);
}

.ruler__track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleY(var(--f, 0));
  transform-origin: top center;
  transition: transform 0.8s var(--ease);
}

/* Full height, moved by its own height, so the dot travels the whole track on a transform. */
.ruler__dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  transform: translateY(calc(var(--f, 0) * 100%));
  transition: transform 0.8s var(--ease);
}

.ruler__dot::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-bed);
}

.ruler__mark {
  position: absolute;
  top: calc(var(--at) * 100%);
  left: 20px;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.tally {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.tally div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.tally dt {
  font-size: 13px;
  color: var(--ink-3);
}

.tally dd {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tally dd.is-bump {
  animation: bump 0.5s var(--ease);
}

@keyframes bump {
  from {
    opacity: 0;
    transform: translateY(0.45em);
  }
}

/* One moment: its time on the timeline, what happened, and one line about it, read as one piece. */
.moment {
  --mp: clamp(30px, 4.6vw, 52px);
  --pt: var(--mp);
  position: relative;
  padding: var(--pt) 0 var(--mp) var(--spine);
}

.moment:first-child {
  --pt: 0px;
}

/* The timeline: from this moment's dot down to the next one's, drawn as the moment arrives. */
.moment::before {
  content: "";
  position: absolute;
  top: calc(var(--pt) + 10px);
  bottom: calc((var(--mp) + 10px) * -1);
  left: 4px;
  width: 1px;
  background: var(--divider);
  transform-origin: top center;
}

.moment:last-child::before {
  display: none;
}

.js .day .moment::before {
  transform: scaleY(0);
  transition: transform 1.4s var(--ease) 0.35s;
}

.js .day .moment.is-seen::before {
  transform: none;
}

.moment__when {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-3);
}

.moment__when time {
  position: relative;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.moment__when time::before,
.moment__when time::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--spine) * -1);
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--fill-strong);
  box-shadow: 0 0 0 4px var(--bg);
}

.moment__when time::after {
  background: var(--teal);
  opacity: 0;
  transition: opacity 0.4s;
}

.moment.is-live .moment__when time::after {
  opacity: 1;
  animation: breathe 2.4s ease-in-out infinite;
}

.moment > * + * {
  margin-top: 12px;
}

.moment > .moment__when + * {
  margin-top: 0;
}

/* The line under the picture: a caption, close enough to belong to it. */
.moment > .moment__note {
  max-width: 32rem;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Things on screen, drawn the way the app draws them. */

.la {
  max-width: 400px;
  padding: 14px 18px 16px;
  border-radius: 26px;
  background: var(--btn);
  color: var(--on-btn);
}

.la__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.7;
}

.la__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.la__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: breathe 2.4s ease-in-out infinite;
}

.la__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.la__body p {
  font-family: var(--system);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.la__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.la__wave i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleY(0.4);
  animation: la-bar 1.1s ease-in-out infinite;
}

.la__wave i:nth-child(3n) { animation-delay: -0.3s; }
.la__wave i:nth-child(3n + 1) { animation-delay: -0.65s; }
.la__wave i:nth-child(4n) { animation-duration: 0.9s; }
.la__wave i:nth-child(5n) { animation-duration: 1.3s; }

@keyframes la-bar {
  0%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.35);
  }
}

.heard {
  display: grid;
  gap: 14px;
  max-width: 34rem;
}

.heard__line {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.heard__line p {
  font-family: var(--system);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.02em;
}

.todo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: 30rem;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--card);
}

.todo__box {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-dim);
  border-radius: 5px;
}

.todo__text {
  font-size: 16px;
  font-weight: 500;
}

.todo__meta {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
}

.note {
  display: grid;
  gap: 12px;
  max-width: 32rem;
  padding: 20px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--card);
}

.note header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.note h3 {
  font-size: 26px;
  line-height: 1.1;
}

.note header p {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}

.note__sum {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.note__label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.note ul {
  display: grid;
}

.note li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--divider);
  font-size: 15px;
}

.note li .chip {
  margin-left: auto;
}

.event {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 26rem;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--card);
}

.event__day {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  background: var(--wall);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.event__day small {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-3);
}

.event__text {
  display: grid;
  gap: 2px;
}

.event__text b {
  font-size: 16px;
  font-weight: 500;
}

.event__text small {
  font-size: 13px;
  color: var(--ink-3);
}

.notif {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 12px;
  max-width: 26rem;
  padding: 14px;
  border-radius: 22px;
  background: var(--wall);
}

.notif__icon {
  font-size: 38px;
}

.notif__text b {
  font-size: 14px;
  font-weight: 600;
}

.notif__text p {
  font-size: 15px;
  line-height: 1.35;
}

.notif__acts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notif__acts span {
  position: relative;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.notif__acts .is-picked {
  color: var(--ink);
}

/* The pick: a ring that settles round it. */
.notif__acts .is-picked::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1.5px solid var(--ink);
  border-radius: inherit;
}

.js .day .notif__acts .is-picked::after {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--k, 0) * 90ms + 500ms);
}

.js .day .is-seen .notif__acts .is-picked::after {
  opacity: 1;
  transform: none;
}

.draft {
  display: grid;
  gap: 10px;
  max-width: 30rem;
  padding: 18px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--card);
}

.draft__q {
  font-size: 13px;
  color: var(--ink-3);
}

.draft__body {
  font-size: 15.5px;
  line-height: 1.5;
}

.draft__act {
  justify-self: start;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--divider);
}

.doc {
  display: grid;
  gap: 12px;
  max-width: 32rem;
  padding: 28px 32px 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  background: var(--card);
  font-family: "Source Serif 4", var(--serif);
}

.doc h3 {
  margin-bottom: 4px;
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc p {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
}

.doc b {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.85;
  color: var(--ink-3);
}

.ask {
  display: grid;
  gap: 14px;
  max-width: 32rem;
}

.ask__q {
  justify-self: end;
  max-width: 80%;
  padding: 10px 16px;
  border-radius: 20px 20px 6px 20px;
  background: var(--fill);
  font-size: 16px;
}

.ask__a {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.15;
  text-wrap: pretty;
}

.ask__from {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}

.ask__from span + span::before {
  content: "·";
  margin-right: 8px;
}

/* Each moment assembles when it reaches you; main.js tags the pieces and their order. */
.js .day .pc {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--k, 0) * 90ms);
}

.js .day .todo.pc {
  transform: translateX(-16px);
}

.js .day .chip.pc {
  transform: scale(0.8);
}

.js .day .notif.pc {
  transform: translateY(-14px) scale(0.98);
}

.js .day .is-seen .pc {
  opacity: 1;
  transform: none;
}

/* ---------- Product and A day, smaller screens ---------- */

@media (max-width: 980px) {
  .lead__title {
    grid-column: 1 / -1;
  }

  .lead__lede {
    grid-column: 4 / -1;
  }

  .seq__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .seq__stage {
    position: relative;
    top: auto;
  }

  .seq__notes {
    gap: 44px;
  }

  .said__title,
  .said__head .prose,
  .more__copy,
  .convo {
    grid-column: 1 / -1;
  }

  .said__head .prose {
    margin-top: 18px;
  }

  .more__copy {
    position: static;
    margin-bottom: 36px;
  }

  /* A block, not a one-column grid: a grid item can only stick inside its own row. */
  .day {
    display: block;
  }

  /* The clock rides along in a slim bar under the nav. */
  .day__aside {
    top: var(--nav);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 22px;
    /* The ruler's dot travels by translating a full-width box; keep that box from widening the page. */
    overflow-x: clip;
    margin: 0 calc(var(--gutter) * -1) clamp(24px, 5svh, 40px);
    padding: 10px var(--gutter);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--hairline);
  }

  .clock {
    font-size: 30px;
  }

  .ruler {
    flex: 1;
    height: 1px;
    margin: 0 6px 0 0;
  }

  .ruler__track {
    right: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .ruler__track::after {
    transform: scaleX(var(--f, 0));
    transform-origin: left center;
  }

  .ruler__dot {
    width: 100%;
    height: 1px;
    transform: translateX(calc(var(--f, 0) * 100%));
  }

  .ruler__mark,
  .tally {
    display: none;
  }

  .moments {
    margin-left: 0;
  }

  .moment {
    --spine: 26px;
  }
}

@media (max-width: 720px) {
  :root {
    --nav: 64px;
  }

  .lead__lede {
    grid-column: 1 / -1;
  }

  .seq__stage {
    padding: 20px 20px 78px;
  }

  .seq__bar {
    margin-bottom: 22px;
  }

  .seq__line p {
    font-size: 1.1875rem;
  }

  .seq__orb {
    right: 20px;
    bottom: 18px;
    font-size: 44px;
  }

  .seq__grid {
    gap: 22px;
  }

  .seq__note {
    gap: 10px;
  }

  .seq__note h2 {
    font-size: 1.875rem;
  }

  .seq--live .seq__note p {
    font-size: 15px;
  }

  .seq--live .seq__ticks {
    margin-top: 18px;
  }

  .convo__aside {
    display: block;
    margin: 6px 0 0;
  }

  .doc {
    padding: 22px 22px 24px;
  }

  .doc p {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .todo__meta {
    margin-left: 30px;
  }

  .pilot__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pilot__orb {
    order: -1;
    justify-self: start;
    margin: 0 0 8px 6px;
    font-size: 84px;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 980px) {
  .hero__grid,
  .stack__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack__fig {
    position: relative;
    top: auto;
    max-width: 640px;
  }

  .stack__side {
    max-width: 34rem;
  }

  .where__title,
  .where__head .prose,
  .keep,
  .dest {
    grid-column: 1 / -1;
  }

  .where__head .prose {
    margin-top: 18px;
  }

  /* One screen on a phone: the words, without the phone picture. */
  html.home .stage {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav__row {
    height: 64px;
  }

  .nav__links {
    gap: 18px;
  }

  .logo {
    font-size: 26px;
  }

  html.home .nav__links a {
    font-size: 16px;
  }

  html.home .nav__links {
    gap: 16px;
  }

  .device {
    padding: 12px 10px 20px;
    border-radius: 30px;
  }

  .device__top {
    padding-inline: 8px;
  }

  .layer {
    grid-template-columns: 18px minmax(0, 1fr);
    row-gap: 8px;
    padding: 12px 14px 13px 10px;
  }

  .layer__node {
    align-self: start;
    margin-top: 7px;
  }

  .layer__slot {
    grid-column: 2;
  }

  /* Layers grow unevenly on a phone, so the rail would miss; the nodes carry it. */
  .layer:not(:last-child)::before,
  .layer:not(:last-child)::after {
    display: none;
  }

  .far {
    min-height: 0;
    padding: 12px 12px 14px;
  }

  .far__id b,
  .layer__id b {
    font-size: 20px;
  }

  /* Tags sit at different heights, clear of the edge label and of each other. */
  .cross {
    --wire: 88px;
  }

  .wire:first-child .wire__tag {
    top: 46%;
  }

  .wire:last-child .wire__tag {
    top: 76%;
    left: auto;
    right: 12px;
  }

  .dest {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 380px) {
  .nav__links {
    gap: 14px;
  }

  .nav__links a {
    font-size: 13px;
  }

  .logo {
    font-size: 23px;
  }

  html.home .nav__links {
    gap: 12px;
  }

  html.home .nav__links a {
    font-size: 15px;
  }

  html.home .hero__cta .btn {
    padding: 0 18px;
  }
}

@media (max-width: 360px) {
  html.home .nav__links a {
    font-size: 14px;
  }
}

/* The narrowest phones have no room to spare: smaller links, and the page may scroll
   if the two buttons wrap. */
@media (max-width: 340px) {
  html.home .nav__links a {
    font-size: 13px;
  }

  html.home,
  html.home body {
    height: auto;
    overflow: auto;
  }
}

/* Too short to hold it all (a phone on its side): let it scroll. */
@media (max-height: 520px) {
  html.home,
  html.home body {
    height: auto;
    overflow: auto;
  }

  html.home main {
    padding: 32px 0;
  }
}

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

  .js .reveal,
  .js .day .pc,
  .js .out > *,
  .js .cal__ev,
  .js .sheet > *,
  .js .convo > *,
  .js .day .notif__acts .is-picked::after {
    opacity: 1;
    transform: none;
  }

  .js .day .moment::before {
    transform: none;
  }

  .spoken__wave i,
  .far__wave i {
    transform: scaleY(0.6);
  }

  .js .keep__list li {
    opacity: 1;
    transform: none;
  }
}
