/* Pip — marketing and support site.
   Tokens mirror docs/05_DESIGN_SYSTEM.md so the site and the app agree. */

:root {
  --emerald: #00b876;
  --emerald-dark: #008f5b;
  --emerald-soft: #daf7ea;
  --emerald-on-tint: #087a52;
  /* **Text tokens, not brand tokens.** `--emerald` is the brand green and is
     correct as a fill, a tick and a meter — but white on it measures 2.59:1,
     and it was the background of every primary button on the site. These two
     carry white text (5.40:1) and a green link on white (7.67:1) instead.
     Same hue, moved until it could carry the text that sits on it — the app's
     own rule, which the site had never been held to. */
  --emerald-btn: #007a4d;
  --emerald-btn-deep: #005c3a;
  --emerald-link: #00603c;
  --violet: #6d5df6;
  --violet-soft: #eceaff;
  --gold-text: #9a6a00;
  --gold-soft: #ffedbd;
  --info: #2b7fff;
  --info-soft: #e5f0ff;
  --ink: #171a2c;
  --muted: #61677f;
  --faint: #6b7189;
  --line: #e3e6f1;
  --line-strong: #ced4e6;
  --field-edge: #7d8399;
  --canvas: #edeffa;
  --surface: #fff;
  --app-bg: #f9faff;
  --radius: 16px;
  --radius-lg: 24px;
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--ink);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* **Full width, and prose still measured.**
 *
 * The shell spans the viewport on every size; what stays narrow is the reading
 * line, and that is not a compromise — a privacy policy set to 2000px is a
 * 250-character line, which nobody finishes. So `.wrap` gives up its cap while
 * `.doc`, `.lede` and the section subheads keep theirs in `ch`, which is
 * measured in characters rather than pixels and therefore means the same thing
 * at any width.
 *
 * The side padding scales with the viewport instead of being a fixed 24px:
 * edge-to-edge text with a thumbnail margin reads as broken rather than as
 * full-bleed. `clamp` floors it at 20px on a phone and grows it to 72px on a
 * desktop.
 */
.wrap {
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 72px);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.12s ease;
}

.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

/* `#main` is only focusable so the skip link can land on it; it must never
   draw a ring of its own when the target is reached by mouse. */
#main:focus {
  outline: none;
}

/* Header */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(249 250 255 / 82%);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

/* Pip, not a letter.
 *
 * The mark is the app icon at 30px: the lavender canvas tile, a white receipt
 * with a face, and the mint folded corner. Same character, same colours, so the
 * thing on the Home Screen and the thing at the top of this page are one brand
 * rather than two.
 *
 * Inline SVG, no external request — this site's CSP is `default-src 'none'`,
 * and a mark that needs a network fetch to appear is a mark that sometimes
 * doesn't.
 *
 * The geometry is the mockup's `.pip`, kept in one place: 76x90 viewBox, eyes
 * 7x9, and the smile as the crescent between two ellipses sharing an rx — a
 * uniform stroked arc reads as a grin and is the wrong face. See
 * `docs/18_MOCKUP_COMPONENT_SPEC.md` §2.
 */
.logo .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  background: #0db47a
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 90'%3E%3Crect x='.75' y='.75' width='74.5' height='88.5' rx='17' fill='%23fff'/%3E%3Cpath d='M58 0 H59 A17 17 0 0 1 76 17 V18 H70 A12 12 0 0 1 58 6 Z' fill='%23d4f3e7'/%3E%3Cellipse cx='26.5' cy='37.5' rx='3.5' ry='4.5' fill='%23171a2c'/%3E%3Cellipse cx='49.5' cy='37.5' rx='3.5' ry='4.5' fill='%23171a2c'/%3E%3Cpath d='M26 50 A12 12 0 0 0 50 50 A12 8 0 0 1 26 50 Z' fill='%23171a2c'/%3E%3C/svg%3E")
    center / auto 21px no-repeat;
}

nav.site {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
}

nav.site a:hover {
  color: var(--ink);
  background: var(--canvas);
}

nav.site a[aria-current="page"] {
  color: var(--emerald-on-tint);
  background: var(--emerald-soft);
}

/* Hero */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero .promise {
  color: var(--emerald-on-tint);
}

.hero p.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--violet-soft);
  color: #4a3bc4;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
}

