/* Nib Count's website: the app's paper, ink and brass, Literata for headings and figures,
   the system sans for reading. No frameworks, one file. */

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-2.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
/* Close to Literata's size on Georgia, so the swap barely moves anything. */
@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 26%;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;
  --paper: #F7F2E8;
  --card: #FFFDF8;
  --vellum: #EFE6D6;
  --tint: #F3ECDF;
  --ink: #1F2A44;
  --ink-soft: #3B4A6B;
  --brass: #7A5C30;
  --text: #2B2620;
  --muted: #645B51;
  --rule: #DDD2BE;
  --outline: #B9AC95;
  --good: #3E6B48;
  --primary: #1F2A44;
  --on-primary: #FFFDF8;
  --primary-container: #DCE2F0;
  --secondary-container: #F1E3C8;
  --on-secondary-container: #4A3818;
  --hero: #1F2A44;
  --on-hero: #FFFDF8;
  --on-hero-muted: #B9C3DA;
  --hero-glow: #3B4A6B;
  --hero-good: #8FC29B;
  --brass-on-ink: #D9B47B;
  --bar: rgba(59, 74, 107, .75);
  --shadow: 0 1px 2px rgba(31, 42, 68, .04), 0 4px 14px rgba(31, 42, 68, .05);
  --shadow-lg: 0 2px 6px rgba(31, 42, 68, .06), 0 24px 64px -12px rgba(31, 42, 68, .22);

  --serif: "Literata", "Literata Fallback", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --wrap: 1140px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1a11 11 0 1 0 0 22a11 11 0 1 0 0-22zM5.6 12.4 7.1 10.9l3 3 6.8-7.2 1.5 1.4-8.3 8.8z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1014;
    --card: #171A20;
    --vellum: #22262E;
    --tint: #1C2027;
    --ink: #C3CEEA;
    --ink-soft: #A9B5D3;
    --brass: #D9B47B;
    --text: #E9EAEE;
    --muted: #A3A8B4;
    --rule: #2C3038;
    --outline: #5E6470;
    --good: #8FC29B;
    --primary: #C3CEEA;
    --on-primary: #16203A;
    --primary-container: #2C3958;
    --secondary-container: #2A2F3A;
    --on-secondary-container: #E6E9F0;
    --hero: #243150;
    --on-hero: #F3EDE2;
    --on-hero-muted: #A9B5D3;
    --hero-glow: #2C3958;
    --bar: rgba(142, 157, 196, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .2);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 64px -12px rgba(0, 0, 0, .6);
  }
}

@media (prefers-contrast: more) {
  :root { --muted: #3A342D; --rule: #8A7F6E; --outline: #5E5548; --text: #110E0A; --brass: #5E4522; --on-hero-muted: #E3E8F3; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root { --paper: #000; --text: #fff; --muted: #D6D9E0; --rule: #5E6470; --outline: #9AA0AC; --brass: #E2BE82; --on-hero-muted: #DCE2F0; }
}

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
  font-optical-sizing: auto;
}
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }

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

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Small capitals, like a book's running heads (and the app's section labels). */
.eyebrow {
  font-family: var(--serif);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .08em;
  font-variant-caps: all-small-caps;
  font-feature-settings: "c2sc", "smcp";
  color: var(--brass);
  margin: 0 0 .75rem;
}
.figure { font-family: var(--serif); font-weight: 600; font-variant-numeric: oldstyle-nums proportional-nums; }
.lede { font-size: clamp(1.125rem, 1rem + .5vw, 1.3125rem); line-height: 1.55; color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: .9375rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1.0625rem/1.2 var(--sans);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 18px rgba(31, 42, 68, .22); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(31, 42, 68, .28); }
.btn-primary:active { transform: translateY(0); }
.btn-quiet { background: transparent; color: var(--primary); border-color: var(--outline); }
.btn-quiet:hover { border-color: var(--primary); }
.btn-on-ink { background: var(--on-hero); color: #1F2A44; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header and footer ---------- */

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--hero);
  color: var(--on-hero);
  display: grid; place-items: center;
  flex: none;
  transition: transform .4s var(--ease);
}
.brand-mark svg { width: 22px; height: 22px; }
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:hover { background: var(--vellum); }
.site-nav a[aria-current="page"] { background: var(--vellum); font-weight: 600; }
.site-nav a.nav-cta[aria-current="page"] { background: var(--primary); color: var(--on-primary); }
.site-nav .nav-cta { white-space: nowrap; background: var(--primary); color: var(--on-primary); font-weight: 600; }
.site-nav .nav-cta:hover { background: var(--primary); opacity: .92; }
@media (max-width: 480px) {
  .brand { font-size: 1.2rem; }
  .site-nav a { padding: 0 11px; }
}

.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--rule);
  padding: 40px 0 48px;
  color: var(--muted);
  font-size: .9375rem;
}
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text); display: inline-block; padding: 10px 0; }
.legal { font-size: .875rem; max-width: 60em; }
.legal p { margin: 0 0 .4em; }

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

.section { padding-block: clamp(56px, 9vw, 112px); }
.section-head { max-width: 48em; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.1rem); font-weight: 500; letter-spacing: -.01em; margin-bottom: .45em; }
.section-head p:not(.eyebrow) { font-size: 1.125rem; color: var(--muted); }
.below-fold { content-visibility: auto; contain-intrinsic-size: auto 900px; }

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

