/* Tokens come from the apps: paper from the icon, ink from the iOS Save capsule, and red only for Record. */
:root {
  color-scheme: light dark;
  --paper: #f7f5ef;
  --ink: #111110;
  --ink-2: rgb(17 17 16 / 0.72);
  --ink-3: rgb(17 17 16 / 0.6);
  --rule: rgb(17 17 16 / 0.11);
  --fill: rgb(17 17 16 / 0.055);
  --fill-2: rgb(17 17 16 / 0.09);
  --win: #fdfcf9;
  --side: #efede6;
  --glass: rgb(253 252 249 / 0.78);
  --record: #ff3b30;
  --tile: #ffffff;
  --shadow-win: 0 1px 2px rgb(40 32 16 / 0.05), 0 24px 64px -28px rgb(40 32 16 / 0.28);
  --shadow-panel: 0 2px 6px rgb(40 32 16 / 0.07), 0 18px 44px -14px rgb(40 32 16 / 0.32);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  --gutter: 40px;
  --margin: 168px;
  --inset: 36px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131311;
    --ink: #f4f2ec;
    --ink-2: rgb(244 242 236 / 0.72);
    --ink-3: rgb(244 242 236 / 0.56);
    --rule: rgb(244 242 236 / 0.13);
    --fill: rgb(244 242 236 / 0.07);
    --fill-2: rgb(244 242 236 / 0.12);
    --win: #1b1b18;
    --side: #171715;
    --glass: rgb(38 38 34 / 0.76);
    --record: #ff453a;
    --shadow-win: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 64px -28px rgb(0 0 0 / 0.8);
    --shadow-panel: 0 2px 6px rgb(0 0 0 / 0.3), 0 18px 44px -14px rgb(0 0 0 / 0.8);
  }
}

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

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ol, blockquote, figure { margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; color: inherit; }
a { color: inherit; touch-action: manipulation; }
svg { display: block; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

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

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none;
}
.skip:focus-visible { top: 12px; }

.num { font-variant-numeric: tabular-nums; }

kbd {
  font: inherit;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.dot {
  display: inline-block; width: 8px; height: 8px; margin-right: 7px;
  border-radius: 50%; background: var(--record); vertical-align: 0.06em;
}

/* The page's one structural idea: a real margin. A hairline runs the full height
   and what hangs in it is always a fact or a note, never a section name. */
.page {
  position: relative;
  min-height: 100dvh;
  max-width: calc(1240px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.page::before {
  content: "";
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--gutter) + var(--margin));
  width: 1px;
  background: var(--rule);
  pointer-events: none;
}

.band {
  display: grid;
  grid-template-columns: var(--margin) minmax(0, 1fr);
  align-items: start;
}

.main { padding-left: var(--inset); min-width: 0; }

.note {
  padding-right: 20px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
  text-wrap: balance;
}

/* Header */
.top {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.012em;
  text-decoration: none;
}
.brand-mark { width: 22px; height: 22px; }

.nav { display: flex; gap: 4px; margin-right: -12px; }
.nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 12px;
  color: var(--ink-2); font-size: 14px; text-decoration: none;
  transition: color 150ms ease;
}

/* Hero */
.hero { padding-top: 20px; }

h1 {
  font-size: clamp(2.875rem, 6.1vw, 5.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.032em;
}
h1 span { display: inline-block; }

.hero > .band:first-child .note { padding-top: 0.7em; }
/* Above the window, so the QR popover opens over it. */
.hero-lede { position: relative; z-index: 4; margin-top: 28px; }
.hero-lede .note { padding-top: 5px; }
.hero-lede kbd { color: var(--ink); }

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: start;
}