/* Buttons — chunky and pressable, per the design system. */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  background: var(--emerald-btn);
  color: #fff;
  box-shadow: 0 4px 0 var(--emerald-btn-deep);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--emerald-btn-deep);
}

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line-strong);
}

/* Cards */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 0 0 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-size: 19px;
}

.icon.em {
  background: var(--emerald-soft);
}
.icon.vi {
  background: var(--violet-soft);
}
.icon.go {
  background: var(--gold-soft);
}
.icon.in {
  background: var(--info-soft);
}

section.band {
  padding: 56px 0;
}

section.band h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.025em;
  margin: 0 0 8px;
}

section.band > .wrap > p.sub {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 60ch;
}

/* The privacy panel — the claim the whole product rests on. */

.panel {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.025em;
}

.panel p {
  color: #c3c8dd;
  margin: 0 0 24px;
  max-width: 58ch;
}

.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.panel li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #e8ebf5;
  font-size: 15px;
}

.panel-link {
  color: #3adfa4;
  font-weight: 700;
  text-decoration: none;
}

.panel-link:hover {
  text-decoration: underline;
}

.panel li .tick {
  color: #3adfa4;
  font-weight: 800;
  flex: none;
}

/* The two new footer groups stack: a label above its own links. The plain
   `.links` block stays a single wrapping row, as it was. */
footer.site .links.group {
  flex-direction: column;
  gap: 6px;
}

.links-head {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 2px;
}

/* Long-form documents */

.doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 56px);
  max-width: var(--measure);
  margin: 40px auto 64px;
}

