/* PocketDesk website
   Sections: tokens, base, nav, shared, hero, statement, story, setup, plans,
   closing, footer, article pages, load motion, responsive, reduced motion.
   Scroll-driven layout is enabled by `.js` on <html>; without it every
   section reads top to bottom in its settled state. */

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  --black: #000;
  --light: #f5f5f7;
  --white: #fff;
  --ink: #1d1d1f;
  --secondary: #86868b;
  --tertiary: #6e6e73;
  --tile: #161617;
  --hairline-dark: rgba(255, 255, 255, 0.12);
  --hairline-light: rgba(0, 0, 0, 0.08);
  --amber: #f5a524;
  --amber-soft: rgba(245, 165, 36, 0.18);
  --focus: #2997ff;
  --link-dark: #2997ff;
  --link-light: #0066cc;

  --titanium: linear-gradient(180deg, #f5f5f7 12%, #c7c7cc 58%, #a1a1a6 100%);
  --bezel: linear-gradient(150deg, #a4a4a9 0%, #626267 30%, #85858a 55%, #4d4d52 80%, #909095 100%);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --nav-height: 48px;
  --content: 1080px;
  --gutter: 24px;
  --tracking: -0.022em;
  --tracking-display: -0.03em;
}

/* Chinese text is set without the Latin optical tightening. */
:lang(zh-Hans) {
  --tracking: 0;
  --tracking-display: 0.01em;
}

.mark-end {
  margin-right: -0.5em;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--light);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: var(--tracking);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1, h2, h3 {
  text-wrap: balance;
}

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

img, svg, video {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: rgba(245, 165, 36, 0.35);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
}

.skip-link:focus {
  top: 10px;
}

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

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(22, 22, 23, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline-dark);
  color: var(--light);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.nav.is-light {
  background: rgba(250, 250, 252, 0.8);
  border-bottom-color: var(--hairline-light);
  color: var(--ink);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(var(--content), 100% - 2 * var(--gutter));
  height: 100%;
  margin-inline: auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-brand img {
  border-radius: 5px;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 12px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

:lang(zh-Hans) .nav-links {
  font-size: 13px;
  letter-spacing: 0;
}

.nav-links a {
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  opacity: 1;
}

/* ---------- Shared ---------- */

.stage-dark {
  background: var(--black);
  color: var(--light);
}

.stage-light {
  background: var(--light);
  color: var(--ink);
}

.titanium {
  background: var(--titanium);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title {
  font-size: clamp(40px, 5.6vw, 80px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

:lang(zh-Hans) .section-title {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.14;
  letter-spacing: 0.01em;
}

.section-lede {
  margin-top: 16px;
  color: var(--secondary);
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.3;
}

.stage-light .section-lede {
  color: var(--tertiary);
}

.fine-print {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-nav {
  padding: 3px 10px;
  font-size: 12px;
  opacity: 0.85;
}

.pill-small {
  margin-left: 10px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--amber);
  border-color: rgba(245, 165, 36, 0.45);
  vertical-align: 1px;
}

.pill-large {
  padding: 9px 20px;
  font-size: 15px;
  color: var(--light);
  border-color: rgba(245, 245, 247, 0.4);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 400;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}

.button svg {
  width: 14px;
  height: 14px;
}

.button-light {
  background: var(--light);
  color: var(--ink);
}

.button-light:hover {
  background: var(--white);
  transform: scale(1.03);
}

.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-dark:hover {
  background: #000;
  transform: scale(1.02);
}

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

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--link-dark);
  font-size: 17px;
}

.link-more .chevron {
  width: 6px;
  height: 11px;
  transition: transform 0.3s var(--ease);
}

.link-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-more:hover .chevron {
  transform: translateX(3px);
}

/* Sections that rise into place as they enter the viewport. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
}

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

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

.hero {
  position: relative;
  padding: calc(var(--nav-height) + clamp(40px, 8vh, 96px)) var(--gutter) 32px;
  text-align: center;
  overflow: clip;
}

.hero-eyebrow {
  margin-bottom: clamp(10px, 1.6vh, 18px);
  color: var(--amber);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: var(--tracking-display);
  padding-bottom: 0.06em;
}

:lang(zh-Hans) .hero-title {
  font-size: clamp(44px, 8.2vw, 116px);
  line-height: 1.12;
}

.hero-lede {
  margin: 26px auto 30px;
  color: var(--secondary);
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

:lang(zh-Hans) .hero-lede {
  letter-spacing: 0;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 28px;
}

.hero-devices {
  position: relative;
  width: min(1180px, 100%);
  margin: clamp(12px, 3vh, 36px) auto 0;
}

/* Studio light: a cool wash behind the devices and a warm one where they stand. */
.hero-devices::before {
  content: "";
  position: absolute;
  inset: 4% 2% 0;
  background:
    radial-gradient(40% 22% at 50% 84%, rgba(245, 165, 36, 0.08), transparent 70%),
    radial-gradient(closest-side, rgba(200, 204, 216, 0.2), transparent 72%);
  pointer-events: none;
}

.hero-devices-motion {
  position: relative;
  transform-origin: 50% 20%;
  will-change: transform;
}

.hero-devices img {
  width: 100%;
  height: auto;
}

.hero-devices figcaption {
  margin-top: 8px;
}

/* ---------- Statement ---------- */

.statement {
  padding: clamp(88px, 15vh, 170px) var(--gutter) clamp(48px, 9vh, 96px);
}

.statement-title,
.statement-body {
  max-width: 980px;
  margin-inline: auto;
}

.statement-title {
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  padding-bottom: 0.05em;
}

.statement-body {
  margin-top: clamp(28px, 5vh, 48px);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

:lang(zh-Hans) .statement-title {
  line-height: 1.2;
  letter-spacing: 0.01em;
}

:lang(zh-Hans) .statement-body {
  font-size: clamp(22px, 2.7vw, 36px);
  line-height: 1.45;
  letter-spacing: 0.01em;
  line-break: strict;
}

.statement-body .word {
  opacity: 0.22;
  transition: opacity 0.35s linear;
}

.statement-body .word.is-lit {
  opacity: 1;
}

/* ---------- Story ---------- */

/* Plain form: three steps, read in order. */
.story {
  position: relative;
  padding: 24px var(--gutter) clamp(80px, 12vh, 120px);
  overflow-x: clip;
}

.story-sticky {
  width: min(680px, 100%);
  margin-inline: auto;
}

.story-sticky > .story-device,
.story-progress {
  display: none;
}

.story-copy {
  display: grid;
  gap: 72px;
}

.story-step h3 {
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

:lang(zh-Hans) .story-step h3 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.story-step p {
  margin-top: 18px;
  color: var(--secondary);
  font-size: clamp(17px, 1.4vw, 21px);
  font-weight: 500;
  line-height: 1.38;
}

:lang(zh-Hans) .story-step p {
  line-height: 1.6;
}

.story-step > .story-device {
  margin-top: 32px;
}

.story-step .duo {
  width: 100%;
}

.story-device {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 14px;
}

/* Soft studio light behind the device. */
.story-device::before {
  content: "";
  position: absolute;
  inset: -12% -10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(143, 176, 255, 0.12), rgba(143, 176, 255, 0.04) 60%, transparent);
  pointer-events: none;
}

/* Pinned form: the copy changes beside one device as the page scrolls. */
@media (min-width: 834px) and (prefers-reduced-motion: no-preference) {
  .js .story {
    height: 330vh;
    padding: 0;
  }

  .js .story-sticky {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.4fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    width: min(1180px, 100% - 2 * var(--gutter));
    height: 100vh;
    height: 100svh;
    padding-top: var(--nav-height);
  }

  .js .story-sticky > .story-device {
    display: grid;
  }

  .js .story-progress {
    display: flex;
    gap: 6px;
    margin-top: 40px;
  }

  .js .story-copy {
    position: relative;
    gap: 0;
  }

  .js .story-step {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
  }

  .js .story-step.is-active {
    opacity: 1;
    transform: none;
  }

  .js .story-step p {
    max-width: 400px;
  }

  .js .story-step > .story-device {
    display: none;
  }
}

.story-progress i {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 0.4s;
}

.story-progress i.is-on {
  background: var(--light);
}

/* The device, drawn in CSS. Inner sizes use container units so it scales as one piece. */

.duo {
  container-type: inline-size;
  position: relative;
  width: min(100%, calc((100svh - var(--nav-height) - 140px) * 1.18));
  aspect-ratio: 1.18;
  padding: 0.55cqi;
  border-radius: 3.6cqi;
  background: var(--bezel);
  /* Graphite titanium: a hairline rim catches the light, the frame itself stays dark. */
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 4cqi 10cqi rgba(0, 0, 0, 0.7);
}

.duo-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 0.5cqi solid #000;
  border-radius: 3.05cqi;
  background: #fbfbfd;
  color: var(--ink);
  font-size: 2.1cqi;
  letter-spacing: -0.01em;
}

/* Fold crease */
.duo-screen::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: 6;
  width: 2cqi;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.045) 45%, rgba(255, 255, 255, 0.6) 50%, rgba(0, 0, 0, 0.045) 55%, transparent);
  pointer-events: none;
}

/* Window picker */

.duo-picker {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 3cqi;
  padding: 0 6cqi;
  background: radial-gradient(120% 90% at 50% 0%, #3a3a3f, #141416 70%);
  opacity: 0;
}

.duo-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 1.4cqi;
  background:
    linear-gradient(#e8e8ed, #e8e8ed) 0 0 / 100% 12% no-repeat,
    linear-gradient(#dcdce1, #dcdce1) 8% 30% / 22% 60% no-repeat,
    linear-gradient(#ececf0, #ececf0) 80% 30% / 58% 24% no-repeat,
    #f7f7f9;
  box-shadow: 0 1.2cqi 3cqi rgba(0, 0, 0, 0.4);
}

.duo-thumb.is-chosen {
  box-shadow: 0 0 0 0.5cqi var(--amber), 0 1.2cqi 3cqi rgba(0, 0, 0, 0.4);
}

/* App window */

.duo-app {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fbfbfd;
  transform-origin: 50% 50%;
}

.duo-bar {
  display: flex;
  align-items: center;
  gap: 2cqi;
  height: 8cqi;
  padding: 0 3cqi;
  border-bottom: 1px solid #ececf0;
  font-weight: 600;
}

.duo-lights {
  display: flex;
  gap: 0.9cqi;
}

.duo-lights i {
  width: 1.3cqi;
  height: 1.3cqi;
  border-radius: 50%;
  background: #d2d2d7;
}

.duo-title {
  flex: 1;
  text-align: center;
  font-size: 2cqi;
  transition: opacity 0.4s var(--ease);
}

/* The sent notice takes the title's place. */
.duo.is-sent .duo-title {
  opacity: 0;
}

.duo-mode {
  display: inline-flex;
  padding: 0.4cqi;
  border-radius: 99px;
  background: #ececf0;
  font-size: 1.6cqi;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.duo-mode span {
  padding: 0.5cqi 1.6cqi;
  border-radius: 99px;
  color: var(--tertiary);
}

.duo-mode .is-on {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 0.2cqi 0.6cqi rgba(0, 0, 0, 0.12);
}

.duo-body {
  flex: 1;
  display: grid;
  grid-template-columns: 30% 1fr;
  min-height: 0;
}

.duo-side {
  display: flex;
  flex-direction: column;
  gap: 0.6cqi;
  padding: 3cqi 2cqi;
  background: #f3f3f6;
  border-right: 1px solid #ececf0;
}

.duo-row {
  position: relative;
  padding: 1.1cqi 1.6cqi;
  border-radius: 1.2cqi;
  color: #424245;
  font-size: 2cqi;
  white-space: nowrap;
}

.duo-row-target {
  z-index: 0;
}

.duo-row-target::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--amber-soft);
  opacity: 0;
}

.duo-main {
  display: flex;
  flex-direction: column;
  gap: 1.6cqi;
  padding: 4cqi 4cqi 4cqi 6cqi;
}

.duo-heading {
  margin-bottom: 1cqi;
  font-size: 3.4cqi;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.duo-line {
  display: block;
  height: 1.3cqi;
  border-radius: 1cqi;
  background: #e6e6eb;
}

.w45 { width: 45%; }
.w60 { width: 60%; }
.w70 { width: 70%; }
.w78 { width: 78%; }
.w82 { width: 82%; }
.w88 { width: 88%; }
.w92 { width: 92%; }

.duo-media {
  display: block;
  height: 17cqi;
  margin: 0.4cqi 0 1.2cqi;
  border-radius: 2cqi;
  background:
    radial-gradient(120% 70% at 20% 110%, #cfcfd6 0 45%, transparent 46%),
    radial-gradient(110% 80% at 85% 120%, #dcdce2 0 50%, transparent 51%),
    linear-gradient(180deg, #f1f1f4, #e6e6eb);
}

.duo-card {
  display: flex;
  flex-direction: column;
  gap: 1.3cqi;
  margin: 1cqi 0;
  padding: 2.6cqi;
  border-radius: 2cqi;
  background: #f3f3f6;
}

.duo-card .duo-line {
  background: #dcdce1;
}

/* Cursor: the track fills the screen so percentage translations map to screen coordinates. */

.duo-cursor-track {
  position: absolute;
  inset: 0;
  z-index: 7;
  opacity: 0;
  transform: translate(62%, 66%);
  pointer-events: none;
}

.duo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 3.2cqi;
}

.duo-cursor svg {
  width: 100%;
  fill: var(--ink);
  stroke: var(--white);
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 0.3cqi 0.6cqi rgba(0, 0, 0, 0.3));
}

.duo-cursor-dot {
  position: absolute;
  top: -1.1cqi;
  left: -1.1cqi;
  width: 2.2cqi;
  height: 2.2cqi;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0.8cqi var(--amber-soft);
}

/* Compose sheet: dark, like the app's own. */

.duo-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 2cqi;
  width: 66%;
  padding: 1.6cqi 3.6cqi 3cqi;
  border-radius: 3.6cqi 3.6cqi 0 0;
  background: #1c1c1e;
  color: var(--light);
  box-shadow: 0 -1cqi 5cqi rgba(0, 0, 0, 0.22);
  transform: translate(-50%, 130%);
  transition: transform 0.8s var(--ease);
}

.duo-sheet-grabber {
  align-self: center;
  width: 6cqi;
  height: 0.7cqi;
  border-radius: 1cqi;
  background: #48484a;
}

.duo-sheet-text {
  min-height: 7.6cqi;
  font-size: 2.8cqi;
  font-weight: 500;
  line-height: 1.35;
}

.duo-sheet-placeholder {
  color: #636366;
}

.duo.is-typing .duo-sheet-placeholder {
  display: none;
}

.duo-caret {
  display: inline-block;
  width: 0.35cqi;
  height: 3cqi;
  margin-left: 0.3cqi;
  vertical-align: -0.5cqi;
  background: var(--amber);
  animation: caret-blink 1s steps(1) infinite;
}

.duo-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.duo-sheet-return {
  padding-bottom: 0.4cqi;
  border-bottom: 0.25cqi solid var(--amber);
  color: #d1d1d6;
  font-size: 1.8cqi;
}

.duo-send {
  display: grid;
  place-items: center;
  width: 5.4cqi;
  height: 5.4cqi;
  border-radius: 50%;
  background: #48484a;
  transition: background-color 0.3s, transform 0.3s var(--ease);
}

.duo-send svg {
  width: 55%;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.duo-toast {
  position: absolute;
  top: 1.7cqi;
  left: 50%;
  z-index: 9;
  padding: 1.2cqi 2.6cqi 1.2cqi 2cqi;
  border-radius: 99px;
  background: var(--ink);
  color: var(--light);
  font-size: 1.9cqi;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -2cqi);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.duo-toast::before {
  content: "";
  display: inline-block;
  width: 1.2cqi;
  height: 1.2cqi;
  margin-right: 1.2cqi;
  border-radius: 50%;
  background: var(--amber);
}

/* Small devices: larger type so the illustration stays legible at phone width. */
@container (max-width: 520px) {
  .duo-screen { font-size: 2.6cqi; }
  .duo-title,
  .duo-row { font-size: 2.6cqi; }
  .duo-heading { font-size: 4.2cqi; }
  .duo-mode { font-size: 2.1cqi; }
  .duo-sheet { width: 84%; }
  .duo-sheet-return,
  .duo-toast { font-size: 2.5cqi; }
  .duo-sheet-text { font-size: 3.4cqi; }
}

/* Story states */

.duo[data-state="standby"] .duo-picker {
  opacity: 1;
}

.duo[data-state="standby"] .duo-app {
  opacity: 0;
  transform: scale(0.28);
}

.duo[data-state="window"] .duo-picker {
  animation: picker-out 2.4s var(--ease) both;
}

.duo[data-state="window"] .duo-app {
  animation: window-in 2.4s var(--ease) both;
}

.duo[data-state="touch"] .duo-mode,
.duo[data-state="send"] .duo-mode {
  opacity: 1;
}

.duo[data-state="touch"] .duo-cursor-track {
  opacity: 1;
  animation: cursor-path 5.2s var(--ease) 0.3s infinite;
}

.duo[data-state="touch"] .duo-cursor-dot {
  animation: cursor-press 5.2s var(--ease) 0.3s infinite;
}

.duo[data-state="touch"] .duo-row-target::before {
  animation: row-select 5.2s var(--ease) 0.3s infinite;
}

.duo[data-state="send"] .duo-row-target::before {
  opacity: 1;
}

.duo[data-state="send"] .duo-sheet {
  transform: translate(-50%, 0);
}

.duo.is-typed .duo-send {
  background: var(--amber);
  transform: scale(1.06);
}

.duo.is-typed .duo-caret {
  opacity: 0;
  animation: none;
}

.duo.is-sent .duo-toast {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Static frames (stacked story) show each state's settled moment. */
.duo.is-static .duo-picker { opacity: 0; animation: none; }
.duo.is-static .duo-app { opacity: 1; transform: none; animation: none; }
.duo.is-static[data-state="touch"] .duo-cursor-track {
  opacity: 1;
  transform: translate(16%, 30.6%);
  animation: none;
}
.duo.is-static[data-state="touch"] .duo-row-target::before {
  opacity: 1;
  animation: none;
}
.duo.is-static[data-state="touch"] .duo-cursor-dot { animation: none; }
.duo.is-static .duo-caret { display: none; }

@keyframes picker-out {
  0%, 40% { opacity: 1; }
  60%, 100% { opacity: 0; }
}

/* The chosen window grows out of the picker, then settles at full screen. */
@keyframes window-in {
  0%, 30% { opacity: 0; transform: scale(0.3); }
  42% { opacity: 1; }
  78%, 100% { opacity: 1; transform: none; }
}

@keyframes cursor-path {
  0%   { transform: translate(62%, 66%); }
  28%  { transform: translate(36%, 32%); }
  46%, 64% { transform: translate(16%, 30.6%); }
  100% { transform: translate(62%, 66%); }
}

@keyframes cursor-press {
  0%, 44% { transform: scale(1); }
  49% { transform: scale(0.55); }
  56%, 100% { transform: scale(1); }
}

@keyframes row-select {
  0%, 46% { opacity: 0; }
  52%, 88% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ---------- Setup ---------- */

.setup {
  padding: clamp(96px, 16vh, 170px) var(--gutter);
}

.setup-heading,
.plans-heading {
  max-width: var(--content);
  margin: 0 auto clamp(48px, 8vh, 80px);
  text-align: center;
}

.walkthrough {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  max-width: var(--content);
  margin-inline: auto;
}

.walkthrough-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step {
  display: flex;
  gap: 16px;
  width: 100%;
  padding: 22px 24px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.step:hover {
  background: rgba(255, 255, 255, 0.55);
}

.step.is-active {
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.step-number {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #c7c7cc;
  color: var(--tertiary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.step.is-active .step-number {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.step-text {
  display: grid;
  gap: 6px;
  padding-top: 3px;
}

.step-text strong {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--tertiary);
  transition: color 0.3s;
}

:lang(zh-Hans) .step-text strong {
  letter-spacing: 0;
}

.step.is-active .step-text strong {
  color: var(--ink);
}

.step-description {
  color: var(--tertiary);
  font-size: 16px;
  line-height: 1.45;
}

/* With script, only the chosen step is spelled out; without it, all three are. */
.js .step:not(.is-active) .step-description {
  display: none;
}

:lang(zh-Hans) .step-description {
  line-height: 1.6;
}

.js .step.is-active .step-description {
  animation: rise-in 0.5s var(--ease) both;
}

.walkthrough-stage {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 28px 28px 22px;
  border-radius: 32px;
  background: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.stage-device {
  justify-self: start;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
}

.panel {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 372px;
  border-radius: 20px;
  animation: rise-in 0.55s var(--ease) both;
}

.panel:focus-visible {
  outline-offset: 2px;
}

.stage-fine-print {
  max-width: 440px;
  text-align: center;
}

/* The two apps */

.app-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.app-tiles li {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 30px 16px 26px;
  border-radius: 20px;
  background: var(--light);
  text-align: center;
  letter-spacing: -0.01em;
}

.app-tiles img {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 15px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.app-name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.app-platform,
.app-source {
  color: var(--tertiary);
  font-size: 14px;
  line-height: 1.4;
}

.app-tiles .live {
  justify-self: center;
  margin-top: 16px;
  padding: 6px 13px 6px 11px;
  border-radius: 99px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 0 0 1px var(--hairline-light);
}

/* Host window */

.mac-window {
  width: min(100%, 440px);
  overflow: hidden;
  border-radius: 14px;
  background: #fbfbfd;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 50px rgba(0, 0, 0, 0.12);
}

.mac-chrome {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid #ececf0;
  background: #f3f3f6;
  color: var(--tertiary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mac-lights {
  display: flex;
  gap: 7px;
}

.mac-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d2d2d7;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  color: var(--tertiary);
  font-size: 12px;
  font-weight: 500;
}

.live i,
.paired i,
.pick-list i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.host-body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px 20px;
  padding: 28px 26px 24px;
  letter-spacing: -0.01em;
}

.host-heading {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.host-name {
  margin-top: 4px;
  color: var(--tertiary);
  font-size: 15px;
}

.host-key,
.tile-key {
  display: flex;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.host-key {
  gap: 4px 8px;
  margin-top: 18px;
  max-width: 210px;
  color: #424245;
  font-size: 13px;
}

.qr {
  width: 128px;
  height: 128px;
  padding: 2px;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.host-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
}

.host-actions span {
  padding: 7px 14px;
  border-radius: 99px;
  background: #ececf0;
  color: #424245;
  font-size: 13px;
}

/* Phone screens */

.phone-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 20px, 420px);
  aspect-ratio: 1.18;
  margin: 10px;
  padding: 26px 30px;
  border-radius: 26px;
  background: #fbfbfd;
  letter-spacing: -0.01em;
  box-shadow:
    0 0 0 6px #0b0b0c,
    0 0 0 8px #b9b9be,
    0 0 0 9px #8e8e93,
    0 28px 60px rgba(0, 0, 0, 0.18);
}

.phone-screen::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 14px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.035) 45%, rgba(255, 255, 255, 0.7) 50%, rgba(0, 0, 0, 0.035) 55%, transparent);
  pointer-events: none;
}

.phone-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.phone-kicker svg,
.pick-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.phone-note {
  margin-top: 4px;
  color: var(--secondary);
  font-size: 13px;
  animation: rise-in 0.5s var(--ease) 1.5s both;
}

.phone-link {
  margin-top: 12px;
  color: var(--tertiary);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: #c7c7cc;
  text-underline-offset: 3px;
}

/* Camera view: the code is found, the corners close in, the Mac is paired. */

.scan-frame {
  position: relative;
  align-self: center;
  width: min(46%, 168px);
  aspect-ratio: 1;
  margin: 14px 0 16px;
  padding: 12%;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(160deg, #2c2c2e, #111113);
}

.scan-frame .qr {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  box-shadow: none;
}

.scan-corners {
  position: absolute;
  inset: 7%;
  border-radius: 12px;
  background:
    linear-gradient(var(--amber), var(--amber)) 0 0 / 22% 3px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 0 0 / 3px 22% no-repeat,
    linear-gradient(var(--amber), var(--amber)) 100% 0 / 22% 3px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 100% 0 / 3px 22% no-repeat,
    linear-gradient(var(--amber), var(--amber)) 0 100% / 22% 3px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 0 100% / 3px 22% no-repeat,
    linear-gradient(var(--amber), var(--amber)) 100% 100% / 22% 3px no-repeat,
    linear-gradient(var(--amber), var(--amber)) 100% 100% / 3px 22% no-repeat;
  animation: corners-lock 1.1s var(--ease) 0.2s both;
}

.scan-line {
  position: absolute;
  inset: 12% 10% auto;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 165, 36, 0.9), transparent);
  animation: scan-sweep 1.1s var(--ease) 0.2s both;
}

.paired {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  animation: rise-in 0.5s var(--ease) 1.35s both;
}

/* Window list */

.pick-list {
  display: grid;
  gap: 2px;
  margin-top: 14px;
}

.pick-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #424245;
  font-size: 15px;
  font-weight: 500;
  animation: rise-in 0.45s var(--ease) both;
}

.pick-list li:nth-child(2) { animation-delay: 0.08s; }
.pick-list li:nth-child(3) { animation-delay: 0.16s; }
.pick-list li:nth-child(4) { animation-delay: 0.24s; }

.pick-list .is-chosen {
  background: #f0f0f3;
  color: var(--ink);
}

.pick-list i {
  margin-left: auto;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes corners-lock {
  from { inset: -4%; opacity: 0; }
  to { inset: 7%; opacity: 1; }
}

@keyframes scan-sweep {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(96px); opacity: 0; }
}

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

.plans {
  padding: clamp(96px, 16vh, 170px) var(--gutter) clamp(64px, 10vh, 110px);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: var(--content);
  margin-inline: auto;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  padding: clamp(28px, 3.4vw, 44px);
  overflow: hidden;
  border-radius: 28px;
  background: var(--tile);
}

.js .tile:nth-child(2) { transition-delay: 0.08s; }

.tile-kicker {
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tile h3 {
  margin-top: 10px;
  max-width: 420px;
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

:lang(zh-Hans) .tile h3 {
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.tile-body {
  margin-top: 14px;
  max-width: 440px;
  color: var(--secondary);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.42;
}

:lang(zh-Hans) .tile-body {
  line-height: 1.65;
}

.tile-mark {
  margin-top: auto;
  padding-top: 32px;
  font-size: clamp(64px, 8vw, 104px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--tracking-display);
}

/* Mac, relay, iPhone: three points and the path between them. */
.tile-route {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 40px;
}

.tile-route i {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #48484a;
}

.tile-route i:first-child,
.tile-route i:last-child {
  background: var(--amber);
  box-shadow: 0 0 0 5px var(--amber-soft);
}

.tile-route span {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #48484a 0 6px, transparent 6px 12px);
}

.tile-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 5vw, 72px);
  min-height: 0;
}

.tile-wide .link-more {
  margin-top: 10px;
}

.tile-key {
  flex: none;
  gap: 10px;
  max-width: 330px;
  color: var(--light);
  font-size: 17px;
}

.tile-key span {
  padding: 10px 14px;
  border-radius: 12px;
  background: #232326;
  box-shadow: inset 0 0 0 1px var(--hairline-dark);
}

.requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: var(--content);
  margin: clamp(40px, 6vh, 64px) auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--hairline-dark);
  font-size: 14px;
  line-height: 1.45;
}

.requirements dt {
  color: var(--light);
  font-weight: 600;
}

.requirements dd {
  color: var(--secondary);
}

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

.closing {
  display: grid;
  justify-items: center;
  padding: clamp(110px, 18vh, 200px) var(--gutter) clamp(90px, 14vh, 160px);
  text-align: center;
}

.closing-icon {
  width: 84px;
  height: 84px;
  border-radius: 19px;
  box-shadow: 0 0 0 1px var(--hairline-dark), 0 20px 70px rgba(245, 165, 36, 0.16);
}

.closing-title {
  margin-top: 40px;
  font-size: clamp(44px, 7.4vw, 108px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: var(--tracking-display);
  padding-bottom: 0.06em;
}

:lang(zh-Hans) .closing-title {
  font-size: clamp(40px, 6.8vw, 96px);
  line-height: 1.14;
}

.closing-lede {
  margin: 24px 0 36px;
  color: var(--secondary);
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 500;
  line-height: 1.3;
}

:lang(zh-Hans) .closing-lede {
  line-height: 1.45;
}

.closing .fine-print {
  margin-top: 22px;
  font-size: 14px;
}

.closing .link-more {
  margin-top: 2px;
}

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

.footer {
  background: var(--black);
  color: var(--secondary);
  border-top: 1px solid var(--hairline-dark);
}

.footer-inner {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: 22px 0 30px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-dark);
  color: #d2d2d7;
}

.footer-links a,
.footer-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.footer a:hover {
  color: var(--light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 16px;
  margin-top: 6px;
}

.footer-light {
  background: var(--light);
  color: var(--tertiary);
  border-top-color: var(--hairline-light);
}

.footer-light .footer-links {
  border-top-color: var(--hairline-light);
  color: #424245;
}

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

/* ---------- Article pages (Support, Privacy, Terms) ---------- */

.page-article {
  color-scheme: light;
  background: var(--white);
  color: var(--ink);
}

.article-main {
  width: min(var(--content), 100% - 2 * var(--gutter));
  margin-inline: auto;
  padding: calc(var(--nav-height) + clamp(48px, 9vh, 96px)) 0 clamp(72px, 12vh, 128px);
}

.article-head {
  max-width: 820px;
  padding-bottom: clamp(36px, 6vh, 56px);
  border-bottom: 1px solid var(--hairline-light);
}

.article-eyebrow {
  color: var(--tertiary);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.article-head h1 {
  margin-top: 6px;
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

:lang(zh-Hans) .article-head h1 {
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.article-lead {
  margin-top: 20px;
  color: var(--tertiary);
  font-size: clamp(19px, 1.6vw, 21px);
  font-weight: 500;
  line-height: 1.42;
}

.article-updated {
  margin-top: 18px;
  color: var(--secondary);
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 692px);
  justify-content: space-between;
  gap: 48px;
  margin-top: clamp(36px, 6vh, 56px);
}

.article-toc {
  position: sticky;
  top: calc(var(--nav-height) + 28px);
  align-self: start;
  max-height: calc(100vh - var(--nav-height) - 56px);
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.article-toc p {
  margin-bottom: 10px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
}

.article-toc a {
  display: block;
  padding: 6px 0;
  color: var(--tertiary);
}

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

.article-body {
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.012em;
  overflow-wrap: break-word;
}

:lang(zh-Hans) .article-body {
  line-height: 1.8;
  letter-spacing: 0.01em;
  line-break: strict;
}

.article-body section + section {
  margin-top: 48px;
}

.article-body h2 {
  margin-bottom: 14px;
  font-size: clamp(24px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

:lang(zh-Hans) .article-body h2 {
  letter-spacing: 0.01em;
}

.article-body p + p,
.article-body ul + p,
.article-body p + ul {
  margin-top: 14px;
}

.article-body ul {
  display: grid;
  gap: 12px;
  padding-left: 22px;
  list-style: disc;
}

.article-body li::marker {
  color: #c7c7cc;
}

.article-body a,
.article-lead a {
  color: var(--link-light);
}

.article-body a:hover,
.article-lead a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  margin-top: 64px;
  padding: 28px 32px;
  border-radius: 24px;
  background: var(--light);
  line-height: 1.4;
}

.article-contact p {
  color: var(--tertiary);
  font-size: 15px;
}

.article-contact .article-contact-title {
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.article-contact .button {
  color: var(--white);
  font-size: 15px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.article-contact .button:hover {
  text-decoration: none;
}

/* ---------- Load motion (one orchestrated moment) ---------- */

.hero-eyebrow {
  animation: focus-in 1.2s var(--ease) 0.05s both;
}

.hero-title {
  animation: focus-in 1.3s var(--ease) 0.15s both;
}

.hero-lede {
  animation: focus-in 1.2s var(--ease) 0.5s both;
}

.hero-actions {
  animation: focus-in 1.2s var(--ease) 0.65s both;
}

.hero-devices {
  animation: devices-rise 1.6s var(--ease) 0.8s both;
}

@keyframes focus-in {
  from { opacity: 0; transform: translateY(24px); filter: blur(14px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes devices-rise {
  from { opacity: 0; transform: translateY(80px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1068px) {
  .js .story-sticky {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.3fr);
  }

  .article-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 36px;
  }
}

@media (max-width: 833px) {
  .walkthrough {
    grid-template-columns: 1fr;
  }

  .step {
    padding: 18px;
  }

  .walkthrough-stage {
    padding: 22px 16px 18px;
    border-radius: 26px;
  }

  .panel {
    min-height: 0;
  }

  .tiles {
    grid-template-columns: 1fr;
  }

  .tile {
    min-height: 0;
  }

  .tile-wide {
    flex-direction: column;
    align-items: flex-start;
  }

  .tile-key {
    max-width: none;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-toc {
    position: static;
    max-height: none;
    margin-bottom: 40px;
    padding: 20px 22px;
    border-radius: 18px;
    background: var(--light);
  }

  .article-toc ol {
    columns: 2;
    column-gap: 24px;
  }

  .article-toc li {
    break-inside: avoid;
  }
}

@media (max-width: 699px) {
  :root {
    --gutter: 20px;
  }

  .nav-inner {
    gap: 18px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-link-wide {
    display: none;
  }

  .hero-devices {
    width: 108%;
    margin-left: -4%;
    margin-top: 28px;
  }

  .phone-screen {
    aspect-ratio: auto;
    padding: 24px 20px;
  }

  /* One app per row: icon beside its name, so neither tile wraps into the other's shape. */
  .app-tiles {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .app-tiles li {
    grid-template-columns: auto 1fr;
    justify-items: start;
    column-gap: 16px;
    padding: 18px;
    text-align: left;
  }

  .app-tiles img {
    grid-row: 1 / span 4;
    align-self: center;
    margin-bottom: 0;
  }

  .app-tiles .live {
    justify-self: start;
    margin-top: 10px;
  }

  .host-body {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .host-key {
    max-width: none;
  }

  .requirements {
    grid-template-columns: 1fr;
  }

  .tile-key {
    gap: 8px;
    font-size: 15px;
  }

  .tile-key span {
    padding: 8px 11px;
  }

  .article-toc ol {
    columns: 1;
  }

  .article-contact {
    padding: 24px;
  }
}

@media (max-width: 389px) {
  .nav-inner {
    gap: 12px;
  }

  .nav-links {
    gap: 14px;
  }

  .pill-nav {
    display: none;
  }

  .step-text strong {
    font-size: 19px;
  }

  .mac-chrome {
    grid-template-columns: 1fr auto;
  }

  .mac-lights {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .hero-devices-motion {
    transform: none !important;
    will-change: auto;
  }

  .statement-body .word,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