.lede {
  max-width: 35em;
  font-size: 19px;
  line-height: 1.48;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-get { justify-self: end; }

.cta { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.008em;
  text-decoration: none; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, opacity 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { border-radius: 999px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-quiet { background: var(--fill); color: var(--ink); }

.fine { margin-top: 12px; color: var(--ink-3); font-size: 13px; }

/* QR popover: scales from the button that owns it, and only exists where a pointer can hover. */
.has-pop { position: relative; }
.pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 5;
  display: none;
  width: 220px; padding: 14px;
  border-radius: 18px;
  background: var(--win);
  box-shadow: 0 0 0 0.5px var(--rule), var(--shadow-panel);
  font-size: 12px; line-height: 1.4; color: var(--ink-2);
  opacity: 0; transform: scale(0.96); transform-origin: top right;
  visibility: hidden;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), visibility 0s linear 150ms;
}
.pop .qr-tile { width: 192px; height: 192px; padding: 8px; }
.pop .qr-tile img { width: 100%; height: 100%; }
.pop-text { display: block; margin-top: 10px; }

@media (hover: hover) and (pointer: fine) {
  .pop { display: block; }
  .has-pop:hover .pop, .btn-iphone:focus-visible + .pop {
    opacity: 1; transform: none; visibility: visible;
    transition: opacity 150ms var(--ease-out) 60ms, transform 150ms var(--ease-out) 60ms, visibility 0s linear 60ms;
  }
  .nav a:hover { color: var(--ink); }
  .btn-ink:hover { opacity: 0.84; }
  .btn-quiet:hover { background: var(--fill-2); }
  .foot a:hover { color: var(--ink); }
  .qr:hover .qr-url { text-decoration-color: var(--ink); }
  .demo .row:not(:disabled):not([aria-current="true"]):hover { background: var(--fill); }
  .side-item:not(:disabled):not([aria-pressed="true"]):hover { background: var(--fill); }
  .src-back:not(:disabled):hover, .src-note:not(:disabled):hover { background: var(--fill); }
  .panel-undo:hover { opacity: 0.7; }
  .panel-send:hover { background: var(--fill-2); }
}

/* Illustration: native sizes and strings from LibraryUI.swift and QuickPanel.swift */
.demo { position: relative; margin-top: 48px; }

.win {
  display: grid;
  grid-template-columns: 204px 292px minmax(0, 1fr);
  height: 600px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--win);
  box-shadow: 0 0 0 0.5px var(--rule), var(--shadow-win);
  font-size: 13px;
  line-height: 1.38;
  text-align: left;
}

