/* Lexspar marketing homepage. Rally identity: packages/brand/rally/identity.json.
   Brief, beat sheet and visual system: docs/design/website/README.md. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/InstrumentSans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  interpolate-size: allow-keywords;

  /* Rally tokens */
  --chalk: #f4f1e9;
  --surface: #fff;
  --surface-2: #eceef5;
  --surface-3: #e3e7f2;
  --hairline: #d4d9e5;
  --divider: #e0e3eb;
  --navy: #172342;
  --ink-2: #3e4c68;
  --muted: #53627d;
  --cobalt: #2855e8;
  --on-cobalt: #f4f1e9;
  --tint: #e7ecfc;
  --tint-strong: #dce4ff;
  --marigold: #ffc857;
  --teal: #146e61;
  --teal-tint: #e0f1eb;
  --rust: #b94432;
  --rust-tint: #fbe9e4;
  --rust-border: #dda99c;

  /* Derived for the website stages; each passes AA on its ground */
  --cobalt-hover: #1f48d6;
  --on-cobalt-2: #dce4ff;
  --navy-ink-2: #b9c3da;
  --navy-muted: #8e9ab8;
  --navy-rule: #2c3a5e;
  --navy-link: #9db4ff;

  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1320px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(96px, 12vw, 176px);
  --stage-inset: clamp(8px, 1.2vw, 20px);
  --stage-radius: clamp(28px, 3vw, 44px);
  --header-h: 72px;

  /* Rally motion motifs (RallyMotion in the apps), scaled for page distances */
  --ease-advance: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-move: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-land: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tap: 160ms;
  --settle: 280ms;
  --advance: 640ms;
}

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

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--chalk);
  color: var(--navy);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
