@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --background: #F5F0E8;
  --card: #FFFCF7;
  --ink: #2A2420;
  --secondary: #6E645C;
  --hairline: #E6DDCF;
  --accent: #D9774B;
  --accent-deep: #A64D26;
  --on-accent: #FFFFFF;
  --accent-soft: #F6DCCB;
  --sage: #8FA98C;
  --sage-soft: #E3EBDF;
  --sage-ink: #44603F;
  --glow: rgba(217, 119, 75, 0.16);
  --shadow: 0 1px 2px rgba(138, 106, 79, 0.08), 0 18px 40px -18px rgba(138, 106, 79, 0.35);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --page: 1160px;
  --gutter: clamp(18px, 5vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1B1816;
    --card: #262220;
    --ink: #F2EBE3;
    --secondary: #A79C92;
    --hairline: #3A3430;
    --accent: #F09A6E;
    --accent-deep: #F09A6E;
    --on-accent: #2A1A12;
    --accent-soft: #4A3228;
    --sage: #A3BD9F;
    --sage-soft: #2E362C;
    --sage-ink: #B9D2B5;
    --glow: rgba(240, 154, 110, 0.13);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 44px -20px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 88% -8%, var(--glow), transparent 65%),
    radial-gradient(700px 480px at -10% 38%, color-mix(in srgb, var(--sage) 14%, transparent), transparent 70%),
    var(--background);
  color: var(--ink);
  font: 17px/1.55 var(--text);
}

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

main { overflow-x: clip; }

a { color: var(--accent-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--ink);
  color: var(--background);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

/* Top bar */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.01em;
  color: var(--accent-deep);
  text-decoration: none;
}
.brand img { width: 38px; height: 38px; margin-top: -4px; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--secondary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }

@media (max-width: 460px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tabs a { padding: 8px 11px; }
}

/* Home: hero */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding-top: clamp(16px, 4vw, 48px);
  padding-bottom: clamp(56px, 9vw, 110px);
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 40px; }
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--secondary);
  font-size: 16px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(42px, 11vw, 78px);
  line-height: 0.98;
}
.hero h1 em { font-style: normal; color: var(--accent-deep); }
.nb { white-space: nowrap; }

.hero .lead {
  max-width: 30ch;
  margin: 22px 0 30px;
  font-size: clamp(19px, 2.4vw, 22px);
  line-height: 1.45;
  color: var(--secondary);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
  padding: 8px 26px 9px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--background);
  text-decoration: none;
  line-height: 1.1;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.store:hover { transform: translateY(-2px); }
.store small { font-size: 12px; font-weight: 500; opacity: 0.85; }
.store strong { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }

.soon { margin: 0; max-width: 24ch; font-size: 14px; color: var(--secondary); }

.promise-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-ink);
  font-size: 15px;
  font-weight: 600;
}
.promise-chip svg { flex: none; }

.stage {
  position: relative;
  justify-self: center;
  width: min(300px, 74vw);
  margin-top: 100px;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 8% -22% 14% -22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent);
  z-index: -1;
}

.phone {
  position: relative;
  padding: 9px;
  border-radius: 46px;
  background: var(--ink);
  box-shadow: var(--shadow), 0 40px 80px -30px rgba(166, 77, 38, 0.45);
  transform: rotate(2.5deg);
}
.phone img, .shot img {
  width: 100%;
  height: auto;
  border-radius: 37px;
  aspect-ratio: 600 / 1300;
  object-fit: cover;
  object-position: top;
}

@media (prefers-color-scheme: dark) {
  .phone { background: #3A3430; }
}

.stage .octo {
  position: absolute;
  width: 46%;
  bottom: 100%;
  margin-bottom: -42px;
  z-index: 1;
  left: -20%;
  transform: rotate(-8deg);
  filter: drop-shadow(0 10px 14px rgba(138, 106, 79, 0.25));
}

.chip {
  position: absolute;
  right: -14%;
  bottom: 14%;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.3;
  color: var(--secondary);
  transform: rotate(-3deg);
}
.chip b { display: block; color: var(--ink); font-size: 16px; }

@media (max-width: 420px) {
  .chip { right: -6%; }
  .stage .octo { left: -10%; }
}

/* Dose-day dots, the marks from the Progress chart */

.dots {
  height: 12px;
  margin: 0 auto;
  max-width: var(--page);
  background: radial-gradient(circle, var(--accent) 3.5px, color-mix(in srgb, var(--accent) 25%, transparent) 4px, transparent 6.5px) center / 36px 12px repeat-x;
  -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

/* Home: privacy band */

.band {
  margin: clamp(56px, 9vw, 110px) auto;
}

.vault {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border-radius: clamp(28px, 4vw, 44px);
  background: var(--sage-soft);
  color: var(--sage-ink);
}
.vault::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -160px;
  border-radius: 50%;
  border: 56px solid color-mix(in srgb, var(--sage) 22%, transparent);
}

.kicker {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault h2 {
  position: relative;
  z-index: 1;
  max-width: 14ch;
  font-size: clamp(36px, 7vw, 64px);
  color: var(--ink);
}

.nos {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 34px 0 30px;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .nos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.nos li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--card) 72%, transparent);
}
.nos li + li { margin-top: 0; }
.nos b {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.1;
  color: var(--ink);
}
.nos span { font-size: 15px; line-height: 1.4; color: var(--secondary); }

