/* The blog: index and articles. Same paper as the landing — the app's LIGHT
   rung (DesignSystem.swift Palette, DS3 § 21.1): a card is the lightest layer
   on its ground, no strokes, the hairline is the only line. UI in Onest; the
   article body in Literata, a face drawn for long reading on screens.

   The reading column is 680 px (~68 characters of Literata at 20 px). Pictures
   break out of it on purpose, in three widths: the column, 920 (a pair of
   phones), 1200 (a wide photo). */

:root {
  --bg: #FBEFDD;
  --panel: #FDF5E9;
  --card: #FFFDF9;
  --surface-hi: #F0E4D0;
  --ink: #1A1A1A;
  --muted: #62594F;
  --faint: #8A8177;   /* marks only, never text: 3.4:1 */
  --brand: #8F5B14;
  --hairline: rgba(26, 26, 26, .08);
  --press-gold-face: #D9AC62;
  --press-gold-lip: #B98A3E;
  --press-gold-edge: #8F5B14;
  --press-edge-w: 1.5px;
  --ease-down: cubic-bezier(.4, 0, .2, 1);      --dur-down: 100ms;
  --ease-release: cubic-bezier(.3, .7, .4, 1.4); --dur-release: 180ms;
  --gutter: clamp(20px, 5vw, 48px);
  --serif: Literata, Georgia, "Times New Roman", serif;
}
@media (prefers-contrast: more) { :root { --press-edge-w: 2px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Onest, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

/* ── Header / footer (the landing's) ─────────────────────────────────────── */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 22px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark img { width: 32px; height: 32px; border-radius: 8px; }
.wordmark span { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.top nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); font-size: 15px; font-weight: 500; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a.strong, .top nav a[aria-current] { color: var(--ink); font-weight: 600; }
.legal { border-top: 1px solid var(--hairline); margin-top: clamp(72px, 9vw, 112px); }
.legal .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-block: 28px 40px; font-size: 14px; color: var(--muted); }
.legal nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.legal nav a { color: var(--muted); text-decoration: none; }
@media (max-width: 30rem) { .legal nav { margin-left: 0; } }

/* ── Press (DS3 § 7), light rung ─────────────────────────────────────────── */
.press {
  --h: 3.25rem; --lip: 4px; --lip-p: 2px; --r: 16px; --px: 1.375rem; --fs: 1.03125rem;
  position: relative; isolation: isolate; display: inline-flex; vertical-align: top;
  padding: 0 0 var(--lip); border-radius: var(--r);
  font: 600 var(--fs)/1.15 Onest, ui-sans-serif, -apple-system, sans-serif;
  color: var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.press::before {
  content: ""; position: absolute; z-index: -1; inset: var(--lip) 0 0 0;
  background: var(--press-gold-lip); border: var(--press-edge-w) solid var(--press-gold-edge); border-radius: var(--r);
}
.press__face {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: var(--h); padding: 0 var(--px);
  background: var(--press-gold-face); border: var(--press-edge-w) solid var(--press-gold-edge); border-radius: var(--r);
  transition: transform var(--dur-release) var(--ease-release), filter var(--dur-release) ease;
}
.press:active .press__face { transform: translateY(calc(var(--lip) - var(--lip-p))); transition-duration: var(--dur-down); transition-timing-function: var(--ease-down); }
@media (hover: hover) and (pointer: fine) { .press:hover .press__face { filter: brightness(1.04); } }
.press:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--r); }
@media (prefers-reduced-motion: reduce) { .press__face { transition: transform var(--dur-down) var(--ease-down), filter var(--dur-down) ease; } }

