/* The Packt website: every page in hosting/. Values from packt-design-tokens (dist/web/tokens.css) and the
   illustration palette (illustrations/palette.py). Design: docs/superpowers/specs/2026-10-23-website-overhaul-design.md.

   Motion in three layers, all CSS:
   1. .rise      — on-load entrance for what's on screen at first paint (the hero), keyframes, staggered by --i.
   2. .reveal    — a fade and a small rise, once, as a block enters the viewport (Gary, 2026-10-23: "content animates and
                   fades in nicely as you scroll. don't overdo it"). Time-based so it reads the same at any scroll speed:
                   an IntersectionObserver in site.js adds .in; html.js (set by site.js) is what hides it first, so without
                   JS nothing is ever hidden. Staggered by --i within a group.
   3. .para      — parallax drift over the element's trip through the viewport, scroll-driven (animation-timeline) where
                   the browser has it (html.sda); at rest elsewhere. The header frost and the counters use the same gate.
   prefers-reduced-motion turns all three off. */

/* Outfit: the full font for anything outside Latin, then a Latin WOFF2 subset (34 KB, the one that loads in practice).
   Faces are matched last-declared first, so Latin text uses the subset. */
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2190-2193, U+2212, U+2215;
}

:root {
  color-scheme: dark;
  --packt-color-bg-canvas: #0E0E0E;
  --packt-color-bg-surface: #232323;
  --packt-color-bg-surface-raised: #FFFFFF1f;
  --packt-color-bg-track: #FFFFFF1a;
  --packt-color-bg-brand: #F5FF6A;
  --packt-color-bg-accent-subtle: #AEE04A33;
  --packt-color-bg-warning-subtle: #EA5B2D33;
  --packt-color-fg-primary: #FFFFFF;
  --packt-color-fg-secondary: #FFFFFF99;
  --packt-color-fg-tertiary: #FFFFFF4d;
  --packt-color-fg-on-brand: #0E0E0E;
  --packt-color-fg-brand: #F5FF6A;
  --packt-color-fg-accent: #AEE04A;
  --packt-color-fg-warning: #EA5B2D;
  --packt-color-fg-danger: #DD3B3B;
  --packt-color-border-hairline: #FFFFFF14;
  --packt-font-family-display: "Outfit", system-ui, sans-serif;
  --packt-font-family-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --packt-radius-card: 20px;
  --packt-radius-ticket: 14px;
  --packt-radius-tile: 10px;
  --packt-space-screen: 16px;
  --packt-space-card-gap: 14px;
  --packt-space-section-gap: 24px;
  --packt-size-button: 50px;
  --packt-size-icon-tile: 36px;
  --packt-motion-entrance-duration: 550ms;
  --packt-motion-entrance-easing: cubic-bezier(0.16, 1, 0.3, 1);
  --packt-motion-entrance-rise: 12px;
  --packt-motion-entrance-stagger: 60ms;
  --packt-motion-press-scale: 0.97;
  /* The illustration palette (illustrations/palette.py): the home hue tints the canvas behind each mark. */
  --packt-illustration-hue-lime: #AEE04A;
  --packt-illustration-hue-mint: #5CE8A4;
  --packt-illustration-hue-aqua: #3FD9CB;
  --packt-illustration-hue-sky: #55B9FF;
  --packt-illustration-hue-azure: #4A8EF0;
  --packt-illustration-hue-violet: #9D86FF;
  --packt-illustration-hue-orchid: #D27BFF;
  --packt-illustration-hue-pink: #FF6FB8;
  --packt-illustration-hue-coral: #FF6B5E;
  --packt-illustration-hue-tangerine: #FF9A3D;
  --packt-illustration-hue-sand: #E8CF7A;
  --packt-illustration-hue-olive: #B9C94B;
  --packt-illustration-hue-signal: #F5FF6A;

  --page: 1120px;
  --gutter: max(var(--packt-space-screen), env(safe-area-inset-left), env(safe-area-inset-right));
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-h: 64px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; overflow-x: clip;
  background: var(--packt-color-bg-canvas);
  color: var(--packt-color-fg-primary);
  font: 17px/1.55 var(--packt-font-family-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--packt-color-fg-brand); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--packt-color-fg-brand); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { display: block; }

/* ---------- Header ---------- */
/* Transparent over the hero; frosts over the first 120 px of scroll (scroll-driven), or on .scrolled (site.js). */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: rgba(14, 14, 14, 0);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled { background: rgba(14, 14, 14, 0.78); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--packt-color-fg-primary); text-decoration: none;
         font: 700 22px/1 var(--packt-font-family-display); letter-spacing: -0.01em; }