.side {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--side);
  border-right: 0.5px solid var(--rule);
}
.lights { display: flex; gap: 8px; padding: 16px 16px 0; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: var(--fill-2); box-shadow: inset 0 0 0 0.5px var(--rule); }
.side-brand {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 16px 14px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.012em;
}
.side-brand svg { width: 19px; height: 19px; }
.side-list { flex: 1; min-height: 0; padding: 0 8px; }
.side-head { padding: 14px 8px 4px; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.side-item {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 100%; min-height: 28px; padding: 0 8px;
  border-radius: 7px;
  font-size: 13px;
}
.side-item svg { width: 15px; height: 15px; color: var(--ink-2); }
.side-item[aria-pressed="true"] { background: var(--fill-2); font-weight: 500; }
.side-item .n { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-foot { padding: 12px 16px 16px; }
.side-new { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.side-new svg { width: 13px; height: 13px; }

.list {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  border-right: 0.5px solid var(--rule);
}
.list-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 16px 10px; }
.list-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.list-tools svg { width: 15px; height: 15px; color: var(--ink-2); }
.search {
  display: flex; align-items: center; gap: 7px;
  margin: 0 12px 8px; padding: 0 9px; height: 30px;
  border-radius: 8px;
  background: var(--fill);
}
.search svg { width: 13px; height: 13px; flex: none; color: var(--ink-3); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: none;
  font-size: 12px;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 1px; }
.rows { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; }
.day {
  padding: 10px 8px 5px;
  font-size: 11px; font-weight: 500; color: var(--ink-3);
}
.row {
  display: block; width: 100%;
  padding: 9px 8px;
  border-radius: 8px;
}
.row[aria-current="true"] { background: var(--fill-2); }
.row-t {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-size: 13px; font-weight: 500;
}
.row-m {
  display: flex; align-items: center; gap: 5px;
  margin-top: 7px;
  font-size: 10px; color: var(--ink-3);
}
.row-m > :first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-m svg { width: 11px; height: 11px; flex: none; }
.row.enter {
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}
@starting-style {
  .row.enter { opacity: 0; transform: translateY(-6px); }
}
.list-empty { padding: 44px 16px; text-align: center; font-size: 11px; color: var(--ink-2); }
.list-empty p:first-child { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.list-foot { padding: 9px 16px; border-top: 0.5px solid var(--rule); font-size: 10px; color: var(--ink-2); }

.reader { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 30px 30px; }
.src-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 11px; color: var(--ink-2); }
.src-folder { display: inline-flex; align-items: center; gap: 5px; }
.src-folder svg { width: 13px; height: 13px; }
.src-folder .chev { width: 9px; height: 9px; }
.src-tools { display: inline-flex; align-items: center; gap: 13px; }
.src-tools svg { width: 14px; height: 14px; }
.src h3 { font-size: 25px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 8px; text-wrap: balance; }
.src-m { font-size: 11px; color: var(--ink-2); margin-bottom: 4px; }
.src-label {
  margin: 20px 0 8px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2);
}
.src-label-plain { font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.src-note {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px;
  width: calc(100% + 16px); margin-inline: -8px; padding: 6px 8px;
  border-radius: 7px; font-size: 12px;
  transition: background-color 120ms ease;
}
.src-note .num { color: var(--ink-2); }
.src-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 6px -6px 16px; padding: 4px 6px;
  border-radius: 6px; font-size: 11px; color: var(--ink-2);
  transition: background-color 120ms ease;
}
.src-back svg { width: 12px; height: 12px; }
.src-body { font-size: 14px; line-height: 1.55; white-space: pre-wrap; text-wrap: pretty; }
.cues p { font-size: 14px; line-height: 1.55; margin-bottom: 10px; }
.cues b { font-weight: 600; }
.cue { color: var(--ink-3); font-size: 11px; }
.finding { margin-top: 2px; }
.finding summary { font-size: 13px; cursor: pointer; padding: 3px 0 9px; }
.finding summary:focus-visible { border-radius: 4px; }
.finding blockquote { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.finding .src-m { font-size: 10px; color: var(--ink-3); }
.src-app { font-size: 13px; margin-top: 8px; }
.idle { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.idle p:first-child { font-size: 17px; font-weight: 500; }
.idle p:last-child { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* Quick Capture hangs into the page's margin: it floats over everything in the app, too. */
.panel {
  position: absolute; z-index: 3;
  left: calc(-1 * var(--inset) - var(--margin) + 8px);
  bottom: 130px;
  width: 392px;
  padding: 12px 14px 12px 16px;
  border-radius: 24px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 0 0 0.5px var(--rule), var(--shadow-panel);
}
.panel:has(textarea:focus-visible) { box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-panel); }
.panel-field { position: relative; display: flex; align-items: flex-start; gap: 8px; }
.panel textarea {
  flex: 1; min-width: 0; display: block;
  min-height: 40px; max-height: 130px; padding: 8px 0 8px 2px;
  border: 0; outline: 0; background: none; resize: none;
  font-size: 16px; line-height: 24px;
  field-sizing: content;
}
.panel textarea::placeholder { color: var(--ink-3); opacity: 1; }
.panel textarea:read-only { cursor: default; }
.panel-mic { flex: none; width: 34px; height: 34px; margin-top: 3px; padding: 8px; color: var(--ink-3); }
.panel-send {
  display: none; flex: none;
  width: 34px; height: 34px; margin-top: 3px;
  border-radius: 50%;
  background: var(--fill);
  align-items: center; justify-content: center;
  transition: transform 160ms var(--ease-out), background-color 120ms ease;
}
.panel-send svg { width: 15px; height: 15px; }
.panel-send:active { transform: scale(0.94); }
.panel-send:focus-visible { border-radius: 50%; }
.panel.has-text .panel-mic { display: none; }
.panel.has-text .panel-send { display: flex; }
.panel-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 2px 2px 0;
  font-size: 11px; color: var(--ink-3);
}
.panel-chooser { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); min-width: 0; }
.panel-chooser svg { width: 12px; height: 12px; flex: none; }
.panel.is-routed .panel-chooser { color: var(--ink); font-weight: 500; }
.panel-hint { white-space: nowrap; color: var(--ink-2); }
.panel-undo { color: var(--ink); font-weight: 500; margin-left: 4px; transition: opacity 120ms ease; }

.demo-note { padding-top: 48px; text-wrap: pretty; }
.demo-note b { font-weight: 500; color: var(--ink-2); }
.js-only { display: none; }
.js .js-only { display: inline; }
.js .no-js-only { display: none; }

/* Chapters */
.chapter { padding-top: clamp(96px, 11vw, 160px); }
.chapter .band > .note { padding-top: 0.72em; }

h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 20em;
}
.body {
  max-width: 35em;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.52;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}