.hero { padding-top: clamp(24px, 5vw, 64px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero .wrap { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 920px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; } }
.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4.75rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.02em;
  margin-bottom: .4em;
}
.hero h1 em { font-style: italic; color: var(--brass); font-weight: 500; }
.hero .lede { margin-bottom: 32px; }
.hero-note span { white-space: nowrap; }
.hero-note { margin-top: 16px; font-size: .9375rem; color: var(--muted); }

.hero-art { position: relative; display: grid; place-items: center; min-height: 560px; }
.hero-art::before {
  /* A soft pool of ink behind the phone. */
  content: "";
  position: absolute;
  width: min(520px, 110%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--primary-container) 90%, transparent), transparent 68%);
  z-index: -1;
}

/* Notifications that float beside the phone in the hero. */
.float-notes {
  position: absolute;
  inset: auto 0 12% auto;
  display: grid;
  gap: 10px;
  width: min(300px, 78%);
  z-index: 2;
}
.float-notes .notif:nth-child(1) { transform: translateX(-26%); }
.float-notes .notif:nth-child(2) { transform: translateX(4%); }
@media (max-width: 919px) {
  .hero-art { min-height: 0; padding-bottom: 8px; }
  .float-notes { inset: auto auto -6px 50%; transform: translateX(-50%); width: min(320px, 92%); }
  .float-notes .notif:nth-child(n) { transform: none; }
  .float-notes .notif { font-size: .875rem; }
}

/* ---------- Phone mockups ---------- */