.brand svg { width: 22px; height: 26px; fill: var(--packt-color-fg-brand); overflow: visible; }
.site-nav { display: none; gap: 28px; font-size: 15px; font-weight: 500; }
.site-nav a { color: var(--packt-color-fg-secondary); text-decoration: none; transition: color 0.2s; }
.site-nav a:hover { color: var(--packt-color-fg-primary); }
.site-header .actions { display: flex; align-items: center; gap: 24px; }
@media (min-width: 880px) { .site-nav { display: flex; } }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--packt-size-button); padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 17px/1.2 var(--packt-font-family-body); text-decoration: none; white-space: nowrap;
  color: var(--packt-color-fg-on-brand); background: var(--packt-color-bg-brand);
  transition: transform 0.3s var(--spring), background-color 0.2s, opacity 0.2s, box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.button:active { transform: scale(var(--packt-motion-press-scale)); }
.button svg { width: 20px; height: 20px; flex: none; }
.button.secondary { color: var(--packt-color-fg-primary); background: var(--packt-color-bg-surface-raised); }
.button.small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.button[aria-disabled="true"], .button:disabled { opacity: 0.55; cursor: default; }
@media (hover: hover) {
  .button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(245, 255, 106, 0.55); }
  .button.secondary:hover { box-shadow: none; background: rgba(255, 255, 255, 0.16); }
  .button:hover:active { transform: scale(var(--packt-motion-press-scale)); }
}

/* Store buttons: a small line over the big one. */
.stores { display: grid; gap: 10px; }
.store {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 10px 22px;
  border-radius: 18px; text-decoration: none; color: var(--packt-color-fg-on-brand); background: var(--packt-color-bg-brand);
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.store:active { transform: scale(var(--packt-motion-press-scale)); }
.store + .store { color: var(--packt-color-fg-primary); background: var(--packt-color-bg-surface-raised); }
.store span { display: block; text-align: left; }
.store small { display: block; font-size: 13px; line-height: 1.2; opacity: 0.72; }
.store strong { display: block; font: 600 18px/1.25 var(--packt-font-family-body); }
.store svg { width: 20px; height: 20px; flex: none; opacity: 0.7; transition: transform 0.3s var(--spring), opacity 0.2s; }
@media (hover: hover) {
  .store:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -18px rgba(245, 255, 106, 0.6); }
  .store + .store:hover { box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9); }
  .store:hover svg { transform: translate(2px, -2px); opacity: 1; }
}
.stores-note { margin: 12px 0 0; font-size: 15px; color: var(--packt-color-fg-tertiary); text-wrap: pretty; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--packt-color-fg-secondary);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--packt-color-fg-accent);
                box-shadow: 0 0 0 4px var(--packt-color-bg-accent-subtle); }
h1, h2, h3 { font-family: var(--packt-font-family-display); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 11.5vw, 88px); line-height: 0.96; letter-spacing: -0.03em; }
h2 { font-size: clamp(34px, 7.5vw, 60px); line-height: 1.02; letter-spacing: -0.025em; }
h3 { font-size: 22px; line-height: 28px; }
.mark-word { color: var(--packt-color-fg-brand); }
.lede { margin: 20px 0 0; font-size: clamp(18px, 4.6vw, 22px); line-height: 1.45; color: var(--packt-color-fg-secondary); text-wrap: pretty; max-width: 36ch; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 6vw, 56px); }
.section-head p { margin: 16px 0 0; font-size: 18px; color: var(--packt-color-fg-secondary); text-wrap: pretty; max-width: 56ch; }

/* ---------- Sections ---------- */
/* No rules between sections: space, a change of scale, and, where a section has a hue, a faint tint (the illustration
   canvas rule: the void, the home hue at about ten percent in the middle, nothing at the edges). */
section { position: relative; padding: clamp(72px, 12vw, 136px) 0; }
.tint { --hue: var(--packt-illustration-hue-lime); --tint-x: 50%; --tint-y: 50%; }
/* The glow box reaches past the section so the ellipse fades out inside it: no edge where a section starts or ends.
   Keep --tint-y between 40 % and 60 %. */
.tint::before {
  content: ""; position: absolute; inset: -30% -10%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at var(--tint-x) var(--tint-y), color-mix(in srgb, var(--hue) 10%, transparent), transparent 100%);
}

/* ---------- The illustration canvas (P1-35c), the way the apps draw it ---------- */
.illu {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 55%, transparent 50%, rgb(0 0 0 / 0.35) 110%),
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--hue, transparent) 28%, transparent) 0%, transparent 75%),
    var(--packt-color-bg-canvas, #0E0E0E);
}
.illu img { width: 100%; height: 100%; object-fit: contain; }
.illu-hero { width: 160px; height: 160px; border-radius: var(--packt-radius-card); margin-bottom: 24px; }
/* A mark on the bare canvas: just the image, the tint comes from the section. */
.mark-img { display: block; width: var(--size, 120px); height: var(--size, 120px); object-fit: contain; }