.doc h1 {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.doc .meta {
  color: var(--faint);
  font-size: 14px;
  margin: 0 0 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.doc h2 {
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 40px 0 12px;
}

.doc h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  color: #2c3145;
  font-size: 16px;
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

/* **Ambient prose link styling must not reach into components.**
 *
 * `.doc a` is (0,1,1) and `.btn` is (0,1,0), so this rule was winning the
 * colour on every button inside a document — and once the button's background
 * was darkened to carry white text, the result was `#087a52` on `#007a4d`:
 * **1.01:1**, a button with no visible label at all. It read as broken, and it
 * was, on /support and every other `.doc` page with a call to action.
 *
 * `:not()` rather than a more specific override, because the fix belongs at the
 * boundary: a link that is a component brings its own colours. */
.doc a:not(.btn):not(.store-badge) {
  color: var(--emerald-on-tint);
  font-weight: 600;
}

.doc strong {
  color: var(--ink);
}

.callout {
  background: var(--emerald-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.callout p {
  margin: 0;
  color: var(--emerald-on-tint);
  font-weight: 600;
}

.callout.info {
  background: var(--info-soft);
}

.callout.info p {
  color: #1859cf;
}

/* Tables read better than prose for a data map. */

.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--canvas);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: 0;
}

/* **A row header is a name, not a column label.** The `th` rule above is
   written for the head row — uppercase, 13px, muted, on the canvas fill — and
   it applies to `th[scope="row"]` just as happily, which put the styling that
   means "this is a label" on the one cell carrying the subject of the row.
   Scoped to `tbody` so the head row keeps its own treatment. */
tbody th[scope='row'] {
  background: var(--surface);
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

/* The second line of a row header — a developer name under an app name. */
.cell-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

/* A table's own name. Left-aligned like everything else in `.doc`; `caption`
   defaults to centred, which reads as a heading floating loose above the
   border. */
caption {
  text-align: left;
  padding: 12px 16px 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* A caveat under a table. Smaller, and in the measured muted token — never
   dimmed with opacity, which is how the app's own hero text reached 4.28:1. */
p.note {
  margin-top: -8px;
  font-size: 15px;
  color: var(--muted);
}

td .no {
  color: var(--emerald-on-tint);
  font-weight: 700;
}

td .yes {
  color: var(--muted);
}

/* FAQ */

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 10px;
}

details[open] {
  border-color: var(--line-strong);
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  float: right;
  color: var(--faint);
  font-weight: 700;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* Footer */

footer.site {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  color: var(--faint);
  font-size: 14px;
}

footer.site .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

footer.site a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

footer.site a:hover {
  color: var(--ink);
}

footer.site .links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site address {
  font-style: normal;
  line-height: 1.6;
  max-width: 34ch;
}

/* Focus — visible for keyboard users, everywhere. */

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (max-width: 640px) {
  nav.site a {
    padding: 8px;
    font-size: 14px;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .panel {
    padding: 28px;
  }
}

/* ─── The hero scene ─────────────────────────────────────────────────────
   The app's own furniture, built from the design system's real geometry
   (docs/18_MOCKUP_COMPONENT_SPEC.md): the Village Grocer receipt with the
   torn edge, Pip at his exact 76x90 with the crescent smile, the speech
   bubble whose squared bottom-left corner is its whole tail. Nothing here
   is a stock illustration, which is rather the point. */

h1, h2, h3, .logo {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI",
    system-ui, sans-serif;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  text-align: left;
}

.hero-copy p.lede {
  margin: 0 0 32px;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Apple's App Store badge.
 *
 * The artwork is Apple's and their guidelines are specific: do not alter it,
 * do not add a border, shadow or background, and keep clear space of at least
 * 10% of the badge's height on every side. So this is a bare link around the
 * SVG — no `.btn`, which would put a chunky press and a green ground behind
 * trademarked artwork.
 *
 * `height` drives it and `width: auto` keeps the 2.99:1 ratio, so the img's
 * width/height attributes reserve the right box and the badge cannot be
 * squashed by a flex parent. Apple's minimum is 40px tall on the web; the hero
 * runs larger and the footer sits just above the floor.
 */
.store-badge {
  display: inline-flex;
  padding: 6px;
  margin: -6px;
  border-radius: 10px;
  line-height: 0;
}

.store-badge img {
  height: 60px;
  width: auto;
}

.footer-cta .store-badge img {
  height: 50px;
}

/* The badge is dark artwork on a light ground, so the usual focus ring sits
 * right on its edge. Offset it. */
.store-badge:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.footer-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 32px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

.footer-cta p {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 560px) {
  .store-badge img {
    height: 52px;
  }
  .footer-cta {
    gap: 14px;
  }
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy p.lede {
    margin-inline: auto;
  }
  .cta-row {
    justify-content: center;
  }
  .hero-scene {
    margin-inline: auto;
  }
}

.hero-scene {
  position: relative;
  width: min(340px, 100%);
  padding: 12px 0 96px;
}

/* The receipt paper — monospaced, slightly askew, with the same 12px
   sawtooth the app icon tears its bottom edge with. */
.paper {
  position: relative;
  width: 225px;
  margin: 0 auto;
  padding: 22px 20px 26px;
  background: #fff;
  border-radius: 3px 3px 0 0;
  transform: rotate(-1.5deg);
  box-shadow: 0 24px 60px rgb(38 44 88 / 22%);
  font: 500 11px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--ink);
  white-space: nowrap;
}

.paper strong {
  font-weight: 700;
}

.paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 9px;
  background: linear-gradient(135deg, transparent 6px, #fff 0) 0 0 / 12px 12px;
}

/* +10 ✦ — gold means clarity earned, nothing else. */
.xp-chip {
  position: absolute;
  top: 2px;
  right: 6px;
  background: var(--gold-soft);
  color: var(--gold-text);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgb(38 44 88 / 12%);
  transform: rotate(3deg);
}

/* One line, already extracted — the paper becomes a record. */
.extract {
  position: absolute;
  right: -14px;
  bottom: 176px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: 0 4px 0 var(--line), 0 14px 34px rgb(38 44 88 / 10%);
  transform: rotate(1deg);
}

.extract strong {
  font-variant-numeric: tabular-nums;
}

.extract-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex: none;
}

/* Pip — 76x90, eyes taller than wide, the smile a bottom-border arc.
   Uniformly stroked semicircles read as a grin and are the wrong face. */
.pip-say {
  position: absolute;
  left: -6px;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.pip {
  position: relative;
  width: 76px;
  height: 90px;
  flex: none;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 14px 34px rgb(38 44 88 / 10%);
}

.pip::before,
.pip::after {
  content: "";
  position: absolute;
  top: 33px;
  width: 7px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.pip::before { left: 23px; }
.pip::after { right: 23px; }

.pip .smile {
  position: absolute;
  top: 49px;
  left: 28px;
  width: 20px;
  height: 10px;
  border-bottom: 3px solid var(--ink);
  border-radius: 0 0 20px 20px;
}

.pip.happy .smile {
  width: 24px;
  height: 13px;
  left: 26px;
  border-bottom-width: 4px;
}

.pip .fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: var(--emerald-soft);
  border-radius: 0 17px 0 12px;
}

@keyframes pip-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.pip.bounce {
  animation: pip-bounce 1.6s ease-in-out infinite;
}

/* The bubble's squared bottom-left corner is the tail. There is no triangle. */
.bubble {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  max-width: 220px;
  box-shadow: 0 6px 18px rgb(38 44 88 / 5%);
}

/* ─── Feature cards, chunkier ──────────────────────────────────────────── */

.card {
  border-width: 1.5px;
  box-shadow: 0 4px 0 var(--line);
}

.icon svg {
  width: 20px;
  height: 20px;
}

.icon.em { color: var(--emerald-on-tint); }
.icon.vi { color: #5343d6; }
.icon.go { color: var(--gold-text); }
.icon.in { color: #1859cf; }

/* Privacy list ticks as the app draws them: a filled emerald circle. */
.panel li .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

/* Paper rows: label left, amount right — mono keeps the digits honest. */
.paper strong {
  display: block;
  margin-bottom: 2px;
}

.paper .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.paper .row.total {
  font-weight: 700;
  margin-top: 2px;
}

.paper .gap {
  display: block;
  height: 12px;
}

.hero-grid h1 {
  font-size: clamp(34px, 4.6vw, 52px);
}

/* Four across on desktop, no orphan card. */
.grid {
  grid-template-columns: repeat(auto-fit, minmax(218px, 1fr));
}

/* ============================================================
   Added with the Astro rebuild: slim page heroes, app screenshots
   in device frames, pricing plans, how-to-use steps, blog cards.
   ============================================================ */

/* Slim hero for inner pages */
.hero.slim {
  padding: 72px 0 8px;
  text-align: center;
}
.page-title {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 18px 0 14px;
}
.lede.center {
  margin: 0 auto;
  max-width: 56ch;
}
section.band.tight {
  padding-top: 28px;
}

/* Device frame — an iPhone-ish shell around real screenshots */
.device {
  border-radius: 34px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  box-shadow:
    0 1px 2px rgba(23, 26, 44, 0.05),
    0 18px 44px -18px rgba(23, 26, 44, 0.22);
}
.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 25px;
  border: 1px solid var(--line);
}

/* Homepage screenshot row */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 40px;
  align-items: start;
}
.shot {
  margin: 0;
}
.shot figcaption {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  padding: 0 6px;
}

/* Pricing plans */
/* **Four plans, and never three-plus-one.**
 *
 * `auto-fit` was right for three cards and wrong the moment Lifetime was added:
 * between roughly 1000px and 1250px it fits exactly three, and the fourth drops
 * to a row of its own and stretches to full width — which reads as a mistake
 * rather than as emphasis. The counts are pinned instead, so the grid steps
 * 1 -> 2 -> 4 and skips the arrangement that has an orphan in it.
 */
.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 40px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1250px) {
  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
}
.plan.featured {
  border: 2px solid var(--violet);
  background: linear-gradient(180deg, var(--violet-soft) 0%, var(--surface) 190px);
  box-shadow: 0 18px 44px -20px rgba(109, 93, 246, 0.4);
}

.premium-note {
  margin: 26px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}
.plan-flag {
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--emerald);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan h2 {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.plan-for {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 18px;
  min-height: 3em;
}
.price {
  margin: 0 0 2px;
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.02em;
}
.price strong {
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.price span {
  color: var(--muted);
  font-size: 16px;
}
.price-sub {
  margin: 0;
  color: var(--faint);
  font-size: 13.5px;
}
.plan-list {
  list-style: none;
  margin: 18px 0 24px;
  padding: 0;
  flex: 1;
}
.plan-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 7px 0;
  font-size: 15.5px;
  line-height: 1.5;
}
.plan-list .tick {
  /* `--emerald` is 2.59:1 on a white card — the same failure the tokens at the
     top of this file were created to end, still sitting on every checkmark of
     every plan. `--emerald-on-tint` is 5.36:1. */
  color: var(--emerald-on-tint);
  font-weight: 800;
  flex: none;
}
.btn.block {
  display: block;
  text-align: center;
}
.plans-note {
  margin: 26px auto 0;
  max-width: 52ch;
  text-align: center;
  color: var(--muted);
  font-size: 15.5px;
}
.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* How-to-use steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-top: 40px;
  padding-bottom: 24px;
}
.step {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 48px;
  align-items: center;
}
.step:nth-child(even) {
  grid-template-columns: minmax(220px, 300px) 1fr;
}
.step:nth-child(even) .step-copy {
  order: 2;
}
.step:nth-child(even) .step-shot {
  order: 1;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--emerald-soft);
  color: var(--emerald-on-tint);
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 800;
  font-size: 17px;
}
.step-copy h2 {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
}
.step-copy p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 12px;
  max-width: 52ch;
}
.step-shot {
  margin: 0;
}
@media (max-width: 720px) {
  .step,
  .step:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .step:nth-child(even) .step-copy {
    order: 1;
  }
  .step:nth-child(even) .step-shot {
    order: 2;
  }
  .step-shot {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* Blog cards */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 34px;
}
.post-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px -14px rgba(23, 26, 44, 0.18);
}
.post-card time {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
.post-card h2 {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 21px;
  letter-spacing: -0.015em;
  margin: 8px 0 8px;
  color: var(--ink);
}
.post-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}
.post-more {
  /* `--emerald-dark` measured 4.13:1 here — under the bar for 15px bold. */
  color: var(--emerald-link);
  font-weight: 700;
  font-size: 15px;
}

/* Blog post images */
.doc img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 26px 0;
}

/* ============================================================
   Mobile: horizontal snap carousels + swipe hint.
   Desktop keeps the grids; under 720px the marked containers
   become swipeable rows with snap points.
   ============================================================ */

.swipe-hint {
  display: none;
}

@media (max-width: 720px) {
  .swipe-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 18px 0 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--faint);
  }
  .swipe-arrow {
    display: inline-block;
    animation: swipe-nudge 1.6s ease-in-out infinite;
  }
  @keyframes swipe-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
  }

  .carousel-m {
    display: flex !important;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    margin-top: 14px;
    /* Let cards breathe to the screen edge, keep alignment with .wrap */
    margin-left: -24px;
    margin-right: -24px;
    padding: 6px 24px 18px;
    scrollbar-width: none;
  }
  .carousel-m::-webkit-scrollbar {
    display: none;
  }
  .carousel-m > * {
    flex: 0 0 76%;
    scroll-snap-align: center;
  }
  .shots.carousel-m > .shot {
    flex-basis: 68%;
  }
}

