:root {
  --paper: #F5F3EE;
  --card: #FFFFFF;
  --ink: #14161B;
  --ink-2: #4A4F5C;
  --ink-3: #7A7F8C;
  --line: #E6E2D9;
  --accent: #1E3FD9;
  --accent-ink: #FFFFFF;
  --accent-soft: #E8ECFD;
  --save: #0B7A47;
  --save-soft: #E2F4EA;
  --star: #F2A20C;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 22, 27, .06), 0 8px 24px rgba(20, 22, 27, .06);
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.locked, html.locked body { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.demo-banner {
  background: #FFF4CC; color: #6B4E00; text-align: center;
  font-size: 13px; font-weight: 600; padding: 6px 16px;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px calc(96px + env(safe-area-inset-bottom));
}

/* Profile */
.profile { text-align: center; padding: 0 4px 20px; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 12px;
  object-fit: cover; border: 3px solid var(--card); box-shadow: var(--shadow);
}
.name { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0; }
.headline {
  font-size: clamp(28px, 8vw, 34px); line-height: 1.1; font-weight: 800;
  letter-spacing: -0.03em; margin: 8px 0 10px; text-wrap: balance;
}
.sub { color: var(--ink-2); margin: 0 auto 16px; max-width: 34ch; font-size: 15px; text-wrap: pretty; }
.proof-row {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.proof-row .pill {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px;
  display: inline-flex; align-items: center; gap: 5px;
}
.stars { color: var(--star); letter-spacing: 1px; }
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.socials svg { width: 18px; height: 18px; }

.section-title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 12px; }

/* Covers: the real book covers */
.cover {
  display: block; flex: none; height: auto; aspect-ratio: 1751 / 2479; object-fit: cover;
  border-radius: 3px 6px 6px 3px; background: #E6E2D9;
  box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 6px 14px rgba(20,22,27,.18);
}
.cover-sm { width: 52px; }
.cover-md { width: 78px; }
.cover-lg { width: 132px; }
.stack { position: relative; display: grid; place-items: center; flex: none; }
.stack .cover { position: absolute; transform: translateX(var(--x, 0)) rotate(var(--r, 0deg)); }
.stack-sm { width: 116px; height: 96px; }
.stack-md { width: 120px; height: 120px; }

/* Featured card */
.featured {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: var(--ink); color: #fff; border-radius: 24px; padding: 22px 20px 20px;
  box-shadow: 0 16px 40px rgba(20, 22, 27, .22); position: relative; overflow: hidden;
}
.featured::after {
  content: ''; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(30,63,217,.55), transparent 70%); pointer-events: none;
}
.featured .ribbon {
  display: inline-block; background: #FFD84D; color: #14161B; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .02em;
}
.featured-top { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.featured h2 { font-size: 22px; line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.02em; }
.featured p { color: rgba(255,255,255,.75); font-size: 14px; margin: 0; }
.featured .price-row { margin-top: 18px; }
.featured .price { color: #fff; }
.featured .was { color: rgba(255,255,255,.5); }
.featured .btn { margin-top: 14px; }

/* Product cards */
.products { display: grid; gap: 12px; margin-top: 16px; }
.card {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); transition: transform .15s ease;
}
.card:active, .featured:active { transform: scale(.985); }
.card-body { min-width: 0; flex: 1; }
.kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: 16.5px; line-height: 1.25; margin: 3px 0 4px; letter-spacing: -0.01em; }
.card p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.was { color: var(--ink-3); text-decoration: line-through; font-size: 14px; }
.save { background: var(--save-soft); color: var(--save); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.featured .save { background: rgba(255,216,77,.16); color: #FFD84D; }
.rating { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: inline-flex; gap: 3px; align-items: center; }
.chev { color: var(--ink-3); flex: none; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 54px; padding: 14px 18px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16.5px;
  box-shadow: 0 6px 16px rgba(30, 63, 217, .3); text-decoration: none;
  transition: transform .12s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-light { background: #fff; color: var(--ink); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink-2); box-shadow: none; min-height: 44px; font-weight: 600; font-size: 15px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Review wall */
.wall-track {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none;
}
.wall-track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 82%; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; font-size: 14.5px;
}
.review blockquote { margin: 6px 0 10px; color: var(--ink); }
.review cite { font-style: normal; font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.faq summary { padding: 14px 16px; font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--ink-3); font-weight: 600; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0; padding: 0 16px 14px; color: var(--ink-2); font-size: 14.5px; }

.footer { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 36px; }
.footer a { color: var(--ink-2); }

/* Sticky bar */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(245, 243, 238, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.sticky-bar.show { transform: none; }
.sticky-inner { max-width: 448px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.sticky-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.sticky-text strong { display: block; font-size: 14.5px; }
.sticky-bar .btn { width: auto; min-height: 46px; padding: 10px 18px; font-size: 15px; }

/* Sheet: product page + checkout slide up over the store */
.scrim { position: fixed; inset: 0; background: rgba(20, 22, 27, .45); z-index: 30; opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 520px; margin: 0 auto; max-height: 94dvh; display: flex; flex-direction: column;
  background: var(--paper); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  transform: translateY(100%); transition: transform .36s cubic-bezier(.2,.8,.2,1);
}
.sheet.show { transform: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #CFCAC0; margin: 8px auto 0; flex: none; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; background: var(--paper);
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.sheet-step { font-size: 13px; font-weight: 700; color: var(--ink-3); }

.pd-hero { display: flex; gap: 18px; align-items: flex-end; padding: 6px 0 4px; }
.pd-title { font-size: 25px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin: 18px 0 8px; text-wrap: balance; }
.pd-intro { color: var(--ink-2); margin: 0 0 16px; }
.pd-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.pd-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 500; }
.pd-list svg { flex: none; width: 20px; height: 20px; color: var(--save); margin-top: 1px; }
.pd-proof { margin: 0 0 18px; }
.pd-proof img { border-radius: 14px; border: 1px solid var(--line); }
.pd-proof figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; text-align: center; }
.pd-reviews { display: grid; gap: 10px; margin-bottom: 18px; }
.pd-reviews .review { flex: none; }
.pd-buy {
  position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); margin: 0 -16px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 22%);
}
.reassure { display: flex; justify-content: center; gap: 4px 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-top: 10px; }
.reassure span { display: inline-flex; gap: 5px; align-items: center; }
.reassure svg { width: 14px; height: 14px; }

/* Checkout */
.co-summary { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.co-summary .grow { flex: 1; min-width: 0; }
.co-summary h3 { font-size: 15px; margin: 0 0 2px; line-height: 1.25; }
.bump {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; cursor: pointer;
  background: #FFFBEA; border: 2px dashed #E9B90E; border-radius: var(--radius); padding: 14px;
}
.bump input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.bump-title { font-weight: 800; font-size: 14.5px; line-height: 1.3; }
.bump-text { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.bump.on { background: #FFF4C2; border-style: solid; }
.field { display: block; margin-top: 12px; }
.field span { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field input {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border-radius: 12px;
  border: 1px solid #D9D4C9; background: var(--card); color: var(--ink);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; margin: 16px 0 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
#express:empty { display: none; }
.pay-box { margin-top: 4px; }
.demo-card { background: var(--card); border: 1px dashed #C8C2B6; border-radius: 12px; padding: 14px; font-size: 14px; color: var(--ink-2); }
.total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 17px; margin: 18px 2px 12px; }
.error { color: #B42318; font-size: 14px; font-weight: 600; margin: 10px 2px 0; min-height: 1em; }
.error:empty { display: none; }

/* Success */
.success { text-align: center; padding-top: 8px; }
.tick { width: 72px; height: 72px; border-radius: 50%; background: var(--save-soft); color: var(--save); display: grid; place-items: center; margin: 8px auto 14px; animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.tick svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.success h2 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
.success p { color: var(--ink-2); margin: 0 0 18px; }
.downloads { display: grid; gap: 10px; text-align: left; }
.dl { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-decoration: none; }
.dl .grow { flex: 1; font-weight: 700; font-size: 14.5px; }
.dl .go { background: var(--accent); color: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.dl .go svg { width: 15px; height: 15px; }
.upsell { margin-top: 24px; text-align: left; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 16px; }
.upsell .kicker { color: #FFD84D; }
.upsell h3 { margin: 4px 0 6px; font-size: 18px; }
.upsell p { color: rgba(255,255,255,.75); font-size: 14px; margin: 0 0 12px; }

@media (min-width: 640px) {
  .sheet { bottom: 4vh; border-radius: 22px; max-height: 92dvh; }
  .sheet-grip { display: none; }
  .sheet-body { padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.legal { font-size: 12px; color: var(--ink-3); text-align: center; margin: 12px 8px 0; line-height: 1.45; }
.doc { max-width: 640px; margin: 0 auto; padding: 32px 16px 64px; }
.doc h1 { font-size: 28px; letter-spacing: -0.02em; }
.doc h2 { font-size: 18px; margin-top: 28px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .note { background: #FFF4CC; color: #6B4E00; padding: 10px 14px; border-radius: 10px; font-size: 14px; }

.optin { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; color: var(--ink-2); cursor: pointer; line-height: 1.4; }
.optin input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }

.pd-poster { display: block; width: 100%; height: auto; border-radius: 16px; margin: 4px 0 2px; box-shadow: var(--shadow); }
.pd-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pd-stats span { background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