/* ---------- Hero ---------- */
.hero { padding: clamp(24px, 6vw, 72px) 0 clamp(64px, 10vw, 112px); overflow: visible; }
.hero.tint { --tint-x: 70%; --tint-y: 45%; }
.hero .wrap { display: grid; gap: 56px; align-items: center; }
.hero-mark { width: 52px; height: 61px; margin-bottom: 28px; display: block; overflow: visible; fill: var(--packt-color-fg-brand); }
.hero .stores { margin-top: 32px; max-width: 380px; }
.hero h1 { max-width: 12ch; }
@media (min-width: 880px) {
  .hero { padding-top: 56px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
  .hero h1 { font-size: clamp(64px, 6.4vw, 92px); }
}

/* The hero's picture: the phone with three illustrations floating around it at different depths. */
.hero-art { position: relative; width: min(100%, 440px); margin: 24px auto 0; }
.hero-art .phone { width: min(300px, 70vw); }
.float { position: absolute; z-index: 2; pointer-events: none; }
.float img { width: var(--size, 150px); height: var(--size, 150px); object-fit: contain;
             filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)); }
.float-pot { --size: clamp(140px, 36vw, 200px); left: -8%; bottom: 6%; }
.float-check { --size: clamp(96px, 24vw, 130px); right: -4%; top: 4%; }
.float-coin { --size: clamp(110px, 28vw, 150px); right: -10%; bottom: 26%; }
@media (min-width: 880px) {
  .hero-art { margin-top: 0; }
  .float-pot { left: -14%; bottom: 2%; }
  .float-check { right: -8%; top: 0; }
  .float-coin { right: -16%; bottom: 28%; }
}

/* A phone: the screenshot under a dark bezel. */
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 1320 / 2868; margin: 0 auto;
  padding: 9px; border-radius: 48px; background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 120px -40px rgba(245, 255, 106, 0.25);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 40px; }
.phones { display: flex; justify-content: center; gap: 16px; }
.phones .phone { width: min(260px, 42vw); padding: 7px; border-radius: 40px; }
.phones .phone img { border-radius: 34px; }
.phones > :nth-child(2) { margin-top: 64px; }
@media (max-width: 480px) { .phones .phone { border-radius: 30px; padding: 5px; } .phones .phone img { border-radius: 26px; } }

/* ---------- How it works: three cards, each with its illustration ---------- */
.steps { display: grid; gap: var(--packt-space-card-gap); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 24px 24px 26px;
  border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface); counter-increment: step; overflow: clip;
  --hue: var(--packt-illustration-hue-lime);
  background-image: radial-gradient(80% 70% at 90% 10%, color-mix(in srgb, var(--hue) 14%, transparent), transparent 70%);
}
.steps li::before {
  content: counter(step, decimal-leading-zero); grid-column: 1; align-self: start;
  font: 700 15px/20px var(--packt-font-family-display); letter-spacing: 0.04em; color: var(--packt-color-fg-brand); font-variant-numeric: tabular-nums;
}
.steps li.miss { --hue: var(--packt-illustration-hue-tangerine); }
.steps li.miss::before { color: var(--packt-color-fg-warning); }
.steps h3 { grid-column: 1; margin-top: 10px; }
.steps p { grid-column: 1; margin: 0; color: var(--packt-color-fg-secondary); text-wrap: pretty; }
.steps .mark-img { grid-column: 2; grid-row: 1 / 4; align-self: center; --size: 96px; margin-right: -6px; }
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--packt-space-card-gap); }
  .steps li { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; padding: 24px 24px 28px; min-height: 360px; }
  .steps h3, .steps p { grid-column: 1; }
  .steps .mark-img { grid-column: 1; grid-row: 1; justify-self: end; --size: 136px; margin: -12px -16px 8px 0; }
  .steps li::before { grid-row: 1; }
  .steps h3 { grid-row: 2; margin-top: 24px; }
  .steps p { grid-row: 3; }
}

/* ---------- Why it works: typographic ---------- */
.why .section-head { max-width: 820px; }
.why .section-head h2 { font-size: clamp(36px, 8vw, 68px); }
.claims { display: grid; gap: 44px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: claim; }
.claims li { counter-increment: claim; }
.claims li::before {
  content: counter(claim, decimal-leading-zero); display: block; margin-bottom: 8px;
  font: 700 15px/20px var(--packt-font-family-display); letter-spacing: 0.04em; color: var(--packt-color-fg-brand); font-variant-numeric: tabular-nums;
}
.claims h3 { margin-bottom: 10px; font-size: clamp(24px, 5.2vw, 30px); line-height: 1.15; }
.claims p { margin: 0; color: var(--packt-color-fg-secondary); max-width: 60ch; text-wrap: pretty; }
.claims em { color: var(--packt-color-fg-primary); font-style: italic; }
sup a { font-size: 12px; font-weight: 600; text-decoration: none; padding: 0 2px; }
@media (min-width: 880px) { .claims { grid-template-columns: 1fr 1fr; gap: 56px 64px; } .claims li:last-child { grid-column: 1 / -1; max-width: 50%; } }
.closer {
  display: grid; gap: 24px; align-items: center; margin: clamp(56px, 8vw, 96px) 0 0;
  font: 600 clamp(26px, 6vw, 44px)/1.15 var(--packt-font-family-display); letter-spacing: -0.02em; text-wrap: balance;
}
.closer p { margin: 0; max-width: 20ch; }
@media (min-width: 900px) { .closer { grid-template-columns: 1fr auto; gap: 56px; } }

