/* Beyond Alarm — site styles. Rules: docs/WEB_DESIGN.md
   Tokens read from the app (lib/theme/app_colors.dart).

   NOTE: shared with /privacy and /terms, which are linked from the app, the Play
   listing and the AdMob consent messages. The classes .wrap .card .mark .name
   .meta .pill and the bare header/nav/footer/h1-h3 rules must keep working. */

/* Manrope, served from our own origin — the same family the reference sites use,
   and already bundled in the app, so the site and the app share a voice. A
   variable font is one file for every weight: lighter than the four static cuts
   it replaces, and no CDN to leak visitors to. */

/* Source Serif 4 (SIL OFL), self-hosted. Medium and Substack both set body copy
   in a transitional serif and keep the sans for UI — that split is most of why
   their pages feel like reading rather than like an interface. This is the
   open-licence member of the same family. Latin subsets only; the rest is
   weight an English blog never uses. */
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4-latin-roman.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4-latin-ext-roman.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4-latin-italic.woff2') format('woff2');
  font-weight: 400 700; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/SourceSerif4-latin-ext-italic.woff2') format('woff2');
  font-weight: 400 700; font-style: italic; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/Manrope-var.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ground: #050506;
  --ground-2: #08080a;
  --bg: #0d0d0f;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #232327;
  --border-soft: #1a1a1d;

  --text: #f7f6f4;
  --body: #b9b8b4;
  --muted: #86857f;
  --faint: #5c5b56;

  --accent: #fed501;
  --accent-lift: #ffe24d;
  --accent-deep: #e0bb00;
  --ink: #111111;

  --pro: #8e6bff;
  --wake: #ff6b5e;
  --ok: #37ce7e;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 56px; --s7: 72px;
  --section: clamp(52px, 6vw, 92px);

  --r-card: 18px;
  --r-panel: 26px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-micro: 180ms;
  --t-comp: 340ms;

  --maxw: 1180px;
}

/* Dark only, deliberately. The whole page is built on glow artwork and
   `screen` blending, neither of which survives a light ground. */
:root { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .mcol { animation: none !important; }
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }
@media (prefers-color-scheme: light) { a { color: #8a7400; } }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------- the backdrop ---- */
/* A page-wide starfield plus per-section blooms. The flatness came from one
   colour with nothing behind it; depth comes from things sitting in space. */

.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* Slow-drifting light. Three blurred blobs on long, offset loops — the page is
   never quite still, but nothing ever crosses the eye fast enough to distract
   from reading. Transform-only, so it stays on the compositor. */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); will-change: transform;
}
.blob.b1 {
  width: 46vw; height: 46vw; top: -14vw; right: -8vw;
  background: rgba(254,213,1,.13);
  animation: drift1 34s var(--ease) infinite alternate;
}
.blob.b2 {
  width: 40vw; height: 40vw; top: 34%; left: -12vw;
  background: rgba(142,107,255,.09);
  animation: drift2 44s var(--ease) infinite alternate;
}
.blob.b3 {
  width: 52vw; height: 52vw; bottom: -20vw; left: 32%;
  background: rgba(254,213,1,.075);
  animation: drift3 52s var(--ease) infinite alternate;
}
@keyframes drift1 { from { transform: translate3d(0,0,0)        scale(1);   } to { transform: translate3d(-9vw, 7vw, 0)  scale(1.16); } }
@keyframes drift2 { from { transform: translate3d(0,0,0)        scale(1.1); } to { transform: translate3d(11vw, -9vw, 0) scale(.92); } }
@keyframes drift3 { from { transform: translate3d(0,0,0)        scale(1);   } to { transform: translate3d(-13vw,-6vw, 0) scale(1.2); } }
.sky::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.4px 1.4px at 78% 8%,  rgba(255,255,255,.4),  transparent),
    radial-gradient(1.2px 1.2px at 33% 62%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.6px 1.6px at 88% 44%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.2px 1.2px at 58% 88%, rgba(255,255,255,.3),  transparent),
    radial-gradient(1.4px 1.4px at 22% 92%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.3px 1.3px at 92% 74%, rgba(255,255,255,.3),  transparent),
    radial-gradient(1.5px 1.5px at 46% 30%, rgba(255,255,255,.4),  transparent);
  background-size: 100% 100%;
}
/* Grain — large flat dark fields look plasticky without it. */
.sky::after {
  content: ""; position: absolute; inset: 0; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) { .sky { opacity: .5; } .sky::before { display: none; } }

main, .nav, .site-footer, .wrap { position: relative; z-index: 1; }

/* --------------------------------------------------------------- type ---- */

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.035em; }

.display { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.04; }
.h2 { font-size: clamp(30px, 3.9vw, 52px); line-height: 1.06; }
.h3 { font-size: clamp(21px, 1.6vw, 24px); line-height: 1.25; letter-spacing: -0.025em; }

.lead {
  font-size: clamp(16px, 1.35vw, 18.5px);
  color: var(--muted); max-width: 48ch; margin: var(--s3) 0 0;
  line-height: 1.6; font-weight: 400;
}

.hl { color: var(--accent); }