p,
h1,
h2,
h3,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 4px;
  border-radius: 6px;
}
/* Sections and headings that receive focus after an in-page link. */
[tabindex="-1"]:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
::selection {
  background: var(--tint-strong);
  color: var(--navy);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* Entries wait off to the trailing edge; clip keeps that from adding a
   horizontal scroll without making main a scroll container (sticky still works). */
main {
  overflow-x: clip;
}
.wrap {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip-link {
  position: absolute;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--chalk);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  font-optical-sizing: auto;
  color: var(--navy);
  text-wrap: balance;
}
h2 {
  font-size: clamp(2.5rem, 4.6vw + 0.6rem, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
h3 {
  font-size: clamp(1.375rem, 1vw + 1rem, 1.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
p {
  color: var(--ink-2);
  text-wrap: pretty;
}
.lede {
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
}
.kicker {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.accent {
  color: var(--cobalt);
}
.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Controls ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
  font: 600 17px/1 var(--text);
  text-decoration: none;
  transition:
    background-color var(--tap) ease-out,
    color var(--tap) ease-out,
    box-shadow var(--tap) ease-out,
    transform var(--tap) ease-out;
}
.button .icon {
  transition: transform var(--settle) var(--ease-settle);
}
.button:active {
  transform: scale(0.98);
}
.button-primary {
  background: var(--cobalt);
  color: var(--on-cobalt);
}
.button-primary:hover {
  background: var(--cobalt-hover);
}
.button-primary:hover .icon {
  transform: translate(2px, -2px);
}
.button-quiet {
  color: var(--navy);
  padding-inline: 20px;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.button-quiet:hover {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--outline, #7b88a6);
}
.button-quiet:hover .icon-down {
  transform: translateY(2px);
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  transition: text-decoration-color var(--tap) ease-out;
}
.text-link:hover {
  text-decoration-color: currentColor;
}
.text-link .icon {
  transition: transform var(--settle) var(--ease-settle);
}
.text-link:hover .icon {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: var(--chalk);
  transition: box-shadow var(--settle) ease-out;
}
.header.is-scrolled {
  box-shadow: 0 1px 0 var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  flex: none;
  border-radius: 8px;
}
.lockup {
  width: 150px;
  height: auto;
  overflow: visible;
}
.lockup .arch,
.closing-mark .arch {
  fill: var(--cobalt);
}
.lockup .dot,
.closing-mark .dot {
  fill: var(--marigold);
  transform-box: fill-box;
  transform-origin: center;
}
.lockup .wordmark {
  fill: var(--navy);
}
.spine {
  fill: none;
  stroke: #fff;
  stroke-width: 30;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.navigation {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.navigation a {
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-2);
  transition:
    color var(--tap) ease-out,
    background-color var(--tap) ease-out;
}
.navigation a:hover {
  color: var(--navy);
  background: var(--surface-2);
}
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--chalk);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color var(--tap) ease-out;
}
.header-cta:hover {
  background: #22315a;
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-left: auto;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-2);
  font-weight: 600;
  font-size: 15px;
}
.menu-icon {
  position: relative;
  width: 14px;
  height: 10px;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--settle) var(--ease-settle);
}
.menu-icon::before {
  top: 1px;
}
.menu-icon::after {
  bottom: 1px;
}
.menu-toggle[aria-expanded="true"] .menu-icon::before {
  transform: translateY(3.1px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-icon::after {
  transform: translateY(-3.1px) rotate(-45deg);
}

@media (max-width: 899px) {
  .header-cta {
    display: none;
  }
  .navigation {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--chalk);
    box-shadow: 0 1px 0 var(--hairline);
  }
  .navigation a {
    padding: 16px 0;
    border-radius: 0;
    font: 700 28px/1.1 var(--display);
    letter-spacing: -0.03em;
    color: var(--navy);
    box-shadow: 0 1px 0 var(--divider);
  }
  .navigation a:hover {
    background: none;
    color: var(--cobalt);
  }
  .navigation.is-collapsed {
    display: none;
  }
}

/* Lockup: the arch draws along its spine, the dot lands, the wordmark follows */
@keyframes arch-draw {
  from {
    stroke-dashoffset: 1;
  }
}
@keyframes dot-land {
  from {
    transform: scale(0);
  }
}
@keyframes wordmark-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
}
.draws-on-load .spine {
  animation: arch-draw 700ms var(--ease-move) 100ms both;
}
.draws-on-load .dot {
  animation: dot-land 460ms var(--ease-land) 640ms both;
}
.draws-on-load .wordmark {
  animation: wordmark-in 560ms var(--ease-advance) 720ms both;
}

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

@keyframes advance-in {
  from {
    opacity: 0;
    transform: translate3d(32px, 0, 0);
  }
}
.hero {
  padding-block: clamp(32px, 6vw, 72px) clamp(72px, 9vw, 128px);
}
.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(20px, 2.4vw, 32px);
}
.beta-tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--cobalt);
}
.hero-title {
  font-size: clamp(2.4rem, 12.6vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  text-wrap: initial;
}
.hero-title .phrase {
  display: block;
}
.hero-lede {
  margin-top: clamp(24px, 2.6vw, 36px);
  max-width: 30em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3vw, 40px);
}
.hero-meta {
  margin-top: 20px;
  font-size: 15px;
  color: var(--muted);
}
.hero-copy > *,
.hero-title .phrase {
  animation: advance-in var(--advance) var(--ease-advance) both;
}
.hero-kicker {
  animation-delay: 80ms;
}
.hero-title .phrase:first-child {
  animation-delay: 160ms;
}
.hero-title .phrase:last-child {
  animation-delay: 240ms;
}
.hero-title {
  animation: none;
}
.hero-lede {
  animation-delay: 340ms;
}
.hero-actions {
  animation-delay: 420ms;
}
.hero-meta {
  animation-delay: 480ms;
}
.hero-product {
  --device-w: clamp(280px, 25vw, 360px);
  display: grid;
  justify-items: center;
  gap: 18px;
}
.phone-caption {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  animation: advance-in var(--advance) var(--ease-advance) 480ms both;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(40px, 5vw, 96px);
    min-height: min(calc(100svh - var(--header-h) - 120px), 760px);
  }
  .hero-title {
    font-size: clamp(4.25rem, 7.3vw, 7.5rem);
  }
  .hero-product {
    justify-items: end;
  }
  .phone-caption {
    width: var(--device-w);
  }
}
/* On a phone, a frame as wide as the column keeps the sample's targets near
   44 px. */
@media (max-width: 899px) {
  .hero-product,
  .stage-product,
  .chapter-product {
    --device-w: min(100%, 360px);
  }
}

/* ---------- iPhone 18 Pro Max (Apple's product bezel) ----------
   Apple's marketing guidelines: the bezel is shown as supplied, with no added
   shadow, crop, tilt or animation, and it only ever holds the iOS app. The
   opening in the 1470 x 3000 artwork is 1320 x 2868 at (75, 66), with corners
   of about 190 px; the screen sits under it and the bezel's own edge and
   Dynamic Island cover the screen's border. */

