/* MiddleMark — middlemark.app
   Colours are the app's own (App/Theme/Theme.swift, Shared/AccentChoice.swift):
   Paper White and Black base themes, MiddleMark purple as ink and as fill.
   Structure follows kahcozi.com: eyebrow labels, numbered cards, pill buttons,
   a "where your data goes" matrix. No web fonts, no scripts, no third parties. */

:root {
  /* Paper White */
  --bg: #f2eee2;
  --surface: #ffffff;
  --subtle: #e4ded0;
  --line: #cdc6b5;
  --outline: #897c5d;
  --ink: #1b1a16;
  --muted: #5b5546;
  --accent: #514fd4;
  --accent-fill: #5856d6;
  --accent-quiet: #6e6db6;
  --on-accent: #ffffff;
  --ok: #1d7100;
  --no: #c60000;
  --caution: #994c00;
  --accent-tint: rgba(81, 79, 212, 0.1);
  --ok-tint: rgba(29, 113, 0, 0.1);
  --no-tint: rgba(198, 0, 0, 0.08);
  --mark-blue: #1a9fe6;
  --mark-red: #e8513f;
  --mark-bar: #1b1a16;
  --glow: rgba(88, 86, 214, 0.18);
  --phone-ring: rgba(27, 26, 22, 0.14);
  --phone-shadow: 0 22px 50px rgba(40, 34, 20, 0.22);
  --radius: 16px;
  --page: 68rem;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Black */
    --bg: #0d1117;
    --surface: #161b22;
    --subtle: #21262d;
    --line: #30363d;
    --outline: #647180;
    --ink: #e6edf3;
    --muted: #9aa3ad;
    --accent: #817eff;
    --accent-fill: #625eff;
    --accent-quiet: #9d9be2;
    --ok: #33bb33;
    --no: #ff4d4d;
    --caution: #f0883e;
    --accent-tint: rgba(129, 126, 255, 0.14);
    --ok-tint: rgba(51, 187, 51, 0.13);
    --no-tint: rgba(255, 77, 77, 0.13);
    --mark-blue: #4cc3ff;
    --mark-red: #ff6956;
    --mark-bar: #e6edf3;
    --glow: rgba(98, 94, 255, 0.22);
    --phone-ring: rgba(255, 255, 255, 0.13);
    --phone-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --subtle: #21262d;
  --line: #30363d;
  --outline: #647180;
  --ink: #e6edf3;
  --muted: #9aa3ad;
  --accent: #817eff;
  --accent-fill: #625eff;
  --accent-quiet: #9d9be2;
  --ok: #33bb33;
  --no: #ff4d4d;
  --caution: #f0883e;
  --accent-tint: rgba(129, 126, 255, 0.14);
  --ok-tint: rgba(51, 187, 51, 0.13);
  --no-tint: rgba(255, 77, 77, 0.13);
  --mark-blue: #4cc3ff;
  --mark-red: #ff6956;
  --mark-bar: #e6edf3;
  --glow: rgba(98, 94, 255, 0.22);
  --phone-ring: rgba(255, 255, 255, 0.13);
  --phone-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

h1,
h2,
h3,
h4 {
  font-family: -apple-system, system-ui, "SF Pro Display", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-weight: 700;
}

h2 {
  font-weight: 680;
}

h3,
h4 {
  font-weight: 650;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

h1 em,
h2 em {
  font-style: normal;
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 10px;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 680;
  font-size: 17.5px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.nav {
  display: flex;
  gap: 2px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 520;
  padding: 6px 12px;
  border-radius: 999px;
}

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

/* ---------- Shared pieces ---------- */

.eyebrow {
  display: block;
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.mark {
  display: inline-grid;
  grid-template-columns: 1fr 4px 1fr;
  align-items: center;
  gap: 5px;
  width: 60px;
  height: 14px;
}

.mark::before,
.mark::after {
  content: "";
  height: 4px;
  border-radius: 2px;
}

.mark::before {
  background: var(--mark-blue);
}

.mark::after {
  background: var(--mark-red);
}

.mark span {
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: var(--mark-bar);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 620;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent-fill) 88%, #000);
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--subtle);
  text-decoration: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.chips svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.lock-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.45;
  color: var(--accent);
}

.lock-note svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
}

/* Phone frames for screenshots */

.phone {
  margin: 0;
  padding: 2.4%;
  background: #05060a;
  border-radius: 14.5% / 6.7%;
  box-shadow: 0 0 0 1px var(--phone-ring), var(--phone-shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12.4% / 5.7%;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(60px, 9vw, 104px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(32px, 4vw, 44px);
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.section-head p + p {
  margin-top: 12px;
}

.section-head.flush {
  margin-bottom: 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 92px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero .lead {
  font-size: clamp(18px, 2vw, 20.5px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero .fineprint {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-shots {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  display: grid;
  justify-items: center;
}

.hero-shots .phone-front {
  position: relative;
  z-index: 1;
  width: 290px;
  max-width: 72%;
}

.hero-shots .phone-back {
  position: absolute;
  right: -2%;
  top: 9%;
  width: 230px;
  max-width: 56%;
  opacity: 0.5;
  transform: rotate(5deg);
}

/* ---------- Numbered cards ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cards.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.num {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.card .stage {
  margin: -24px -24px 22px;
  padding: 26px 24px 0;
  background: var(--subtle);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  height: 300px;
}

.card .stage .phone {
  width: 210px;
  margin: 0 auto;
}

/* ---------- Privacy: truths ---------- */

.privacy-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.privacy-shot {
  position: sticky;
  top: 90px;
}

.truths {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.truths li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.ico svg {
  width: 19px;
  height: 19px;
}

.truths h3 {
  font-size: 16.5px;
  margin: 1px 0 4px;
}

.truths p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Where your data goes ---------- */

.flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.flow-head h3 {
  font-size: 18px;
  margin: 0 0 2px;
}

.flow-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.flow-label {
  margin: 0;
  padding: 14px 24px 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.flow ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flow li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}

.flow li:last-child {
  border-bottom: 0;
}

.flow .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.flow .dot svg {
  width: 14px;
  height: 14px;
}

.flow h4 {
  margin: 3px 0 2px;
  font-size: 16px;
}

.flow p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.badge {
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.never .dot,
.never .badge {
  color: var(--no);
  background: var(--no-tint);
}

.sealed .dot,
.sealed .badge {
  color: var(--accent);
  background: var(--accent-tint);
}

.limited .dot,
.limited .badge {
  color: var(--ok);
  background: var(--ok-tint);
}

.flow-foot {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Gallery ---------- */

.gallery-wrap {
  padding-left: 0;
  padding-right: 0;
}

.gallery {
  list-style: none;
  margin: 0;
  padding: 4px var(--gutter) 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 44px 24px;
}

.gallery li {
  min-width: 0;
}

.gallery .phone {
  width: min(100%, 230px);
  margin: 0 auto 18px;
}

.gallery h3 {
  font-size: 17px;
  margin: 0 0 4px;
}

.gallery p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.gallery .lock-note {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--accent);
}

/* ---------- Plus ---------- */

.plus-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--ink);
  font-size: 15.5px;
}

.plus-note svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 3px;
  color: var(--accent);
}

/* ---------- Sources ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.split .section-head {
  margin-bottom: 0;
}

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.source-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}

.source-list li:last-child {
  border-bottom: 0;
}

.source-list li span:last-child {
  color: var(--muted);
  text-align: right;
}

/* ---------- Contact card ---------- */

.contact-band {
  padding: clamp(40px, 6vw, 64px) 0;
  border-top: 1px solid var(--line);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
}

.contact-card > div {
  flex: 1 1 320px;
}

.contact-card .btn {
  flex: none;
}

.contact-card h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Document pages ---------- */

.doc-hero {
  padding-top: clamp(40px, 7vw, 72px);
  padding-bottom: clamp(24px, 4vw, 40px);
}

.doc-hero h1 {
  font-size: clamp(36px, 5.4vw, 52px);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.doc-hero p {
  color: var(--muted);
  font-size: 19px;
  max-width: 48ch;
  margin: 0;
}

.doc-hero .meta {
  margin-top: 16px;
  font-size: 14px;
}

.doc-hero .chips {
  margin-top: 22px;
}

.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.doc.single {
  grid-template-columns: minmax(0, 1fr);
}

.toc {
  position: sticky;
  top: 84px;
  font-size: 14.5px;
}

.toc p {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px 10px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 8px;
  line-height: 1.35;
}

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

.prose {
  max-width: 68ch;
  min-width: 0;
}

.prose > section,
.prose > div {
  margin: 0 0 44px;
}

.prose h2 {
  font-size: 25px;
  margin: 0 0 14px;
}

.prose h3 {
  font-size: 18px;
  margin: 26px 0 8px;
}

.prose p,
.prose li {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.prose ul {
  padding-left: 1.2em;
  margin: 0 0 1em;
}

.prose li + li {
  margin-top: 6px;
}

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

.prose .flow ul {
  padding-left: 0;
  margin: 0;
}

.prose .flow li,
.prose .flow li + li,
.prose .flow p {
  margin: 0;
}

.prose .flow p {
  color: var(--muted);
}

.summary-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px clamp(18px, 3vw, 28px);
}

.summary-box h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.summary-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.summary-box li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  margin: 0;
}

.summary-box li svg {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--accent);
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.2em;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--subtle);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  font-weight: 600;
  color: var(--ink);
  min-width: 9em;
}

.callout {
  border-left: 4px solid var(--accent);
  background: var(--accent-tint);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin: 0 0 1.2em;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Support */

.email-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 650;
  text-decoration: none;
  word-break: break-all;
}

.email-link svg {
  width: 20px;
  height: 20px;
  flex: none;
}

details {
  border-bottom: 1px solid var(--line);
}

details:first-of-type {
  border-top: 1px solid var(--line);
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  font-weight: 640;
  font-size: 17.5px;
  position: relative;
}

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

summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}

details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

details > div {
  padding: 0 0 18px;
}

details > div p:last-child {
  margin-bottom: 0;
}

.faq-group {
  margin: 0 0 40px;
}

.faq-group > .eyebrow {
  margin-bottom: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 40px;
  font-size: 14.5px;
  color: var(--muted);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.footer-brand strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 4px;
}

.footer-brand p {
  margin: 0;
  max-width: 34ch;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-content: flex-start;
}

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

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
}

.footer-bottom p {
  margin: 0;
}

.footer-privacy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.footer-privacy svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ---------- 404 ---------- */

.lost {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.lost h1 {
  font-size: clamp(36px, 6vw, 52px);
  margin: 18px 0 12px;
}

.lost p {
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero .wrap,
  .privacy-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .hero::before {
    width: 120%;
    right: -40%;
    top: 30%;
    height: 80%;
  }

  .hero-shots .phone-back {
    display: none;
  }

  .hero-shots .phone-front {
    width: 250px;
  }

  .privacy-shot {
    position: static;
    width: min(70%, 250px);
    justify-self: center;
    order: 2;
  }

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

  .toc {
    position: static;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 12px 12px;
  }
}

@media (max-width: 700px) {
  .nav .wide {
    display: none;
  }

  .truths,
  .cards,
  .cards.two {
    grid-template-columns: 1fr;
  }

  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 18px;
    padding-bottom: 18px;
    scroll-padding: 0 var(--gutter);
  }

  .gallery li {
    flex: 0 0 62vw;
    max-width: 250px;
    scroll-snap-align: start;
  }

  .flow li {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .flow .badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }

  .source-list li {
    flex-direction: column;
    gap: 2px;
  }

  .source-list li span:last-child {
    text-align: left;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16.5px;
  }

  .cta-row .btn {
    width: 100%;
  }

  .nav a {
    padding: 6px 10px;
  }
}

@media (max-width: 360px) {
  .brand span {
    display: none;
  }
}

@media print {
  .site-header,
  .toc,
  .site-footer nav {
    display: none;
  }

  .doc {
    display: block;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* Get the app: official store badges */
.get-app {
  display: grid;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  padding: 18px 20px 20px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 14px 34px -22px rgba(30, 28, 90, 0.45);
}

.get-app-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.get-app-head img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex: none;
}

.get-app-head strong {
  display: block;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.get-app-head span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

/* Clear space: Apple and Google both ask for a quarter of the badge height. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.store-badge {
  display: block;
  line-height: 0;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-badge img {
  display: block;
  height: 52px;
  width: auto;
}

.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.55);
}

.store-badge:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.hero .privacy-link {
  margin-bottom: 26px;
}

/* Download band at the end of the home page */
.get-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px) clamp(18px, 4vw, 40px);
}

.get-card > img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
}

.get-card h2 {
  margin: 4px 0 0;
}

.get-card p {
  margin: 0 0 10px;
  color: var(--muted);
  max-width: 46ch;
  text-wrap: balance;
}

.get-card .store-badges {
  justify-content: center;
}

.get-card .store-badge img {
  height: 58px;
}

.nowrap {
  white-space: nowrap;
}

.footer-legal {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 700px) {
  .get-app {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
  }

  .store-badges {
    gap: 12px;
  }

  /* Both badges share one height (Apple's and Google's rule), sized so the
     pair fits side by side on a phone: 6.4 ≈ the two badges' combined
     width-to-height ratio. */
  .store-badge img {
    height: clamp(40px, calc((100vw - 78px) / 6.4), 54px);
  }

  .get-card .store-badges {
    flex-wrap: nowrap;
  }

  .get-card .store-badge img {
    height: clamp(36px, calc((100vw - 92px) / 6.4), 54px);
  }

  .hero .privacy-link .btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    font-size: 15px;
  }
}