.body + .body { margin-top: 12px; }

/* Marginalia made literal: the same note the app files under the call. */
.page-source { margin-top: 56px; }
.line + .line { margin-top: 26px; }
.speech {
  max-width: 28em;
  font-size: clamp(1.3125rem, 2.3vw, 1.875rem);
  line-height: 1.26;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  text-wrap: pretty;
}
.line-key .speech { color: var(--ink); }
.note-time { padding-top: 0.58em; font-size: 12px; }
.line-key .note { padding-top: 0.5em; text-wrap: pretty; }
.note-written .note-time { display: block; padding: 0 0 6px; }
.scribble { color: var(--ink); font-size: 13px; line-height: 1.38; font-weight: 500; }
.scribble-source { margin-top: 5px; font-size: 11px; color: var(--ink-3); }

.tracks { margin-top: 44px; max-width: 880px; }
.track + .track { margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--rule); }
.track-label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 8px; }
.track svg { width: 100%; height: 44px; color: var(--ink); overflow: hidden; }

.quote-line { margin-top: 48px; }
.quote-line .speech { color: var(--ink); }

.typed {
  margin-top: 40px;
  font-size: clamp(1.3125rem, 2.3vw, 1.875rem);
  line-height: 1.26;
  letter-spacing: -0.02em;
}
.tag { color: var(--ink-3); white-space: nowrap; }
.typed-result { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.typed-result svg { width: 14px; height: 14px; }

.evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 72px;
  align-items: start;
}
.menu {
  margin-top: 8px;
  padding: 6px;
  border-radius: 12px;
  background: var(--win);
  box-shadow: 0 0 0 0.5px var(--rule), var(--shadow-win);
  font-size: 13px;
}
.menu-head { padding: 5px 9px 3px; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.menu span { display: block; padding: 4px 9px; border-radius: 6px; }
.menu span:nth-of-type(2) { background: var(--fill-2); }
.menu i { display: block; height: 0.5px; margin: 5px 9px; background: var(--rule); }

.phone-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: start;
}
.status { margin-top: 28px; max-width: 35em; padding-top: 14px; border-top: 0.5px solid var(--rule); }
.status-line { font-size: 15px; color: var(--ink-2); text-wrap: pretty; }
.status-line b { color: var(--ink); font-weight: 500; }

.qr {
  display: inline-flex; align-items: center; gap: 18px;
  margin-top: 24px;
  text-decoration: none;
  border-radius: 16px;
}
.qr:focus-visible { outline-offset: 4px; border-radius: 16px; }
/* Always white, in dark mode too, so the code stays scannable. */
.qr-tile {
  display: block; flex: none;
  width: 132px; height: 132px; padding: 8px;
  border-radius: 14px;
  background: var(--tile);
  box-shadow: 0 0 0 0.5px var(--rule);
  color: #111110; font-size: 11px; line-height: 1.3;
}
.qr-tile img { width: 100%; height: 100%; }
.qr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qr-hint { font-size: 13px; color: var(--ink-3); }
.qr-url {
  font-size: 15px; font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-decoration-color 150ms ease;
}