/* Mobile polish across pages */
@media (max-width: 720px) {
  .hero {
    padding-top: 48px;
  }
  .hero.slim {
    padding-top: 48px;
  }
  .plans {
    gap: 26px;
  }
  .plan.featured {
    order: -1; /* the recommended plan comes first when stacked */
  }
  .steps {
    gap: 56px;
  }
  footer.site .cols {
    flex-direction: column;
    gap: 18px;
  }
  footer.site .links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}

/* Nav labels never break mid-phrase; tighten to fit small phones */
nav.site a {
  white-space: nowrap;
}
@media (max-width: 480px) {
  header.site .wrap {
    padding: 0 14px;
  }
  nav.site {
    gap: 0;
  }
  nav.site a {
    padding: 8px 6px;
    font-size: 13px;
  }
  .logo span:last-child {
    display: none; /* the mark alone identifies Pip; the word returns at 481px+ */
  }
}

/* The screenshots row scrolls horizontally at every size (desktop included).
   Overrides the earlier grid definition — later in the cascade wins. */
.shots {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  gap: 28px;
  align-items: flex-start;
  padding: 6px 4px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.shots > .shot {
  flex: 0 0 272px;
  scroll-snap-align: start;
}

/* The hint above it shows on desktop too */
.swipe-hint.always {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}
.swipe-hint.always .swipe-arrow {
  display: inline-block;
  animation: swipe-nudge 1.6s ease-in-out infinite;
}
@keyframes swipe-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

/* Mobile keeps the edge-bleed carousel behaviour */
@media (max-width: 720px) {
  .shots {
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 14px;
    margin-left: -24px;
    margin-right: -24px;
    padding: 6px 24px 18px;
  }
  .shots::-webkit-scrollbar {
    display: none;
  }
  .shots > .shot {
    flex: 0 0 68%;
    scroll-snap-align: center;
  }
}

/* ============================================================
   Pricing & support, de-bored.
   Premium is violet — that is the design system's law.
   ============================================================ */

.plan.featured {
  border-color: var(--violet);
  box-shadow: 0 18px 44px -20px rgb(109 93 246 / 40%);
}
.plan.featured .plan-flag {
  background: var(--violet);
}

/* The one number that changes between plans, made visible */
.scan-stat {
  margin: 18px 0 4px;
}
.scan-stat .num {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.scan-stat .unit {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
}
.scan-meter {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: var(--canvas);
  overflow: hidden;
}
.scan-meter i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--emerald);
}
.plan.premium .scan-stat .num { color: var(--violet); }
.plan.premium .scan-meter i { background: var(--violet); }

