/* Journaly site. White only, like the app at its best. Ink, P&L green and red are the app's own tokens
   (apps/mobile/src/theme/tokens.ts); violet comes from the icon and marks where Journaly does the work. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --page: #f6f6f3;
  --paper: #ffffff;
  --wash: #f4f4f5;
  --ink: #18181b;
  --muted: #6b6b70;
  --line: rgba(24, 24, 27, 0.09);
  --violet: #5b4cf5;
  --marker: #e6e1ff;
  --profit: #1f9d45;
  --loss: #d92d20;
  --bezel: #18181b;
  --shadow: rgba(24, 24, 27, 0.16);
  --lavender: linear-gradient(160deg, #f4f1ff 0%, #e9e4ff 55%, #f6ecff 100%);
  --mint: linear-gradient(160deg, #f0faf4 0%, #e0f4e8 100%);
  --sky: linear-gradient(160deg, #f1f6ff 0%, #e1ecfd 100%);
  --peach: linear-gradient(160deg, #fff6ef 0%, #fde8da 100%);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { display: block; max-width: 100%; height: auto; }
svg { flex: none; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }
h1, h2 { font-weight: 650; letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.2; }
p { text-wrap: pretty; }

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

.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

/* Header (inside the hero sheet on the home page; legal pages use header.top) */
.site-header,
header.top {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand img { width: 34px; height: 34px; border-radius: 9px; }

.site-header nav { display: none; gap: 28px; }

.site-header nav a,
header.top nav a,
.site-footer nav a { color: var(--muted); font-size: 0.94rem; font-weight: 550; text-decoration: none; }

header.top nav,
.site-footer nav { display: flex; align-items: center; gap: 24px; }

/* Buttons: ink pills, like the app's own primary buttons. */
.button,
.pill {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: var(--ink);
  color: #fff;
  font: 600 1rem var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), opacity 160ms ease;
}

.button:active,
.pill:active { transform: scale(0.97); }

.button-small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

/* Hero: one white sheet holding the promise and the live demo. */
.hero {
  margin: 8px;
  overflow: hidden;
  border-radius: 28px;
  padding: 0 16px 16px;
  background:
    radial-gradient(120% 60% at 50% 100%, #ebe6ff 0%, rgba(235, 230, 255, 0) 70%),
    var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

.hero-copy {
  display: grid;
  justify-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 0 36px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 1.2rem + 5.4vw, 5rem);
  line-height: 1.02;
}

/* The way you log, cycling: voice first, then screenshot and text. */
.cycle {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  vertical-align: bottom;
}

.cycle-icon {
  display: inline-grid;
  place-items: center;
  width: 0.92em;
  height: 0.92em;
  border-radius: 0.24em;
  background: var(--ink);
  color: #fff;
  transform: translateY(-0.04em);
}

.cycle-icon svg { width: 0.56em; height: 0.56em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cycle-word { display: inline-block; transition: opacity 260ms ease, transform 260ms var(--ease-out); }
.cycle-word::before { content: attr(data-word); }
.cycle-word::after { content: "."; }
/* Phones: the cycling word gets its own line so the headline never reflows as it changes. */
@media (max-width: 759px) { .cycle { display: flex; justify-content: center; white-space: nowrap; } }
@media (max-width: 359px) { .hero h1 { font-size: 2rem; } }
.cycle.is-swapping .cycle-word,
.cycle.is-swapping .cycle-icon { opacity: 0; transform: translateY(0.25em); }
.cycle-icon { transition: opacity 260ms ease, transform 260ms var(--ease-out); }

.lede {
  max-width: 36rem;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem);
  line-height: 1.55;
}

.marker {
  border-radius: 6px;
  padding: 0 4px;
  background: var(--marker);
  color: var(--ink);
  text-decoration: none;
}

.marker::after { content: " ↓"; color: var(--violet); }

.hero-form { width: min(100%, 30rem); margin-top: 28px; }
.hero-form .waitlist-status { text-align: center; }

/* Hero recording: right under the headline on phones (whole phone above the fold), right column on desktop. */
.hero-film { display: grid; justify-items: center; gap: 14px; margin-top: 22px; }
.hero-phone { width: min(24vh, 210px); width: min(24svh, 210px); }
.hero-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.hero-steps button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.hero-steps button[aria-current="true"] { background: var(--ink); box-shadow: none; color: #fff; }

@media (min-width: 960px) {
  .hero-copy {
    max-width: 1120px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr auto auto auto auto 1fr;
    grid-template-areas: ". film" "title film" "lede film" "cta film" "form film" ". film";
    column-gap: clamp(48px, 6vw, 96px);
    justify-items: start;
    text-align: left;
  }
  .hero h1 { grid-area: title; font-size: clamp(3.2rem, 1rem + 3.4vw, 4.4rem); }
  .hero-copy .lede { grid-area: lede; }
  .hero-form { grid-area: form; }
  .hero-actions { grid-area: cta; }
  .hero-form .waitlist-status { text-align: left; }
  .hero-film { grid-area: film; margin: 0; }
  .hero-phone { width: min(290px, 30vh); }
}

/* The stage: tabs for each way in, voice first. */
.stage {
  max-width: 1080px;
  margin: 0 auto;
  border-radius: 24px;
  padding: 16px 12px 24px;
  background: var(--lavender);
  box-shadow: inset 0 0 0 1px rgba(91, 76, 245, 0.08);
  scroll-margin-top: 16px;
}

.tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  overflow-x: auto;
  border-radius: 999px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px var(--line);
  scrollbar-width: none;
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: none;
  color: var(--muted);
  font: 600 0.9rem var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

@media (max-width: 419px) { .tabs svg { display: none; } .tabs button { padding: 0 9px; font-size: 0.86rem; } }
.tabs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(24, 24, 27, 0.12); }

.panel {
  display: grid;
  justify-items: center;
  gap: 24px;
}

.panel[hidden] { display: none; }
.panel > .phone { order: -1; width: min(74%, 300px); }

.convo { display: grid; gap: 10px; width: min(100%, 420px); }

.from-you,
.from-app {
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.06), 0 8px 24px -12px rgba(24, 24, 27, 0.16);
}

