/* Hugh Mann in the Loop — shared styles. Doodle look: paper, ink, flat grey.
   Pink lilac = the AI agent ONLY (D018). Lilac is light, so small text never
   sits IN lilac: agent labels are ink text on a lilac chip. */
:root {
  --paper: #FBFAF7;
  --ink: #111;
  --ink-soft: #55534e;
  --line: #e4e1d9;
  --lilac: #DDB3DD;
  --lilac-soft: #F6ECF6;
  --blue: #0A84FF;
  --grey-bubble: #E9E9EB;
  --radius: 22px;
  --gutter: 16px;
  --max: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.agent-chip {
  display: inline-block;
  background: var(--lilac);
  color: var(--ink);
  border-radius: 6px;
  padding: 1px 7px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 15px;
  font-weight: 600;
}
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .muted { color: var(--ink-soft); font-weight: 500; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.02; font-weight: 800; }
.display { font-size: clamp(56px, 17vw, 128px); }
.h2 { font-size: clamp(36px, 10vw, 72px); }
.h3 { font-size: clamp(28px, 7.5vw, 44px); }
.lede { font-size: clamp(20px, 5.4vw, 28px); line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; margin: 14px 0 0; }
.sub { color: var(--ink-soft); font-size: 17px; margin: 12px 0 0; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.eyebrow.agent { color: var(--ink); background: var(--lilac); border-radius: 6px; padding: 2px 8px; }

section { padding-top: 72px; padding-bottom: 72px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-block;
  border: 2.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--lilac);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--lilac); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--lilac); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.waitlist-note {
  min-height: 1.5em;
  margin: 16px auto 0;
  font-weight: 600;
  max-width: 34ch;
}

.pill {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}
.pill.agent { border-color: var(--ink); color: var(--ink); background: var(--lilac); }

/* ---------- Home: idea grid ---------- */
.home-hero { padding-top: 56px; padding-bottom: 32px; }
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-bottom: 72px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  padding: 24px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
a.card:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.card img { width: 84px; }
.card .num { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink-soft); }
.card h2 { font-size: 36px; }
.card p { margin: 0; color: var(--ink-soft); }
.card .go { margin-top: auto; font-weight: 700; }
.card.soon {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Product hero ---------- */
.hero { padding-top: 40px; padding-bottom: 64px; text-align: center; }
.hero .mascot { width: 150px; margin: 0 auto 18px; }
.hero .display .dot { color: var(--lilac); -webkit-text-stroke: 2px var(--ink); }
.hero .actions { margin-top: 28px; }
.hero .beta { margin-top: 18px; }

/* ---------- Story ---------- */
.story { border-top: 2px solid var(--ink); }
.story .img-frame { max-width: 520px; margin: 32px auto 0; }
.facts {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* ---------- Feature rows ---------- */
.features { border-top: 2px solid var(--ink); }
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1.5px dashed var(--line);
}
.feature:last-child { border-bottom: 0; }
.feature .copy p { margin: 12px 0 0; font-size: 19px; color: var(--ink-soft); }
.feature .copy .kicker { color: var(--ink); font-weight: 700; }
@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 56px; }
  .feature.flip .copy { order: 2; }
}

/* ---------- Phone + bubbles ---------- */
.phone {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 30px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px 14px 18px;
}
.phone-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 12px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 12px;
}
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grey-bubble);
  border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  flex: none;
}
.phone-head .who { font-weight: 700; font-size: 15px; line-height: 1.2; }
.phone-head .who small { display: block; width: fit-content; margin-top: 2px; font-weight: 700; font-size: 12px; color: var(--ink); background: var(--lilac); border-radius: 5px; padding: 0 6px; }