/* Drawn from CaptureViews.swift. The dot does not pulse because nothing is recording. */
.phone {
  position: relative;
  width: 280px; height: 548px;
  border-radius: 42px;
  background: var(--win);
  box-shadow: 0 0 0 0.5px var(--rule), var(--shadow-win);
}
.phone-top {
  display: flex; justify-content: space-between;
  padding: 44px 22px 0;
  color: var(--ink-2);
}
.phone-top svg { width: 21px; height: 21px; }
.phone-prompt { padding: 24px 22px 0; font-size: 16px; color: var(--ink-3); }
.phone-record {
  position: absolute; left: 16px; bottom: 86px;
  display: inline-flex; align-items: center;
  height: 42px; padding: 0 18px 0 16px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 600;
}
.phone-tabs {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--win);
  box-shadow: 0 0 0 0.5px var(--rule), 0 8px 24px -10px rgb(40 32 16 / 0.28);
}
.phone-tabs span {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 76px; padding: 6px 0 5px;
  border-radius: 999px;
  font-size: 10px; font-weight: 500;
  color: var(--ink-2);
}
.phone-tabs svg { width: 19px; height: 19px; }
.phone-tabs .is-on { background: var(--fill); color: var(--ink); }

.path { color: var(--ink); white-space: nowrap; }

.ledger {
  width: 100%; max-width: 980px;
  margin-top: 34px;
  border-collapse: collapse;
  font-size: 15px; line-height: 1.42;
}
.ledger th, .ledger td {
  padding: 13px 28px 13px 0;
  border-top: 0.5px solid var(--rule);
  text-align: left; vertical-align: top;
  font-weight: 400;
}
.ledger thead th { border-top: 0; padding-block: 0 9px; font-size: 12px; color: var(--ink-3); }
.ledger tbody th { width: 21%; font-weight: 500; }
.ledger td { color: var(--ink-2); }
.ledger td:first-of-type { width: 49%; }
.ledger td:last-child { padding-right: 0; }

.steps {
  max-width: 35em;
  margin-top: 26px;
  list-style: none;
  counter-reset: step;
  font-size: 17px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 11px 0 11px 30px;
  border-top: 0.5px solid var(--rule);
  text-wrap: pretty;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.steps b { font-weight: 500; }
.steps + .cta { margin-top: 26px; }

.chapter-last { padding-bottom: 120px; }

.foot {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px;
  padding: 16px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 0.5px solid var(--rule);
  font-size: 13px; color: var(--ink-3);
}
.foot span { margin-right: auto; }
.foot a {
  display: inline-flex; align-items: center;
  min-height: 44px;
  text-decoration: none;
  transition: color 150ms ease;
}

/* iPhone page */
.ios-head { margin-bottom: 22px; }
.ios-icon { width: 76px; height: 76px; border-radius: 17px; box-shadow: 0 0 0 0.5px var(--rule); }
.ios h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.ios .lede { margin-top: 18px; }
.ios-main { padding-top: 40px; padding-bottom: 96px; }
.ios-block { margin-top: 48px; max-width: 35em; }
.ios-block h2 { font-size: 21px; font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; }
.ios-status { font-size: 19px; line-height: 1.45; letter-spacing: -0.012em; text-wrap: pretty; color: var(--ink-2); }
.ios-status b { font-weight: 500; color: var(--ink); }
.ios-status + .cta { margin-top: 20px; }
.ios .steps { margin-top: 14px; font-size: 16px; }
.ios .fine { margin-top: 14px; }
.ios-404 .cta { margin-top: 24px; }
.privacy .ios-block p { margin-top: 14px; color: var(--ink-2); }

/* First-load only, and only on the one view that earns it. */
@media (prefers-reduced-motion: no-preference) {
  .rise, .rise-late > .win {
    animation: rise 620ms var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
  .rise-late > .win { --i: 3; }
  .rise-late > .panel {
    animation: pop 380ms var(--ease-out) 460ms both;
    transform-origin: 20% 100%;
  }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  @keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(6px); } }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active, .panel-send:active { transform: none; }
  .row.enter { transition: none; }
  .pop { transition: none !important; transform: none; }
}

/* Keep the reader readable once the window gets narrower. The sidebar goes first, as in a split view. */
@media (max-width: 1240px) {
  .win { grid-template-columns: 276px minmax(0, 1fr); }
  .side { display: none; }
  .panel { bottom: -26px; width: 360px; }
  .hero { padding-bottom: 26px; }
}

