:root {
  --paper: #f8f7f3;
  --card: #ffffff;
  --ink: #17161d;
  --muted: #5e5c69;
  --line: #e4e1d9;
  --accent: #c8502a;
  --accent-text: #b84622; /* The app's accent is 4.2:1 on --paper, so small text goes a shade deeper. */
  --accent-soft: #fbeee7;
  --serif: "Newsreader", "New York", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111016;
    --card: #1b1a22;
    --ink: #f3f1ec;
    --muted: #a5a2b1;
    --line: #2e2c38;
    --accent: #ffa27c;
    --accent-text: #ffa27c;
    --accent-soft: #2a1d1a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.9rem, 8vw, 5.2rem); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; }
h3 { font-size: 1.4rem; line-height: 1.2; }
p { margin: 0; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* Header */
.bar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid transparent; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 1.45rem var(--serif); }
.dot { width: 26px; height: 28px; background: url(/assets/nod.svg) center / contain no-repeat; }
nav { display: flex; gap: 26px; font-size: 0.95rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); }

/* Nod, drawn from ios/Aide/Character/Characters/NodCharacter.swift. It moves the way the
   rig does: the body squashes, the head drops, the face drops further and the curl lags.
   The site's CSP blocks inline styles, so all of this has to stay in this file. */
.nod-figure { position: absolute; z-index: 1; width: 42%; left: -33%; bottom: -3%; overflow: visible; color: var(--ink); }
.nod-body { transform-origin: 100px 176px; animation: nod-squash 9s ease-in-out infinite; }
.nod-head { animation: nod-drop 9s ease-in-out infinite; }
.nod-face { animation: nod-drop-further 9s ease-in-out infinite; }
.nod-curl { transform-origin: 100px 36px; animation: nod-trail 9s ease-in-out infinite; }
.nod-eye { animation: nod-blink 5.3s linear infinite; }
.nod-eye-left { transform-origin: 73px 100px; }
.nod-eye-right { transform-origin: 127px 100px; }
@keyframes nod-squash {
  0%, 62%, 69%, 76%, 100% { transform: none; }
  65%, 72% { transform: scale(1.016, 0.978); }
}
@keyframes nod-drop {
  0%, 62%, 69%, 76%, 100% { transform: none; }
  65%, 72% { transform: translateY(5px); }
}
@keyframes nod-drop-further {
  0%, 62%, 69%, 76%, 100% { transform: none; }
  65%, 72% { transform: translateY(8px); }
}
@keyframes nod-trail {
  0%, 62%, 83%, 100% { transform: none; }
  66%, 73% { transform: rotate(-7deg); }
  70%, 77% { transform: rotate(5deg); }
}
@keyframes nod-blink {
  0%, 96%, 100% { transform: none; }
  98% { transform: scaleY(0.08); }
}
@media (prefers-reduced-motion: reduce) {
  .nod-body, .nod-head, .nod-face, .nod-curl, .nod-eye { animation: none; }
  html { scroll-behavior: auto; }
}