.who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.who img { width: 20px; height: 20px; border-radius: 5px; }
.said { margin: 0; font-size: 0.98rem; line-height: 1.45; }

.voice-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  border-radius: 999px;
  padding: 2px 9px 2px 6px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}

.voice-chip svg { width: 12px; height: 12px; fill: currentColor; }

.said-thumb {
  float: left;
  width: 38px;
  height: 52px;
  margin: 2px 12px 0 0;
  border-radius: 6px;
  object-fit: cover;
  object-position: top;
  box-shadow: 0 0 0 1px var(--line);
}

.said-thumb-wide { object-position: 50% 12%; }
.said::after { display: block; clear: both; content: ""; }

/* Journaly's side: each step ticks as the demo reaches it. */
.ticks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.94rem; }

.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
  transition: color 240ms ease;
}

.ticks li::before {
  position: absolute;
  top: 2px;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(24, 24, 27, 0.2);
  content: "";
  transition: background-color 240ms ease, box-shadow 240ms ease;
}

.ticks li::after {
  position: absolute;
  top: 7px;
  left: 6px;
  width: 6px;
  height: 3.5px;
  border: solid #fff;
  border-width: 0 0 1.8px 1.8px;
  content: "";
  opacity: 0;
  transform: rotate(-45deg);
  transition: opacity 240ms ease;
}

.ticks li.done,
.ticks.is-done li { color: var(--ink); }
.ticks li.done::before,
.ticks.is-done li::before { background: var(--profit); box-shadow: none; }
.ticks li.done::after,
.ticks.is-done li::after { opacity: 1; }

.convo .fine { margin: 4px 4px 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }

/* Phone frame around real recordings, screenshots and the voice recreation. */
.phone {
  position: relative;
  margin: 0;
  padding: 3%;
  border-radius: 15.5% / 7.2%;
  background: var(--bezel);
  box-shadow: 0 40px 70px -40px rgba(40, 24, 120, 0.45), 0 0 0 1px var(--line);
}

.phone > video,
.phone > img,
.phone > .app {
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: 12.8% / 5.9%;
  object-fit: cover;
}

.phone > video,
.phone > img { background: #fff; }

/* Small pause control, so moving demos can be stopped (WCAG 2.2.2). */
.demo-toggle {
  position: absolute;
  right: 7%;
  bottom: 4.5%;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 24, 27, 0.55);
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease;
}

.phone:hover .demo-toggle,
.demo-toggle:focus-visible,
.demo-toggle[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .demo-toggle { opacity: 0.7; } }

.demo-toggle::before,
.demo-toggle::after {
  position: absolute;
  top: 12px;
  width: 4px;
  height: 12px;
  border-radius: 1px;
  background: #fff;
  content: "";
}

.demo-toggle::before { left: 12px; }
.demo-toggle::after { right: 12px; }

