/* ------------------------------------------------------------------
   AideMemo — the whole design system, with no build step.

   It borrows the app's own materials: the warm paper page (#FAF8F2), 28px
   cards with the app's resting shadow, the yellow of the logo, Geist for
   type (the logo's wordmark is Geist SemiBold). Motion lives in app.js;
   everything here renders complete, and readable, without it.

   The CSP allows styles from this file only. No element carries a style
   attribute, and scripts change styles through the CSSOM, which the CSP
   permits. Keep it that way: an inline style works locally and silently
   breaks in production.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------- Tokens --
   Contrast is measured, not eyeballed. Yellow on paper is 1.5:1, so the
   brand yellow never carries text on a light surface: it is the mark, a
   fill under ink labels (11:1) and a highlight. Accent text on paper is
   --accent-text (5.2:1). --text-3 is 3.4:1 and only ever decorates. */
:root {
  color-scheme: light dark;

  --paper: #faf8f2;
  --paper-2: #f3f0e6;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --text-2: #5f5b53;
  --text-3: #8c877c;
  --line: rgb(26 26 26 / 0.08);
  --line-2: rgb(26 26 26 / 0.14);

  --yellow: #fcc81c;
  --yellow-ui: #eebf1c;
  --on-yellow: #1a1a1a;
  --accent-text: #8a6100;
  --zima: #1b9aee;

  --wash-butter: #fff0bf;
  --wash-sky: #dceaff;
  --wash-lilac: #eae4ff;
  --wash-peach: #ffe3d3;
  --wash-mint: #daf2e6;

  --night: #121110;
  --night-2: #1d1b18;
  --night-text: #f4f1ea;
  --night-dim: #a9a396;

  --shadow-card: 0 7px 12px rgb(26 26 26 / 0.07);
  --shadow-float: 0 24px 48px -18px rgb(26 26 26 / 0.24), 0 2px 8px rgb(26 26 26 / 0.06);
  --glass: rgb(250 248 242 / 0.72);
  --glass-solid: #faf8f2;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-card: 28px;
  --r-panel: 40px;
  --r-sm: 16px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section: clamp(104px, 12vw, 176px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1916;
    --paper-2: #211f1b;
    --surface: #262420;
    --ink: #f4f1ea;
    --text-2: #b4aea2;
    --text-3: #8a8479;
    --line: rgb(255 255 255 / 0.08);
    --line-2: rgb(255 255 255 / 0.15);
    --accent-text: #fcc81c;

    --wash-butter: #3a3116;
    --wash-sky: #17273a;
    --wash-lilac: #25203a;
    --wash-peach: #3a261c;
    --wash-mint: #162d23;

    --night: #0e0d0c;
    --night-2: #1a1916;

    --shadow-card: 0 7px 12px rgb(0 0 0 / 0.3);
    --shadow-float: 0 24px 48px -18px rgb(0 0 0 / 0.65), 0 2px 8px rgb(0 0 0 / 0.3);
    --glass: rgb(26 25 22 / 0.66);
    --glass-solid: #1a1916;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Where a linked section lands, clear of the floating nav. The one place
     this offset is set: Lenis and the contents highlight both read it, and a
     scroll-margin on the target would add to it. */
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: var(--yellow);
  color: var(--on-yellow);
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  text-decoration: none;
}

.skip:focus {
  top: 16px;
}

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

.i {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.section {
  padding-block: var(--section);
}

/* ------------------------------------------------------ Typography --
   Tracking is size-specific (Apple, "The Details of UI Typography"): large
   text tightens, body text sits at zero, small text opens slightly. Leading
   runs the other way. */
.display {
  font-size: clamp(2.75rem, 1.1rem + 5.6vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 520;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.125rem, 1.15rem + 3.3vw, 3.875rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 520;
  text-wrap: balance;
}

.h3 {
  font-size: 1.3125rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 580;
}

.lede {
  font-size: clamp(1.125rem, 0.98rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  letter-spacing: -0.008em;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 40rem;
}

.fine {
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: var(--text-2);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.875rem;
  font-weight: 540;
  letter-spacing: 0.01em;
  line-height: 1;
}

.tag .i {
  width: 16px;
  height: 16px;
  color: var(--accent-text);
}

.section-head {
  display: grid;
  justify-items: center;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto clamp(44px, 6vw, 80px);
  text-align: center;
}

.section-head .lede {
  margin-inline: auto;
}

/* --------------------------------------------------------- Buttons --
   Feedback lives on the press: :active answers the finger immediately;
   app.js swaps it for a spring when motion is allowed. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 540;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out), background-color 200ms, box-shadow 200ms;
}

.btn:active {
  transform: scale(0.97);
}

.btn .i {
  width: 18px;
  height: 18px;
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
}

.btn-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.btn-quiet:hover {
  background: var(--surface);
}

/* Not a link, on purpose: there is no store page to send anyone to yet, and
   Apple's badge may only point at a live one. It says so, plainly. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px 0 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--on-yellow);
  font-weight: 560;
  letter-spacing: -0.005em;
  box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.08), 0 10px 24px -12px rgb(252 200 28 / 0.9);
}

.soon .i {
  width: 20px;
  height: 20px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 540;
  text-decoration: none;
  color: var(--ink);
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
}

.link-arrow .i {
  width: 18px;
  height: 18px;
  transition: translate 200ms var(--ease-out);
}

.link-arrow:hover .i {
  translate: 3px 0;
}

/* ------------------------------------------------------------- Nav --
   A bare capsule over the hero that gains its material once content moves
   under it, the way a large title does on iOS: tint, blur and shadow arrive
   together, so the bar reads as glass arriving rather than a box fading in. */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100% - 2 * var(--gutter), 1080px);
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  translate: -50% 0;
  background: transparent;
  transition:
    background-color 400ms var(--ease-out),
    box-shadow 400ms var(--ease-out),
    -webkit-backdrop-filter 400ms var(--ease-out),
    backdrop-filter 400ms var(--ease-out);
}

.nav.is-lifted {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 32px -16px rgb(26 26 26 / 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 20px;
  height: 26px;
  color: var(--yellow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 200ms;
}

.nav-links a:hover,
.nav-links a[aria-current="true"],
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.nav-menu {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  place-items: center;
  cursor: pointer;
}

.nav-menu .i {
  width: 22px;
  height: 22px;
}

/* The phone menu is a native popover: it opens, closes and traps nothing
   without a line of script. It enters from the capsule it belongs to. */
.menu {
  inset: 72px var(--gutter) auto auto;
  width: min(320px, 100% - 2 * var(--gutter));
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 28px;
  background: var(--glass-solid);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float);
  transform-origin: top right;
  opacity: 0;
  scale: 0.94;
  translate: 0 -8px;
  transition:
    opacity 220ms var(--ease-out),
    scale 320ms var(--ease-out),
    translate 320ms var(--ease-out),
    display 320ms allow-discrete,
    overlay 320ms allow-discrete;
}

.menu:popover-open {
  opacity: 1;
  scale: 1;
  translate: 0 0;
}

@starting-style {
  .menu:popover-open {
    opacity: 0;
    scale: 0.94;
    translate: 0 -8px;
  }
}

.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 1.0625rem;
  font-weight: 520;
  text-decoration: none;
}

.menu a:hover {
  background: var(--paper-2);
}

.menu .i {
  width: 18px;
  height: 18px;
  color: var(--text-3);
}

@media (max-width: 820px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-menu {
    display: grid;
  }
}

/* ------------------------------------------------------------ Hero -- */
.hero {
  position: relative;
  padding: clamp(128px, 15vw, 184px) 0 0;
  text-align: center;
  isolation: isolate;
}

/* Soft washes of light behind the stage, as radial gradients rather than
   blurred shapes: a large blurred layer makes every translucent element over
   it re-filter a freshly blurred source each frame. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 -10% 0;
  z-index: -1;
  background:
    radial-gradient(52% 44% at 50% 4%, var(--wash-butter), transparent 72%),
    radial-gradient(34% 36% at 88% 34%, var(--wash-sky), transparent 72%),
    radial-gradient(34% 36% at 12% 40%, var(--wash-peach), transparent 72%),
    radial-gradient(40% 30% at 50% 78%, var(--wash-lilac), transparent 72%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent 96%);
  mask-image: linear-gradient(#000 60%, transparent 96%);
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 24px;
  max-width: 920px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero-copy .lede {
  max-width: 36rem;
}

/* The four taglines: what AideMemo does not have, said first and plainly. */
.nos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
}

.nos li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
  font-size: 0.9375rem;
  font-weight: 560;
  letter-spacing: -0.005em;
  line-height: 1;
}