.phone {
  --w: clamp(268px, 26vw + 60px, 330px);
  width: var(--w);
  aspect-ratio: 9 / 19.2;
  padding: 10px;
  border-radius: calc(var(--w) * .15);
  background: linear-gradient(145deg, #2a2f39, #0b0d10 55%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  position: relative;
  flex: none;
}
.phone::after {
  /* The camera. */
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  width: 11px; height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: #05060a;
  box-shadow: inset 0 0 0 2px #1b1f27;
  z-index: 3;
}
.screen {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--w) * .125);
  overflow: hidden;
  position: relative;
  background: var(--paper);
  color: var(--text);
  font-size: calc(var(--w) * .043);
  line-height: 1.4;
  container-type: inline-size;
}
.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.05em 1.6em .4em;
  font: 600 .82em/1 var(--sans);
  position: relative;
  z-index: 2;
}
.statusbar .icons { display: flex; gap: .35em; align-items: center; }
.statusbar .icons i { display: block; width: 1em; height: .7em; border-radius: 2px; background: currentColor; opacity: .85; }
.statusbar .icons i:nth-child(1) { clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.statusbar .icons i:nth-child(2) { width: 1.6em; height: .75em; border-radius: 3px; }

/* The app's Home screen. */
.app { padding: .4em 1.15em 1em; }
.app-date { font: 500 .78em/1.3 var(--serif); letter-spacing: .08em; font-variant-caps: all-small-caps; color: var(--muted); margin: .6em 0 .1em; }
.app-hello { font: 600 1.6em/1.15 var(--serif); margin: 0 0 .15em; }
.app-line { font-style: italic; color: var(--brass); margin: 0 0 .9em; font-size: .95em; }
.today {
  position: relative;
  overflow: hidden;
  border-radius: 1.4em;
  padding: 1.15em 1.2em 1.1em;
  background: var(--hero);
  color: var(--on-hero);
  isolation: isolate;
}
.today .wm { position: absolute; right: -1.6em; bottom: -2.2em; width: 8.5em; height: 8.5em; opacity: .1; transform: rotate(-24deg); color: var(--on-hero); z-index: -1; }
.today-top { display: flex; align-items: center; gap: .4em; margin-bottom: .45em; }
.today-top b { font: 600 1.15em/1 var(--serif); }
.today-top small { margin-left: auto; color: var(--on-hero-muted); font-size: .72em; letter-spacing: .02em; }
.big { font: 500 2.6em/1 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums; letter-spacing: -.01em; }
.big-label { color: var(--on-hero-muted); font-size: .9em; }
.today hr { border: 0; border-top: 1px solid rgba(255, 253, 248, .16); margin: .85em 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.stat-label { font: 500 .74em/1.2 var(--serif); letter-spacing: .08em; font-variant-caps: all-small-caps; color: var(--on-hero-muted); }
.stat-value { font: 600 1.45em/1.1 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums; }
.month {
  margin-top: .8em;
  border-radius: 1.2em;
  background: var(--card);
  padding: 1em 1.1em;
  box-shadow: 0 1px 2px rgba(31, 42, 68, .06);
}
.month h4 { font: 600 1.05em/1.2 var(--serif); margin: 0 0 .25em; }
.month .figure { font-size: 1.8em; line-height: 1.05; font-weight: 500; }
.month .note { font-size: .7em; color: var(--muted); margin: .2em 0 .6em; }
.bars { display: flex; align-items: flex-end; gap: .22em; height: 3.2em; }
.bars i { flex: 1; border-radius: .2em .2em .08em .08em; background: var(--bar); height: var(--h); transform-origin: bottom; }
.bars i:last-child { background: var(--primary); }
.app-section { font: 500 .78em/1 var(--serif); letter-spacing: .08em; font-variant-caps: all-small-caps; color: var(--muted); margin: 1.1em 0 .5em; }
.shelf-row { display: flex; gap: .7em; align-items: center; padding: .35em 0; }
.shelf-row .cover { width: 2.3em; }
.shelf-row b { display: block; font-weight: 600; font-size: .9em; }
.shelf-row span { font-size: .75em; color: var(--muted); }
.navbar {
  position: absolute;
  left: 1em; right: 1em; bottom: 1em;
  display: flex;
  justify-content: space-around;
  padding: .5em .3em .3em;
  border-radius: 2.2em;
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(31, 42, 68, .14);
  font-size: .66em;
  color: var(--muted);
}
/* As the app's bar: Material outlined icons, labels below, and a brass ink drop under the open tab. */
.navbar span { position: relative; flex: 1; display: grid; justify-items: center; gap: .15em; padding: .15em 0 .55em; }
.navbar svg { width: 1.75em; height: 1.75em; fill: currentColor; }
.navbar .on { color: var(--text); }
.navbar .on svg { translate: 0 -.15em; }
.navbar .on::after { content: ""; position: absolute; bottom: 0; left: 50%; width: .5em; height: .5em; margin-left: -.25em; border-radius: 50%; background: var(--brass); }

/* Book covers, drawn: no images to load. */
.cover {
  aspect-ratio: 2 / 3;
  border-radius: 3px 5px 5px 3px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: inset 3px 0 0 rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .15);
  color: rgba(255, 255, 255, .92);
  position: relative;
  flex: none;
  overflow: hidden;
}
.cover::after { content: ""; position: absolute; left: 18%; right: 18%; top: 24%; height: 2px; background: currentColor; opacity: .7; box-shadow: 0 .35em 0 currentColor; }
.cover-a { --c1: #3a5674; --c2: #1d2b3e; }
.cover-b { --c1: #9a5a3c; --c2: #5c2f1f; }
.cover-c { --c1: #6c7a54; --c2: #39432a; }

/* Notifications, as Android draws them. */
.notif {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: .9375rem;
  line-height: 1.35;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.notif-icon {
  grid-row: span 2;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--hero);
  color: var(--on-hero);
  display: grid; place-items: center;
}
.notif-icon svg { width: 21px; height: 21px; }
.notif-head { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.notif-head b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-head small { color: var(--muted); font-size: .8em; white-space: nowrap; }
/* A Pro badge on a mock notification (reviews, milestones): pinned to the card's top edge, so it never squeezes the words. */
.notif.has-pro { position: relative; }
.notif > .pro-tag { position: absolute; top: -8px; right: 16px; margin: 0; font-size: .65rem; padding: 0 6px; background: var(--card); }
.notif p { margin: 0; color: var(--muted); font-size: .92em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stars { color: var(--brass); letter-spacing: 1px; }

/* The lock screen. */
.lock {
  background:
    radial-gradient(120% 70% at 85% 10%, #3B4A6B 0%, transparent 60%),
    radial-gradient(90% 60% at 0% 100%, #2b2017 0%, transparent 60%),
    #141b2d;
  color: #F3EDE2;
}
.lock .statusbar { color: #F3EDE2; }
.lock-clock { text-align: center; margin-top: 1.4em; }
.lock-clock b { display: block; font: 300 4.1em/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.lock-clock span { font-size: .9em; opacity: .85; }
.lock-notes { display: grid; gap: .55em; padding: 1.6em .8em 0; }
.lock .notif {
  font-size: .82em;
  padding: .85em .95em;
  border-radius: 1.4em;
  gap: .2em .8em;
  background: rgba(255, 253, 248, .9);
  color: #2B2620;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.lock .notif p, .lock .notif-head small { color: #5c544a; }
.lock .notif-icon { width: 2.6em; height: 2.6em; background: #1F2A44; color: #FFFDF8; }
.lock .notif-icon svg { width: 1.45em; height: 1.45em; }
.lock .stars { color: #7A5C30; }
.lock .notif.milestone { background: #F1E3C8; }
@media (prefers-color-scheme: dark) {
  .lock .notif { background: rgba(32, 36, 43, .92); color: #E9EAEE; }
  .lock .notif p, .lock .notif-head small { color: #A3A8B4; }
  .lock .stars { color: #D9B47B; }
  .lock .notif.milestone { background: #2C3958; }
}
.lock-hint { position: absolute; bottom: 1.2em; left: 0; right: 0; text-align: center; font-size: .7em; opacity: .7; }
.lock-hint::before { content: ""; display: block; width: 34%; height: 4px; border-radius: 4px; background: currentColor; margin: 0 auto .8em; opacity: .7; }

/* ---------- Feature grid ---------- */

.kinds { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); list-style: none; padding: 0; margin: 0; }
.kind {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 24px 22px 22px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.kind:hover { box-shadow: var(--shadow-lg); }
.kind-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--primary-container);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.kind-icon svg { width: 24px; height: 24px; }
.kind h3 { font-size: 1.25rem; margin-bottom: .35em; }
.kind p { margin: 0; color: var(--muted); font-size: 1rem; }
/* The app's Pro badge: "Pro" in the italic sans, in brass, inside a thin brass pill. */
.pro-tag {
  display: inline-block;
  vertical-align: .12em;
  font: italic 600 .75rem/1.35 var(--sans);
  letter-spacing: .05em;
  color: var(--brass);
  border: 1px solid color-mix(in srgb, var(--brass) 60%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: .45em;
  white-space: nowrap;
}

/* ---------- Split sections (words beside a mockup) ---------- */

.split { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.flip > :first-child { order: 2; }
}
.split-art { display: grid; place-items: center; position: relative; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.ticks li::before, .plan li::before {
  content: "";
  width: 22px; height: 22px;
  margin-top: 2px;
  background: var(--brass);
  -webkit-mask: var(--tick) center / contain no-repeat;
  mask: var(--tick) center / contain no-repeat;
}

/* ---------- Email mockup ---------- */

.mail {
  width: min(100%, 540px);
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: .9375rem;
}
.mail-bar { display: flex; gap: 7px; padding: 12px 16px; background: var(--vellum); }
.mail-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--outline); opacity: .7; }
.mail-meta { padding: 16px 22px 14px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; }
.mail-meta .avatar { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--hero); color: var(--on-hero); display: grid; place-items: center; }
.mail-meta .avatar svg { width: 22px; height: 22px; }
.mail-meta b { font-weight: 600; }
.mail-meta span { color: var(--muted); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-body { padding: 20px; background: var(--paper); }
.mail-head { background: var(--hero); color: var(--on-hero); border-radius: 14px 14px 0 0; padding: 20px 22px 22px; position: relative; overflow: hidden; }
.mail-brand { display: flex; align-items: center; gap: 8px; font: 600 .95rem/1.2 var(--serif); margin-bottom: 14px; }
.mail-brand svg { width: 20px; height: 20px; }
.mail-brand span { font-weight: 400; color: var(--on-hero-muted); }
.mail-head h4 { font: 600 1.45rem/1.25 var(--serif); margin: 0; color: var(--on-hero); }
.mail-head .big { font-size: 2.1rem; margin-top: 12px; font-weight: 600; }
.mail-card { background: var(--card); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 14px 14px; padding: 18px 22px 20px; }
.mail-card h5 { font: 600 1.05rem/1.3 var(--serif); margin: 0 0 8px; }
.mail-book { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.mail-book .cover { width: 46px; }
.mail-book b { display: block; font-weight: 600; color: var(--primary); text-decoration: underline; text-underline-offset: .15em; }
.mail-book p { margin: 2px 0 0; }
.mail-book small { color: var(--muted); font-size: .85rem; }
.mail-month { background: var(--tint); border-radius: 12px; padding: 14px 16px 10px; margin-top: 14px; }
.mail-figs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 4px; }
.mail-figs div { font: 600 1.2rem/1.2 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums; }
.mail-figs small { display: block; font: 400 .8rem/1.4 var(--sans); color: var(--muted); }
.mail-note { font-size: .8rem; color: var(--muted); margin: 6px 0 4px; }
.mail-btn { display: inline-block; margin-top: 16px; padding: 10px 22px; border-radius: 999px; background: var(--hero); color: var(--on-hero); font-weight: 600; font-size: .9rem; }
@media (prefers-color-scheme: dark) { .mail-btn { background: var(--primary); color: var(--on-primary); } }

/* ---------- Steps ---------- */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: step; }
.step { padding: 28px 24px; border-radius: var(--r-lg); border: 1px solid var(--rule); background: color-mix(in srgb, var(--card) 60%, transparent); counter-increment: step; }
.step::before {
  content: counter(step);
  display: block;
  font: 500 3.2rem/1 var(--serif);
  font-variant-numeric: oldstyle-nums;
  color: var(--brass);
  margin-bottom: 14px;
}
.step h3 { font-size: 1.3rem; margin-bottom: .4em; }
.step p { margin: 0; color: var(--muted); }

/* ---------- Ink panel (calls to action, the Pro header) ---------- */

.ink-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--hero);
  color: var(--on-hero);
  padding: clamp(36px, 6vw, 72px) clamp(24px, 6vw, 72px);
}
.ink-panel h2, .ink-panel h1, .ink-panel h3 { color: var(--on-hero); }
.ink-panel p { color: var(--on-hero-muted); }
.ink-panel a:not(.btn) { color: var(--on-hero); }
/* The app's ink bloom: a glow drifting slowly across the ink. */
.bloom::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 90%;
  aspect-ratio: 1;
  right: -20%;
  top: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hero-glow) 100%, transparent) 0%, transparent 65%);
  opacity: .9;
}
.bloom::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(60% 80% at 5% 110%, rgba(0, 0, 0, .22), transparent 70%);
}
.ink-panel .wm, .plan-pro .wm { position: absolute; right: -40px; bottom: -70px; width: 260px; height: 260px; opacity: .08; transform: rotate(-24deg); z-index: -1; color: var(--on-hero); }
.cta-panel { text-align: center; }
.cta-panel h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); font-weight: 500; margin-bottom: .4em; }
.cta-panel p { max-width: 34em; margin: 0 auto 28px; font-size: 1.125rem; }
.cta-panel .btn-row { justify-content: center; }
.cta-panel small { display: block; margin-top: 16px; color: var(--on-hero-muted); }

/* ---------- Celebration ---------- */

.celebrate { display: grid; gap: 28px; justify-items: center; text-align: center; }
.celebrate h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); font-weight: 500; }
.celebrate p { color: var(--muted); max-width: 32em; margin: 0 auto; }
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 24px;
  width: fit-content;
  margin-inline: auto;
  z-index: 60;
  background: var(--hero);
  color: var(--on-hero);
  padding: 14px 22px;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 1.0625rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.confetti { position: fixed; inset: 0; z-index: 55; pointer-events: none; width: 100%; height: 100%; }

/* ---------- Writing flourish ---------- */

.flourish { display: grid; place-items: center; padding-block: 8px; color: var(--outline); }
.flourish svg { width: min(340px, 80%); height: auto; overflow: visible; }
.flourish path.line { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }

/* ---------- Trust ---------- */

.trust { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); list-style: none; margin: 0; padding: 0; }
.trust li { padding: 26px 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); }
.trust h3 { font-size: 1.2rem; margin-bottom: .4em; }
.trust p { margin: 0; color: var(--muted); }
.note-box { margin-top: 20px; padding: 16px 20px; border-radius: var(--r-md); background: var(--vellum); color: var(--muted); font-size: .9375rem; }

/* ---------- Plans ---------- */

.page-head { padding-top: clamp(24px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); }
.page-head h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem); font-weight: 500; letter-spacing: -.015em; margin-bottom: .35em; }

.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: stretch; }
.plan { border-radius: var(--r-xl); padding: clamp(28px, 4vw, 40px); background: var(--card); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan h2 { font-size: 1.9rem; margin-bottom: .2em; }
.plan .price { font: 500 1.15rem/1.4 var(--serif); color: var(--muted); margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; }
.plan li::before { width: 20px; height: 20px; margin-top: 3px; background: var(--primary); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-pro { background: var(--hero); color: var(--on-hero); box-shadow: var(--shadow-lg); position: relative; isolation: isolate; overflow: hidden; }
.plan-pro h2, .plan-pro li { color: var(--on-hero); }
.plan-pro .price { color: var(--on-hero-muted); }
.plan-pro li::before { background: var(--brass-on-ink); }
.plan-pro .fine { color: var(--on-hero-muted); font-size: .9rem; margin: 14px 0 0; }

/* The Pro mark: "Pro" in italic brass, with the pen's stroke under it. */
.pro-mark { display: inline-grid; justify-items: start; color: var(--brass-on-ink); margin-bottom: 6px; }
.pro-mark b { font: italic 600 3.4rem/1 var(--serif); letter-spacing: -.01em; }
.pro-mark svg { width: 5.4rem; height: auto; margin-top: -2px; }
.pro-mark.on-paper { color: var(--brass); }

.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare caption { text-align: left; font: 600 1.6rem/1.2 var(--serif); letter-spacing: -.015em; margin-bottom: 16px; color: var(--text); }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 16px 14px; border-bottom: 1px solid var(--rule); }
.compare thead th { font: 600 .875rem/1.2 var(--sans); color: var(--muted); border-bottom: 2px solid var(--rule); }
.compare tbody th { font-weight: 600; width: 28%; }
.compare td:last-child { color: var(--text); }
.compare .pro-col { background: color-mix(in srgb, var(--primary-container) 45%, transparent); }
.compare thead .pro-col .pro-tag { margin: 0; font-size: .8125rem; }
.table-wrap { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
@media (max-width: 560px) {
  .compare { font-size: .9375rem; }
  .compare th, .compare td { padding: 12px 8px; }
  .compare caption { font-size: 1.35rem; }
}

.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 56px 20px 22px;
  font: 600 1.125rem/1.35 var(--serif);
  position: relative;
  border-radius: var(--r-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 22px; top: 50%;
  width: 12px; height: 12px;
  margin-top: -8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > div { padding: 0 22px 18px; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Legal pages ---------- */

.doc { font-size: 1.0625rem; }
.doc h1 { font-size: clamp(2.3rem, 1.7rem + 2.6vw, 3.4rem); font-weight: 500; margin-bottom: .3em; }
.doc h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; scroll-margin-top: 24px; }
.doc h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.doc ul, .doc ol { padding-left: 1.2em; margin: 0 0 1em; }
.doc ol { padding-left: 1.5em; }
.doc li { margin-bottom: .45em; }
.doc li::marker { color: var(--brass); }
.doc .updated { color: var(--muted); }
.summary-box { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px 26px; margin: 28px 0 8px; }
.summary-box h2 { margin-top: 0; font-size: 1.25rem; }
.summary-box ul { margin-bottom: 0; }
.toc { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--vellum); color: var(--text); text-decoration: none; font-size: .9375rem; }
.toc a:hover { background: var(--secondary-container); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .975rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
.doc th { font-weight: 600; }
.doc .scroll-x { overflow-x: auto; }

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

.lost { text-align: center; padding-block: clamp(40px, 8vw, 96px); }
.lost .flourish svg { width: 200px; margin: 0 auto 16px; color: var(--outline); }
.lost h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem); font-weight: 500; margin-bottom: .4em; }
.lost .btn-row { justify-content: center; margin-top: 24px; }

/* ---------- Motion (only when it's welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .bloom::before { animation: drift 14s linear infinite alternate; }
  @keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-28%, 34%); } }

  .live { position: relative; }
  .live::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    animation: ring 2.2s cubic-bezier(.4, 0, .2, 1) infinite;
  }
  @keyframes ring { 0% { transform: scale(.4); opacity: .5; } 100% { transform: scale(1.1); opacity: 0; } }

  /* Things arrive once, as they scroll into view (only with the script running). */
  .js .arrive { opacity: 0; translate: 0 28px; transition: opacity .6s var(--ease), translate .6s var(--ease); transition-delay: calc(var(--i, 0) * 140ms); }
  .js .arrive.in { opacity: 1; translate: 0 0; }

  .js .bars i { transform: scaleY(0); transition: transform .7s var(--ease); transition-delay: calc(400ms + var(--b, 0) * 30ms); }
  .js .in .bars i, .js .bars.in i { transform: scaleY(1); }

  .js .flourish .line { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 1.6s var(--ease); }
  .js .flourish .nib { opacity: 0; transition: opacity .4s 1.3s; }
  .js .flourish.in .line { stroke-dashoffset: 0; }
  .js .flourish.in .nib { opacity: 1; }

  .js .pro-mark .stroke { clip-path: inset(0 100% 0 0); transition: clip-path .9s .25s var(--ease); }
  .js .pro-mark.in .stroke { clip-path: inset(0 0 0 0); }

  .toast { transition: opacity .35s var(--ease), translate .35s var(--ease); translate: 0 -16px; }
  .toast.show { translate: 0 0; }
}