/* The badge every section opens with. */
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text); margin-bottom: var(--s3);
}
.badge svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------- layout ---- */

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s3); }
.section { padding: var(--section) 0; position: relative; }
.section.tight { padding: clamp(20px, 2.4vw, 36px) 0; }
.head { max-width: 54ch; margin-bottom: var(--s6); }
.head.mid { margin-left: auto; margin-right: auto; text-align: center; }
.head.mid .lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: var(--s2); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 940px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g3 { grid-template-columns: 1fr; } }

/* Feature rows alternate side, which is what keeps a long page from marching. */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.row.flip .row-art { order: -1; }
@media (max-width: 900px) {
  .row { grid-template-columns: 1fr; gap: var(--s6); text-align: center; }
  .row .lead, .row .ticks { margin-left: auto; margin-right: auto; }
  .row .cta-row { justify-content: center; }
  .row.flip .row-art { order: 0; }
  .row .ticks li { text-align: left; }
}

/* ---------------------------------------------------------------- nav ---- */

.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ground) 72%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-micro) var(--ease), background var(--t-micro) var(--ease);
}
.nav.stuck { border-bottom-color: var(--border); background: color-mix(in srgb, var(--ground) 92%, transparent); }
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 20px var(--s3); display: flex; align-items: center; gap: var(--s2); }

/* The supplied art carried a lot of transparent padding, which is why it looked
   tiny at a sane pixel height. Both files are trimmed to their ink before use,
   so the height set here is the height you actually see. */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* Composed from the two clean, real-alpha parts. The supplied glow lockup was
   unusable: its checkerboard was baked into the pixels, and its wordmark bloom
   filled the letter counters at every alpha curve I tried. */
.brand img.lock { height: 46px; width: auto; flex: none; }
.foot-brand .brand img.lock { height: 52px; }
@media (max-width: 520px) { .brand img.lock { height: 34px; } }

.nav-links { margin-left: auto; display: flex; gap: var(--s3); align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: color var(--t-micro) var(--ease); }
.nav-links a:hover { color: var(--text); }
/* Hamburger below 880: the links were simply hidden, which left a header with
   nothing in it but a Download button. */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;          /* full touch target */
  margin-left: auto;
  background: transparent; border: 1px solid var(--border); border-radius: 11px;
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform var(--t-micro) var(--ease), opacity var(--t-micro) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 18px;
    background: color-mix(in srgb, var(--ground) 96%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    margin-left: 0;
    /* Collapsed rather than display:none so it can animate, and so the links
       stay out of the tab order while closed. */
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height var(--t-comp) var(--ease), visibility var(--t-comp);
  }
  .nav-links.open { max-height: 340px; visibility: visible; }
  .nav-links a { padding: 13px 8px; font-size: 16px; }
  .nav-links .btn { margin-top: 8px; }
}

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform var(--t-micro) var(--ease), filter var(--t-micro) var(--ease),
              border-color var(--t-micro) var(--ease), background var(--t-micro) var(--ease);
}
.btn:active { transform: translateY(1px); }
/* Forced, not inherited. The bare `a { color: var(--accent) }` rule above was
   winning on the nav button and painting yellow text on a yellow fill. */
.btn-primary, .btn-primary:link, .btn-primary:visited {
  background: linear-gradient(180deg, var(--accent-lift), var(--accent));
  color: #111111; font-weight: 800;
}
.btn-primary:hover { filter: brightness(1.06); }
/* Outlined pill, the reference sites' section CTA. */
.btn-out {
  background: transparent; color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 22px -8px rgba(254,213,1,.5);
}
.btn-out:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }

/* This badge ships with Google's own black plate and rounded corners already
   drawn in, so it needs no wrapper — just the artwork, at size. */
.play-badge { display: inline-block; transition: transform var(--t-micro) var(--ease); }
.play-badge img { height: 66px; width: auto; border-radius: 10px; }
.play-badge:hover { transform: translateY(-2px); }
@media (max-width: 520px) { .play-badge img { height: 54px; } }

.cta-row { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-top: var(--s4); }
.close-cta .cta-row { margin-top: var(--s3); }
.cta-note { font-size: 13px; color: var(--faint); margin: var(--s2) 0 0; }

/* --------------------------------------------------------------- hero ---- */

.hero { padding: clamp(36px, 5vw, 72px) 0 clamp(60px, 8vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }

@media (max-width: 1000px) {
  /* Stacked, and in reading order: badge, headline, promise, product, then the
     ask. `display: contents` dissolves the copy wrapper so its children can be
     ordered against the artwork instead of being stuck in one block. */
  .hero-grid { display: flex; flex-direction: column; text-align: center; gap: 0; }
  .hero-copy { display: contents; }
  .hero-grid .trust    { order: 1; align-self: center; }
  .hero-grid .display  { order: 2; }
  .hero-grid .lead     { order: 3; margin-left: auto; margin-right: auto; text-align: center; }
  .hero-art            { order: 4; margin: var(--s4) 0 var(--s1); }
  .hero-grid .cta-row  { order: 5; justify-content: center; margin-top: var(--s2); }
}

.trust {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 7px 20px 7px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--body);
  margin-bottom: var(--s3);
}
.stack { display: inline-flex; }
.stack .av { width: 32px; height: 32px; font-size: 12px; border: 2px solid var(--surface); }
.stack .av + .av { margin-left: -12px; }
.stars { color: var(--accent); letter-spacing: 1.5px; font-size: 12.5px; }

