/* Pinned investigation story: one stage steps through Notice, Try and Learn (desktop; enabled by investigation.js). */
.pv-investigation { --story-ease: cubic-bezier(.16, 1, .3, 1); }
.pv-investigation.is-story { padding-block: 0; }
.pv-investigation.is-story::after { content: ""; display: block; height: var(--story-distance, 220vh); }
.pv-investigation.is-story > .pv-shell {
  position: sticky;
  top: 0;
  box-sizing: border-box;
  height: 100svh;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(2.5rem, 5vw, 5rem);
  padding-block: clamp(1.5rem, 4vh, 3rem);
}

/* Opening heading: the question the three chapters answer. */
.pv-investigation-intro > p { max-width: 38ch; margin: 1.25rem auto 0; color: var(--muted); font-size: clamp(1.0625rem, 1.4vw, 1.25rem); line-height: 1.55; }
.pv-investigation-intro { width: calc(100% - 36px); margin-inline: auto; padding-block: clamp(5rem, 9vw, 8rem) clamp(1rem, 3vw, 2rem); }
.pv-investigation-intro h2 { max-width: 22ch; margin-inline: auto; }
.is-story .pv-investigation-intro { padding-bottom: 0; }

/* All three chapters share one cell; copy stays left and the product visual right. */
.is-story .pv-chapter { grid-area: 1 / 2; padding-block: 0; pointer-events: none; }
.is-story .pv-chapter.is-active { pointer-events: auto; }
.is-story .pv-chapter-reverse { grid-template-columns: minmax(0, .82fr) minmax(0, 1.2fr); }
.is-story .pv-chapter-reverse > .pv-copy { order: 0; }
/* The step rail carries the chapter labels while pinned. */
.is-story .pv-copy > .pv-eyebrow {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.is-story .pv-chapter > :is(.pv-copy, .pv-stage) {
  transition: opacity .45s var(--story-ease), translate .6s var(--story-ease), scale .8s var(--story-ease), filter .45s var(--story-ease);
}
.is-story .pv-chapter.is-active > :is(.pv-copy, .pv-stage) {
  transition-duration: .9s, 1s, 1s, .9s;
  transition-delay: .12s;
}
.is-story .pv-chapter:not(.is-active) > .pv-copy { opacity: 0; translate: 0 28px; filter: blur(8px); }
.is-story .pv-chapter.is-past > .pv-copy { translate: 0 -28px; }
/* While pinned, one live phone (built by investigation.js) carries the conversation; the per-chapter phones rest. */
.is-story .pv-chapter > .pv-stage { opacity: 0; pointer-events: none; }
.pv-live { display: none; }
.is-story .pv-live { display: grid; }
.pv-live-chat { width: min(100%, 440px); margin: 0; justify-self: start; }
.is-story .pv-chat-screen { height: min(470px, calc(100svh - 300px)); -webkit-mask-image: linear-gradient(transparent, #000 2em); mask-image: linear-gradient(transparent, #000 2em); }

/* Step rail: a rose-gold line fills with scroll and each label jumps to its step. */
.pv-story-rail { display: none; }
.is-story .pv-story-rail { display: block; grid-area: 1 / 1; position: relative; isolation: isolate; }
.pv-story-rail ol { display: grid; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.pv-page .pv-story-rail button {
  display: flex;
  align-items: center;
  gap: .875rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font: 500 .6875rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .4s var(--story-ease);
}
.pv-story-rail button::before {
  content: "";
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #111213;
  transition: background-color .4s var(--story-ease), border-color .4s var(--story-ease);
}
.pv-story-num { font-variant-numeric: tabular-nums; }
.pv-page .pv-story-rail button:hover { color: var(--ink-soft); }
.pv-page .pv-story-rail button.is-past { color: var(--muted); }
.pv-page .pv-story-rail button[aria-current="step"] { color: var(--ink); }
.pv-story-rail button:is(.is-past, [aria-current="step"])::before { border-color: var(--rose-gold); background: var(--rose-gold); }
.pv-story-rail button:focus-visible { outline: 2px solid var(--rose-gold); outline-offset: 6px; border-radius: 4px; }
.pv-story-track { position: absolute; z-index: -1; left: 3px; top: 22px; bottom: 22px; width: 1px; background: #f5f0e31f; }
.pv-story-track > span { position: absolute; inset: 0; background: var(--rose-gold); transform-origin: top; scale: 1 var(--story-fill, 0); }

/* Phones: the same pinned story, compacted. Step labels run across the top, the headline sits
   beneath, and the live phone fills the rest of the screen. Body copy stays available to screen readers. */
@media (max-width: 860px) {
  .pv-investigation.is-story > .pv-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: center;
    align-items: start;
    row-gap: .75rem;
    padding-block: 1rem;
  }
  /* Story-style progress: three thin segments that fill with scroll; each still jumps to its step. */
  .is-story .pv-story-rail { grid-area: 1 / 1; justify-self: stretch; }
  .pv-story-rail ol { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; gap: 6px; }
  .pv-page .pv-story-rail button { position: relative; width: 100%; min-height: 24px; }
  .pv-story-rail button > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pv-story-rail button::before { display: none; }
  .pv-story-rail button::after {
    content: "";
    position: absolute;
    inset: calc(50% - 1px) 0 auto;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--rose-gold) calc(var(--seg, 0) * 100%), #f5f0e326 0);
  }
  .pv-story-track { display: none; }
  /* The step label returns above its headline. */
  .is-story .pv-copy > .pv-eyebrow {
    position: static; width: auto; height: auto; margin: 0 0 .625rem; overflow: visible; clip-path: none; white-space: normal;
    font-size: .6875rem; letter-spacing: .14em;
  }
  .is-story :is(.pv-chapter, .pv-chapter-reverse) { grid-area: 2 / 1; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .is-story .pv-copy { text-align: center; }
  .is-story .pv-copy h3 { font-size: clamp(1.75rem, 7.4vw, 2.375rem); }
  .is-story .pv-copy > p:not(.pv-eyebrow),
  .is-story .pv-chapter > .pv-stage {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  /* The conversation fills whatever height remains below the headline. */
  .is-story .pv-live { grid-area: 3 / 1; gap: 0; }
  .is-story .pv-live > :first-child { display: none; }
  .is-story .pv-live-chat { justify-self: center; }
  /* A fixed, modest chat height; labels, headline and chat centre together as one group. */
  .is-story .pv-live .pv-chat-screen { height: min(400px, calc(100svh - 330px)); }
  .is-story .pv-live .pv-msg:not(.is-card) { max-width: 84%; }
  .is-story .pv-live .pv-chat-screen { -webkit-mask-image: linear-gradient(transparent, #000 1.8em); mask-image: linear-gradient(transparent, #000 1.8em); }
  /* Shorter steps sit down against the conversation; the compact header saves height. */
  .is-story .pv-chapter:not(.pv-live) { align-self: end; }
  .is-story .pv-live .pv-chat-head { display: flex; justify-content: center; gap: .3em; padding: 0 0 .35em; border-bottom: 0; }
  .is-story .pv-live .pv-chat-head :is(img, i) { display: none; }
  .is-story .pv-live .pv-chat-head :is(span, small) { color: #8e8e93; font-size: .72em; font-weight: 400; }
  .is-story .pv-live .pv-chat-head small::before { content: "· "; }
}
/* Taller phones have room for each step's supporting line. */
@media (max-width: 860px) and (min-height: 780px) {
  .is-story .pv-copy > p:not(.pv-eyebrow) {
    position: static; width: auto; height: auto; margin: .5rem auto 0; overflow: visible; clip-path: none; white-space: normal;
    max-width: 32ch; font-size: 1rem; line-height: 1.5;
  }
}

@media (forced-colors: active) {
  .pv-story-rail button::before, .pv-story-track > span { background: CanvasText; border-color: CanvasText; }
}

/* The conversation, frameless: iMessage in dark mode, sitting directly on the page. */
.pv-stage.pv-chat-visual { width: min(100%, 440px); }
.pv-chat {
  width: 100%;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(15px, 1.2vw, 17px);
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
.pv-chat-head { display: grid; justify-items: center; gap: .15em; padding-bottom: .8em; border-bottom: 1px solid #ffffff14; }
.pv-chat-head img { width: 2.6em; height: 2.6em; margin-bottom: .2em; border-radius: 50%; }
.pv-chat-head span { color: #f2f2f7; font-size: .76em; font-weight: 500; }
.pv-chat-head i { color: #8e8e93; font-style: normal; }
.pv-chat-head small { color: #8e8e93; font-size: .66em; }
.pv-chat-screen { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.pv-thread { display: flex; flex-direction: column; gap: .25em; margin: 0; padding: .6em 0 .2em; list-style: none; }
.pv-thread:not(.is-static) > .is-hidden { display: none; }
.pv-thread.is-static > .is-hidden { visibility: hidden; }
.pv-msg { max-width: 78%; padding: .45em .8em .5em; border-radius: 1.15em; font-size: 1em; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: break-word; }
.pv-msg.is-in { align-self: flex-start; background: #262629; transform-origin: bottom left; }
.pv-msg.is-out { align-self: flex-end; background: #0a84ff; transform-origin: bottom right; }
.pv-msg.is-in + .pv-msg.is-out, .pv-msg.is-out + .pv-msg.is-in { margin-top: .45em; }
.pv-msg-time { align-self: center; margin-block: .8em .3em; color: #8e8e93; font-size: .7em; font-weight: 500; }
/* The time jump is a scene break, not a timestamp. */
.pv-msg-skip {
  align-self: center;
  margin-block: 1.2em .2em;
  padding: .4em 1em;
  border: 1px solid #cfa28e59;
  border-radius: 999px;
  color: var(--rose-gold);
  font-family: var(--sans);
  font-size: .66em;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pv-msg.is-new { animation: pv-msg-in .5s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes pv-msg-in { from { opacity: 0; scale: .86; translate: 0 .4em; } }
.pv-msg.is-typing { display: flex; gap: .28em; padding: .72em .9em; animation: pv-msg-in .35s ease both; }
.pv-msg.is-typing i { width: .42em; height: .42em; border-radius: 50%; background: #8e8e93; animation: pv-chat-dot 1s ease-in-out infinite; }
.pv-msg.is-typing i:nth-child(2) { animation-delay: .15s; }
.pv-msg.is-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pv-chat-dot { 0%, 60%, 100% { opacity: .4; translate: 0 0; } 30% { opacity: 1; translate: 0 -30%; } }

/* In-thread data cards: one dark style, from the first insight to the result. */
.pv-msg.is-card { width: 86%; max-width: 86%; padding: 0; background: none; border-radius: 1.1em; }
.pv-chat-card { padding: .85em .9em .75em; border: 1px solid #38383a; border-radius: 1.1em; background: #1c1c1e; }
.pv-page .pv-chat-card p { margin: 0; }
.pv-page .pv-chat-card .pv-card-title { color: #fff; font-size: .98em; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.pv-page .pv-chat-card .pv-card-sub { margin: .1em 0 .4em; color: #8e8e93; font-size: .72em; line-height: 1.3; }
.pv-card-title + .pv-card-row { margin-top: .35em; }
.pv-card-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: .6em; margin-inline: -.45em; padding: .3em .45em .4em; border-radius: .7em; }
.pv-card-row.is-key { background: #0a84ff1f; }
.pv-card-label { color: #ebebf5d9; font-size: .74em; line-height: 1.3; }
.pv-card-label small { color: #8e8e93; font-size: 1em; }
.pv-card-label small::before { content: " · "; }
.pv-card-row strong { font-size: 1.15em; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pv-card-row strong small { color: #8e8e93; font-size: .64em; font-weight: 400; }
.pv-card-row.is-key strong { color: #409cff; }
.pv-card-bar { position: relative; grid-column: 1 / -1; height: .42em; margin-top: .25em; overflow: hidden; border-radius: 99px; background: #2c2c2e; }
.pv-card-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--w) * 100%); border-radius: inherit; background: #636366; transform-origin: left; transition: scale 1.1s cubic-bezier(.16, 1, .3, 1) .15s; }
.pv-card-row.is-key .pv-card-bar::after { background: #0a84ff; }
.pv-chat-card.is-drawing .pv-card-bar::after { scale: 0 1; transition: none; }
.pv-page .pv-chat-card .pv-card-delta { margin-top: .55em; color: #ebebf5; font-size: .8em; line-height: 1.2; }
.pv-card-delta strong { margin-right: .15em; color: #409cff; font-size: 1.9em; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pv-page .pv-chat-card .pv-card-note { margin-top: .5em; color: #8e8e93; font-size: .66em; line-height: 1.35; }
.pv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .pv-msg.is-new, .pv-msg.is-typing, .pv-msg.is-typing i { animation: none; }
  .pv-card-bar::after { transition: none; }
}

/* After the story: one quiet invitation, in normal flow, before How it works. */
.pv-invite { display: grid; justify-items: center; gap: 1.5rem; width: calc(100% - 36px); margin-inline: auto; padding-block: clamp(3.5rem, 7vw, 6rem) clamp(1rem, 3vw, 2rem); text-align: center; }
.pv-page .pv-invite h2 { margin: 0; font: 400 clamp(1.75rem, 3.2vw, 2.5rem)/1.15 var(--sans); letter-spacing: -.035em; color: var(--ink); }
.pv-page .pv-invite .button-primary { min-height: 52px; padding: 15px 24px; font-size: .9375rem; letter-spacing: 0; text-transform: none; }