.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hero-good); color: var(--hero-good); }

/* ---------- Windows high contrast ---------- */

@media (forced-colors: active) {
  .btn, .site-nav a, .toc a { border: 1px solid ButtonText; }
  .plan, .kind, .trust li, .step, .faq details, .table-wrap, .ink-panel, .phone, .mail, .notif { border: 1px solid CanvasText; }
  body::before, .bloom::before, .bloom::after { display: none; }
  .ticks li::before, .plan li::before { forced-color-adjust: none; background: CanvasText; }
}

@media print {
  body::before, .site-nav, .hero-art, .split-art, .cta-panel, .toast, .confetti { display: none !important; }
  body { background: #fff; color: #000; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.h-section { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.1rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.12; }
.split .lede { margin-top: 18px; }
@media (max-width: 560px) {
  .kinds { gap: 12px; grid-template-columns: 1fr; }
  .kind { display: grid; grid-template-columns: 44px 1fr; gap: 2px 16px; padding: 18px; }
  .kind-icon { grid-row: span 2; margin: 0; }
  .kind h3 { font-size: 1.15rem; margin: 0; }
}
.lost .lede { margin-inline: auto; }
/* Phones: each feature becomes a heading, with Free and Pro side by side under it. */
@media (max-width: 560px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tbody, .compare tr { display: block; }
  .compare tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .compare tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 8px; border: 0; font: 600 1.05rem/1.3 var(--serif); }
  .compare td { display: block; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--paper); }
  .compare td.pro-col { background: color-mix(in srgb, var(--primary-container) 55%, transparent); }
  .compare td::before { content: attr(data-plan); display: block; font: 500 .85rem/1.2 var(--serif); letter-spacing: .08em; font-variant-caps: all-small-caps; color: var(--muted); margin-bottom: 4px; }
  .compare td.pro-col::before { display: inline-block; font: italic 600 .75rem/1.35 var(--sans); font-variant-caps: normal; letter-spacing: .05em; color: var(--brass); border: 1px solid color-mix(in srgb, var(--brass) 60%, transparent); border-radius: 999px; padding: 1px 8px; margin-bottom: 6px; }
  .compare tbody tr:last-child { border-bottom: 0; }
}
/* Legal pages: one section per topic, and the services' own policies as a list of links. */
.doc section > h2 { margin-top: 2em; }
.doc .policy-links { list-style: none; padding: 0; display: grid; gap: 10px; margin: 1.2em 0 0; }
.doc .policy-links a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 500; }
.doc .policy-links svg { flex-shrink: 0; margin-inline-start: .3em; }
/* A new-tab icon inside running text sits on the line, after the link's last word. */
a[target="_blank"] svg { display: inline-block; vertical-align: -.1em; margin-inline-start: .25em; }