/* --------------------------------------------------------- phone frame --- */

.phone {
  --w: 200px;
  width: var(--w); aspect-ratio: 9 / 19.5; position: relative;
  border-radius: calc(var(--w) * .185);
  background: linear-gradient(115deg,
    #6f7176 0%, #b9bcc2 6%, #83868c 13%, #4c4e53 24%,
    #3a3c41 50%, #55575c 74%, #9fa2a8 88%, #5e6065 100%);
  padding: calc(var(--w) * .011);
  box-shadow: 0 0 0 .5px rgba(255,255,255,.2) inset,
              0 30px 60px -24px rgba(0,0,0,.9), 0 10px 26px -14px rgba(0,0,0,.7);
  flex: none;
}
.phone::before, .phone::after {
  content: ""; position: absolute; width: calc(var(--w) * .0115);
  background: linear-gradient(180deg, #9a9da3, #4a4c51); border-radius: 2px;
}
.phone::before {
  left: calc(var(--w) * -.008); top: 17%; height: 4.2%; color: #74767c;
  box-shadow: 0 calc(var(--w) * .105) 0 currentColor, 0 calc(var(--w) * .205) 0 currentColor;
}
.phone::after { right: calc(var(--w) * -.008); top: 23%; height: 8.5%; }

.phone-in {
  position: relative; height: 100%;
  border-radius: calc(var(--w) * .176);
  background: #000; padding: calc(var(--w) * .016); overflow: hidden;
}
.phone-in::after {
  content: ""; position: absolute; z-index: 6;
  bottom: calc(var(--w) * .028); left: 50%; transform: translateX(-50%);
  width: 32%; height: calc(var(--w) * .014); min-height: 2px;
  border-radius: 999px; background: rgba(255,255,255,.5);
}

.screen {
  position: relative; height: 100%;
  border-radius: calc(var(--w) * .162);
  overflow: hidden; background: #111111;
  background-image: radial-gradient(80% 50% at 50% 10%, rgba(254,213,1,.10), transparent 70%),
                    linear-gradient(180deg, #191919, #0e0e0e);
  display: flex; flex-direction: column;
}
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; position: relative; z-index: 2; }
.screen::before {
  content: ""; position: absolute; z-index: 4;
  top: calc(var(--w) * .038); left: 50%; transform: translateX(-50%);
  width: 30%; height: calc(var(--w) * .085); min-height: 11px;
  border-radius: 999px; background: #000;
}
.screen::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(128deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 32%);
}

.ph-note {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--w) * .05); padding: calc(var(--w) * .1); text-align: center;
}
.ph-note b { font-size: calc(var(--w) * .062); color: var(--muted); font-weight: 700; line-height: 1.3; }
.ph-note span { font-size: calc(var(--w) * .052); color: var(--faint); line-height: 1.45; }
.ph-mark {
  width: calc(var(--w) * .17); height: calc(var(--w) * .17);
  border-radius: calc(var(--w) * .048);
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; font-size: calc(var(--w) * .085);
}

/* A device floating in coloured light, not sitting on a flat card. */
.lit { position: relative; display: flex; justify-content: center; }
.lit::before {
  content: ""; position: absolute; z-index: 0;
  width: 84%; height: 74%; top: 13%; left: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo, rgba(254,213,1,.30)), transparent 68%);
  filter: blur(46px);
}
.lit > * { position: relative; z-index: 1; }

/* ------------------------------------------------------------- panels ---- */
/* The store panels are finished artwork: each already carries its own headline,
   its own device and its own background. So they are shown whole, as cards —
   dropping one inside the CSS iPhone above would be a phone inside a phone.
   The .phone frame is kept for whenever raw screenshots turn up. */

.pnl {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 34px 70px -30px rgba(0,0,0,.9), 0 10px 26px -16px rgba(0,0,0,.6);
  background: #0d0d0f;
}
.pnl img { width: 100%; height: auto; display: block; }

.row-art .pnl { max-width: 380px; margin: 0 auto; }
.hero-art .pnl { max-width: 340px; margin: 0 auto; }

/* Hero cluster: centre handset forward and larger, flanks tilted behind. */
.cluster { display: flex; align-items: center; justify-content: center; padding: var(--s3) 0; }
.cluster .phone { --w: 196px; }
.cluster .phone.mid { --w: 246px; z-index: 3; }
.cluster .phone.left { transform: translateX(34px) rotate(-6deg); z-index: 1; }
.cluster .phone.right { transform: translateX(-34px) rotate(6deg); z-index: 1; }
@media (max-width: 1180px) {
  .cluster .phone { --w: 168px; }
  .cluster .phone.mid { --w: 212px; }
}
@media (max-width: 560px) {
  .cluster .phone { --w: 116px; }
  .cluster .phone.mid { --w: 150px; }
  .cluster .phone.left { transform: translateX(20px) rotate(-6deg); }
  .cluster .phone.right { transform: translateX(-20px) rotate(6deg); }
}

/* The empty third handset — a real device showing nothing yet, rather than a
   gap where a phone should be. */