/* Hero */
.hero { padding: clamp(40px, 7vw, 86px) 0 clamp(50px, 8vw, 100px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: clamp(30px, 6vw, 70px); }
.eyebrow { color: var(--muted); font-size: 0.98rem; margin-bottom: 20px; }
.lead { font-size: clamp(1.15rem, 2vw, 1.34rem); line-height: 1.5; color: var(--muted); margin-top: 24px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 34px; }
.pill { display: inline-flex; align-items: center; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 0.97rem; }
.stage { position: relative; justify-self: center; width: min(320px, 78vw); }

/* Phone */
.phone { position: relative; border-radius: 46px; padding: 9px; background: #0b0b0f; box-shadow: 0 30px 70px -28px rgba(23, 18, 28, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
.phone img { border-radius: 38px; width: 100%; }

/* Sections */
section { padding: clamp(56px, 9vw, 104px) 0; }
.rule { border-top: 1px solid var(--line); }
.head { max-width: 40rem; margin-bottom: clamp(32px, 5vw, 56px); }
.head p { color: var(--muted); margin-top: 16px; font-size: 1.12rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 4vw, 44px); }
.step .num { font: italic 500 1.05rem var(--serif); color: var(--accent-text); }
.step h3 { margin: 6px 0 8px; }
.step p { color: var(--muted); }
.step .phone { margin-top: 26px; width: min(250px, 100%); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.cell { background: var(--paper); padding: 28px; }
.cell h3 { margin-bottom: 8px; font-size: 1.25rem; }
.cell p { color: var(--muted); font-size: 0.98rem; }

/* Trust band */
.trust { background: #17151f; color: #f3f1ec; }
.trust .head p, .trust .promise p { color: #b9b6c5; }
.trust a { color: #ffa27c; }
.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px clamp(30px, 6vw, 72px); }
.promise { border-top: 1px solid #38354a; padding-top: 18px; }
.promise h3 { margin-bottom: 6px; }
.more { margin-top: 40px; font-weight: 600; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan .price { font: 500 2.7rem/1.1 var(--serif); margin: 12px 0 4px; }
.plan .price small { font: 400 1rem var(--sans); color: var(--muted); }
.plan .who { color: var(--muted); font-size: 0.97rem; }
.plan ul { list-style: none; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 0.97rem; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.58em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.soon { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.92rem; margin-top: 22px; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 18px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font: 500 1.24rem var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-family: var(--sans); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin-top: 10px; }

/* Security page */
.page { padding: clamp(40px, 7vw, 80px) 0 clamp(50px, 8vw, 90px); }
.page h1 { font-size: clamp(2.5rem, 6.6vw, 4.1rem); }
.page .lead { max-width: none; }
.page h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin: 52px 0 12px; }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 20px; margin: 12px 0 0; }
.page li { margin-top: 6px; }
.page ul + p { margin-top: 16px; }
.scroll { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 11px 16px 11px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--muted); font-size: 0.84rem; }
.note { background: var(--accent-soft); border-radius: 16px; padding: 18px 20px; margin-top: 18px; }
.updated { color: var(--muted); font-size: 0.92rem; margin-top: 44px; }
.after-table { margin-top: 14px; }

/* Privacy page */
.skip { position: absolute; left: 20px; top: -60px; z-index: 20; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 0.95rem; }
.skip:focus { top: 12px; }
.policy { width: min(1120px, 100% - 40px); margin-inline: auto; }
.policy-head, .policy-body { min-width: 0; overflow-wrap: break-word; }
.page a:focus-visible, .page summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.stamp { color: var(--muted); font-size: 0.92rem; margin-top: 18px; }

.glance { margin-top: 32px; padding: clamp(20px, 3vw, 28px); border-radius: 22px; background: var(--accent-soft); }
.glance h2 { font-size: 1.4rem; margin: 0; }
.glance ul { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 30px; margin: 14px 0 0; padding: 0; }
.glance li { margin: 0; font-size: 0.97rem; line-height: 1.5; }
.glance li strong { display: block; }
.glance ul + p { margin-top: 18px; color: var(--muted); font-size: 0.92rem; }

.toc { display: block; margin-top: 28px; font-size: 0.97rem; }
.toc summary { font-size: 1.15rem; }
.toc ol { display: grid; gap: 9px; margin: 12px 0 2px; padding-left: 1.7em; color: var(--muted); }
.toc li { margin: 0; padding-left: 2px; }

.policy-body { counter-reset: section; }
.policy-body section { padding: 0; scroll-margin-top: 84px; counter-increment: section; }
.policy-body h2::before { content: counter(section) "."; color: var(--accent-text); margin-right: 0.4em; }

.rows { margin: 16px 0 0; border-top: 1px solid var(--line); }
.rows > div { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 3px 24px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rows dt { font-weight: 600; line-height: 1.45; }
.rows dd { margin: 0; line-height: 1.5; }
.page .rows + p { margin-top: 18px; }

@media (min-width: 1000px) {
  .policy { display: grid; grid-template-columns: 216px minmax(0, 690px); gap: 0 clamp(48px, 7vw, 96px); justify-content: center; }
  .policy-head, .policy-body { grid-column: 2; }
  .toc { grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; margin-top: 14px; font-size: 0.93rem; }
  .toc details { border: 0; padding: 0; }
}
@media (min-width: 1000px) {
  @supports selector(::details-content) {
    .toc details::details-content { content-visibility: visible; height: auto; }
    .toc summary { pointer-events: none; font: 600 0.84rem var(--sans); color: var(--muted); }
    .toc summary::after { content: none; }
  }
}
@media (max-width: 640px) {
  .glance ul, .rows > div { grid-template-columns: minmax(0, 1fr); }
  table { min-width: 0; font-size: 0.9rem; }
  th, td { padding-right: 12px; }
}

/* Footer */
footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); font-size: 0.93rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { gap: 20px; font-size: inherit; }

@media (max-width: 860px) {
  .hero .wrap, .steps, .grid, .plans, .promises { grid-template-columns: 1fr; }
  .hero { text-align: left; }
  .stage { margin-top: 20px; }
  .nod-figure { width: 33%; left: -11%; bottom: -5%; }
  .step .phone { width: min(270px, 74vw); }
  .bar nav a.optional { display: none; }
}

@media print {
  :root { --paper: #fff; --card: #fff; --ink: #000; --muted: #444; --line: #bbb; --accent: #000; --accent-text: #000; --accent-soft: #fff; }
  body { font-size: 11pt; }
  .bar, .toc, .skip, footer { display: none; }
  .page { padding: 0; }
  .glance { border: 1px solid var(--line); }
  .rows > div, .glance { break-inside: avoid; }
  .page h2 { break-after: avoid; }
  .policy a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