/* ===================== Modern pass ===================== */

h3 { font-family: var(--sans); font-weight: 650; letter-spacing: -.01em; }
.hero h1, .page-head h1, .h-section, .section-head h2, .cta-panel h2 { letter-spacing: -.025em; }

/* Section labels: a small pill, not small capitals. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font: 600 .8125rem/1 var(--sans);
  letter-spacing: .01em;
  font-variant-caps: normal;
  font-feature-settings: normal;
  color: var(--on-secondary-container);
  background: var(--secondary-container);
  padding: 7px 12px;
  border-radius: 999px;
  margin: 0 0 1.1rem;
}

/* A sticky, translucent header. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 0;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.brand { font-size: 1.25rem; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; }
.brand-mark svg { width: 19px; height: 19px; }
.site-nav a { font-size: .9375rem; min-height: 40px; }
html { scroll-padding-top: 84px; }

/* Cards: a hairline edge and a soft lift. */
.kind, .trust li, .plan, .faq details, .table-wrap, .step, .bento-card, .summary-box {
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  border-radius: 20px;
}
.plan-pro, .bento-ink { border-color: transparent; }
.step { background: var(--card); }
.faq summary { font: 600 1.0625rem/1.4 var(--sans); }
.kind-icon { border-radius: 12px; }