.screen.empty { background-image: linear-gradient(180deg, #17171a, #0c0c0e); }

/* -------------------------------------------------------- motion grid ---- */
/* Columns drifting in opposite directions on a tilt. A single straight row
   reads as a filmstrip; a tilted, counter-moving field reads as a wall of the
   app and lets far more of it be seen at once. */

.mosaic {
  position: relative;
  height: clamp(400px, 56vh, 580px);
  overflow: hidden;
  /* Fades at the edges only. A radial mask left the corners bare, which read as
     a hole in the wall rather than as a fade. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
                      linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent),
                      linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.mosaic-in {
  position: absolute; top: 50%; left: 50%;
  /* Scaled well past the viewport so the tilt can never expose a bare corner. */
  transform: translate(-50%, -50%) rotate(-9deg) scale(1.45);
  display: flex; gap: 18px;
  /* Natural heights, not stretched: the loop translates each column by 50% of
     its OWN height, so a stretched column would drift out of step and open a
     gap halfway round. */
  align-items: flex-start;
}
.mcol { display: flex; flex-direction: column; gap: 20px; animation: drift-up 52s linear infinite; will-change: transform; }
.mcol.down { animation-name: drift-down; }
.mcol:nth-child(2) { animation-duration: 64s; }
.mcol:nth-child(3) { animation-duration: 46s; }
.mcol:nth-child(4) { animation-duration: 58s; }
.mcol:nth-child(5) { animation-duration: 50s; }
@keyframes drift-up   { from { transform: translateY(0); }    to { transform: translateY(-50%); } }
@keyframes drift-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }

.mosaic .pnl {
  width: 210px; flex: none; border-radius: 16px;
  /* One fixed ratio for every panel. The source art is a mix of 2:3 and 9:16,
     which made columns different heights — and a short column is exactly what
     left a hole in the wall mid-drift. */
  aspect-ratio: 9 / 16;
}
.mosaic .pnl img { height: 100%; object-fit: cover; }
/* Deliberately no pause-on-hover: the drift is ambient, and stopping it the
   moment a cursor crosses the section made the page feel like it had snagged. */
@media (max-width: 720px) {
  .mosaic .pnl { width: 150px; border-radius: 12px; }
  .mosaic-in { gap: 14px; }
  .mcol { gap: 14px; }
}

/* --------------------------------------------------------------- cards --- */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 20px 22px; margin: 22px 0;
}
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card p:first-child { margin-top: 0; }
.grid .card { margin: 0; height: 100%; padding: 30px 28px; }
.card h3 { font-size: 20px; margin: 0 0 10px; }
.card p { color: var(--body); font-size: 15px; margin: 0; line-height: 1.62; }

.feature { transition: border-color var(--t-comp) var(--ease), transform var(--t-comp) var(--ease); }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); transform: translateY(-3px); }

/* Index numerals instead of a line icon in a rounded square. That icon-chip
   pattern is the most template-looking thing on any landing page. */
.num {
  display: block; font-size: 13px; font-weight: 800;
  letter-spacing: .12em; color: var(--accent);
  margin-bottom: 14px;
}
.ico {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; margin-bottom: 20px; color: var(--accent);
}
.ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------- chips --- */

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
}
.chip.is-pro { border-color: color-mix(in srgb, var(--pro) 46%, var(--border)); color: var(--text); }
.chip small { font-size: 10px; font-weight: 800; letter-spacing: .09em; color: var(--pro); text-transform: uppercase; margin-left: 6px; }
@media (max-width: 900px) { .row .chips { justify-content: center; } }

/* -------------------------------------------------------------- ticks ---- */

.ticks { list-style: none; padding: 0; margin: var(--s3) 0 0; max-width: 46ch; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--body); font-size: 15px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 14px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* -------------------------------------------------------- testimonials --- */

.rev { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px; height: 100%; }
.rev-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.av {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 16px;
  flex: none; object-fit: cover;
}
.rev-who b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.rev-who span { font-size: 12.5px; color: var(--muted); }
.rev .stars { font-size: 14px; display: block; margin-bottom: 10px; }
.rev p { color: var(--body); font-size: 14.5px; margin: 0; line-height: 1.62; }

/* ------------------------------------------------------------ pricing ---- */

.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface));
}
.tag {
  position: absolute; top: -12px; left: 28px;
  background: var(--accent); color: var(--ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px;
}
.plan-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.price { font-size: 42px; font-weight: 800; letter-spacing: -0.04em; margin: 8px 0 0; line-height: 1.1; }
.price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-card .ticks { margin-top: var(--s3); flex: 1; }

/* ---------------------------------------------------------------- faq ---- */

/* One card holding the whole set, with hairline-separated rows inside — rather
   than a stack of separate floating cards, which read as unrelated items. */
.faq {
  max-width: 860px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: 4px clamp(8px, 2vw, 20px);
  overflow: hidden;
}
.faq details { border-bottom: 1px solid var(--border-soft); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 22px 48px 22px 8px;
  font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; position: relative;
  transition: color var(--t-micro) var(--ease);
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--t-comp) var(--ease), border-color var(--t-micro) var(--ease);
}
.faq details[open] summary { color: var(--accent); }
.faq details[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
  border-color: var(--accent);
}
.faq details p {
  color: var(--body); margin: 0 44px 24px 8px;
  font-size: 15px; line-height: 1.62;
}