/* The tally. Plays once when the observer adds .in (the reveal's own fade covers the block; this is what happens inside):
   rows land 0.55 s apart, a coin drops with each miss, the pot's number steps up. Reduced motion shows the end state. */
.tally {
  --row: 550ms; --t0: 350ms;
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; width: min(100%, 520px);
  padding: 18px; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface);
  font: 500 15px/1.3 var(--packt-font-family-body); letter-spacing: 0;
}
@media (max-width: 419px) { .tally { grid-template-columns: 1fr; justify-items: center; } .tally .tally-ledger { justify-self: stretch; } }
.tally-pot { position: relative; width: clamp(150px, 38vw, 190px); aspect-ratio: 1; }
/* Four stacked layers in one box (the three pot layers are pixel-aligned crops of the same frame): the empty pot at the
   back, coins in the middle, the front lip over them so a coin visibly drops inside, the full pot on top for the end.
   Without JS (and under reduced motion) only the full pot shows: the end state. */
.tally-pot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tally-pot .pot-back, .tally-pot .pot-front, .tally-pot .coin { opacity: 0; }
.tally-pot .pot-back { z-index: 1; } .tally-pot .coin { z-index: 2; } .tally-pot .pot-front { z-index: 3; } .tally-pot .pot-full { z-index: 4; }
.tally-count {
  position: absolute; z-index: 5; left: 50%; bottom: 6%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px;
  font: 700 18px/1.2 var(--packt-font-family-display); color: var(--packt-color-fg-on-brand); background: var(--packt-color-bg-brand);
  font-variant-numeric: tabular-nums;
}
/* The pot's number: four stacked labels, one shown at a time (no counter or registered property, so it steps the same in
   every browser). Without JS, under reduced motion and at the end: $35. */
.tally-count { display: inline-grid; }
.tally-count span { grid-area: 1 / 1; text-align: center; opacity: 0; }
.tally-count .v3 { opacity: 1; }
/* A coin: 18.4 % of the box wide (12 % of the master), centred, landing with its middle at 40 % down, where the front
   lip covers its lower half. Small sideways offsets so three coins don't sit on one spot. */
.tally-pot .coin { inset: auto; left: 50%; top: 30%; width: 18.4%; height: auto; margin-left: -9.2%; }
.tally-pot .coin.c2 { margin-left: -13%; top: 31%; }
.tally-pot .coin.c3 { margin-left: -5.5%; top: 31.5%; }
.tally-ledger { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; min-width: 0; }
.tally-ledger li { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px;
                   background: rgba(255, 255, 255, 0.04); }
.tally-ledger .day { color: var(--packt-color-fg-tertiary); font-variant-numeric: tabular-nums; }
.tally-ledger .who { color: var(--packt-color-fg-primary); }
.tally-ledger .amt { font-weight: 700; color: var(--packt-color-fg-warning); font-variant-numeric: tabular-nums; }
.tally-ledger .clean .amt { color: var(--packt-color-fg-accent); display: inline-flex; }
.tally-ledger .clean .amt svg { width: 18px; height: 18px; }
.tally-ledger .clean .who { color: var(--packt-color-fg-secondary); }
.tally-ledger .total { grid-template-columns: 1fr; margin-top: 4px; background: rgba(245, 255, 106, 0.1); }
.tally-ledger .total .who { font-weight: 700; color: var(--packt-color-fg-brand); }
/* Before it plays (JS on, not yet in view): the empty pot with its lip, no rows, no coins, $0. Once .in, everything runs on
   its clock: rows land, a coin drops with each miss, and when the total row lands the full pot cross-fades in. */
.js .tally .pot-back, .js .tally .pot-front { opacity: 1; }
.js .tally .pot-full { opacity: 0; }
.js .tally:not(.in) .tally-ledger li { opacity: 0; }
.js .tally:not(.in) .tally-count .v0 { opacity: 1; }
.js .tally:not(.in) .tally-count .v3 { opacity: 0; }
.js .tally.in .tally-ledger li { animation: tally-row 420ms var(--packt-motion-entrance-easing) both; animation-delay: calc(var(--t0) + var(--i) * var(--row)); }
.js .tally.in .coin { --drop: calc(var(--t0) + var(--n) * var(--row) + 120ms);
                      animation: coin-drop 620ms cubic-bezier(0.5, 0, 0.75, 0) both, layer-out 1ms step-end forwards;
                      animation-delay: var(--drop), calc(var(--end) + 450ms); }   /* the fade-out fills forwards only, or it would show the coins early */