/* Tighter rhythm. */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2, .h-section { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.08; }
.section-head p:not(.eyebrow) { font-size: 1.125rem; max-width: 34em; }
.below-fold { contain-intrinsic-size: auto 700px; }

/* Hero: a soft wash of ink and brass, and a faint grid fading out. */
.hero { position: relative; isolation: isolate; padding-top: clamp(32px, 6vw, 80px); }
.hero::before {
  content: "";
  position: absolute;
  inset: -80px 0 0;
  z-index: -1;
  background:
    radial-gradient(50% 60% at 78% 30%, color-mix(in srgb, var(--primary-container) 85%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 0%, color-mix(in srgb, var(--secondary-container) 70%, transparent), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: -80px 0 0;
  z-index: -1;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .45;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 20%, #000 20%, transparent 75%);
}
.hero-art::before { display: none; }
.hero h1 { font-size: clamp(2.75rem, 1.5rem + 4.8vw, 5rem); line-height: 1.02; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: .9375rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 16px; height: 16px; background: var(--good); -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }

/* ---------- Bento: the homepage's highlights ---------- */

.bento { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.bento-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--card);
  padding: clamp(22px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.bento-card:hover { box-shadow: var(--shadow-lg); }
.bento-card h3 { font-size: 1.3rem; margin: 0; }
.bento-card p { margin: 0; color: var(--muted); max-width: 30em; }
.bento-card .more { margin-top: auto; padding-top: 14px; font-weight: 600; font-size: .9375rem; color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: .35em; }
.bento-card .more::after { content: "→"; transition: transform .2s var(--ease); }
.bento-card:hover .more::after { transform: translateX(3px); }
/* The whole card is the link's target, without nesting interactive elements. */
.bento-card .more::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.bento-card:has(.more:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
.bento-card .more:focus-visible { outline: none; }
.b-wide { grid-column: span 4; grid-row: span 2; }
.b-narrow { grid-column: span 2; }
.b-half { grid-column: span 3; }
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .b-wide { grid-column: 1 / -1; grid-row: auto; }
  .b-narrow, .b-half { grid-column: span 1; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .b-narrow, .b-half { grid-column: auto; }
  .bento-card { min-height: 0; }
}
.bento-ink { background: var(--hero); color: var(--on-hero); }
.bento-ink h3 { color: var(--on-hero); }
.bento-ink p { color: var(--on-hero-muted); }
.bento-ink .more { color: var(--on-hero); }
.bento-art { margin: 10px 0 4px; }
.b-wide .bento-art { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; max-width: 440px; }
.b-wide .notif { box-shadow: 0 10px 30px rgba(0, 0, 0, .25); border: 0; }
.b-wide .notif:nth-child(2) { margin-left: 6%; }
.b-wide .notif:nth-child(3) { margin-left: 12%; }
.b-wide .notif:nth-child(4) { margin-left: 6%; }
.b-wide .notif.milestone { background: var(--secondary-container); }
@media (prefers-color-scheme: light) { .bento-ink .notif { background: #FFFDF8; color: #2B2620; } .bento-ink .notif p, .bento-ink .notif-head small { color: #5c544a; } }
.mini-fig { font: 500 2.4rem/1 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums; letter-spacing: -.01em; }
.mini-fig small { display: block; font: 400 .875rem/1.4 var(--sans); color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.bento-card .bars { height: 56px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 600; font-size: .9375rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-mail { border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); }
.mini-mail .mail-head { border-radius: 0; padding: 14px 16px 16px; }
.mini-mail .mail-head h4 { font-size: 1.1rem; }
.mini-mail .mail-head .big { font-size: 1.6rem; margin-top: 6px; }
.mini-mail .mail-brand { margin-bottom: 8px; font-size: .85rem; }

/* ---------- Stats mockup (features) ---------- */

.statcard { width: min(100%, 480px); background: var(--card); border: 1px solid var(--rule); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 24px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--vellum); width: fit-content; margin-bottom: 20px; font-size: .875rem; font-weight: 600; }
.tabs span { padding: 7px 14px; border-radius: 999px; color: var(--muted); }
.tabs .on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.statcard .big-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.statcard .mini-fig { font-size: 2.8rem; }
.delta { font-weight: 600; font-size: .875rem; color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); padding: 4px 10px; border-radius: 999px; }
.statcard .bars { height: 120px; margin: 20px 0 8px; gap: 6px; }
.statcard .axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.statcard .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.statcard .row3 b { display: block; font: 600 1.25rem/1.2 var(--serif); font-variant-numeric: oldstyle-nums proportional-nums; }
.statcard .row3 span { display: block; font-size: .8125rem; line-height: 1.3; color: var(--muted); }

/* ---------- Features page: in-page navigation ---------- */

.jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); color: var(--text); text-decoration: none; font-weight: 500; font-size: .9375rem; }
.jump a:hover { border-color: var(--outline); }

/* The hero arrives with the first paint, with no wait for the script. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s var(--ease) both; animation-delay: calc(120ms + var(--i, 0) * 140ms); }
  @keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
}
@media (max-width: 400px) {
  .site-header .brand-name { display: none; }
  .site-nav a { padding: 0 10px; }
}
@media (max-width: 620px) {
  .b-wide .notif:nth-child(n) { margin-left: 0; }
}

/* ===================== Review pass 2 ===================== */

@media (prefers-reduced-motion: no-preference) {
  .kind:hover, .bento-card:hover { transform: translateY(-3px); }
  .btn-primary:hover, .btn-on-ink:hover { transform: translateY(-1px); }
  .brand:hover .brand-mark { transform: rotate(-12deg); }
}

/* Less air between the hero and what follows, and between features. */
.hero { padding-bottom: clamp(24px, 4vw, 56px); }
.section { padding-block: clamp(48px, 6.5vw, 88px); }
.page-head { padding-bottom: clamp(16px, 3vw, 32px); }

/* The big notifications card: the stack sits right and fills the space. */
@media (min-width: 961px) {
  .b-wide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: auto auto 1fr auto; column-gap: 28px; }
  .b-wide h3, .b-wide > p, .b-wide .more { grid-column: 1; }
  .b-wide .more { grid-row: 4; align-self: end; }
  .b-wide .bento-art { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; padding: 0; max-width: none; }
  .b-wide .notif:nth-child(2) { margin-left: 18px; margin-right: -10px; }
  .b-wide .notif:nth-child(3) { margin-left: 36px; margin-right: -20px; }
  .b-wide .notif:nth-child(4) { margin-left: 18px; margin-right: -10px; }
}

/* Features: what it tells you, as 2 then 3. */
@media (min-width: 900px) {
  .kinds { grid-template-columns: repeat(6, 1fr); }
  .kinds .kind { grid-column: span 2; }
  .kinds .kind:nth-child(-n+2) { grid-column: span 3; }
}

/* The celebration on a soft panel. */
.celebrate-panel {
  border-radius: 28px;
  padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 48px);
  background:
    radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--secondary-container) 90%, transparent), transparent 70%),
    var(--card);
  border: 1px solid var(--rule);
}