.nos .i {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
  margin-top: 6px;
}

.stage {
  position: relative;
  width: min(100% - 2 * var(--gutter), 1120px);
  height: 700px;
  margin: 72px auto 0;
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}

.stage .phone {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% 0;
}

/* Floating cards: each one is a piece of the app lifted out of the phone.
   They sit behind it in the source order and come out from it on load. */
.float {
  position: absolute;
  width: 272px;
  padding: 16px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float);
  text-align: left;
}

.stage .float {
  translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px);
}

.float-voice {
  left: 3%;
  top: 72px;
}

.float-map {
  left: 8%;
  top: 356px;
  width: 256px;
}

.float-chat {
  right: 3%;
  top: 48px;
  width: 288px;
}

.float-journal {
  right: 7%;
  top: 332px;
}

.card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-2);
}

.card-kicker .i {
  width: 15px;
  height: 15px;
}

.card-title {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 580;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.card-body {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 0.75rem;
  font-weight: 540;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

.chip .i {
  width: 13px;
  height: 13px;
  color: var(--accent-text);
}

.chip-lock {
  background: var(--wash-butter);
}

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  margin-top: 12px;
}

.wave span {
  flex: 1;
  height: 30%;
  border-radius: 3px;
  background: var(--line-2);
  transform-origin: center;
}

.wave span.on {
  background: var(--yellow-ui);
}

.wave span:nth-child(3n) { height: 70%; }
.wave span:nth-child(4n) { height: 50%; }
.wave span:nth-child(5n + 1) { height: 90%; }
.wave span:nth-child(7n) { height: 40%; }

.quote {
  margin-top: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.quote .said {
  color: var(--ink);
}

.quote .next {
  color: var(--text-3);
}

.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.bubble-me {
  margin-left: auto;
  border-bottom-right-radius: 6px;
  background: var(--yellow-ui);
  color: var(--on-yellow);
}

.bubble-ai {
  margin-top: 8px;
  border-bottom-left-radius: 6px;
  background: var(--paper-2);
}

.mini-map {
  position: relative;
  height: 148px;
  margin-top: 10px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--paper-2);
}

.mini-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-done {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-plan {
  fill: none;
  stroke: var(--text-3);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
}

.pin {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 2;
}

.pin-plan {
  fill: var(--surface);
  stroke: var(--text-3);
  stroke-width: 2;
}

/* ----------------------------------------------------------- Phone --
   An iPhone drawn in CSS, showing the app's For You home: its paper, its
   28pt cards (scaled), its glass tab bar. Drawn rather than screenshotted,
   so it follows dark mode, stays sharp and never ages into test data. */
.phone {
  width: 304px;
  aspect-ratio: 304 / 640;
  padding: 9px;
  border-radius: 56px;
  background: linear-gradient(160deg, #3a3a3a, #121212 40%, #0b0b0b);
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.08),
    0 40px 80px -30px rgb(26 26 26 / 0.45),
    0 2px 10px rgb(26 26 26 / 0.12);
}

.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 47px;
  background: var(--paper);
  text-align: left;
}

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 3;
  width: 94px;
  height: 28px;
  border-radius: 20px;
  background: #050505;
  translate: -50% 0;
}