.device {
  position: relative;
  width: var(--device-w, clamp(260px, 24vw, 340px));
  max-width: 100%;
  aspect-ratio: 1470 / 3000;
}
.device-frame {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.device-screen {
  position: absolute;
  left: 5.102%;
  top: 2.2%;
  width: 89.796%;
  height: 95.6%;
  overflow: hidden;
  border-radius: 14.4% / 6.63%;
  background: var(--chalk);
  container-type: size;
}
.device-screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Sample duel: the iOS practice duel, point for point ----------
   Measured in iOS points (the 440 pt wide Pro Max screen) so the sample keeps
   the app's proportions at every frame size; values follow PracticeDuelView,
   DuelScoreboard, AnswerGrid and RevealBanner. */

.duel {
  --pt: calc(100cqw / 440);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 calc(20 * var(--pt)) calc(34 * var(--pt));
  color: var(--navy);
  font-size: calc(17 * var(--pt));
}
.duel-top {
  height: calc(116 * var(--pt));
  margin-inline: calc(-20 * var(--pt));
  padding-inline: calc(20 * var(--pt));
  background: #fcf9ee;
}
.ios-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(62 * var(--pt));
  padding: calc(6 * var(--pt)) calc(30 * var(--pt)) 0 calc(36 * var(--pt));
  color: #000;
}
.ios-time {
  font: 600 calc(17 * var(--pt)) / 1 -apple-system, BlinkMacSystemFont,
    "SF Pro Text", var(--text);
  letter-spacing: -0.01em;
}
.ios-icons {
  display: flex;
  align-items: center;
  gap: calc(6.5 * var(--pt));
}
.ios-icons svg {
  height: calc(13.5 * var(--pt));
  width: auto;
  fill: currentColor;
}
.ios-icons .ios-battery {
  height: calc(14.5 * var(--pt));
}
.ios-icons .ios-wifi {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.duel-toolbar {
  display: flex;
  height: calc(52 * var(--pt));
  align-items: center;
  margin-inline: calc(-4 * var(--pt));
}
.duel-close {
  display: grid;
  place-items: center;
  width: calc(44 * var(--pt));
  height: calc(44 * var(--pt));
  border-radius: 50%;
  background: rgb(255 255 255 / 0.72);
  box-shadow:
    0 0 0 calc(0.5 * var(--pt)) rgb(23 35 66 / 0.08),
    0 calc(2 * var(--pt)) calc(8 * var(--pt)) rgb(23 35 66 / 0.08);
}
.duel-close svg {
  width: calc(17 * var(--pt));
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.duel-scoreboard {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--pt));
  margin-top: calc(8 * var(--pt));
  padding-inline: calc(4 * var(--pt));
}
.duel-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(36 * var(--pt));
  height: calc(36 * var(--pt));
  border-radius: 50%;
  background: var(--tint);
  color: var(--cobalt);
  font: 600 calc(13 * var(--pt)) / 1 var(--mono);
}
.duel-count {
  font: 700 calc(30 * var(--pt)) / 1 var(--mono);
  font-variant-numeric: tabular-nums;
  transition: color var(--settle) ease-out;
}
.duel-count.is-scored {
  color: var(--cobalt);
}
.duel-round {
  display: grid;
  justify-items: center;
  gap: calc(7 * var(--pt));
  flex: 1;
}
.duel-round-label {
  font: 500 calc(12 * var(--pt)) / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.duel-segments {
  display: flex;
  gap: calc(3 * var(--pt));
}
.duel-segments span {
  width: calc(12 * var(--pt));
  height: calc(5 * var(--pt));
  border-radius: calc(3 * var(--pt));
  background: var(--track, #d7dce8);
  transition: background-color var(--settle) ease-out 240ms;
}
.duel-segments .is-current {
  background: var(--navy);
}
.duel-segments .is-right {
  background: var(--cobalt);
}
.duel-segments .is-wrong {
  background: var(--rust);
}
.duel-sample {
  padding: calc(6 * var(--pt)) calc(10 * var(--pt));
  border-radius: 999px;
  box-shadow: inset 0 0 0 calc(1 * var(--pt)) var(--hairline);
  font: 600 calc(11 * var(--pt)) / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.duel-stage {
  display: flex;
  flex-direction: column;
  padding-inline: calc(4 * var(--pt));
}
.duel-banner {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--pt));
  min-height: calc(40 * var(--pt));
  margin-top: calc(34 * var(--pt));
  font: 600 calc(18 * var(--pt)) / 1.2 var(--text);
}
.duel-no-timer {
  font: 500 calc(14 * var(--pt)) / 1 var(--mono);
  color: var(--muted);
}
.duel-banner .plus {
  padding: calc(6 * var(--pt)) calc(10 * var(--pt));
  border-radius: 999px;
  background: var(--cobalt);
  color: var(--on-cobalt);
  font: 600 calc(13 * var(--pt)) / 1 var(--mono);
}
.duel-banner.is-wrong .plus {
  background: var(--rust-tint);
  color: var(--rust);
}
.duel-kicker {
  margin-top: calc(36 * var(--pt));
  font: 600 calc(12 * var(--pt)) / 1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.duel-prompt {
  margin-top: calc(14 * var(--pt));
  font: 500 calc(28 * var(--pt)) / 1.3 var(--text);
  letter-spacing: -0.01em;
  color: var(--navy);
  text-wrap: pretty;
}
.duel-prompt em {
  font-style: normal;
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-thickness: calc(1.5 * var(--pt));
  text-underline-offset: 0.16em;
}
.duel-explanation {
  margin-top: calc(14 * var(--pt));
  font: 400 calc(15 * var(--pt)) / 1.4 var(--text);
  color: var(--ink-2);
}
.duel-bottom {
  display: grid;
  gap: calc(6 * var(--pt));
  margin-top: auto;
}
.duel-answers {
  display: grid;
  gap: calc(10 * var(--pt));
  margin-bottom: calc(6 * var(--pt));
}
.duel-answers button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: calc(2 * var(--pt));
  min-height: calc(58 * var(--pt));
  padding: calc(10 * var(--pt)) calc(12 * var(--pt));
  border: 0;
  border-radius: calc(20 * var(--pt));
  background: var(--surface-2);
  box-shadow: inset 0 0 0 calc(1.5 * var(--pt)) var(--hairline);
  font: 600 calc(17 * var(--pt)) / 1.2 var(--text);
  color: var(--navy);
  transition:
    background-color var(--settle) var(--ease-settle),
    color var(--settle) var(--ease-settle),
    box-shadow var(--settle) var(--ease-settle),
    transform var(--tap) ease-out;
}
.duel-answers button:not(:disabled):hover {
  background: var(--surface-3);
}
.duel-answers button:not(:disabled):active {
  transform: scale(0.97);
}
.answer-tag {
  font: 600 calc(11 * var(--pt)) / 1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.answer-tag:empty {
  display: none;
}
.duel-answers .is-correct {
  background: var(--cobalt);
  color: var(--on-cobalt);
  box-shadow: none;
}
.duel-answers .is-wrong {
  box-shadow: inset 0 0 0 calc(1.5 * var(--pt)) var(--rust);
}
.duel-answers .is-wrong .answer-tag {
  color: var(--rust);
}
.duel-answers .is-dim {
  background: #ecebe6;
  box-shadow: none;
  color: #8992a3;
}
.duel-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(4 * var(--pt));
  min-height: calc(44 * var(--pt));
  font: 400 calc(13 * var(--pt)) / 1.2 var(--text);
  color: var(--muted);
}
.duel-unknown {
  padding: calc(8 * var(--pt)) calc(4 * var(--pt));
  border: 0;
  background: none;
  font: inherit;
  color: var(--navy);
}
.duel-next {
  min-height: calc(58 * var(--pt));
  margin-top: calc(6 * var(--pt));
  border: 0;
  border-radius: calc(18 * var(--pt));
  background: var(--cobalt);
  color: var(--on-cobalt);
  font: 600 calc(17 * var(--pt)) / 1 var(--text);
  transition:
    background-color var(--tap) ease-out,
    transform var(--tap) ease-out;
}
.duel-next:hover {
  background: var(--cobalt-hover);
}
.duel-next:active {
  transform: scale(0.98);
}
.duel-noscript {
  font-size: calc(13 * var(--pt));
}
/* Reveal in three beats (RallyMotion.beat, 80 ms): the cells settle, then
   the banner, then the explanation; the score follows two beats later. */
@keyframes beat-in {
  from {
    opacity: 0;
  }
}
.duel.is-revealed .duel-banner > * {
  animation: beat-in var(--settle) var(--ease-settle) 80ms both;
}
.duel.is-revealed .duel-explanation {
  animation: beat-in var(--settle) var(--ease-settle) 160ms both;
}
.duel-count.is-scored {
  transition-delay: 160ms;
}

/* ---------- The loop index ---------- */

.loop {
  padding-block: 0 var(--section);
}
.loop-list {
  margin-top: 24px;
  border-top: 1px solid var(--hairline);
}
.loop-list a {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding-block: clamp(18px, 2.2vw, 30px);
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
}
.loop-number {
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}
.loop-line {
  font: 700 clamp(2rem, 5.4vw, 5rem) / 1 var(--display);
  letter-spacing: -0.045em;
  transition:
    color var(--settle) ease-out,
    transform var(--settle) var(--ease-settle);
}
.loop-list .icon {
  width: clamp(20px, 2.4vw, 32px);
  height: clamp(20px, 2.4vw, 32px);
  stroke-width: 1.5;
  align-self: center;
  color: var(--cobalt);
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity var(--settle) ease-out,
    transform var(--settle) var(--ease-settle);
}
.loop-list a:hover .loop-line,
.loop-list a:focus-visible .loop-line {
  color: var(--cobalt);
  transform: translateX(8px);
}
.loop-list a:hover .icon,
.loop-list a:focus-visible .icon {
  opacity: 1;
  transform: none;
}

/* ---------- Stages (cobalt Play, navy Speak) ---------- */

.stage {
  margin-inline: var(--stage-inset);
  padding-block: var(--section);
  border-radius: var(--stage-radius);
  scroll-margin-top: var(--header-h);
}
.stage-cobalt {
  background: var(--cobalt);
  --ink: var(--on-cobalt);
  --ink-soft: var(--on-cobalt-2);
  --rule: rgb(244 241 233 / 0.28);
}
.stage-navy {
  background: var(--navy);
  --ink: var(--chalk);
  --ink-soft: var(--navy-ink-2);
  --rule: var(--navy-rule);
}
.stage h2,
.stage h3,
.stage .kicker {
  color: var(--ink);
}
.stage p,
.stage .lede,
.stage li {
  color: var(--ink-soft);
}
.stage-navy .kicker {
  color: var(--navy-muted);
}
.stage-grid {
  display: grid;
  gap: 64px;
  align-items: center;
}
.stage-copy .lede {
  margin-top: 28px;
}
.stage-copy h2 {
  margin-top: 20px;
}
.stage-product {
  display: grid;
  justify-items: center;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.facts div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.facts dd {
  order: -1;
}
.facts dd {
  font: 500 clamp(2.5rem, 4vw, 4rem) / 0.9 var(--mono);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.facts dt {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-soft);
}
.checks {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}
.checks li {
  position: relative;
  padding-left: 30px;
  line-height: 1.5;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.42em;
  width: 13px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  color: var(--cobalt);
}
.stage .checks li::before {
  color: var(--ink);
}
.stage-note {
  margin-top: 28px;
  padding-left: 16px;
  border-left: 2px solid var(--rule);
  font-size: 15px;
  max-width: 34em;
}
.upcoming {
  margin-top: var(--section);
}
.upcoming-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--rule);
}
.upcoming-list li {
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
}
.upcoming-list h3 {
  font-size: 22px;
}
.upcoming-list p {
  margin-top: 8px;
  font-size: 15px;
  max-width: 30em;
}