/* Below this the margin is gone, and the notes sit above what they annotate. */
@media (max-width: 1040px) {
  :root { --gutter: 28px; --margin: 0px; --inset: 0px; }
  .page::before { display: none; }
  .band { grid-template-columns: minmax(0, 1fr); }
  .note { text-align: left; padding-right: 0; }
  .note br { display: none; }
  .demo-note { padding-top: 44px; }
  .note-ios { margin-bottom: 18px; }
  .hero > .band:first-child { display: flex; flex-direction: column-reverse; gap: 16px; }
  .hero > .band:first-child .note { padding-top: 0; }
  .hero-lede { display: flex; flex-direction: column-reverse; gap: 20px; }
  .hero-lede .note br { display: inline; }
  .hero-lede .note { padding-top: 0; font-size: 14px; }
  .hero-split { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero-get { justify-self: start; }
  .pop { right: auto; left: 0; transform-origin: top left; }
  .demo { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
  .panel { position: relative; left: auto; bottom: auto; width: 100%; }
  .chapter .band > .note { order: 1; padding-top: 18px; }
  .chapter .band > .main { order: 0; }
  .line { display: flex; flex-direction: column; gap: 4px; }
  .chapter .line > .note { order: 0; padding-top: 0; }
  .chapter .line > .main { order: 1; }
  .line-key { gap: 10px; }
  .line-key .note-time { display: block; }
  .note-written { padding-left: 12px; border-left: 1px solid var(--rule); }
  .note-written .note-time { padding-bottom: 3px; }
  .evidence, .phone-split { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .menu { max-width: 260px; margin-top: 0; }
  .phone { margin-inline: auto; }
  .ledger { max-width: none; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 16px; }
  .top { height: 64px; }
  .nav-optional { display: none !important; }
  .hero { padding-top: 24px; }
  .lede { font-size: 18px; }
  .cta { width: 100%; }
  .cta .btn, .has-pop { flex: 1 1 auto; }
  .has-pop .btn { width: 100%; }
  .pop { display: none !important; }
  .win { display: flex; flex-direction: column; height: auto; }
  .list { border-right: 0; border-bottom: 0.5px solid var(--rule); }
  .list-top { padding-top: 16px; }
  .rows { overflow: visible; }
  .row { padding-block: 11px; }
  .reader { overflow: visible; padding: 16px 16px 24px; }
  .src h3 { font-size: 22px; }
  .panel-meta { flex-wrap: wrap; gap: 2px 12px; }
  .qr { align-items: flex-start; flex-direction: column; gap: 12px; }
  .evidence, .phone-split { gap: 40px; }
  .phone { height: 440px; }
  .chapter { padding-top: 80px; }
  .tracks { margin-top: 34px; }

  /* A table you can read in order at phone width */
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; width: auto !important; }
  .ledger thead { display: none; }
  .ledger tr { padding: 13px 0; border-top: 0.5px solid var(--rule); }
  .ledger th, .ledger td { padding: 0; border: 0; }
  .ledger td { margin-top: 3px; }
  .ledger td:last-child { color: var(--ink-3); font-size: 14px; }
  .chapter-last { padding-bottom: 80px; }
}

/* Only a real phone: it can't scan its own screen and can't run a DMG, so the order flips. Both stay. */
@media (hover: none) and (pointer: coarse) and (max-width: 720px) {
  .cta .has-pop, .cta .btn-iphone { order: -1; }
  .btn-iphone { background: var(--ink); color: var(--paper); }
  .btn-mac { background: var(--fill); color: var(--ink); }
  .qr .qr-tile, .qr-hint, .ios-qr-block { display: none; }
  .qr { margin-top: 16px; min-height: 44px; justify-content: center; }
}

/* Touch-sized controls inside the illustration. Narrow windows get them too. */
@media (pointer: coarse), (max-width: 720px) {
  .side-item { min-height: 44px; }
  .row { min-height: 56px; }
  .search { height: 44px; }
  .search input { font-size: 16px; }
  .panel textarea { min-height: 44px; padding-block: 10px; }
  .panel-send { width: 44px; height: 44px; margin-top: 0; }
  .panel-mic { width: 44px; height: 44px; margin-top: 0; padding: 13px; }
  .panel-undo { min-height: 44px; padding: 0 8px; }
  .src-note, .src-back { min-height: 44px; align-items: center; }
  .finding summary { min-height: 44px; padding-block: 11px; }
}