.statusbar {
  display: flex;
  justify-content: space-between;
  padding: 18px 28px 0 32px;
  font-size: 0.8125rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.statusbar .bars {
  display: flex;
  gap: 4px;
  align-items: center;
}

.statusbar .bars i {
  display: block;
  width: 17px;
  height: 10px;
  border-radius: 3px;
  background: var(--ink);
}

.statusbar .bars i:first-child {
  width: 15px;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  border-radius: 1px;
}

.app {
  display: grid;
  gap: 10px;
  padding: 26px 14px 0;
}

/* The Journal's week strip, today selected, as the app opens. */
.app-week {
  display: flex;
  justify-content: space-between;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--text-3);
  text-align: center;
}

.app-week span {
  display: grid;
  gap: 1px;
  width: 30px;
  padding: 4px 0 5px;
  border-radius: 11px;
}

.app-week b {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.app-week .is-today,
.app-week .is-today b {
  background: var(--ink);
  color: var(--paper);
}

/* The app's label on the event that is on now or starts soon. */
.app-live {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--yellow-ui);
  color: var(--on-yellow);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-card {
  padding: 13px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.app-card .card-title {
  margin-top: 4px;
  font-size: 0.9375rem;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 0.75rem;
  font-weight: 600;
}

.app-btn.is-primary {
  background: var(--yellow-ui);
  color: var(--on-yellow);
}

.app-btn .i {
  width: 13px;
  height: 13px;
}

.app-rail {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 0 4px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-rail .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}

.app-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.app-row .app-card {
  padding: 11px;
}

.app-note {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-2);
}

.app-tabbar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  justify-content: space-around;
  padding: 7px 6px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: inset 0 0 0 1px var(--line), 0 8px 20px -10px rgb(26 26 26 / 0.3);
}