.js .tally.in .coin.c1 { --n: 0; } .js .tally.in .coin.c2 { --n: 1; } .js .tally.in .coin.c3 { --n: 3; }
.tally { --end: calc(var(--t0) + 5 * var(--row)); }
.js .tally.in .pot-back, .js .tally.in .pot-front { animation: layer-out 1ms step-end calc(var(--end) + 450ms) both; }   /* gone once pot-full is opaque over them */
.js .tally.in .pot-full { animation: layer-in 450ms ease var(--end) both; }
/* Each label holds from one coin's landing to the next: $0 → Mon's coin ($5) → Tue's ($15) → Thu's ($35). */
.js .tally.in .tally-count span { animation: 2740ms linear both; }
.js .tally.in .tally-count .v0 { animation-name: tally-v0; } .js .tally.in .tally-count .v1 { animation-name: tally-v1; }
.js .tally.in .tally-count .v2 { animation-name: tally-v2; } .js .tally.in .tally-count .v3 { animation-name: tally-v3; }
@keyframes tally-row { from { opacity: 0; transform: translateY(8px); } }
/* Falls from above the box with gravity (ease-in), fading in on the way; ends inside the mouth, half behind the lip. */
@keyframes coin-drop { 0% { opacity: 0; transform: translateY(-170%) rotate(-12deg); } 25% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes layer-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes layer-in { from { opacity: 0; } to { opacity: 1; } }
/* The number steps at each miss: $0 until Monday lands, $5, then $15 on Tuesday, then $35 on Thursday. */
/* One clock for all four labels, 2740 ms: the number steps as each coin lands (t0 + n rows + 120 ms delay + 620 ms drop:
   Mon 1090 ms = 39.8 %, Tue 1640 ms = 59.9 %, Thu 2740 ms = 100 %). Change --t0, --row or the drop and recompute. */
@keyframes tally-v0 { 0%, 39.7% { opacity: 1; } 39.8%, 100% { opacity: 0; } }
@keyframes tally-v1 { 0%, 39.7% { opacity: 0; } 39.8%, 59.8% { opacity: 1; } 59.9%, 100% { opacity: 0; } }
@keyframes tally-v2 { 0%, 59.8% { opacity: 0; } 59.9%, 99.9% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tally-v3 { 0%, 99.9% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  /* The end state, still: every row, the full pot, $35. */
  .js .tally:not(.in) .tally-ledger li { opacity: 1; }
  .js .tally .tally-count span, .js .tally:not(.in) .tally-count .v0 { opacity: 0; }
  .js .tally .tally-count .v3, .js .tally:not(.in) .tally-count .v3 { opacity: 1; }
  .js .tally .pot-back, .js .tally .pot-front, .js .tally .coin { opacity: 0; }
  .js .tally .pot-full { opacity: 1; }
  .js .tally.in .tally-ledger li, .js .tally.in .coin,
  .js .tally.in .tally-count .v0, .js .tally.in .tally-count .v1, .js .tally.in .tally-count .v2, .js .tally.in .tally-count .v3,
  .js .tally.in .pot-back, .js .tally.in .pot-front, .js .tally.in .pot-full { animation: none; }
}
.footnotes { margin: clamp(48px, 8vw, 80px) 0 0; font-size: 13px; line-height: 18px; color: var(--packt-color-fg-tertiary); }
.footnotes ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; max-width: 70ch; }
.footnotes a { color: var(--packt-color-fg-secondary); }
.footnotes li:target { color: var(--packt-color-fg-primary); }

/* ---------- Proof tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { padding: 22px 20px; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface); }
.tile .icon {
  display: grid; place-items: center; width: var(--packt-size-icon-tile); height: var(--packt-size-icon-tile); margin-bottom: 32px;
  border-radius: var(--packt-radius-tile); color: var(--packt-color-fg-on-brand); background: var(--packt-color-bg-brand);
}
.tile .icon svg { width: 20px; height: 20px; }
.tile h3 { font-size: 20px; line-height: 25px; }
.tile p { margin: 6px 0 0; font-size: 15px; line-height: 20px; color: var(--packt-color-fg-secondary); text-wrap: pretty; }
@media (min-width: 880px) { .tiles { grid-template-columns: repeat(4, 1fr); gap: var(--packt-space-card-gap); } .tile { padding: 26px 24px; } }

/* ---------- Split sections (pot, pass) ---------- */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; gap: 80px; } .split.flip > :first-child { order: 2; } }
.callout {
  margin: 28px 0 0; padding-left: 18px; border-left: 3px solid var(--packt-color-fg-brand);
  font: 600 20px/1.35 var(--packt-font-family-display); text-wrap: balance;
}

/* The pot ticker: a number that counts up as it scrolls in (scroll-driven only; static otherwise). */
@property --pot { syntax: "<integer>"; inherits: false; initial-value: 65; }
.pot-stat { margin: 28px 0 0; display: flex; gap: 18px; align-items: baseline; }
.pot-stat b { font: 700 clamp(44px, 10vw, 64px)/1 var(--packt-font-family-display); letter-spacing: -0.03em; color: var(--packt-color-fg-brand);
              font-variant-numeric: tabular-nums; }