@media (min-width: 900px) {
  .stage-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(48px, 6vw, 112px);
  }
  .stage-product {
    justify-items: end;
  }
  .upcoming-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 48px);
    border-top: 0;
  }
  .upcoming-list li {
    border-bottom: 0;
    border-top: 1px solid var(--rule);
  }
}

/* ---------- Chapters on chalk ---------- */

.chapter {
  padding-block: var(--section);
}
.chapter-grid {
  display: grid;
  gap: 64px;
  align-items: center;
}
.chapter-copy h2 {
  margin-top: 20px;
}
.chapter-copy .lede {
  margin-top: 28px;
}
.chapter-product {
  display: grid;
  justify-items: center;
  order: 2;
}
@media (min-width: 900px) {
  .chapter-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6vw, 112px);
  }
  .chapter-product {
    order: 0;
    justify-items: start;
  }
}

.ladder {
  margin-top: clamp(36px, 4vw, 56px);
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.ladder-title {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.ladder-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
}
.ladder-steps li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--muted);
}
.ladder-steps li::before {
  content: "";
  height: 6px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: var(--teal);
  transform-origin: left center;
  transition:
    transform var(--settle) var(--ease-settle),
    background-color var(--settle) ease-out;
}
.ladder-steps li:nth-child(2)::before {
  transition-delay: 90ms;
}
.ladder-steps li:nth-child(3)::before {
  transition-delay: 180ms;
}
.ladder-steps li:nth-child(4)::before {
  transition-delay: 270ms;
}
.ladder-steps li:nth-child(5)::before {
  transition-delay: 360ms;
}
.ladder.is-pending .ladder-steps li::before {
  transform: scaleX(0);
}
.ladder-day {
  font: 500 clamp(1.5rem, 2vw, 2rem) / 1 var(--mono);
  letter-spacing: -0.04em;
  color: var(--navy);
}
.ladder-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
  font-size: 14.5px;
}