/* Very small phones: a tighter header. */
@media (max-width: 360px) {
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0 9px; font-size: .875rem; }
}

/* ===================== Review pass 3 ===================== */

/* Phones: the lock screen fills the width, so its notifications stay readable, and loses the empty lower half. */
@media (max-width: 560px) {
  .phone:has(.lock) { --w: min(calc(100vw - 40px), 340px); aspect-ratio: 9 / 15; }
  .hero .btn-row .btn { flex: 1 1 100%; justify-content: center; }
  .celebrate-panel .flourish svg { width: min(240px, 70%); }
}

/* Plans: the two names carry the same weight. */
.plan h2 { font-size: 2.25rem; letter-spacing: -.02em; }

/* A section label with the Pro badge beside it. */
.eyebrow-row { display: flex; align-items: center; gap: 8px; margin: 0 0 1.1rem; }
.eyebrow-row .eyebrow { margin: 0; }
.eyebrow-row .pro-tag { margin: 0; }

/* Homepage: Milestones spans the bento's full width, words on the left and the badges on the right. */
.b-full { grid-column: 1 / -1; min-height: 0; }
@media (min-width: 961px) {
  .b-full { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; column-gap: 40px; }
  .b-full h3, .b-full > p, .b-full .more { grid-column: 1; }
  .b-full > p { max-width: 34em; }
  .b-full .bento-art { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; padding: 0; justify-content: flex-end; flex-wrap: nowrap; max-width: none; }
  .b-full .more { margin-top: 18px; }
}