.demo-toggle[aria-pressed="true"]::before {
  left: 14px;
  width: 0;
  height: 0;
  border-radius: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  background: none;
}

.demo-toggle[aria-pressed="true"]::after { display: none; }

/* Section heads */
.works h2,
.know h2,
.pricing h2,
.faq h2 {
  font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.5rem);
  line-height: 1.04;
  text-align: center;
}

.sub {
  max-width: 34rem;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1.06rem;
  text-align: center;
}

/* Works with */
.works { padding-block: 80px 24px; }

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 44rem;
  margin: 28px auto 0;
  padding: 0;
  list-style: none;
}

.pills li {
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 0.94rem;
  font-weight: 600;
}

.pills li:nth-child(-n+3) { background: var(--ink); color: #fff; box-shadow: none; }

/* Outcome cards on soft tints */
.know { padding-block: 80px; }

.cards {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

.card {
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.card > p { max-width: 28rem; margin: 8px 0 0; color: var(--muted); }
.tint-lavender { background: var(--lavender); }
.tint-mint { background: var(--mint); }
.tint-sky { background: var(--sky); }
.tint-peach { background: var(--peach); }

.card-ask { display: grid; gap: 28px; padding-bottom: 0; }
.card-copy > p { max-width: 26rem; margin: 10px 0 0; color: var(--muted); font-size: 1.04rem; }

.asks { display: grid; justify-items: start; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }

.asks li {
  border-radius: 20px 20px 6px 20px;
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 550;
}

.phone-top {
  width: min(86%, 340px);
  justify-self: center;
  align-self: end;
  padding-bottom: 0;
  border-radius: 15.5% 15.5% 0 0 / 11% 11% 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent);
  mask-image: linear-gradient(to bottom, #000 74%, transparent);
}

.phone-top > video {
  aspect-ratio: 640 / 820;
  border-radius: 12.8% 12.8% 0 0 / 9.2% 9.2% 0 0;
}

.shot {
  margin: 0 0 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3.3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.06), 0 12px 28px -16px rgba(24, 24, 27, 0.25);
}

.shot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; }
.shot-bottom img { object-position: 50% 100%; }
.shot-badges img { object-position: 50% 30%; }

/* Pricing */
.pricing { padding-block: 48px 24px; }
.plans { display: grid; gap: 16px; max-width: 900px; margin: 36px auto 0; }

.plan {
  border-radius: 28px;
  padding: 28px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

.plan-pro { background: var(--ink); color: #fff; box-shadow: none; }
.plan h3 { font-size: 1.6rem; }
.plan ul { margin: 16px 0 0; padding: 0; list-style: none; }

.plan li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-top: 1px solid var(--line);
}

.plan-pro li { border-color: rgba(255, 255, 255, 0.14); }

/* Bullets are small candle bodies: green on Free, violet on Pro. */
.plan li::before {
  position: absolute;
  left: 4px;
  top: 16px;
  width: 7px;
  height: 14px;
  border-radius: 2px;
  background: var(--profit);
  content: "";
}

.plan-pro li::before { background: #a99fff; }

/* FAQ as a chat with Journaly */
.faq { padding-block: 80px; }

.chat {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 36px auto 0;
  border-radius: 28px;
  padding: 20px 16px 24px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -40px var(--shadow);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}

.chat-head img { width: 24px; height: 24px; border-radius: 6px; }
.qa { display: grid; gap: 8px; }

.q {
  justify-self: end;
  max-width: 85%;
  border-radius: 20px 20px 6px 20px;
  padding: 9px 15px;
  background: var(--ink);
  color: #fff;
  font: 550 0.96rem/1.4 var(--sans);
  letter-spacing: 0;
}

.a {
  justify-self: start;
  max-width: 88%;
  margin: 0;
  border-radius: 20px 20px 20px 6px;
  padding: 10px 15px;
  background: var(--wash);
  font-size: 0.96rem;
  line-height: 1.5;
}

/* Closing waitlist */
.closing {
  display: grid;
  justify-items: center;
  margin-bottom: 56px;
  border-radius: 28px;
  padding: 48px 20px;
  background:
    radial-gradient(120% 70% at 50% 0%, #ebe6ff 0%, rgba(235, 230, 255, 0) 70%),
    var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  text-align: center;
}

.closing > img { width: 84px; height: 84px; border-radius: 22px; }
.closing h2 { margin-top: 22px; font-size: clamp(2.1rem, 1.5rem + 3vw, 3.5rem); line-height: 1.02; }
.closing > p { max-width: 30rem; margin: 14px 0 0; color: var(--muted); }
.closing .waitlist-form { width: min(100%, 30rem); margin-top: 28px; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.store-badges > span { flex-basis: 100%; }

/* Google's PNG carries its own transparent margin; Apple's SVG does not. */
.store-badges img[src$=".png"] { width: auto; height: 60px; margin: -6px; }
.store-badges img[src$=".svg"] { width: auto; height: 40px; }

/* Waitlist form (hero and closing) */
.waitlist-form { display: grid; gap: 10px; max-width: 30rem; text-align: left; }
.waitlist-form label { font-size: 0.92rem; font-weight: 700; }
.waitlist-row { display: flex; flex-direction: column; gap: 8px; }

.waitlist-form input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  background: var(--paper);
  color: var(--ink);
  font: 16px var(--sans);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
}

.waitlist-form input::placeholder { color: #9a9aa0; }
.waitlist-form input:focus-visible { outline-offset: 1px; }
.waitlist-form .button:disabled { opacity: 0.6; cursor: default; }
.waitlist-form.is-done label, .waitlist-form.is-done .waitlist-row { display: none; }
.waitlist-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist-status { min-height: 1.4em; margin: 0; color: var(--muted); font-size: 0.88rem; }
.waitlist-form.is-done .waitlist-status { color: var(--profit); font-weight: 600; }

/* Footer */
.site-footer,
footer {
  padding-block: 28px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer { display: grid; gap: 18px 32px; align-items: center; }
.site-footer nav { flex-wrap: wrap; gap: 10px 18px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-family: var(--display); font-weight: 700; }
.footer-brand img { width: 32px; height: 32px; border-radius: 9px; }
.site-footer > p { margin: 0; }

/* ---- Voice recreation: the app's chat at its real point sizes, scaled to the frame. ---- */
.app {
  --pt: calc(100cqi / 390);
  --a-bg: #ffffff;
  --a-surface: #f4f4f5;
  --a-glass: #ffffff;
  --a-text: #0a0a0b;
  --a-muted: #6b6b70;
  --a-border: rgba(0, 0, 0, 0.08);
  --a-profit: #1f9d45;
  --a-loss: #d92d20;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
  background: var(--a-bg);
  color: var(--a-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Roboto, sans-serif;
  line-height: 1.4;
}

/* cqi resolves against an ancestor container, so sizes are set on .app's children, never on .app. */
.app > * { font-size: calc(var(--pt) * 16); }
.app svg { width: calc(var(--pt) * 22); height: calc(var(--pt) * 22); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--pt) * 56) calc(var(--pt) * 12) calc(var(--pt) * 8);
}

.app-round,
.app-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(var(--pt) * 44);
  border-radius: 999px;
  background: var(--a-glass);
  box-shadow: 0 calc(var(--pt) * 4) calc(var(--pt) * 14) rgba(0, 0, 0, 0.08);
}

.app-round { width: calc(var(--pt) * 44); }
.app-account { gap: calc(var(--pt) * 7); padding: 0 calc(var(--pt) * 14); font-size: calc(var(--pt) * 17); font-weight: 600; }
.app-account svg { width: calc(var(--pt) * 16); height: calc(var(--pt) * 16); color: var(--a-muted); }
.app-logo { width: calc(var(--pt) * 22); height: calc(var(--pt) * 22); border-radius: 50%; background: var(--a-text); box-shadow: inset 0 0 0 calc(var(--pt) * 5) var(--a-text), inset 0 0 0 calc(var(--pt) * 7) var(--a-bg); }

.app-chat {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: calc(var(--pt) * 14);
  padding: calc(var(--pt) * 10) calc(var(--pt) * 16);
}

.app-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--pt) * 9);
  padding-bottom: calc(var(--pt) * 40);
  transition: opacity 200ms ease;
}

.app-empty p { margin: 0 0 calc(var(--pt) * 6); font-size: calc(var(--pt) * 20); font-weight: 600; }
.app-empty span { border-radius: 999px; padding: calc(var(--pt) * 8) calc(var(--pt) * 14); background: var(--a-surface); font-size: calc(var(--pt) * 13); font-weight: 500; }

/* Each part of the conversation shows from its step on. */
.v-turn, .v-working, .v-card, .v-reply, .v-saved, .c-rec { display: none; }

.app:not([data-step="idle"], [data-step="tap-mic"], [data-step="rec"], [data-step="send"]) .app-empty { opacity: 0; }
.app:is([data-step="sent"], [data-step="words"], [data-step="heard"], [data-step="card"], [data-step="confirm"], [data-step="saved"]) .v-turn { display: flex; }
.app:is([data-step="sent"], [data-step="words"], [data-step="heard"]) .v-working { display: flex; }
.app:is([data-step="card"], [data-step="confirm"], [data-step="saved"]) .v-card { display: flex; }
.app[data-step="saved"] :is(.v-reply, .v-saved) { display: flex; }
.app[data-step="saved"] .v-actions { display: none; }
.app:is([data-step="rec"], [data-step="send"]) .c-rec { display: flex; }
.app:is([data-step="rec"], [data-step="send"]) .c-idle { display: none; }

.v-turn, .v-working, .v-card, .v-reply { animation: rise 320ms var(--ease-out) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(calc(var(--pt) * 10)); }
}