.details {
  display: grid;
  gap: 0;
  margin-top: 36px;
  border-top: 1px solid var(--hairline);
}
.details div {
  display: grid;
  gap: 4px;
  padding-block: 18px;
  border-bottom: 1px solid var(--hairline);
}
.details dt {
  font-weight: 600;
}
.details dd {
  color: var(--ink-2);
  font-size: 15.5px;
}
@media (min-width: 640px) {
  .details div {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 24px;
  }
}

.section-head {
  display: grid;
  gap: 24px;
}
.section-head h2 {
  margin-top: -4px;
  font-size: clamp(2.5rem, 4.2vw + 0.6rem, 4.75rem);
}
@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    column-gap: clamp(48px, 6vw, 112px);
    align-items: end;
  }
  .section-head .kicker {
    grid-column: 1 / -1;
  }
  .section-head h2 {
    margin-top: 0;
  }
}

.feature-grid {
  display: grid;
  gap: 0;
  margin-top: clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--hairline);
}
.feature-grid article {
  padding-block: 28px;
  border-bottom: 1px solid var(--hairline);
}
.feature-grid p {
  margin-top: 10px;
  font-size: 15.5px;
}
@media (min-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(32px, 4vw, 64px);
    border-top: 0;
  }
  .feature-grid article {
    border-top: 1px solid var(--hairline);
    border-bottom: 0;
    padding-block: 28px 36px;
  }
}
@media (min-width: 1100px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.companions {
  display: grid;
  gap: 32px;
  margin-top: clamp(48px, 6vw, 88px);
  padding: clamp(28px, 4vw, 56px);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.companion-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 1.6vw, 20px);
}
.companion-row li {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--chalk);
}
.companion-row img {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  transition:
    opacity var(--tap) ease-out,
    transform var(--settle) var(--ease-land);
}
.companion-row img + img {
  opacity: 0;
}
.companion-row li:hover img:first-child {
  opacity: 0;
}
.companion-row li:hover img + img {
  opacity: 1;
  transform: translateY(-4%);
}
.companions-copy p {
  margin-top: 10px;
  max-width: 36em;
}
@media (min-width: 720px) {
  .companion-row {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .companions {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    align-items: center;
    gap: 56px;
  }
}

/* ---------- Plans ---------- */

.plans {
  padding-top: 0;
}
.plan-table {
  display: grid;
  margin-top: clamp(48px, 6vw, 88px);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.plan {
  padding: clamp(28px, 3vw, 44px);
}
.plan + .plan {
  border-top: 1px solid var(--divider);
}
.plan h3 {
  margin-top: 14px;
  font-size: clamp(2.25rem, 3vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1;
}
.plan-line {
  margin-top: 12px;
}
.plan .checks {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-size: 15.5px;
}
.fineprint {
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
  max-width: 48em;
}
@media (min-width: 900px) {
  .plan-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .plan + .plan {
    border-top: 0;
    border-left: 1px solid var(--divider);
  }
  .plan-line {
    min-height: 3em;
  }
}

/* ---------- Questions ---------- */

.questions {
  padding-top: 0;
}
.questions-grid {
  display: grid;
  gap: 56px;
}
.questions-aside h2 {
  margin-top: 20px;
}
.promises {
  display: grid;
  gap: 28px;
  margin-top: 40px;
}
.promises h3 {
  font-size: 20px;
}
.promises p {
  margin-top: 8px;
  font-size: 15.5px;
}
.promises .text-link {
  margin-top: 12px;
}
.faq-list {
  border-top: 1px solid var(--hairline);
}
.faq-list details {
  border-bottom: 1px solid var(--hairline);
}
.faq-list summary {
  position: relative;
  display: block;
  padding: 24px 48px 24px 0;
  font: 600 clamp(1.125rem, 0.6vw + 1rem, 1.3125rem) / 1.35 var(--text);
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
  border-radius: 4px;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 16px;
  height: 1.75px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform var(--settle) var(--ease-settle);
}
.faq-list summary::after {
  transform: rotate(90deg);
}
.faq-list details[open] summary::after {
  transform: rotate(0deg);
}
.faq-list summary:hover {
  color: var(--cobalt);
}
.faq-list details::details-content {
  block-size: 0;
  overflow: clip;
  transition:
    block-size var(--settle) var(--ease-move),
    content-visibility var(--settle) allow-discrete;
}
.faq-list details[open]::details-content {
  block-size: auto;
}
.answer {
  padding-bottom: 24px;
  max-width: 38em;
}
.answer a {
  color: var(--cobalt);
}
@media (min-width: 900px) {
  .questions-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(48px, 6vw, 112px);
    align-items: start;
  }
  .questions-aside {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}

/* ---------- Closing ---------- */

.closing {
  padding-block: var(--section) clamp(80px, 10vw, 144px);
  border-top: 1px solid var(--hairline);
}
.closing-grid {
  display: grid;
  gap: 40px;
}
.closing-title {
  font-size: clamp(3.25rem, 11vw, 10rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-wrap: initial;
}
.closing-mark {
  width: clamp(120px, 16vw, 220px);
  height: auto;
}
.closing-copy {
  display: grid;
  gap: 24px;
  justify-items: start;
  max-width: 30em;
}
.closing-mark .spine {
  transition: stroke-dashoffset 900ms var(--ease-move);
}
.closing-mark .dot {
  transition: transform 480ms var(--ease-land) 760ms;
}
.closing-mark.is-pending .spine {
  stroke-dashoffset: 1;
  transition: none;
}
.closing-mark.is-pending .dot {
  transform: scale(0);
  transition: none;
}
@media (min-width: 900px) {
  .closing-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title mark"
      "copy mark";
    align-items: end;
    column-gap: 64px;
  }
  .closing-title {
    grid-area: title;
  }
  .closing-mark {
    grid-area: mark;
    align-self: start;
  }
  .closing-copy {
    grid-area: copy;
  }
}

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

.footer {
  padding-block: 40px 48px;
  border-top: 1px solid var(--hairline);
}
.footer-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-2);
}
.footer nav a:hover {
  color: var(--navy);
  text-decoration: underline;
}
.footer-note {
  font-size: 14px;
  color: var(--muted);
}
.footer-note a {
  text-decoration-color: var(--hairline);
}
@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: auto 1fr;
    column-gap: 48px;
    row-gap: 8px;
  }
  .footer nav {
    justify-content: flex-end;
  }
  .footer-note {
    grid-column: 1 / -1;
  }
}

/* ---------- Scroll entries: semantic units advance in reading order ---------- */

/* Shorter than the hero's entrance and only 20 px, so entries keep pace with
   the scroll rather than trailing it. */
[data-reveal] {
  transition:
    opacity 520ms var(--ease-advance),
    transform 520ms var(--ease-advance);
  transition-delay: calc(var(--order, 0) * 60ms);
}
[data-reveal].is-pending {
  opacity: 0;
  transform: translate3d(20px, 0, 0);
}

/* ---------- Reduced motion: final states, short crossfades ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
  }
  [data-reveal],
  .button,
  .button .icon,
  .loop-line,
  .loop-list .icon,
  .companion-row img,
  .duel-answers button,
  .ladder-steps li::before,
  .closing-mark .spine,
  .closing-mark .dot {
    transition-property: opacity, color, background-color, box-shadow !important;
    transition-duration: 160ms !important;
    transition-delay: 0ms !important;
    transform: none !important;
  }
  .faq-list details::details-content {
    transition: none;
  }
}