.app-tab {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-2);
}

.app-tab .i {
  width: 18px;
  height: 18px;
}

.app-tab.is-on {
  background: var(--paper-2);
  color: var(--ink);
}

/* ------------------------------------------------------- Manifesto --
   One sentence that lights up word by word as it scrolls through. The dim
   state exists only once app.js has armed it; without script, or with
   reduced motion, every word is simply there. */
.manifesto {
  padding: var(--section) var(--gutter);
}

.manifesto p {
  max-width: 1000px;
  margin-inline: auto;
  font-size: clamp(1.875rem, 0.95rem + 3vw, 3.5rem);
  line-height: 1.18;
  letter-spacing: -0.032em;
  font-weight: 500;
  text-align: center;
  text-wrap: balance;
}

.manifesto .kw {
  color: var(--accent-text);
}

.manifesto .ic {
  display: inline-grid;
  place-items: center;
  width: 1em;
  height: 1em;
  margin-inline: 0.06em 0.1em;
  border-radius: 0.28em;
  vertical-align: -0.14em;
  background: var(--wash-butter);
  color: var(--ink);
}

.manifesto .ic svg {
  width: 0.6em;
  height: 0.6em;
}

.manifesto .ic-sky { background: var(--wash-sky); }
.manifesto .ic-mint { background: var(--wash-mint); }
.manifesto .ic-lilac { background: var(--wash-lilac); }
.manifesto .ic-peach { background: var(--wash-peach); }

.js .manifesto.is-armed .w {
  opacity: 0.16;
}

.js .manifesto.is-armed .w.is-lit {
  opacity: 1;
}

.js .manifesto.is-armed .w {
  transition: opacity 260ms linear;
}

/* ---------------------------------------------------------- Capture -- */
.segmented {
  position: relative;
  display: none;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.js .segmented {
  display: inline-flex;
}

.segmented button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-size: 0.9375rem;
  font-weight: 540;
  color: var(--text-2);
  cursor: pointer;
  transition: color 200ms;
  -webkit-tap-highlight-color: transparent;
}

.segmented button[aria-selected="true"] {
  color: var(--on-yellow);
}

.segmented .i {
  width: 18px;
  height: 18px;
}

.seg-thumb {
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--yellow);
}

.capture-panels {
  display: grid;
  gap: clamp(56px, 8vw, 96px);
}

.js .capture-panels {
  display: block;
}

.js .capture-panel[hidden] {
  display: none;
}

.capture-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.capture-visual {
  position: relative;
  min-height: 520px;
  border-radius: var(--r-panel);
  overflow: hidden;
  background: var(--paper-2);
  view-transition-name: capture-visual;
}

.capture-visual .photo {
  position: absolute;
  inset: 0;
}

.capture-visual .float {
  width: min(300px, 78%);
}

.capture-copy {
  display: grid;
  gap: 18px;
  view-transition-name: capture-copy;
}

.points {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.points li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--text-2);
}

.points .i {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent-text);
}