.v-turn { flex-direction: column; align-items: flex-end; gap: calc(var(--pt) * 4); }

.v-note {
  display: flex;
  align-items: center;
  gap: calc(var(--pt) * 12);
  width: calc(var(--pt) * 220);
  border-radius: calc(var(--pt) * 20);
  padding: calc(var(--pt) * 8) calc(var(--pt) * 12);
  background: var(--a-surface);
}

.v-play { display: grid; place-items: center; width: calc(var(--pt) * 32); height: calc(var(--pt) * 32); border-radius: 50%; background: var(--a-text); color: var(--a-bg); }
.v-play svg { width: calc(var(--pt) * 16); height: calc(var(--pt) * 16); fill: currentColor; stroke: none; }
.v-track { flex: 1; height: calc(var(--pt) * 3); border-radius: 2px; background: var(--a-border); }
.v-len, .v-timer { min-width: calc(var(--pt) * 34); color: var(--a-muted); font-size: calc(var(--pt) * 13); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.v-timer { color: var(--a-text); }

.v-words {
  max-width: 85%;
  margin: 0;
  padding: 0 calc(var(--pt) * 4);
  color: var(--a-muted);
  font-size: calc(var(--pt) * 13);
  font-weight: 500;
  text-align: right;
}

.app[data-step="sent"] .v-words { animation: pulse 700ms ease-in-out infinite alternate; }

@keyframes pulse {
  from { opacity: 0.4; }
}

.v-working { align-items: center; gap: calc(var(--pt) * 10); font-size: calc(var(--pt) * 13); font-weight: 500; }
.v-working img { width: calc(var(--pt) * 24); height: calc(var(--pt) * 24); border-radius: calc(var(--pt) * 6); }
.v-working div { display: grid; }
.v-working b { font-weight: 500; }
.v-working span { color: var(--a-muted); }

.v-card {
  flex-direction: column;
  gap: calc(var(--pt) * 12);
  border-radius: calc(var(--pt) * 20);
  padding: calc(var(--pt) * 16);
  background: var(--a-glass);
  box-shadow: 0 calc(var(--pt) * 6) calc(var(--pt) * 24) rgba(0, 0, 0, 0.08), 0 0 0 1px var(--a-border);
}

.v-title { margin: 0; font-size: calc(var(--pt) * 17); font-weight: 600; }
.v-card dl { display: grid; gap: calc(var(--pt) * 11); margin: 0; font-size: calc(var(--pt) * 13); font-weight: 500; }
.v-card dl div { display: flex; justify-content: space-between; gap: calc(var(--pt) * 12); }
.v-card dt { color: var(--a-muted); }
.v-card dd { margin: 0; text-align: right; }
.v-actions { display: flex; gap: calc(var(--pt) * 8); }

.v-actions span {
  flex: 1;
  display: grid;
  place-items: center;
  height: calc(var(--pt) * 48);
  border-radius: 999px;
  background: var(--a-surface);
  font-size: calc(var(--pt) * 16);
  font-weight: 600;
  transition: transform 160ms var(--ease-out);
}

.v-actions .v-confirm { background: var(--a-text); color: var(--a-bg); }
.app[data-step="confirm"] .v-confirm { transform: scale(0.95); opacity: 0.8; }

.v-saved { align-items: center; gap: calc(var(--pt) * 6); margin: 0; color: var(--a-muted); font-size: calc(var(--pt) * 13); font-weight: 500; }
.v-saved svg { width: calc(var(--pt) * 18); height: calc(var(--pt) * 18); }
.v-saved circle { fill: var(--a-profit); stroke: none; }
.v-saved path { stroke: #fff; stroke-width: 2.4; }
.v-reply { margin: 0; }

.app-composer {
  margin: 0 calc(var(--pt) * 10) calc(var(--pt) * 30);
  border-radius: calc(var(--pt) * 28);
  padding: calc(var(--pt) * 12) calc(var(--pt) * 8) calc(var(--pt) * 4);
  background: var(--a-glass);
  box-shadow: 0 calc(var(--pt) * 8) calc(var(--pt) * 30) rgba(0, 0, 0, 0.1), 0 0 0 1px var(--a-border);
}

.c-idle { display: grid; gap: calc(var(--pt) * 4); }
.c-placeholder { padding: 0 calc(var(--pt) * 8); color: var(--a-muted); }
.c-bar { display: flex; justify-content: space-between; align-items: center; height: calc(var(--pt) * 44); padding: 0 calc(var(--pt) * 11); }
.c-mic { transition: transform 160ms var(--ease-out); }
.app[data-step="tap-mic"] .c-mic { transform: scale(0.8); }

.c-rec { align-items: center; gap: calc(var(--pt) * 8); min-height: calc(var(--pt) * 52); margin-top: calc(var(--pt) * -8); padding-left: calc(var(--pt) * 11); }
.c-dot { flex: none; width: calc(var(--pt) * 8); height: calc(var(--pt) * 8); border-radius: 50%; background: var(--a-loss); }

.v-wave {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--pt) * 3);
  height: calc(var(--pt) * 26);
  overflow: hidden;
}