/* The reset sits on the element, not the pseudo: a registered (non-inherited) property doesn't reach ::before. */
.pot-stat b { --pot: 65; counter-reset: pot var(--pot); }
.pot-stat b::before { content: "$" counter(pot); }
.pot-stat span { font-size: 15px; color: var(--packt-color-fg-secondary); max-width: 18ch; line-height: 1.3; }

/* The pass vote card, drawn like the app's. */
.vote {
  width: min(420px, 100%); margin: 0 auto; padding: 22px; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.vote-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--packt-color-bg-surface-raised); font: 700 17px/1 var(--packt-font-family-display); color: var(--packt-color-fg-brand);
}
.vote h3 { font-size: 20px; line-height: 25px; }
.vote-meta { margin: 2px 0 0; font-size: 15px; color: var(--packt-color-fg-secondary); }
.vote blockquote { margin: 18px 0 0; padding-left: 12px; border-left: 3px solid var(--packt-color-fg-brand); font-size: 17px; }
.vote-tally { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 15px; color: var(--packt-color-fg-secondary); }
.vote-tally .pips { display: flex; gap: 4px; }
.vote-tally .pips i { width: 22px; height: 6px; border-radius: 3px; background: var(--packt-color-bg-track); }
.vote-tally .pips i.on { background: var(--packt-color-fg-accent); }
.vote-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.vote-buttons .button { width: 100%; }

/* ---------- The latest: a bento of what shipped ---------- */
.bento { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.bento li {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 20px;
  border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface); overflow: clip;
}
.bento h3 { grid-column: 1; font-size: 20px; line-height: 25px; }
.bento p { grid-column: 1; margin: 0; font-size: 15px; line-height: 20px; color: var(--packt-color-fg-secondary); text-wrap: pretty; }
.bento .mark-img { grid-column: 2; grid-row: 1 / 3; --size: 84px; margin: -6px -6px -6px 0; }
.bento .icon {
  grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: var(--packt-size-icon-tile); height: var(--packt-size-icon-tile);
  border-radius: var(--packt-radius-tile); color: var(--packt-color-fg-on-brand); background: var(--packt-color-bg-brand); margin-right: 8px;
}
.bento .icon svg { width: 20px; height: 20px; }
/* The Today card, drawn like the app's stakes hero. */
.bento .stakes { grid-column: 1 / -1; margin-top: 14px; padding: 16px 18px; border-radius: var(--packt-radius-ticket);
                 background: var(--packt-color-bg-canvas); }
.stakes b { display: block; font: 700 clamp(30px, 7vw, 40px)/1.05 var(--packt-font-family-display); letter-spacing: -0.02em; }
.stakes b em { font-style: normal; color: var(--packt-color-fg-warning); white-space: nowrap; }
.stakes span { display: block; margin-top: 4px; font-size: 15px; color: var(--packt-color-fg-secondary); }
.stakes .bar { height: 6px; margin-top: 14px; border-radius: 3px; background: var(--packt-color-bg-track); overflow: clip; }
.stakes .bar i { display: block; height: 100%; width: 66%; border-radius: 3px; background: var(--packt-color-fg-accent); transform-origin: left; }
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(6, 1fr); gap: var(--packt-space-card-gap); }
  .bento li { grid-column: span 2; padding: 24px; }
  .bento li.wide { grid-column: span 3; }
}

/* ---------- The template shelf ---------- */
.shelf-wrap { position: relative; }
.shelf {
  display: flex; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 24px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf li { flex: none; scroll-snap-align: start; width: min(230px, 62vw); }
.shelf-card {
  display: block; height: 100%; padding: 16px; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface);
  color: var(--packt-color-fg-primary); text-decoration: none; transition: transform 0.3s var(--spring), background-color 0.2s;
}
.shelf-card .illu { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--packt-radius-ticket); }
.shelf-card .illu img { width: 72%; height: 72%; }
.shelf-card h3 { margin-top: 16px; font-size: 20px; line-height: 25px; }
.shelf-card p { margin: 2px 0 0; font-size: 15px; color: var(--packt-color-fg-secondary); }
.shelf-card .tag { display: inline-block; margin-top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
                   color: var(--packt-color-fg-on-brand); background: var(--packt-color-bg-brand); }
.shelf-card.soon .tag { color: var(--packt-color-fg-secondary); background: var(--packt-color-bg-surface-raised); }
@media (hover: hover) { .shelf-card:hover { transform: translateY(-4px); } }
.shelf-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 600; text-decoration: none; }
.shelf-more svg { width: 18px; height: 18px; transition: transform 0.3s var(--spring); }
.shelf-more:hover svg { transform: translateX(3px); }
/* On a wide screen the shelf is a grid. */
@media (min-width: 1000px) {
  .shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--packt-space-card-gap); margin: 0; padding: 0; overflow: visible; }
  .shelf.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .shelf li { width: auto; }
}