.vault p { position: relative; z-index: 1; max-width: 56ch; margin: 0; }
.vault a { color: var(--sage-ink); font-weight: 600; }

/* Home: features */

.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(34px, 6vw, 56px); }
.section-head p { margin: 16px 0 0; font-size: 19px; color: var(--secondary); }

.feature {
  display: grid;
  gap: 36px;
  align-items: center;
  margin-bottom: clamp(56px, 8vw, 96px);
}
@media (min-width: 820px) {
  .feature { grid-template-columns: 300px 1fr; gap: clamp(48px, 7vw, 96px); }
  .feature.flip { grid-template-columns: 1fr 300px; }
  .feature.flip .shot { order: 2; }
}

.shot {
  width: min(280px, 80vw);
  justify-self: center;
  padding: 8px;
  border-radius: 44px;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.feature .shot { transform: rotate(-2deg); }
.feature.flip .shot { transform: rotate(2deg); }

.feature h3 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 22px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}
.steps li + li { margin-top: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
  color: var(--accent-deep);
}

/* Home: Watch, widgets and Siri */

.trio {
  display: grid;
  gap: 16px;
}
@media (min-width: 860px) { .trio { grid-template-columns: repeat(3, 1fr); } }

.tile {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 30px;
  background: var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.tile h3 { font-size: 26px; margin: 22px 0 10px; }
.tile p { margin: 0; color: var(--secondary); }

.art {
  display: grid;
  place-items: center;
  height: 150px;
  border-radius: 22px;
  background: var(--accent-soft);
}

.watch {
  width: 98px;
  height: 118px;
  padding: 12px 10px;
  border-radius: 30px;
  background: #1B1816;
  color: #F2EBE3;
  box-shadow: 0 0 0 5px #3A3430, var(--shadow);
  font-size: 11px;
  line-height: 1.25;
}
.watch b { display: block; color: #F09A6E; font-size: 11px; }
.watch strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 21px; font-weight: 600; }

.widgets { display: flex; gap: 12px; align-items: center; }
.widget {
  width: 96px;
  height: 96px;
  padding: 12px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.25;
  color: var(--secondary);
}
.widget strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 30px; line-height: 1; font-weight: 600; color: var(--ink); }
.ring {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-deep) 0 70%, color-mix(in srgb, var(--accent-deep) 22%, transparent) 0);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
}
.ring span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--ink);
}

.siri { display: grid; gap: 8px; padding: 0 18px; justify-items: start; }
.bubble {
  padding: 8px 14px;
  border-radius: 18px 18px 18px 6px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.bubble:nth-child(2) { margin-left: 22px; }

/* Home: the note */

.note-band {
  display: grid;
  gap: 20px;
  align-items: center;
  margin: clamp(56px, 9vw, 110px) auto clamp(40px, 6vw, 72px);
  padding: clamp(26px, 4vw, 40px);
  border-radius: 30px;
  border: 1.5px dashed color-mix(in srgb, var(--accent-deep) 55%, transparent);
}
@media (min-width: 760px) { .note-band { grid-template-columns: auto 1fr; gap: 36px; } }
.note-band h2 { font-size: clamp(28px, 4vw, 38px); max-width: 12ch; }
.note-band p { margin: 0; max-width: 62ch; color: var(--secondary); }
.note-band p + p { margin-top: 10px; }

/* Privacy and support */

.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
  padding-top: clamp(20px, 5vw, 56px);
  padding-bottom: clamp(28px, 5vw, 48px);
}
.page-head h1 { font-size: clamp(42px, 10vw, 76px); }
.page-head p { margin: 14px 0 0; font-size: 19px; color: var(--secondary); max-width: 40ch; }
.page-head img { width: clamp(72px, 16vw, 140px); align-self: start; }

.doc {
  display: grid;
  gap: 32px;
  padding-bottom: 32px;
}
@media (min-width: 960px) {
  .doc { grid-template-columns: 220px minmax(0, 720px); gap: 64px; }
}

.toc { display: none; }
@media (min-width: 960px) {
  .toc { display: block; position: sticky; top: 24px; align-self: start; }
  .toc p { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); }
  .toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--hairline); }
  .toc li + li { margin-top: 0; }
  .toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--secondary); font-size: 15px; text-decoration: none; }
  .toc a:hover { color: var(--ink); border-color: var(--accent); }
}

.card {
  padding: clamp(22px, 4vw, 30px);
  margin: 0 0 16px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--hairline);
  scroll-margin-top: 20px;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: clamp(24px, 3.4vw, 30px); margin-bottom: 12px; }
.card ul, .card ol { padding-left: 1.5em; }
.card ol li::marker { font-family: var(--display); font-weight: 600; color: var(--accent-deep); }
.card ul li::marker { color: var(--accent); }
li + li { margin-top: 6px; }