.v-wave i { flex: none; width: calc(var(--pt) * 3); height: calc(var(--pt) * 3); border-radius: 2px; background: var(--a-muted); }
.v-wave i.on { background: var(--a-text); }

.c-send { flex: none; display: grid; place-items: center; width: calc(var(--pt) * 36); height: calc(var(--pt) * 36); margin: calc(var(--pt) * 4); border-radius: 50%; background: var(--a-text); color: var(--a-bg); transition: transform 160ms var(--ease-out); }
.c-send svg { width: calc(var(--pt) * 20); height: calc(var(--pt) * 20); stroke-width: 2.2; }
.app[data-step="send"] .c-send { transform: scale(0.85); }

/* ---- Legal, support and 404 pages ---- */
.wrap { width: min(780px, calc(100% - 40px)); margin-inline: auto; }

.icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  overflow: hidden;
  border-radius: 11px;
}

.icon img { width: 100%; height: 100%; }
header.top { border-bottom: 1px solid var(--line); }
.wrap article { padding: 56px 0 80px; }
.wrap article > h1, .wrap > .hero h1 { font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1.02; }

.wrap article h2 {
  margin: 44px 0 10px;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.wrap article .updated { margin: 14px 0 32px; color: var(--muted); }
.wrap article li { margin: 7px 0; }
.wrap article table { display: block; width: 100%; margin: 20px 0; overflow-x: auto; border-collapse: collapse; font-size: 0.94rem; }
.wrap article th, .wrap article td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wrap article th { color: var(--muted); font-size: 0.84rem; }

.steps { padding: 0; list-style: none; counter-reset: s; }

.steps li {
  position: relative;
  margin: 10px 0;
  padding: 14px 16px 14px 56px;
  border-bottom: 1px solid var(--line);
  counter-increment: s;
}

.steps li::before {
  position: absolute;
  top: 12px;
  left: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  content: counter(s);
  font-weight: 700;
}

.note { border-left: 4px solid var(--violet); padding: 14px 18px; background: var(--wash); border-radius: 0 12px 12px 0; }
.wrap > .hero { display: block; padding: 86px 0 110px; }
.wrap > .hero p { max-width: 34rem; margin: 16px 0 28px; color: var(--muted); }
.eyebrow { color: var(--muted); font-weight: 700; }


/* ---- Larger screens ---- */
@media (hover: hover) and (pointer: fine) {
  .site-header nav a:hover,
  header.top nav a:hover,
  .site-footer nav a:hover { color: var(--ink); }

  .button:hover, .pill:hover { opacity: 0.86; }
  .tabs button:not([aria-selected="true"]):hover { color: var(--ink); }
}

@media (min-width: 560px) {
  .waitlist-row { flex-direction: row; }
}

@media (min-width: 760px) {
  body { font-size: 17px; }
  .shell { width: min(1120px, calc(100% - 64px)); }
  .hero { margin: 12px; border-radius: 36px; padding: 0 32px 32px; }
  .site-header { min-height: 80px; }
  .site-header nav { display: flex; }
  .hero-copy { padding: 56px 0 48px; }
  .stage { border-radius: 28px; padding: 24px 32px 40px; }

  .panel {
    grid-template-columns: minmax(0, 400px) minmax(260px, 310px);
    justify-content: center;
    align-items: center;
    gap: clamp(40px, 7vw, 88px);
  }

  .panel > .phone { order: 0; width: 100%; }
  .works { padding-block: 112px 32px; }
  .know { padding-block: 104px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
  .card { padding: 28px; }
  .card-ask { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: center; gap: 48px; padding: 40px 48px 0; }
  .card-copy { padding-bottom: 40px; }
  .phone-top { width: 100%; }
  .plans { grid-template-columns: 1fr 1fr; gap: 20px; }
  .plan { padding: 36px; }
  .pricing { padding-top: 64px; }
  .faq { padding-block: 104px; }
  .chat { padding: 24px 32px 32px; }
  .closing { padding: 72px 32px; border-radius: 36px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer > p { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .demo-toggle { display: none; }
}

/* ---- Guide pages (topic pages under /<slug>/) ---- */
.crumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; color: var(--muted); font-size: 0.88rem; font-weight: 550; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #b4b4b8; }
.crumbs a { color: inherit; text-decoration: none; }
.guide-page .hero h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); line-height: 1.05; }
.guide-page .lede { max-width: 42rem; }

.guide-body { max-width: 760px; padding-block: 72px 0; }
.guide-body > section + section { margin-top: 56px; }
.guide-body h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); line-height: 1.1; }
.guide-body p, .guide-body li { font-size: 1.04rem; line-height: 1.6; }
.guide-body > section > p { margin: 14px 0 0; color: var(--muted); }
.guide-body ul:not(.steps) { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.guide-body ul:not(.steps) li + li { margin-top: 6px; }
.guide-body strong { color: var(--ink); }

/* Links between guides (homepage and each guide) */
.guides { padding-block: 24px 64px; }
.guides h2 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.5rem); line-height: 1.04; text-align: center; }
.guide-links { display: grid; gap: 12px; max-width: 1080px; margin: 32px auto 0; padding: 0; list-style: none; }
.guide-links a { display: flex; flex-direction: column; gap: 6px; height: 100%; border-radius: 22px; padding: 20px 22px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.guide-links strong { font: 650 1.12rem/1.25 var(--display); }
.guide-links span { color: var(--muted); font-size: 0.94rem; line-height: 1.45; }
.guide-links a::after { content: "Read the guide →"; margin-top: auto; padding-top: 4px; color: var(--violet); font-size: 0.9rem; font-weight: 650; }

/* Challenge calculator */
.calc { display: grid; gap: 16px; width: min(100%, 900px); margin: 0 auto; }
.calc-fields { display: grid; gap: 16px; margin: 0; border: 0; border-radius: 24px; padding: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.calc-fields legend { float: left; width: 100%; margin-bottom: 4px; font: 650 1.15rem var(--display); }
.calc-field { display: grid; gap: 6px; }
.calc-field label { font-size: 0.95rem; font-weight: 650; }
.calc-field small { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.calc-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--wash); }
.calc-input:focus-within { outline: 2px solid var(--violet); outline-offset: 1px; }
.calc-input span { padding-left: 14px; color: var(--muted); font-weight: 600; }
.calc-input input { flex: 1; min-width: 0; min-height: 48px; border: 0; padding: 0 14px 0 6px; background: transparent; color: var(--ink); font: 16px var(--sans); font-variant-numeric: tabular-nums; }
.calc-input input:focus { outline: none; }
.calc-result { display: grid; gap: 14px; align-content: start; border-radius: 24px; padding: 24px; background: var(--ink); color: #fff; }
.calc-result h2 { font-size: 1.15rem; }
.calc-net { font: 650 clamp(2.2rem, 1.6rem + 2vw, 3rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.calc[data-state="up"] .calc-net { color: #7ee2a0; }
.calc[data-state="down"] .calc-net { color: #ff9b93; }
.calc-result dl { display: grid; gap: 10px; margin: 0; }
.calc-result dl div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); padding-bottom: 10px; }
.calc-result dt { color: #c9c9cf; }
.calc-result dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.calc-verdict { margin: 0; color: #e4e4e7; line-height: 1.5; }
.calc-note { margin: 0; color: #a1a1aa; font-size: 0.82rem; }
.sim-fields { display: grid; gap: 16px; align-content: start; }
.sim-fields legend { grid-column: 1 / -1; }
.sim-fields .calc-field { align-content: start; min-width: 0; }
.sim-fields .calc-input input { width: 100%; }
.sim .calc-result dd { white-space: nowrap; }
.calc-input input:first-child { padding-left: 14px; }
.calc-input input + span { padding: 0 14px 0 0; }
.sim-figure { display: grid; gap: 10px; margin: 0; }
.sim-chart { width: 100%; height: auto; overflow: visible; }
.sim-chart line { stroke: #52525b; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.sim-chart .zero { stroke: #3f3f46; }
.sim-chart text { fill: #c9c9cf; font: 10px var(--sans); paint-order: stroke; stroke: var(--ink); stroke-width: 3px; stroke-linejoin: round; }
.sim-chart polyline { fill: none; stroke-width: 1.5; stroke-linejoin: round; opacity: 0.8; vector-effect: non-scaling-stroke; }
.sim-chart .pass, .sim-legend .pass { stroke: #199e70; background: #199e70; }
.sim-chart .fail, .sim-legend .fail { stroke: #d95926; background: #d95926; }
.sim-chart .time, .sim-legend .time { stroke: #3987e5; background: #3987e5; }
.sim-figure figcaption { color: #a1a1aa; font-size: 0.82rem; line-height: 1.4; }
.sim-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; color: #e4e4e7; font-size: 0.85rem; }
.sim-legend li { display: flex; align-items: center; gap: 6px; }
.sim-legend i { width: 14px; height: 3px; border-radius: 2px; }
@media (min-width: 480px) { .sim-fields .calc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Trading journal template: download card with a preview that scrolls sideways on phones */
.template { display: grid; gap: 14px; width: min(100%, 900px); margin: 0 auto; border-radius: 24px; padding: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.template h2 { font-size: 1.15rem; }
.template p { margin: 0; color: var(--muted); line-height: 1.5; }
.template-table { overflow-x: auto; }
.template table { border-collapse: collapse; font-size: 0.86rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.template th, .template td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.template th { font-weight: 650; }
.template p.template-note { font-size: 0.82rem; }

.plan-price { margin: 6px 0 0; font: 650 1.05rem var(--display); }
.plan-pro .plan-price { color: #d6d1ff; }
.plans + .sub { font-size: 0.9rem; }

@media (hover: hover) and (pointer: fine) {
  .guide-links a:hover { box-shadow: 0 0 0 1px rgba(91, 76, 245, 0.35), 0 20px 40px -30px var(--shadow); }
}

@media (min-width: 760px) {
  .guide-links { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .calc { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .calc-fields { padding: 28px; }
  .calc-result { padding: 32px; position: sticky; top: 16px; }
}

/* Blog posts */
.guide-body h3 { margin: 28px 0 0; font-size: 1.25rem; line-height: 1.25; }
.guide-body ol:not(.steps) { margin: 14px 0 0; padding-left: 22px; color: var(--muted); }
.guide-body ol:not(.steps) li + li { margin-top: 6px; }
.guide-body .table { margin-top: 18px; overflow-x: auto; }
.guide-body table { width: 100%; border-collapse: collapse; font-size: 0.94rem; font-variant-numeric: tabular-nums; }
.guide-body caption { caption-side: bottom; padding-top: 8px; color: var(--muted); font-size: 0.85rem; text-align: left; }
.guide-body th, .guide-body td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.guide-body th { font-weight: 650; color: var(--ink); }
.guide-body td { color: var(--muted); }
.post-meta { margin-top: 14px; color: var(--muted); font-size: 0.9rem; }
.hero-copy .post-meta { grid-area: cta; } /* keep it under the lede in the desktop hero grid */
.guide-body .formula { margin: 18px 0 0; border-radius: 16px; padding: 14px 18px; background: var(--wash); color: var(--ink); font-weight: 600; }
.guide-links a.post-link::after { content: "Read the post →"; }

/* Android beta: hero button above the iPhone waitlist, and the three-step section. */
.hero-actions { margin: 22px 0 0; }
.hero-actions + .hero-form { margin-top: 14px; }
.button-quiet { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.android-badge { width: auto !important; height: 48px !important; border-radius: 0 !important; }
.beta-steps { width: min(100%, 30rem); margin: 24px 0 0; padding-left: 1.4em; text-align: left; display: grid; gap: 12px; }
.beta-steps a { font-weight: 600; }
.beta-steps span { color: var(--muted); }
.beta-note { font-size: 0.95rem; }