/* -------------------------------------------------------------- close ---- */

/* The closing block mirrors the hero: copy on the left, the same three handsets
   on the right, inside one bordered panel. It is the last thing on the page and
   the second-best place to put the store badge, so it gets the hero's weight
   rather than trailing off as a centred paragraph. */
.close-cta {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(32px, 4vw, 60px) clamp(24px, 4vw, 60px);
  border-radius: var(--r-panel);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(254,213,1,.10), transparent 58%),
    var(--surface);
  overflow: hidden;
}
.close-cta .lock { height: 54px; width: auto; margin: 0 0 var(--s4); }
.close-cta .display { font-size: clamp(36px, 4.4vw, 60px); }
.close-cta .lead { margin-top: var(--s3); max-width: 34ch; }
.close-cta .cta-row { margin-top: var(--s4); }
.close-art .cluster { padding: 0; }
.close-art .phone { --w: 148px; }
.close-art .phone.mid { --w: 186px; }

@media (max-width: 900px) {
  .close-cta { grid-template-columns: 1fr; text-align: center; }
  .close-cta .lock { margin-left: auto; margin-right: auto; }
  .close-cta .lead { margin-left: auto; margin-right: auto; }
  .close-cta .cta-row { justify-content: center; }
  .close-art { order: -1; }
  .close-art .phone { --w: 118px; }
  .close-art .phone.mid { --w: 150px; }
}
@media (max-width: 520px) {
  .close-cta .lock { height: 40px; }
  .close-art .phone { --w: 92px; }
  .close-art .phone.mid { --w: 118px; }
}

/* ------------------------------------------------------------- reveal ---- */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--t-comp) var(--ease), transform var(--t-comp) var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* -------------------------------------------------- legal pages (kept) --- */

.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px 96px; }
header { display: flex; align-items: center; gap: 12px; padding: 32px 0 8px; }
.mark { width: 34px; height: 34px; border-radius: 10px; flex: none; display: block; object-fit: cover; }
header .name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
nav { margin-left: auto; display: flex; gap: 20px; }
nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; }
nav a:hover { color: var(--text); }

.wrap h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.15; margin: 40px 0 14px; }
.wrap h2 { font-size: 20px; margin: 40px 0 10px; }
.wrap h3 { font-size: 16px; margin: 26px 0 6px; font-weight: 700; }
.wrap p, .wrap li { color: var(--body); font-size: 16px; }
.wrap .lead { font-size: 18.5px; color: var(--muted); max-width: 58ch; }

.meta { color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 22px; }
.pill {
  display: inline-block; background: var(--accent); color: var(--ink);
  font-weight: 800; font-size: 11.5px; letter-spacing: 0.6px;
  padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
}
footer {
  border-top: 1px solid var(--border); margin-top: 72px; padding-top: 26px;
  color: var(--muted); font-size: 14px; display: flex; gap: 20px; flex-wrap: wrap;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* -------------------------------------------------------- site footer ---- */

.site-footer { border-top: 1px solid var(--border); padding: var(--s6) 0 var(--s3); margin-top: var(--s5); }
.foot-grid { display: grid; grid-template-columns: 1.9fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--s4); } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.foot-brand p { color: var(--muted); font-size: 14.5px; margin: 14px 0 0; max-width: 30ch; line-height: 1.6; }
.foot-col h4 {
  font-size: 12px; margin: 0 0 18px; padding-top: 10px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: 12px; }
.foot-col a { color: var(--muted); text-decoration: none; font-size: 14.5px; transition: color var(--t-micro) var(--ease); }
.foot-col a:hover { color: var(--accent); }

.foot-bar {
  display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center;
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--border); color: var(--faint); font-size: 13px;
}
.foot-bar .right { margin-left: auto; display: flex; gap: var(--s3); }
.foot-bar a { color: var(--faint); text-decoration: none; }
.foot-bar a:hover { color: var(--text); }
@media (max-width: 620px) { .foot-bar .right { margin-left: 0; } }


/* --------------------------------------------------- reviews, restyled ---- */

.stat-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(24px, 5vw, 72px);
  margin: var(--s5) 0 var(--s6);
}
.stat { position: relative; padding-right: clamp(24px, 5vw, 72px); }
.stat + .stat::before {
  content: ""; position: absolute; left: calc(-1 * clamp(24px, 5vw, 72px) / 2);
  top: 6px; bottom: 6px; width: 1px; background: var(--border);
}
.stat b {
  display: block; color: var(--accent);
  font-size: clamp(34px, 4.4vw, 56px); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1;
}
.stat span { display: block; margin-top: 8px; font-size: 14.5px; color: var(--muted); }
@media (max-width: 620px) { .stat + .stat::before { display: none; } }

/* A shelf that keeps moving reads as "there are more of these" in a way a
   static grid never does. */
.revs-wrap { position: relative; overflow: hidden; }
.revs-wrap::before, .revs-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 3;
  width: clamp(40px, 8vw, 140px); pointer-events: none;
}
.revs-wrap::before { left: 0; background: linear-gradient(90deg, var(--ground), transparent); }
.revs-wrap::after { right: 0; background: linear-gradient(270deg, var(--ground), transparent); }

.revs { display: flex; gap: var(--s2); width: max-content; animation: revs-drift 60s linear infinite; }
@keyframes revs-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .revs { animation: none; } }