.thread { display: flex; flex-direction: column; gap: 6px; }
.msg {
  max-width: 78%;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.msg.her { align-self: flex-start; background: var(--grey-bubble); color: var(--ink); border-bottom-left-radius: 6px; }
.msg.him { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.meta {
  font-size: 12px;
  font-weight: 600;
  color: #8a8780;
  text-align: center;
  margin: 6px 0;
}
.meta.right { text-align: right; margin-top: -2px; }
.meta.agent { color: var(--ink); background: var(--lilac); border-radius: 6px; padding: 1px 8px; width: fit-content; margin-left: auto; margin-right: auto; }
.meta.agent.right { margin-right: 0; }
.meta.gap {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.meta.gap::before, .meta.gap::after { content: ""; flex: 1; border-top: 1.5px dashed var(--line); }

/* ---------- Result ---------- */
.result { border-top: 2px solid var(--ink); text-align: center; }
.result blockquote {
  margin: 0 auto;
  max-width: 16ch;
  font-size: clamp(38px, 10.5vw, 80px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.result cite { display: block; margin-top: 20px; font-style: normal; color: var(--ink-soft); font-weight: 600; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 760px;
  margin: 48px auto 0;
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { border: 2px solid var(--ink); border-radius: 18px; padding: 16px 10px; background: #fff; }
.stat b { display: block; width: fit-content; margin: 0 auto; border-radius: 10px; padding: 0 10px; font-size: 34px; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

/* ---------- Pricing ---------- */
.pricing { border-top: 2px solid var(--ink); }
.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 820px;
  margin: 40px auto 0;
}
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: 5px 5px 0 var(--ink);
}
.plan.premium { box-shadow: 5px 5px 0 var(--lilac); border-color: var(--ink); }
.plan h3 { font-size: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan .price { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; margin: 14px 0 0; line-height: 1; }
.plan .price small { font-size: 17px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.plan .fine { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--ink);
}
.plan.premium li::before { background: var(--lilac); }
.plan li.no { color: var(--ink-soft); }
.plan li.no::before { background: transparent; border-color: #b9b6ae; }

/* ---------- Final CTA ---------- */
.cta { border-top: 2px solid var(--ink); text-align: center; }
.cta .mascot { width: 96px; margin: 0 auto 16px; }

/* ---------- Footer ---------- */
footer {
  border-top: 2px solid var(--ink);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--ink-soft);
}
footer p { margin: 0 0 10px; max-width: 62ch; }
footer strong { color: var(--ink); }
.stat b.agent { background: var(--lilac); }

/* ---------- Small layout helpers (no inline styles: the CSP forbids them) ---------- */
.img-frame.inline { max-width: 420px; margin-top: 24px; }
.cta .actions { margin-top: 28px; }
.terms-link { margin: 28px 0 0; text-align: center; font-weight: 600; }
.terms-link a { text-underline-offset: 3px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-weight: 600; }
footer nav a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Terms page ---------- */
.terms { padding-top: 24px; padding-bottom: 64px; max-width: 720px; }
.terms h1 { font-size: clamp(40px, 11vw, 72px); }
.terms .updated { color: var(--ink-soft); font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.plain {
  margin: 28px 0 8px;
  padding: 18px 20px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
}
.plain h2 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.plain ul { margin: 10px 0 0; padding-left: 20px; }
.plain li { margin: 4px 0; font-weight: 600; }
.plain p { margin: 10px 0 0; font-size: 15px; color: var(--ink-soft); }
.clauses { list-style: none; counter-reset: clause; padding: 0; margin: 40px 0 0; }
.clauses > li { counter-increment: clause; padding: 26px 0; border-top: 1.5px dashed var(--line); }
.clauses > li:first-child { border-top: 2px solid var(--ink); }
.clauses h2 { font-size: clamp(22px, 6vw, 30px); letter-spacing: -0.02em; line-height: 1.12; }
.clauses h2::before { content: counter(clause) ". "; color: var(--ink-soft); }
.clauses p { margin: 10px 0 0; }
.clauses .fine { font-size: 14px; color: var(--ink-soft); }
.sign { margin-top: 36px; display: flex; align-items: center; gap: 14px; font-weight: 700; }
.sign img { width: 64px; }

/* ---------- Strip at the top of every page (D027; word removed by D190) ---------- */
.show-bar {
  margin: 0;
  padding: 7px var(--gutter);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
}
.show-bar a { color: var(--paper); text-underline-offset: 2px; }
a.btn { text-decoration: none; }

/* ---------- Picture-first product page (2026-09-29 simplification) ---------- */
.hero { padding-top: 28px; padding-bottom: 24px; }
.founder { margin: 0 auto; padding: 0 var(--gutter) 8px; max-width: 520px; text-align: center; }
.founder figcaption, .shot figcaption {
  margin-top: 14px;
  font-size: clamp(20px, 5.4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}
.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  padding-top: 40px;
  padding-bottom: 40px;
}
@media (min-width: 760px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shot { margin: 0; }
.quote {
  margin: 0 auto;
  padding-top: 8px;
  padding-bottom: 40px;
  max-width: 18ch;
  text-align: center;
  font-size: clamp(30px, 8.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.cta img { width: 100%; max-width: 420px; margin: 0 auto 8px; }
.cta { padding-top: 40px; padding-bottom: 48px; }
.cta .terms-link { margin-top: 14px; font-size: 15px; }
footer { padding: 18px 0 28px; }
footer p { margin: 0; font-size: 13px; }
footer a { color: var(--ink); text-underline-offset: 2px; }
.clauses > li { padding: 16px 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
.clauses > li::before { content: counter(clause) ". "; color: var(--ink-soft); }
.home-hero .lede { margin-top: 10px; }

/* ================= Scroll story (layout "story") =================
   Brief: playful cartoon. One hero per scene: the drawing wipes on; bubbles pop in;
   the agent takes over the phone; the sleep curtain drops; the closer.
   Default = plain stacked scenes (reduce-motion, older browsers).
   Motion only inside @media (prefers-reduced-motion: no-preference) + @supports.
   Only transform, opacity and clip-path animate (fast on phones). */
.story .scroll-hint { display: none; }
.scene { padding: 24px var(--gutter); }
.stage { max-width: 440px; margin: 0 auto; text-align: center; }
.scene .art { position: relative; }
.scene .art img { width: 100%; }
.scene .beat {
  margin: 14px 0 0;
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.scribble { display: block; width: 70%; height: 18px; margin: 4px auto 0; }
.scribble path, .zzz path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.scribble path { stroke: var(--lilac); stroke-width: 6; }
.zzz { position: absolute; width: 16%; left: 54%; top: -1%; }
.zzz .halo { stroke: var(--paper); stroke-width: 10; }
.scene-sleep .base { display: none; }
.scene-chat .phone { position: relative; overflow: hidden; margin-top: 16px; text-align: left; }
.scene-chat .takeover { display: none; }
.mini-thread { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 280px; margin: 14px auto 0; text-align: left; }
.closer .quote { padding: 0 0 24px; }
.real-version {
  max-width: 440px;
  margin: 0 auto 36px;
  padding: 18px 20px 16px;
  background: #fff;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
}
.real-version h2 { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.real-version ul { margin: 10px 0 0; padding-left: 20px; }
.real-version li { margin: 6px 0; font-weight: 600; line-height: 1.35; }
@media (max-width: 480px) { .real-version { margin-left: var(--gutter); margin-right: var(--gutter); width: auto; } }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .story .scroll-hint { display: block; margin-top: 18px; color: var(--ink-soft); font-weight: 700; font-size: 14px; }
    .scene { padding: 0; }
    .scene-desk { height: 190vh; view-timeline: --desk block; }
    .scene-chat { height: 300vh; view-timeline: --chat block; }
    .scene-sleep { height: 210vh; view-timeline: --sleep block; }
    .stage {
      position: sticky; top: 0;
      height: 100vh; height: 100svh;
      padding: 16px var(--gutter);
      display: flex; flex-direction: column; justify-content: center; align-items: center;
    }
    .scene .art { width: min(100%, 52svh); }
    .scene .beat, .scene .draw, .scene .curtain, .scene .phone, .scene .thread > *,
    .scene .takeover, .scene .scribble path, .zzz path, .mini-thread > * {
      animation-fill-mode: both;
      animation-duration: 1ms; /* scroll-driven: length comes from the range */
    }

    /* 1. Desk: the drawing wipes on like ink, then two beats. */
    .scene-desk .draw   { animation-name: wipe-on;  animation-timeline: --desk; animation-range: contain 0% contain 30%; animation-timing-function: cubic-bezier(.22,1,.36,1); }
    .scene-desk .beat-1 { animation-name: rise;     animation-timeline: --desk; animation-range: contain 28% contain 42%; }
    .scene-desk .beat-2 { animation-name: rise;     animation-timeline: --desk; animation-range: contain 46% contain 60%; }
    .scene-desk .scribble path { animation-name: draw-line; animation-timeline: --desk; animation-range: contain 60% contain 80%; }

    /* 2. Chat: phone lands, bubbles pop in one by one (reading order). */
    .scene-chat .beat-a { animation-name: rise-then-leave; animation-timeline: --chat; animation-range: contain 0% contain 62%; }
    .scene-chat .phone  { animation-name: land;    animation-timeline: --chat; animation-range: contain 0% contain 8%; }
    .scene-chat .thread > * { animation-name: pop; animation-timing-function: cubic-bezier(.34,1.56,.64,1); animation-timeline: --chat; }
    .scene-chat .thread > :nth-child(1) { animation-range: contain 8% contain 11.5%; }
    .scene-chat .thread > :nth-child(2) { animation-range: contain 12.5% contain 16%; }
    .scene-chat .thread > :nth-child(3) { animation-range: contain 17% contain 20.5%; }
    .scene-chat .thread > :nth-child(4) { animation-range: contain 21.5% contain 25%; }
    .scene-chat .thread > :nth-child(5) { animation-range: contain 26% contain 29.5%; }
    .scene-chat .thread > :nth-child(6) { animation-range: contain 30.5% contain 34%; }
    .scene-chat .thread > :nth-child(7) { animation-range: contain 35% contain 38.5%; }
    .scene-chat .thread > :nth-child(8) { animation-range: contain 39.5% contain 43%; }
    .scene-chat .thread > :nth-child(9) { animation-range: contain 44% contain 47.5%; }
    .scene-chat .thread > :nth-child(10) { animation-range: contain 48.5% contain 52%; }
    .scene-chat .thread > :nth-child(11) { animation-range: contain 53% contain 56.5%; }
    .scene-chat .thread > :nth-child(12) { animation-range: contain 57.5% contain 61%; }
    .scene-chat .thread > :nth-child(n+13) { animation-range: contain 58% contain 61%; }

    /* 3. Takeover: the pink agent grows from the corner and fills the phone. */
    .scene-chat .takeover {
      display: block; position: absolute; left: 50%; top: 52%; width: 86%;
      animation-name: take-over; animation-timeline: --chat; animation-range: contain 62% contain 88%;
      animation-timing-function: cubic-bezier(.22,1,.36,1);
    }
    .scene-chat .beat-b { animation-name: rise; animation-timeline: --chat; animation-range: contain 80% contain 92%; }

    /* 4. Sleep: the sleeping drawing drops over the desk like a curtain; Zzz draws on. */
    .scene-sleep .art { display: grid; }
    .scene-sleep .art > img { grid-area: 1 / 1; }
    .scene-sleep .base { display: block; }
    .scene-sleep .curtain { animation-name: curtain; animation-timeline: --sleep; animation-range: contain 4% contain 38%; animation-timing-function: cubic-bezier(.65,0,.35,1); }
    .zzz path { animation-name: draw-line; animation-timeline: --sleep; animation-range: contain 38% contain 58%; }
    .scene-sleep .beat-1 { animation-name: rise; animation-timeline: --sleep; animation-range: contain 44% contain 58%; }
    .mini-thread > * { animation-name: pop; animation-timeline: --sleep; animation-timing-function: cubic-bezier(.34,1.56,.64,1); }
    .mini-thread > :nth-child(1) { animation-range: contain 60% contain 64%; }
    .mini-thread > :nth-child(2) { animation-range: contain 64% contain 70%; }
    .mini-thread > :nth-child(3) { animation-range: contain 76% contain 82%; }
    .mini-thread > :nth-child(n+4) { animation-range: contain 84% contain 88%; }

    /* 5. Closer rises as it enters. */
    .closer > * { animation: rise 1ms both; animation-timeline: view(); animation-range: entry 10% entry 70%; }
  }
}

@keyframes wipe-on   { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes curtain   { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes draw-line { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes rise      { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes land      { from { opacity: 0; transform: translateY(40px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes pop       { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes rise-then-leave {
  0%   { opacity: 0; transform: translateY(18px); }
  12%  { opacity: 1; transform: none; }
  88%  { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-12px); }
}
@keyframes take-over {
  from { transform: translate(10%, 10%) scale(.12); opacity: 0; }
  15%  { opacity: 1; }
  to   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------- Real phone details (texting-realism audit, 2026-09-29) ----------
   Only what a real phone shows: time headers, receipts, typing dots, reactions. */
.meta.time { color: #8a8780; font-weight: 500; font-size: 11px; margin: 8px 0 4px; }
.meta.time b { font-weight: 700; }
.meta.receipt { text-align: right; color: #8a8780; font-weight: 500; font-size: 11px; margin: -2px 2px 2px; }
.meta.receipt b { font-weight: 700; }
.msg { position: relative; }
.msg.him + .msg.him, .msg.her + .msg.her { margin-top: -3px; }
.msg .react {
  position: absolute; top: -12px;
  min-width: 26px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; line-height: 1;
  background: var(--grey-bubble); color: #555;
  border: 2px solid #fff; border-radius: 999px;
}
.msg.her .react { right: -10px; }
.msg.him .react { left: -10px; background: var(--grey-bubble); color: #e0245e; }
.msg.typing { display: flex; gap: 4px; align-items: center; padding: 10px 12px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9c9a95; display: block; }
.plan-chip {
  display: inline-block; vertical-align: 3px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: 6px; padding: 0 6px; margin-right: 6px;
}
.plan-chip.agent-chip { background: var(--lilac); }

/* Scroll story on short phones (e.g. 667 px tall): keep the whole chat on screen. */
@media (prefers-reduced-motion: no-preference) and (max-height: 760px) {
  @supports (animation-timeline: view()) {
    .scene-chat .msg { font-size: 14px; padding: 6px 12px; }
    .scene-chat .thread { gap: 4px; }
    .scene-chat .phone { padding: 10px 12px 12px; }
    .scene .beat { font-size: 24px; }
  }
}