.points b {
  color: var(--ink);
  font-weight: 580;
}

/* Photo slots: a warm gradient until the photograph loads, and the same
   gradient if it never does. */
.photo {
  background:
    radial-gradient(80% 60% at 30% 20%, var(--wash-butter), transparent 70%),
    radial-gradient(70% 60% at 80% 80%, var(--wash-peach), transparent 70%),
    var(--paper-2);
}

.photo picture {
  display: contents;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pos-tl { left: 7%; top: 8%; }
.pos-tr { right: 7%; top: 9%; }
.pos-bl { left: 7%; bottom: 8%; }
.pos-br { right: 7%; bottom: 8%; }
.pos-c { left: 50%; top: 50%; translate: -50% -50%; }

.note-lines {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-2);
}

.note-lines .md {
  color: var(--text-3);
  font-family: var(--font-mono);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.thumbs span {
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--wash-sky), var(--wash-mint));
}

.thumbs span:nth-child(2) {
  background: linear-gradient(135deg, var(--wash-peach), var(--wash-butter));
}

.thumbs span:nth-child(3) {
  background: linear-gradient(135deg, var(--wash-lilac), var(--wash-sky));
}

/* ---------------------------------------------------------- Journal -- */
.day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
}

.week {
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 20px;
}

.week-track {
  display: flex;
  gap: 8px;
  touch-action: pan-y pinch-zoom;
}