.revs .rev {
  width: 380px; flex: none;
  display: flex; flex-direction: column; justify-content: space-between;
}
@media (max-width: 520px) { .revs .rev { width: 300px; } }
.rev q { quotes: none; color: var(--body); font-size: 15px; line-height: 1.6; }
.rev-foot { display: flex; align-items: center; gap: 11px; margin-top: var(--s3); }
.rev-foot .av { width: 42px; height: 42px; font-size: 15px; }
.rev-foot b { font-size: 14.5px; font-weight: 700; color: var(--accent); display: block; line-height: 1.3; }
.rev-foot span { font-size: 12.5px; color: var(--muted); }


/* ------------------------------------------------------ mobile polish ----- */

@media (max-width: 560px) {
  .lead { font-size: 16px; line-height: 1.58; }
  .h2, .display { hyphens: none; }
  .badge { margin-bottom: var(--s2); }
  .head { margin-bottom: var(--s4); }
  .stat-row { gap: var(--s3); margin: var(--s4) 0 var(--s4); }
  .stat { padding-right: 0; }
  .row { gap: var(--s4); }
  .foot-grid { gap: var(--s4); }
  .pnl { border-radius: 16px; }
}

/* Nothing may push the page sideways on a phone. */
@media (max-width: 880px) {
  .mosaic { height: clamp(300px, 44vh, 420px); }
}


/* ============================================================== BLOG ====== */
/* Lifted ground: the marketing page runs near-black so its glows read, but a
   page you sit and READ on wants less contrast against the text. #292929 is
   the requested ground; the surfaces step up from it rather than down. */

/* Light by default, dark when the reader's OS asks for it — which is what
   Medium and Substack do. The evidence for long-form reading favours dark text
   on a light ground for most people in normal light, and every publication
   whose business depends on people finishing an article has converged there.
   The marketing page stays dark; it is selling, not being read. */
body.blog {
  --ground: #fffdf8;      /* warm off-white; pure white glares at 20px serif */
  --band: #f6f1e7;
  --bg: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3efe6;
  --border: #e6e0d3;
  --border-soft: #efeae0;
  --text: #1a1a17;
  --body: #33322c;
  --muted: #6a685e;
  --faint: #97948a;
  /* The brand yellow, identical in both themes. */
  --tone: #fed501;
}
/* Tones darkened for contrast on a light ground — #FED501 on white is
   unreadable, and the pillar colours need the same treatment. */
/* One accent throughout. Per-pillar colour was information in principle and
   noise in practice — three hues across a three-post index read as a
   highlighter set, not a system. */

body.blog .sky { display: none; }
body.blog .site-footer { background: var(--band); }
/* The wordmark is white, so it needs its dark twin on a light page. */
body.blog .brand img.lock { content: url('/img/lockup-dark.webp'); }
body.blog .nav { background: color-mix(in srgb, var(--ground) 78%, transparent); }
body.blog .btn-primary { color: #111111; }

@media (prefers-color-scheme: dark) {
  body.blog {
    --ground: #292929;
    --band: #212121;
    --bg: #2e2e2e;
    --surface: #323232;
    --surface-2: #3b3b3b;
    --border: #3d3d3d;
    --border-soft: #353535;
    --text: #f4f3f1;
    --body: #cbc9c5;
    --muted: #9a9893;
    --faint: #7c7a75;
    --tone: #fed501;
  }
  body.blog .sky { display: block; opacity: .45; }
  body.blog .blob { filter: blur(120px); }
  body.blog .brand img.lock { content: url('/img/lockup.webp'); }
}

.blog-band {
  background:
    radial-gradient(70% 130% at 18% 0%, rgba(254,213,1,.10), transparent 62%),
    var(--band);
  border-bottom: 1px solid var(--border);
}
.blog-head { padding: clamp(28px, 4vw, 46px) 0 clamp(22px, 3vw, 34px); }
.blog-head h1 {
  font-size: clamp(26px, 3vw, 36px); line-height: 1.15; margin-top: 6px;
}
.blog-head .lead { color: var(--muted); font-size: 16px; margin-top: 10px; max-width: 52ch; }

/* ---- index list ---- */
/* A list, not a grid of cards. For a blog the title is the product; boxing each
   one adds chrome between the reader and the only thing they are scanning for. */

.stories-head {
  display: flex; align-items: baseline; gap: var(--s3);
  flex-wrap: wrap; margin-top: var(--s6);
}
.stories-head h2 { font-size: clamp(22px, 2.4vw, 28px); color: var(--text); }
.stories-head .count { color: var(--faint); font-size: 14px; }

.blog-search { position: relative; margin-left: auto; min-width: min(260px, 100%); }
@media (max-width: 620px) {
  .stories-head { gap: var(--s2); }
  .blog-search { margin-left: 0; width: 100%; }
}
.blog-search input {
  width: 100%; height: 44px;
  padding: 0 16px 0 42px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text); font: inherit; font-size: 15px;
  transition: border-color var(--t-micro) var(--ease);
}
.blog-search input::placeholder { color: var(--faint); }
.blog-search input:focus { outline: none; border-color: var(--accent); }
.blog-search svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: var(--muted);
  fill: none; stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}