.card.promise {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--sage-soft);
  border-color: transparent;
  color: var(--sage-ink);
  font-weight: 600;
  font-size: 18px;
}
.card.promise svg { flex: none; margin-top: 2px; }

.card.note { border-left: 6px solid var(--accent); }

.meta { margin: 14px 0 0; color: var(--secondary); font-size: 15px; }

/* Blog */

.crumb { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.crumb a { text-decoration: none; }
.crumb a::before { content: "← "; }
.article-head h1 { font-size: clamp(36px, 7.4vw, 60px); max-width: 18ch; }

.prose { min-width: 0; font-size: 18px; line-height: 1.65; }
.prose > .card.note { font-size: 16px; line-height: 1.55; color: var(--secondary); margin-bottom: 28px; }
.prose .lede { font-size: clamp(20px, 2.6vw, 23px); line-height: 1.5; margin: 0 0 8px; }
.prose h2 { font-size: clamp(26px, 3.6vw, 34px); margin: 1.7em 0 0.5em; scroll-margin-top: 20px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ol li::marker { font-family: var(--display); font-weight: 600; color: var(--accent-deep); }
.prose ul li::marker { color: var(--accent); }

.prose table {
  width: 100%;
  margin: 8px 0 1em;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.prose caption { caption-side: top; text-align: left; padding: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--secondary); }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--hairline); }
.prose thead th:first-child { border-top-left-radius: 19px; }
.prose thead th:last-child { border-top-right-radius: 19px; }
.prose thead th { border-top: 0; background: var(--accent-soft); font-weight: 700; }
.prose tbody th { font-weight: 600; color: var(--secondary); }
@media (max-width: 420px) {
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 10px 6px; hyphens: auto; }
  .prose th:first-child, .prose td:first-child { padding-left: 12px; }
}

.app-cta {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 48px 0 40px;
  padding: clamp(24px, 4.5vw, 36px);
  border-radius: 30px;
  background:
    radial-gradient(420px 260px at 100% 0%, var(--glow), transparent 70%),
    var(--card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  font-size: 17px;
}
.app-cta-octo { width: 72px; height: 72px; }
@media (min-width: 640px) {
  .app-cta { grid-template-columns: 96px 1fr; gap: 26px; }
  .app-cta-octo { width: 96px; height: 96px; }
}
.app-cta .kicker { margin: 0 0 6px; }
.app-cta h2 { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 32px); }
.app-cta ul { margin: 0 0 22px; }
.app-cta .promise-chip { margin: 0; }

.sources h2 { font-size: 22px; margin-top: 0; }
.sources ol { font-size: 15px; color: var(--secondary); }

.related { padding: 24px 0 8px; }
.related h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 20px; }

.posts {
  display: grid;
  gap: 16px;
  padding-bottom: 32px;
}
@media (min-width: 720px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .posts { grid-template-columns: repeat(3, 1fr); } }

.post {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post h3 { font-size: 24px; }
.post p { margin: 0; color: var(--secondary); font-size: 16px; }
.post span { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 600; color: var(--accent-deep); }

.prose figure { margin: 8px 0 1.2em; padding: 20px; background: var(--card); border: 1px solid var(--hairline); border-radius: 22px; }
.prose figure svg { width: 100%; height: auto; }
.prose figure.diagram svg { max-width: 360px; margin: 0 auto; }
.prose figcaption { margin-top: 12px; font-size: 15px; color: var(--secondary); }
.diagram .body > * { fill: var(--background); stroke: var(--secondary); stroke-width: 1.5; }
.diagram .zone > * { fill: var(--accent); fill-opacity: 0.55; stroke: var(--accent-deep); stroke-width: 1.5; }
.prose svg .tick { fill: var(--secondary); font: 600 13px var(--text); }
.chart .grid { stroke: var(--hairline); }
.chart .line { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.chart .sema { stroke: var(--accent-deep); }
.chart .tirz { stroke: var(--sage-ink); stroke-dasharray: 9 7; }
.key { display: inline-block; width: 22px; height: 0; margin: 0 6px 4px 0; border-top: 3.5px solid var(--accent-deep); vertical-align: middle; }
.key.tirz { border-top: 3.5px dashed var(--sage-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; color: var(--ink); font-weight: 600; }
.chart svg { max-width: 560px; margin: 0 auto; }

/* Footer */

.foot {
  margin-top: 40px;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--hairline);
  color: var(--secondary);
  font-size: 15px;
}
.foot-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1fr auto; align-items: start; } }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { font-weight: 600; text-decoration: none; }
.foot p { margin: 0; max-width: 52ch; }
.foot p + p { margin-top: 6px; }

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .rise:nth-child(2) { animation-delay: 0.08s; }
  .rise:nth-child(3) { animation-delay: 0.16s; }
  .rise:nth-child(4) { animation-delay: 0.24s; }
  .rise:nth-child(5) { animation-delay: 0.32s; }
  .stage { animation: rise 1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .chip { animation: float 6s ease-in-out infinite; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes float { 50% { translate: 0 -6px; } }
}

@media (prefers-reduced-motion: reduce) {
  .store, .post { transition: none; }
  .store:hover, .post:hover { transform: none; }
}