/* ===================== Finishing touches ===================== */

/* Text you select is highlighted in the brand's brass. */
::selection { background: color-mix(in srgb, var(--brass) 28%, transparent); color: var(--text); }

/* Lists wrap as neatly as paragraphs. */
li, .lede, summary { text-wrap: pretty; }

/* The header gains a soft shadow once the page scrolls under it. */
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-lift linear both; animation-timeline: scroll(); animation-range: 0 72px; }
  @keyframes header-lift {
    from { box-shadow: 0 0 0 transparent; }
    to { box-shadow: 0 6px 24px -12px rgba(28, 24, 18, .28); background: color-mix(in srgb, var(--paper) 90%, transparent); }
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Pages fade into each other instead of flashing; the header stays put. */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root) { animation: .18s var(--ease) both vt-out; }
  ::view-transition-new(root) { animation: .28s var(--ease) both vt-in; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; translate: 0 8px; } }

  /* FAQ answers slide open, and the chevron turns. */
  .faq summary::after { transition: transform .25s var(--ease); }
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .3s var(--ease), content-visibility .3s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}


/* Until the Play listing is live, the download buttons say "Coming soon" and do nothing. */
.btn.is-soon, .site-nav .nav-cta.is-soon {
  background: transparent;
  color: var(--muted);
  border: 2px dashed color-mix(in srgb, currentColor 50%, transparent);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.site-nav .nav-cta.is-soon { border-width: 1.5px; }
.ink-panel .btn.is-soon, .plan-pro .btn.is-soon { color: var(--on-hero-muted); }