/* ---------- Waitlist ---------- */
.waitlist .card {
  position: relative; max-width: 560px; margin: 0 auto; padding: 32px 22px; border-radius: 28px; text-align: center;
  background: radial-gradient(80% 60% at 50% 0%, rgba(245, 255, 106, 0.12), transparent 70%), var(--packt-color-bg-surface);
}
.waitlist h2 { font-size: clamp(30px, 7vw, 44px); }
.waitlist .card > p { margin: 12px auto 0; max-width: 40ch; color: var(--packt-color-fg-secondary); text-wrap: pretty; }
form { display: grid; gap: 14px; margin-top: 26px; text-align: left; }
.field { position: relative; }
input[type="email"] {
  width: 100%; height: 54px; padding: 0 18px; border-radius: var(--packt-radius-ticket); border: 1.5px solid transparent;
  font: 17px var(--packt-font-family-body); color: var(--packt-color-fg-primary); background: var(--packt-color-bg-canvas);
  transition: border-color 0.2s;
}
input[type="email"]::placeholder { color: var(--packt-color-fg-tertiary); }
input[type="email"]:focus { outline: none; border-color: var(--packt-color-fg-brand); }
input[type="email"][aria-invalid="true"] { border-color: var(--packt-color-fg-danger); }

/* The platform picker: a capsule track with a sliding thumb, like PacktSegmented. */
.segmented { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 0; margin: 0;
             border-radius: 999px; background: var(--packt-color-bg-canvas); }
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  position: relative; z-index: 1; display: grid; place-items: center; height: 40px; border-radius: 999px; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--packt-color-fg-secondary); transition: color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.segmented input:checked + label { color: var(--packt-color-fg-primary); }
.segmented input:focus-visible + label { outline: 2px solid var(--packt-color-fg-brand); outline-offset: -2px; }
.segmented .thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 999px;
  background: var(--packt-color-bg-surface-raised); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.42s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.segmented:has(#p-android:checked) .thumb { transform: translateX(100%); }
.segmented:has(#p-either:checked) .thumb { transform: translateX(200%); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--packt-radius-ticket);
         background: var(--packt-color-bg-canvas); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.check input { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 7px; cursor: pointer;
               border: 1.5px solid var(--packt-color-fg-tertiary); display: grid; place-items: center; transition: background-color 0.2s, border-color 0.2s; }
.check input::after { content: ""; width: 12px; height: 7px; border: solid var(--packt-color-fg-on-brand); border-width: 0 0 2.5px 2.5px;
                      transform: translateY(-2px) rotate(-45deg) scale(0); transition: transform 0.3s var(--spring); }
.check input:checked { background: var(--packt-color-bg-brand); border-color: var(--packt-color-bg-brand); }
.check input:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }
.check strong { display: block; font-weight: 600; }
.check span span { display: block; font-size: 15px; color: var(--packt-color-fg-secondary); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form .button { width: 100%; height: 54px; margin-top: 4px; }
.form-status { min-height: 20px; margin: 0; font-size: 15px; text-align: center; color: var(--packt-color-fg-secondary); }
.form-status.error { color: var(--packt-color-fg-warning); }
.done-state { display: none; padding: 28px 0 6px; }
.done-state .tick {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  color: var(--packt-color-fg-on-brand); background: var(--packt-color-fg-accent); animation: pop 0.5s var(--spring);
}
.done-state .tick svg { width: 30px; height: 30px; }
.done-state h3 { font-size: 26px; line-height: 32px; }
.done-state p { margin: 8px 0 0; color: var(--packt-color-fg-secondary); }
.waitlist.done form { display: none; }
.waitlist.done .done-state { display: block; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(40px, 6vw, 64px) 0 max(40px, env(safe-area-inset-bottom)); font-size: 15px; color: var(--packt-color-fg-tertiary); }
.site-footer .wrap { display: grid; gap: 22px; }
.site-footer .brand { font-size: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { color: var(--packt-color-fg-secondary); text-decoration: none; transition: color 0.2s; }
.site-footer nav a:hover { color: var(--packt-color-fg-primary); }
.site-footer p { margin: 0; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; } .site-footer nav { justify-content: center; } }

/* ---------- Template pages ---------- */
.template-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.template-card {
  display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--packt-radius-card);
  background: var(--packt-color-bg-surface); color: var(--packt-color-fg-primary); text-decoration: none;
  transition: transform 0.3s var(--spring), background-color 0.2s;
}
@media (hover: hover) { .template-card:hover { transform: translateY(-2px); background: #262626; } }
.template-card h3 { font-size: 20px; line-height: 25px; }
.template-card p { margin: 2px 0 0; font-size: 15px; color: var(--packt-color-fg-secondary); }
.template-card .body { flex: 1; min-width: 0; }
.template-card .tag { flex: none; font-size: 13px; font-weight: 600; color: var(--packt-color-fg-tertiary); }
.template-card .chev { flex: none; width: 20px; height: 20px; color: var(--packt-color-fg-tertiary); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 28px 0 0; }
.fact { padding: 16px; border-radius: var(--packt-radius-ticket); background: var(--packt-color-bg-surface); }
.fact dt { font-size: 13px; color: var(--packt-color-fg-secondary); }
.fact dd { margin: 4px 0 0; font: 600 18px/1.3 var(--packt-font-family-display); }
.ladder { display: flex; align-items: center; gap: 6px; }
.ladder b { padding: 2px 9px; border-radius: 999px; font-weight: 700; color: var(--packt-color-fg-warning); background: var(--packt-color-bg-warning-subtle); }
.ladder i { width: 12px; height: 12px; color: var(--packt-color-fg-tertiary); display: inline-flex; }

/* ---------- Prose pages (privacy, support, delete account) ---------- */
.prose { max-width: 740px; padding-top: clamp(32px, 6vw, 64px); padding-bottom: clamp(64px, 10vw, 120px); }
.prose h1 { font-size: clamp(36px, 8vw, 56px); margin-bottom: 8px; }
.prose .meta { margin: 0 0 36px; color: var(--packt-color-fg-secondary); }
.prose h2 { font-size: clamp(24px, 5vw, 30px); line-height: 1.15; margin: 48px 0 12px; }
.prose h3 { font-size: 20px; line-height: 26px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--packt-color-fg-secondary); text-wrap: pretty; }
.prose p strong, .prose li strong { color: var(--packt-color-fg-primary); font-weight: 600; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose code { font-size: 0.92em; padding: 1px 5px; border-radius: 5px; background: var(--packt-color-bg-surface); color: var(--packt-color-fg-primary); }
.prose .scroll { overflow-x: auto; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface); margin: 16px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 16px; }
.prose th { font-weight: 600; color: var(--packt-color-fg-secondary); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.prose tbody tr:nth-child(even) td, .prose tr:nth-child(even) td { background: rgba(255, 255, 255, 0.03); }
.prose td { color: var(--packt-color-fg-secondary); }
.prose td:first-child { color: var(--packt-color-fg-primary); font-weight: 600; }
.prose .card { padding: 18px 20px; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface); margin: 12px 0; }
.prose .card h3 { margin: 0 0 8px; }
.prose .card ol { margin: 0; }
.prose details { padding: 0 20px; border-radius: var(--packt-radius-card); background: var(--packt-color-bg-surface); margin: 10px 0; }
.prose summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--packt-color-fg-primary); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: ""; flex: none; width: 10px; height: 10px; border: solid var(--packt-color-fg-tertiary); border-width: 0 2px 2px 0;
                        transform: rotate(45deg); transition: transform 0.3s var(--spring); margin: -4px 4px 0 0; }