/* ── Index ───────────────────────────────────────────────────────────────── */
.blog-hero { padding-top: clamp(32px, 5vw, 64px); }
.eyebrow { margin: 0 0 16px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.blog-hero h1 { margin: 0 0 18px; font-size: clamp(44px, 6vw, 84px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.blog-hero p { margin: 0; max-width: 34rem; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--muted); }
.featured { display: flex; flex-wrap: wrap; align-items: center; gap: 28px clamp(32px, 5vw, 64px); margin-top: clamp(40px, 5vw, 64px); text-decoration: none; color: var(--ink); }
/* Direct children only: the card also carries the author's avatar, and a
   descendant selector stretched it into a 3:2 slab. */
.featured > img { flex: 1 1 520px; min-width: 0; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; }
.featured > span { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.meta { font-size: 14px; font-weight: 500; color: var(--muted); }
.meta b { font-weight: 500; color: var(--brand); }
.featured .title { font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.featured .dek { font-size: 18px; line-height: 1.55; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.3; color: var(--muted); }
.byline time { color: var(--muted); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-hi); }
.byline b { display: block; color: var(--ink); font-weight: 600; }

.band { margin-top: clamp(72px, 9vw, 112px); background: var(--panel); border-radius: 32px; padding: clamp(28px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.band > div { flex: 1 1 360px; display: flex; align-items: center; gap: 22px; }
.band > div > img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.band p { margin: 0; }
.band .t { margin-bottom: 4px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.band .s { font-size: 16px; color: var(--muted); }

/* Index: topics and cards (generated by site-src/blog/build.py). */
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.topics a { padding: 9px 18px; border-radius: 999px; background: var(--surface-hi); color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.topic { margin-top: clamp(56px, 7vw, 88px); padding-top: 28px; border-top: 1px solid var(--hairline); scroll-margin-top: 16px; }
.topic h2, .related h2 { margin: 0 0 28px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 28px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; margin-bottom: 4px; background: var(--panel); }
.card .title { font-size: 21px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; text-wrap: balance; }
.card .dek { font-size: 16px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related { margin-top: clamp(72px, 9vw, 112px); }

/* ── Article ─────────────────────────────────────────────────────────────── */
.post-head { max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; padding: clamp(24px, 4vw, 56px) var(--gutter) 0; }
.crumbs { margin-bottom: 22px; font-size: 14px; font-weight: 500; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs span:last-child { color: var(--brand); }
.crumbs span[aria-hidden] { margin: 0 8px; }
.post-head h1 { margin: 0 0 20px; font-size: clamp(34px, 4.6vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: 1.06; }
.post-head .dek { margin: 0 0 28px; font-family: var(--serif); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }

figure { margin: 0; }
figcaption { margin-top: 12px; font-family: Onest, ui-sans-serif, sans-serif; font-size: 14px; line-height: 1.5; color: var(--muted); }
figcaption a { color: var(--muted); }
.fig-hero { max-width: 1200px; margin: clamp(32px, 4vw, 48px) auto 0; padding: 0 var(--gutter); }
.fig-hero img { width: 100%; aspect-ratio: 16 / 9; min-height: 220px; object-fit: cover; border-radius: 24px; background: var(--panel); }
.fig-hero figcaption { max-width: 680px; margin-inline: auto; }

/* The body is one grid with three widths: the 680 px reading column, a
   920 px band for phone pairs and tables, and 1200 px for wide pictures.
   Everything sits in the column unless it asks to break out. */
.prose {
  --col: min(680px, 100vw - 2 * var(--gutter));
  display: grid;
  grid-template-columns: [full-start] minmax(var(--gutter), 1fr) [wide-start] minmax(0, 140px) [mid-start] minmax(0, 120px) [col-start] var(--col) [col-end] minmax(0, 120px) [mid-end] minmax(0, 140px) [wide-end] minmax(var(--gutter), 1fr) [full-end];
  padding-top: clamp(32px, 4vw, 48px);
  font-family: var(--serif); font-size: clamp(18px, 1.4vw + 10px, 20px); line-height: 1.7;
}
.prose > * { grid-column: col; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin: 56px 0 16px; font-family: Onest, ui-sans-serif, sans-serif; font-size: clamp(25px, 2.3vw, 31px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; scroll-margin-top: 24px; }
.prose h3 { margin: 32px 0 10px; font-family: Onest, ui-sans-serif, sans-serif; font-size: 21px; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brand); }
.prose a { text-underline-offset: 3px; }
.prose strong { font-weight: 600; }

.takeaways { margin: 0 0 32px; padding: 24px 28px; border-radius: 20px; background: var(--card); font-family: Onest, ui-sans-serif, sans-serif; }
.takeaways > p { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.takeaways ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16.5px; line-height: 1.5; }
.takeaways li { display: flex; gap: 12px; margin: 0; }
.takeaways li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .55em; border-radius: 4px; background: var(--press-gold-face); }

.toc { margin: 24px 0 8px; padding: 24px 28px; border-radius: 20px; background: var(--panel); font-family: Onest, ui-sans-serif, sans-serif; }
.toc p { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 22px; columns: 2 260px; column-gap: 32px; font-size: 16px; font-weight: 500; line-height: 1.45; }
.toc li { margin-bottom: 8px; break-inside: avoid; }
.toc li::marker { color: var(--faint); }
.toc a { text-decoration: none; }

/* Phones: honest bezels around real captures, never cropped by a box. */
.phone { margin: 0; padding: 7px; border-radius: 36px; background: #1A1A1A; }
.phone img { width: 100%; border-radius: 30px; }
.fig-single, .fig-pair, .fig-device { margin: 36px 0; }
.fig-single .stage, .fig-pair .stage, .fig-device .stage { display: flex; justify-content: center; gap: clamp(14px, 4vw, 48px); padding: clamp(24px, 4vw, 44px) clamp(14px, 4vw, 44px); border-radius: 24px; background: var(--panel); }
.fig-single .phone { width: min(100%, 250px); }
.fig-pair { grid-column: wide; justify-self: center; width: min(100%, 920px); }
.fig-pair .phone { flex: 0 1 250px; min-width: 0; }
.fig-pair figcaption { max-width: 680px; margin-inline: auto; }
.fig-device { grid-column: wide; }
/* Another app's App Store screenshot: their own marketing panel, device frame
   and all, so no bezel of ours; small, so it reads as a quote from their
   listing and not as our picture. */
.fig-store .store { width: min(100%, 240px); border-radius: 20px; }
.fig-pair.fig-store .store { flex: 0 1 240px; min-width: 0; }
.fig-device .device { width: min(100%, 980px); border-radius: 18px; border: 7px solid #1A1A1A; }
.fig-device figcaption { max-width: 680px; margin-inline: auto; }
.fig-photo { margin: 40px 0; }
.fig-photo img { width: 100%; object-fit: cover; border-radius: 20px; background: var(--panel); }
.fig-photo--col img { aspect-ratio: 3 / 2; }
.fig-photo--wide { grid-column: wide; }
.fig-photo--wide img { aspect-ratio: 21 / 9; min-height: 200px; border-radius: 24px; }
.fig-photo--wide figcaption { max-width: 680px; margin-inline: auto; }

.table-wrap { grid-column: wide; justify-self: center; width: min(100%, 920px); margin: 32px 0; overflow-x: auto; border-radius: 20px; background: var(--card); font-family: Onest, ui-sans-serif, sans-serif; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.45; }
.table-wrap caption { caption-side: top; text-align: left; padding: 20px 22px 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.table-wrap th, .table-wrap td { padding: 12px 22px; text-align: left; vertical-align: top; border-top: 1px solid var(--hairline); }
.table-wrap thead th { border-top: 0; font-weight: 600; color: var(--muted); font-size: 14px; }
.table-wrap tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
/* At phone width a 4-5 column table squeezes each cell to a word per line, so each
   row becomes its own card and every value carries its column name (data-label,
   written by build.py). The first cell, the row's name, is the card's title. */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; background: none; border-radius: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td, .table-wrap tbody th { display: block; }
  .table-wrap caption { display: block; padding: 0 2px 12px; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tbody tr { margin-bottom: 10px; padding: 16px 18px; border-radius: 16px; background: var(--card); }
  .table-wrap td, .table-wrap tbody th { padding: 0; border: 0; white-space: normal; }
  .table-wrap tbody tr > :first-child { margin-bottom: 8px; font-size: 16.5px; font-weight: 600; color: var(--ink); }
  .table-wrap td[data-label] + td[data-label] { margin-top: 10px; }
  .table-wrap td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}

.pull { margin: 36px 0 44px; padding: 0; text-align: center; }
.pull p { margin: 0; font-style: italic; font-size: clamp(24px, 2.5vw, 31px); line-height: 1.32; letter-spacing: -.01em; text-wrap: balance; }
.pull p::before { content: "\201C"; color: var(--brand); }
.pull p::after { content: "\201D"; color: var(--brand); }

.try { margin: 32px 0 36px; padding: 22px 24px; border-radius: 20px; background: var(--card); display: flex; gap: 18px; align-items: flex-start; font-family: Onest, ui-sans-serif, sans-serif; }
.try > img { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.try .t { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.try .s { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.try a { font-size: 15px; font-weight: 600; text-decoration: none; }

.check { margin: 36px 0 0; padding: 28px; border-radius: 20px; background: var(--panel); }
.check > p { margin: 0 0 14px; font-family: Onest, ui-sans-serif, sans-serif; font-size: 18px; font-weight: 600; }
.check ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check li { display: flex; gap: 14px; align-items: baseline; margin: 0; }
.check li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 4px; background: var(--press-gold-face); transform: translateY(-3px); }

.faq { margin-top: 24px; font-family: Onest, ui-sans-serif, sans-serif; }
.faq h2 { margin-top: 56px; }
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary { cursor: pointer; padding: 18px 36px 18px 0; position: relative; list-style: none; font-size: 18px; font-weight: 600; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 22px; font-weight: 400; color: var(--brand); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 18px; font-size: 17px; line-height: 1.6; color: var(--muted); }

.author { margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--hairline); display: flex; gap: 16px; align-items: flex-start; font-family: Onest, ui-sans-serif, sans-serif; }
.author .avatar { width: 52px; height: 52px; }
.author p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.author b { display: block; margin-bottom: 4px; font-size: 17px; color: var(--ink); }

/* The inline arrow that replaces the "→" glyph (build.py ARROW). */
.arr { display: inline-block; vertical-align: -.12em; margin-left: .25em; }