.story-list { margin-top: var(--s4); }

/* The row. On a phone the meta line was wrapping every field onto its own
   line — "Android reliability" stacked three words tall next to a three-line
   author name — so it is one non-wrapping line that drops fields as space runs
   out, rather than folding. */
.story {
  position: relative; display: flex; gap: 22px; align-items: flex-start;
  text-decoration: none; color: inherit;
  padding: 24px 18px 24px 20px;
  border: 1px solid transparent; border-radius: 14px;
  transition: background var(--t-micro) var(--ease),
              border-color var(--t-micro) var(--ease);
}
.story + .story { margin-top: 2px; }
.story::after {
  content: ""; position: absolute; left: 20px; right: 18px; bottom: 0;
  border-bottom: 1px solid var(--border);
}
.story:last-child::after { display: none; }
.story:hover { background: var(--surface); border-color: var(--border); }
.story:hover::after { opacity: 0; }

.story-text { flex: 1; min-width: 0; }

.story-by {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 13px; color: var(--muted); margin-bottom: 10px;
  white-space: nowrap;
}
.story-by img { width: 20px; height: 20px; border-radius: 50%; flex: none; align-self: center; }
.story-by b { color: var(--text); font-weight: 600; flex: none; }
/* The pillar is the only field allowed to truncate. The date was losing its
   year to an ellipsis because everything shrank equally. */
.story-by .in {
  color: var(--muted); font-weight: 500;
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
.story-by time { flex: none; margin-left: auto; color: var(--faint); }

.story h3 {
  font-size: clamp(18px, 2vw, 22px); line-height: 1.3;
  letter-spacing: -0.02em; text-wrap: pretty;
  transition: color var(--t-micro) var(--ease);
}
.story:hover h3 { color: var(--tone); }

.story p {
  color: var(--muted); font-size: 15px; line-height: 1.55; margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-foot { margin-top: 14px; font-size: 12.5px; color: var(--faint); }

.story-thumb {
  flex: none; width: 168px; aspect-ratio: 3/2;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: var(--band);
}
.story-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 760px) {
  .story { gap: 14px; padding: 20px 4px; }
  .story::after { left: 4px; right: 4px; }
  .story-thumb { width: 96px; border-radius: 6px; }
  .story p { display: none; }
  .story-by { font-size: 12.5px; gap: 6px; }
  /* The author repeats on every row of a single-author blog; the avatar and
     the name are the first things worth losing when width runs out. */
  .story-by img, .story-by b { display: none; }
  .story-by time { margin-left: auto; }
  .story h3 { font-size: 17px; }
  .story-foot { margin-top: 10px; }
}
.story[hidden] { display: none; }

.no-results { padding: 40px 0; color: var(--muted); font-size: 16px; }

.kicker {
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

/* Post cards are still used for "keep reading" at the foot of an article. */
.posts { display: grid; gap: var(--s2); margin-top: var(--s3); }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(2, 1fr); } }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card);
  text-decoration: none; color: inherit;
  transition: border-color var(--t-comp) var(--ease), transform var(--t-comp) var(--ease);
}
.post-card:hover { border-color: color-mix(in srgb, var(--tone) 42%, var(--border)); transform: translateY(-3px); }
.post-card-img { aspect-ratio: 16/9; background: var(--band); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 20px 22px 22px; }
.post-card h2 { font-size: 18px; line-height: 1.3; margin: 8px 0 8px; }
.post-card:hover h2 { color: var(--tone); }
.post-card p {
  color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- article ---- */

.article { max-width: 700px; margin: 0 auto; padding-bottom: var(--s7); }
.article h1 {
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; margin: 14px 0 0;
  text-wrap: balance;
}
.article .kicker { color: var(--tone); }

.byline {
  display: flex; align-items: center; gap: 12px;
  margin: var(--s4) 0 0; padding: 18px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.byline img { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.byline b { display: block; font-size: 14.5px; font-weight: 700; }
.byline span { font-size: 13px; color: var(--muted); }

/* Long-form settings. Bigger and looser than UI text on purpose: the measure,
   the leading and the size are what decide whether someone finishes a page. */
.prose { margin-top: var(--s5); }
.prose > * + * { margin-top: 1.3em; }
/* Serif from here down. The size and leading are set for a serif, which needs
   a touch more of both than a geometric sans to read comfortably. */
.prose p, .prose li, .prose blockquote {
  font-family: 'Source Serif 4', Charter, 'Iowan Old Style', Georgia, serif;
}
.prose p, .prose li {
  font-size: 20px; line-height: 1.7; color: var(--body);
  letter-spacing: 0; text-wrap: pretty;
}
.prose > p:first-of-type { font-size: 21.5px; line-height: 1.62; color: var(--text); }
.prose em { font-style: italic; }
.prose h2 {
  font-size: clamp(23px, 2.5vw, 30px); line-height: 1.25;
  margin-top: 2.1em; color: var(--text); text-wrap: balance;
  padding-top: .55em; border-top: 1px solid var(--border-soft);
  position: relative;
}
/* A short tone rule above each section, so a long article has visible joints
   rather than being one undifferentiated column. */
.prose h2::before {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 46px; height: 2px; background: var(--tone);
}
.prose h3 { font-size: 20px; margin-top: 1.8em; color: var(--text); }
.prose strong { color: var(--text); font-weight: 700; }
.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: .65em; }
.prose li::marker { color: var(--tone); }
.prose blockquote {
  margin: 1.8em 0; padding: 6px 0 6px 24px;
  border-left: 3px solid var(--tone);
  color: var(--text); font-size: 19px; line-height: 1.7;
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.6em 0; }
.prose code {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 6px; font-size: .88em;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); font-weight: 700; white-space: nowrap; }
.prose td { color: var(--body); }

/* Cover image. Full width of the measure and slightly wider than the text on
   large screens, which is the shape both reference sites use. */
.cover {
  margin: var(--s5) 0 0;
  border: 0;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--band);
}
.cover img { width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }
.credit {
  font-family: 'Manrope', sans-serif;
  font-size: 12.5px; color: var(--faint);
  margin-top: 10px; text-align: right;
}
.credit a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--text); }