.prose details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.prose details p { margin: 0 0 18px; }

/* ---------- Motion ---------- */
/* 1. What is on screen at first paint (the hero) is visible at once: .rise is kept as a hook but animates nothing. */
.rise { animation: none; }

/* 2. Reveal on scroll: a fade and a 14 px rise over 560 ms, ease-out, staggered 70 ms by --i, once. site.js sets html.js
      up front and adds .in as each block enters the viewport (never removed, so nothing replays on the way back up). */
.js .reveal { transition: opacity 560ms var(--packt-motion-entrance-easing), transform 560ms var(--packt-motion-entrance-easing);
              transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(14px); }

/* 3. Parallax: the element drifts by --depth px over its trip through the viewport. Positive depth moves against the
      scroll (reads as nearer), negative with it (farther). */
@supports (animation-timeline: view()) {
  .sda .para { animation: para linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  .sda .header-timeline { animation: header-solid linear both; animation-timeline: scroll(root); animation-range: 0 120px; transition: none; }
  .sda .pot-stat b { animation: pot linear both; animation-timeline: view(); animation-range: entry 20% entry 90%; }
  .sda .stakes .bar i { animation: fill linear both; animation-timeline: view(); animation-range: entry 30% entry 100%; }
}
@keyframes para { from { transform: translateY(calc(var(--depth, 20) * 1px)); } to { transform: translateY(calc(var(--depth, 20) * -1px)); } }
@keyframes header-solid { to { background: rgba(14, 14, 14, 0.78); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); } }
@keyframes pot { from { --pot: 0; } to { --pot: 65; } }
@keyframes fill { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .sda .para, .sda .header-timeline, .sda .pot-stat b, .sda .stakes .bar i {
    animation: none; transition: none; opacity: 1; transform: none;
  }
  .js .reveal:not(.in) { opacity: 1; transform: none; }
  .segmented .thumb, .button, .store, .store svg, .check input, .check input::after, .shelf-more svg, .template-card, .shelf-card { transition: none; }
  .done-state .tick { animation: none; }
  .prose summary::after, .site-header { transition: none; }
  .shelf-more:hover svg, .store:hover svg { transform: none; }
}