/* Support: Pip greets, statically (no absolute scene positioning) */
.pip-greet {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 26px 0 6px;
}
.pip-greet .bubble {
  max-width: 340px;
}

/* Topic chips that jump to FAQ groups */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 6px;
}
.topics a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  /* The chip sits on `--surface` inside a `--surface` card, so its border is
     the only thing that says it is a control — a UI boundary, owed 3:1.
     `--line` gave 1.25:1. Same reasoning as the waitlist field above.
     Padding raised to clear 44px, which is this project's own bar. */
  padding: 11px 16px;
  border: 1.5px solid var(--field-edge);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--field-edge);
}
.topics a:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--line);
}
.topics .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot.em { background: var(--emerald); }
.dot.vi { background: var(--violet); }
.dot.go { background: #e3a008; }
.dot.in { background: var(--info); }
/* Neutral — the group that is about the app rather than about a colour-coded
   subject. The dot is never the only cue: every one of them sits beside its
   group's name, the same rule the app's category colours follow. */
.dot.ne { background: var(--ink); }

/* FAQ group kickers */
.faq-kicker {
  display: block;
  margin: 34px 0 -6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Waitlist form */
.waitlist-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  box-shadow: 0 4px 0 var(--line);
}
.waitlist-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.waitlist-row {
  display: flex;
  gap: 10px;
}
.waitlist-row input[type='email'] {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 12px 16px;
  /* The border *is* the field: nothing else marks its edge, so it is a UI
     component boundary and owes 3:1. `--line-strong` gave 1.42:1. */
  border: 1.5px solid var(--field-edge);
  border-radius: 14px;
  background: var(--app-bg);
  color: var(--ink);
}
.waitlist-row input[type='email']:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 1px;
}
.waitlist-row .btn {
  flex: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.waitlist-note {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
@media (max-width: 480px) {
  .waitlist-row {
    flex-direction: column;
  }
}

/* Links inside cards and small notes match the site's ink, not browser blue */
.card p a,
.waitlist-note a {
  color: var(--emerald-dark);
  font-weight: 650;
  text-decoration: none;
}
.card p a:hover,
.waitlist-note a:hover {
  text-decoration: underline;
}


/* Blog index meta row and post-to-post navigation
   ------------------------------------------------------------------ */

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.post-mins {
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}

/* The Malay chip is a second cue for the `lang="ms"` on the title beside it —
   one for a screen reader, one for a reader. `--violet-soft` under
   `--violet-ink` rather than the emerald family, because this is neutral
   information and green is the brand's "good" signal. */
.post-lang {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #4a3bc4;
  background: var(--violet-soft);
  border-radius: 999px;
  padding: 3px 9px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) {
  .post-nav {
    grid-template-columns: 1fr 1fr;
  }
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}

.post-nav-link:hover {
  border-color: var(--field-edge);
}

/* Right-aligned only where there is a column beside it to align against. */
@media (min-width: 700px) {
  .post-nav-link.next {
    text-align: right;
  }
}

.post-nav-dir {
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-link);
}

.post-nav-title {
  font-weight: 600;
  line-height: 1.35;
}

/* "Coming soon", beside a feature heading.
 *
 * **Blue, not violet.** Violet means Premium in this product and blue means
 * conversion or neutral information — a rule the design system calls
 * non-negotiable and which the app enforces token by token. A release status is
 * neutral information: reaching for the nearest existing pill, `.badge`, would
 * have marked an unreleased feature as a paid tier. */
.soon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--info-soft);
  color: #1859cf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