.week-day {
  flex: 0 0 calc((100% - 6 * 8px) / 7);
  min-width: 64px;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 0;
  border: 0;
  border-radius: 18px;
  background: var(--paper-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 200ms, color 200ms;
}

.week-day .dow {
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.week-day .date {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.week-day[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.week-day[aria-pressed="true"] .dow {
  color: inherit;
  opacity: 0.7;
}

.day-map {
  position: relative;
  align-self: start;
  aspect-ratio: 10 / 9;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--paper-2);
}

.day-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-legend {
  position: absolute;
  left: 14px;
  top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.map-legend .chip {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.day-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

.day-title {
  font-size: 1.0625rem;
  font-weight: 560;
  letter-spacing: -0.012em;
}

.timeline {
  display: grid;
  gap: 10px;
}

.slot {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}

.event {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--paper-2);
  font-size: 0.875rem;
}

.event .i {
  width: 20px;
  height: 20px;
  justify-self: center;
}

.event .when {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
}

.event.is-plan {
  background: transparent;
  border: 1.5px dashed var(--line-2);
}

.honesty {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.honesty li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  color: var(--text-2);
}

.honesty .i {
  width: 22px;
  height: 22px;
  color: var(--accent-text);
}

.honesty b {
  display: block;
  color: var(--ink);
  font-weight: 580;
}

/* ------------------------------------------------------------- Chat -- */
.chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}

.chat-copy {
  display: grid;
  justify-items: start;
  gap: 20px;
}

.thread {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float);
}

.thread .bubble {
  font-size: 1rem;
  max-width: 82%;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.composer > span:first-child {
  flex: 1;
}

.composer .i {
  width: 20px;
  height: 20px;
}

.composer .send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--yellow-ui);
  color: var(--on-yellow);
}

.questions {
  margin-top: clamp(48px, 7vw, 88px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.questions-track {
  display: flex;
  gap: 12px;
  touch-action: pan-y pinch-zoom;
}

.question {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}

.question .i {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

/* Without script the strip wraps into a quiet cloud instead of scrolling. */
html:not(.js) .questions-track {
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------------------------------------------------------- For You -- */
.foryou-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.moment {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--paper-2);
}

.moment .photo {
  position: absolute;
  inset: 0;
}

.moment .float {
  left: 16px;
  right: 16px;
  bottom: 16px;
  width: auto;
}

.moment-label {
  position: absolute;
  left: 20px;
  top: 20px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  font-size: 0.8125rem;
  font-weight: 580;
}

.notification {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
}

.notification .app-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

/* ------------------------------------------------------------ Bento -- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 280px;
  padding: 28px;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tile p {
  color: var(--text-2);
  max-width: 30rem;
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--wash-butter);
}

.tile-icon .i {
  width: 24px;
  height: 24px;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

.tile-sky { background: linear-gradient(160deg, var(--wash-sky), var(--surface) 70%); }
.tile-butter { background: linear-gradient(160deg, var(--wash-butter), var(--surface) 70%); }
.tile-mint { background: linear-gradient(160deg, var(--wash-mint), var(--surface) 70%); }
.tile-lilac { background: linear-gradient(160deg, var(--wash-lilac), var(--surface) 70%); }
.tile-peach { background: linear-gradient(160deg, var(--wash-peach), var(--surface) 70%); }

.tile .tile-icon.on-sky { background: var(--surface); }

.source-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.875rem;
  font-weight: 540;
}

.source .i {
  width: 16px;
  height: 16px;
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  background: var(--line-2);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.2);
  transition: translate 360ms var(--ease-out);
}

.switch.is-on {
  background: var(--yellow-ui);
}

.switch.is-on::after {
  translate: 18px 0;
}

.toggles {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.9375rem;
  font-weight: 520;
}

.relay {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.8125rem;
  font-weight: 560;
}

.relay .node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.relay .node .i {
  width: 16px;
  height: 16px;
}

.relay .line {
  position: relative;
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}

.relay .pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: 100%;
  border-radius: 2px;
  background: var(--yellow-ui);
}

/* ------------------------------------------------------------ Story -- */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.story-media {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 16px;
}

.story-media .photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-panel);
  background:
    radial-gradient(70% 50% at 40% 30%, rgb(27 154 238 / 0.35), transparent 70%),
    linear-gradient(160deg, #cfe9fb, #8cc7f0);
}

.swatches {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.swatch {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.swatch-chip {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.swatch-zima {
  background: var(--zima);
}

.swatch-now {
  background: #1a1a1a;
  display: grid;
  place-items: center;
}

.swatch-now svg {
  width: 20px;
  height: 26px;
  color: var(--yellow);
}

.swatch b {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.swatch code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
}

.swatches > .i {
  width: 20px;
  height: 20px;
  color: var(--text-3);
}

.story-text {
  display: grid;
  gap: 22px;
  font-size: 1.1875rem;
  line-height: 1.62;
  letter-spacing: -0.006em;
  color: var(--text-2);
}

.story-text strong {
  color: var(--ink);
  font-weight: 600;
}

.story-text .credit {
  font-size: 0.875rem;
  line-height: 1.5;
}

.story-mark {
  width: 64px;
  height: 82px;
  margin: 0 auto 4px;
}

.story-mark path {
  fill: var(--yellow);
}

/* ---------------------------------------------------------- Privacy --
   The one dark block on the page: the privacy promises sit on the logo's
   own ink, where the yellow can carry type. */
.privacy {
  position: relative;
  margin-inline: var(--gutter);
  padding: var(--section) 0;
  border-radius: calc(var(--r-panel) + 8px);
  background: var(--night);
  color: var(--night-text);
  isolation: isolate;
  overflow: hidden;
}

.privacy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 40% at 50% 0%, rgb(252 200 28 / 0.18), transparent 70%),
    radial-gradient(30% 30% at 90% 90%, rgb(252 200 28 / 0.08), transparent 70%);
}

.privacy .tag {
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  color: var(--night-text);
}

.privacy .tag .i {
  color: var(--yellow);
}

.privacy .lede {
  color: var(--night-dim);
}

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.promise {
  border-radius: var(--r-card);
  background: var(--night-2);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}

.promise summary {
  display: grid;
  gap: 12px;
  padding: 26px;
  list-style: none;
  cursor: pointer;
  border-radius: var(--r-card);
}

.promise summary::-webkit-details-marker {
  display: none;
}

.promise .promise-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.promise .tile-icon {
  margin: 0;
  background: rgb(252 200 28 / 0.12);
  color: var(--yellow);
}

.promise .more {
  width: 20px;
  height: 20px;
  color: var(--night-dim);
  transition: rotate 300ms var(--ease-out);
}

.promise[open] .more {
  rotate: 180deg;
}

.promise h3 {
  color: var(--night-text);
}

.promise p {
  color: var(--night-dim);
}

.promise .fine-print {
  padding: 0 26px 26px;
  color: var(--night-dim);
  font-size: 0.9375rem;
}

.privacy-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 48px;
}

.privacy .link-arrow {
  color: var(--night-text);
}

.privacy :focus-visible {
  outline-color: var(--yellow);
}

/* ---------------------------------------------------------- Closing -- */
.closing {
  text-align: center;
}

.closing .section-head {
  margin-bottom: 32px;
}

/* The app icon is cream, like the page, so a hairline and the card
   shadow give it an edge. */
.closing-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-card);
}

/* ----------------------------------------------------------- Footer -- */
.footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.footer h2 {
  margin-bottom: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.footer li + li {
  margin-top: 10px;
}

.footer a {
  color: var(--text-2);
  text-decoration: none;
}

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

.footer address {
  font-style: normal;
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.wordmark {
  margin-top: clamp(56px, 8vw, 96px);
  font-size: clamp(4rem, 1rem + 15vw, 15rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-weight: 600;
  white-space: nowrap;
}

.wordmark .tail {
  display: block;
  font-size: 0.28em;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 520;
  background: linear-gradient(90deg, var(--accent-text), var(--text-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal {
  display: grid;
  gap: 6px;
  margin-top: 40px;
}

/* ------------------------------------------------------ Documents --
   The privacy policy, the terms, support and the assistants guide: long
   text set for reading, with a table of contents that follows the page. */
.doc-hero {
  position: relative;
  padding: clamp(128px, 14vw, 176px) 0 clamp(40px, 5vw, 64px);
  isolation: isolate;
}

.doc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 60% at 20% 0%, var(--wash-butter), transparent 72%),
    radial-gradient(30% 50% at 85% 20%, var(--wash-sky), transparent 72%);
  -webkit-mask-image: linear-gradient(#000 50%, transparent);
  mask-image: linear-gradient(#000 50%, transparent);
}

.doc-hero .wrap {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.doc-hero .display {
  font-size: clamp(2.5rem, 1.2rem + 4.4vw, 4.5rem);
  max-width: 15ch;
}

.doc-meta {
  font-size: 0.9375rem;
  color: var(--text-2);
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-bottom: var(--section);
}

.toc {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 128px);
  overflow: auto;
  overscroll-behavior: contain;
}

.toc summary {
  display: none;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--line-2);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 7px 12px;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--text-2);
  text-decoration: none;
  transition: color 200ms, border-color 200ms;
}

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

.toc a[aria-current="true"] {
  color: var(--ink);
  font-weight: 560;
  border-left-color: var(--yellow);
}

.prose {
  max-width: 44rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-2);
  /* The policy quotes web addresses whole; on a phone they must wrap. */
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 2.6em;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 560;
  color: var(--ink);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
  color: var(--ink);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose ul {
  padding-left: 1.2em;
  list-style: disc;
}

.prose ol {
  padding-left: 1.4em;
  list-style: decimal;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--line);
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* A reproduction of the app's approval prompt, from its own strings. */
.consent {
  margin: 2em 0;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.consent-sheet {
  width: min(100%, 340px);
  padding: 24px 22px 18px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line);
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-2);
}

.consent-sheet > * + * {
  margin-top: 8px;
}

.consent-title {
  font-size: 1.0625rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.consent-where,
.consent-note {
  color: var(--text-3);
  font-size: 0.8125rem;
}

.consent-chips span {
  display: inline-block;
  margin: 2px 1px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.8125rem;
}

.consent-buttons {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.consent-buttons span {
  display: block;
  padding: 10px;
  border-radius: 14px;
  background: var(--line);
  color: var(--ink);
  font-weight: 560;
}

.consent-buttons .consent-primary {
  background: var(--ink);
  color: var(--paper);
}

.consent figcaption {
  max-width: 36ch;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.prose li + li {
  margin-top: 0.5em;
}

.prose li::marker {
  color: var(--text-3);
}

/* Policy text that waits on work in the app, bracketed in the copy. Marked in
   previews so a reviewer sees what is not settled; scripts/merge.sh refuses to
   publish while any is left. */
.pending {
  background: color-mix(in srgb, var(--yellow) 24%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--yellow) 24%, transparent);
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* A pending passage longer than a sentence, such as a list. */
div.pending {
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: none;
}

div.pending > * + * {
  margin-top: 1em;
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose address {
  font-style: normal;
}

.summary-card {
  padding: 24px 28px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card);
}

.summary-card ul {
  margin-top: 0.6em;
}

/* One card per connected service, the same fields in the same order. */
.service {
  margin-top: 1.4em;
  padding: 24px 28px 28px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.service h3 {
  margin-top: 0;
  font-size: 1.3125rem;
}

.service h4 {
  margin-top: 1.4em;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.service > * + * {
  margin-top: 0.8em;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: relative;
    top: 0;
    max-height: none;
    padding: 14px 18px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .toc summary {
    display: block;
    font-weight: 560;
    color: var(--ink);
    cursor: pointer;
  }

  .toc ol {
    margin-top: 10px;
  }
}

/* ---------------------------------------------------------- Reveal --
   Hidden only after head.js marks the document scripted, and only until
   app.js springs each piece in. head.js takes the mark back if app.js never
   finishes, and app.js adds .no-motion if the motion library is missing, so
   no failure can leave the page blank. */
.js [data-reveal],
.js [data-hero],
.js [data-phone],
.js [data-float] {
  opacity: 0;
}

.js [data-reveal].is-in,
.js.no-motion [data-reveal],
.js.no-motion [data-hero],
.js.no-motion [data-phone],
.js.no-motion [data-float] {
  opacity: 1;
}

/* ------------------------------------------------- View transitions --
   Capture's tabs swap panels through the browser's own View Transitions
   API: the visual cross-fades and settles in place. Styled here because the
   CSP forbids a script injecting its own <style>. */
::view-transition-old(capture-visual),
::view-transition-new(capture-visual),
::view-transition-old(capture-copy),
::view-transition-new(capture-copy) {
  animation-duration: 380ms;
  animation-timing-function: var(--ease-out);
}

/* ------------------------------------------------------------ Lenis --
   The rules the smooth-scroll library expects (from its own stylesheet). */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* ------------------------------------------------------ Responsive -- */
@media (max-width: 1080px) {
  .float-voice { left: 0; }
  .float-chat { right: 0; }
  .float-map { left: 2%; }
  .float-journal { right: 2%; }
}

@media (max-width: 900px) {
  .stage {
    height: 660px;
  }

  .float {
    width: 232px;
    padding: 13px;
  }

  .float-map,
  .float-journal {
    display: none;
  }

  .float-voice {
    left: -4px;
    top: 300px;
  }

  .float-chat {
    right: -4px;
    top: 120px;
    width: 240px;
  }

  .capture-panel,
  .chat-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-media {
    position: relative;
    top: 0;
  }

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

  .foryou-grid,
  .promises {
    grid-template-columns: 1fr;
  }

  .moment {
    min-height: 460px;
  }

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

  .span-2,
  .span-3,
  .span-4 {
    grid-column: auto;
  }

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

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

@media (max-width: 560px) {
  .phone {
    width: 272px;
  }

  .stage {
    height: 600px;
  }

  /* On a phone the stage is barely wider than the phone it shows, and a card
     beside it could only cover the Journal on its screen; the Chat section
     below tells the chat's story. */
  .float-voice,
  .float-chat {
    display: none;
  }

  .capture-visual {
    min-height: 440px;
  }

  .segmented button {
    padding: 10px 12px;
  }

  .segmented button span {
    display: none;
  }

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

/* ---------------------------------------------------- Preferences --
   Reduced motion keeps every state and drops the travel: no parallax, no
   drifting, nothing hidden waiting to be revealed. */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-hero],
  .js [data-phone],
  .js [data-float] {
    opacity: 1;
  }

  .js .manifesto.is-armed .w {
    opacity: 1;
  }

  .btn:active {
    transform: none;
  }

  .menu,
  .switch::after,
  .link-arrow .i {
    transition-duration: 1ms;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav.is-lifted,
  .app-tabbar,
  .moment-label {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgb(26 26 26 / 0.4);
    --line-2: rgb(26 26 26 / 0.6);
    --text-2: #3d3a34;
  }

  .nav.is-lifted {
    background: var(--glass-solid);
  }
}