.prose figure { margin: 2.2em 0; }
.prose figure img {
  width: 100%; height: auto; border-radius: 12px;
  border: 1px solid var(--border);
}
/* App screenshots are portrait; the 16:9 photo treatment would crop them to
   nothing. Constrained width, centred, framed like a device. */
.prose figure.screen { max-width: 300px; margin-left: auto; margin-right: auto; }
.prose figure.screen img {
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.55);
}

.prose figcaption {
  font-family: 'Manrope', sans-serif;
  font-size: 13.5px; color: var(--faint); margin-top: 10px;
  text-align: center; line-height: 1.5;
}
.prose figcaption .by { display: block; margin-top: 4px; font-size: 11.5px; opacity: .8; }
.prose figcaption .by a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Reading progress. Quiet, but it tells someone how much is left, which is one
   of the few things that measurably keeps people on a long page. */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--tone); z-index: 70;
}

/* An aside for where the product genuinely fits. Deliberately quiet — see
   docs/BLOG_STRATEGY.md: the article has to stand up with this removed. */
.aside {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--tone);
  border-radius: 12px; padding: 20px 22px; margin: 2em 0;
}
.aside p { font-size: 15.5px; margin: 0; color: var(--body); }
.aside p + p { margin-top: .7em; }

.post-cta {
  margin-top: var(--s6); padding: 30px;
  border-radius: var(--r-panel);
  border: 1px solid color-mix(in srgb, var(--tone) 26%, var(--border));
  background:
    radial-gradient(80% 120% at 10% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 62%),
    var(--surface);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  overflow: hidden;
}
.post-cta h3 { font-size: 21px; margin-bottom: 10px; }
.post-cta p { color: var(--body); font-size: 15px; margin: 0; max-width: 40ch; }
.post-cta .cta-row { margin-top: var(--s3); }
.post-cta-art .cluster { padding: 0; }
.post-cta-art .phone { --w: 84px; }
.post-cta-art .phone.mid { --w: 106px; }
.post-cta-art .phone.left { transform: translateX(16px) rotate(-6deg); }
.post-cta-art .phone.right { transform: translateX(-16px) rotate(6deg); }
@media (max-width: 700px) {
  .post-cta { grid-template-columns: 1fr; text-align: center; }
  .post-cta p { margin: 0 auto; }
  .post-cta .cta-row { justify-content: center; }
  .post-cta-art { order: -1; }
  .post-cta-art .phone { --w: 74px; }
  .post-cta-art .phone.mid { --w: 94px; }
}

.more { margin-top: var(--s6); }
.more h3 { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); }


/* --------------------------------------------- answer / faq / about ------ */

.post-faq { margin-top: var(--s6); }
.post-faq h2 {
  font-size: clamp(22px, 2.4vw, 27px); margin-bottom: var(--s3);
  letter-spacing: -0.03em;
}
.post-faq .faq { max-width: none; }
.post-faq .faq summary { font-size: 16px; padding: 18px 44px 18px 8px; }
.post-faq .faq details p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px; margin: 0 40px 20px 8px;
}

.about-author {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: var(--s6); padding-top: var(--s4);
  border-top: 1px solid var(--border);
}
.about-author img { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.about-author b { font-size: 15.5px; display: block; margin-bottom: 6px; }
.about-author p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }


/* ------------------------------------------------------------ midroll ---- */
/* Quiet by design. The end-of-post card only reaches people who finish; this
   catches the reader at peak interest, right after they got their answer. An
   icon, one line, a text link — nothing that interrupts the read. */
.midroll {
  display: flex; align-items: center; gap: 16px;
  margin: 2.4em 0;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tone);
}
.midroll img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.midroll p {
  margin: 0; flex: 1;
  font-family: 'Manrope', sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--body);
}
.midroll a {
  flex: none; white-space: nowrap;
  font-family: 'Manrope', sans-serif;
  font-size: 14.5px; font-weight: 700;
  color: var(--tone-link, var(--text));
  text-decoration: none;
  border-bottom: 2px solid var(--tone);
  padding-bottom: 2px;
}
.midroll a:hover { border-bottom-color: transparent; }
@media (max-width: 600px) {
  .midroll { flex-wrap: wrap; gap: 12px; }
  .midroll p { flex: 1 1 100%; order: 2; }
  .midroll a { order: 3; }
}
