/* Web checkout pages (checkout, welcome, activate, manage, cancel).
   Mobile-first, one column on every screen size (same width as the Superwall quiz).
   Builds on /styles.css tokens; nothing here invents a colour. */

/* ---- Page frame ---- */
body.funnel { min-height: 100vh; }

.funnel-top {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
}
.funnel-top .wordmark { font-size: 18px; }

.flow {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.flow h1 {
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.flow p { margin: 0 0 16px; line-height: 1.55; }
.flow .muted { color: var(--muted); font-size: 15px; }
.flow .small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.center { text-align: center; }
.ink { color: var(--ink); }
[data-mt] { margin-top: 16px; }

.eyebrow-gold {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.flow .eyebrow-gold { margin-bottom: 8px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 14px;
}
.lock { width: 18px; height: 18px; color: var(--gold); flex: none; }

section + section { margin-top: 28px; }

/* ---- Offer ---- */
.offer {
  background: var(--surface);
  border: 1px solid var(--gold-dark);
  border-radius: 16px;
  padding: 4px 16px 14px;
}
.offer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.offer__row + .offer__row { border-top: 1px solid var(--hairline); }
.offer__label { display: block; color: var(--ink); font-weight: 700; font-size: 16px; }
.offer__label--muted { color: var(--body-text); font-weight: 600; }
.offer__sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.offer__price { color: var(--gold); font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1; white-space: nowrap; }
.offer__later { color: var(--body-text); font-weight: 600; font-size: 15px; white-space: nowrap; }
.flow .offer__note { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ---- What's included ---- */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 0 0 12px 30px; line-height: 1.5; }
.checks li:last-child { padding-bottom: 0; }
.checks li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}

/* ---- Payment ---- */
.pay-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px;
}
.field { margin: 0 0 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

.input,
.collect-field {
  display: block;
  width: 100%;
  min-width: 0;
  height: 50px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px stops iOS from zooming in on focus */
  padding: 0 14px;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: 2px solid var(--gold-dark); outline-offset: 0; border-color: var(--gold-dark); }
.collect-field { padding: 0 4px; display: flex; align-items: center; overflow: hidden; }
.collect-field iframe { width: 100% !important; height: 46px !important; border: 0 !important; }
.collect-field.invalid, .input.invalid { border-color: var(--danger); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--canvas);
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
  padding: 0 20px;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.btn + .btn { margin-top: 12px; }
.pay-card .btn { margin-top: 4px; }

.trust {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.trust li { position: relative; padding-left: 22px; }
.trust li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg);
}
.cards { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cards span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--body-text);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 3px 7px;
}
.flow .legal { margin: 14px 0 0; font-size: 12px; line-height: 1.55; color: var(--muted); }

/* ---- FAQ ---- */
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-of-type { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 28px 14px 0;
  color: var(--ink);
  font-weight: 600;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; color: var(--gold); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--body-text); font-size: 14px; margin: 0 0 14px; }
.faq + .small { margin-top: 24px; }

/* ---- Sticky call to action (phones) ---- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--canvas) 70%, rgba(10, 10, 11, 0));
  z-index: 10;
}
.sticky-cta[hidden] { display: none; }
.sticky-cta .btn { max-width: 448px; margin: 0 auto; }
body.has-sticky .flow { padding-bottom: 104px; }

/* ---- Shared by welcome / activate / manage / cancel ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 20px 16px;
}
.notice {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  background: var(--raised);
  border: 1px solid var(--hairline);
}
.notice--error { border-color: var(--danger); color: var(--ink); }
.notice--ok { border-color: var(--gold-dark); color: var(--ink); }
.notice[hidden] { display: none; }

.steps { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: step; }
.steps li { position: relative; padding: 0 0 16px 40px; line-height: 1.5; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--raised);
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.divider { border: 0; border-top: 1px solid var(--hairline); margin: 24px 0; }

/* ---- Larger screens: same single column, a little more air ---- */
@media (min-width: 600px) {
  .flow { padding-top: 40px; }
  .flow h1 { font-size: 32px; }
  .pay-card, .card { padding: 24px; }
  .offer { padding: 4px 20px 16px; }
}

/* ---- Apple Pay / Google Pay ---- */
.wallets[hidden] { display: none; }
.wallets #applepaybutton:empty, .wallets #googlepaybutton:empty { display: none; }
.wallets #applepaybutton, .wallets #googlepaybutton { margin-bottom: 10px; min-height: 50px; }
.wallets #applepaybutton > *, .wallets #googlepaybutton > * { width: 100% !important; }
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 16px !important;
}
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--hairline); }

/* ==== Superwall look: continues the "3-Step MAIN" paywall ==== */
.funnel--sw { font-family: var(--font-body); }
.sw-top {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 16px 6px;
}
.sw-back { display: flex; color: var(--body-text); width: 28px; height: 28px; flex: none; }
.sw-back svg { width: 28px; height: 28px; }
.sw-back:hover { text-decoration: none; }
.sw-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; }
.sw-progress span { height: 4px; border-radius: 4px; background: var(--hairline); }
.sw-progress span.on { background: var(--gold); }

.funnel--sw .flow { padding-top: 18px; }
.sw-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 14px !important;
}
.sw-eyebrow .lock { width: 20px; height: 20px; }
.sw-eyebrow--plain { color: var(--muted); letter-spacing: 0.12em; }
.funnel--sw .flow h1 {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.flow .sw-lead { color: var(--body-text); font-size: 16px; line-height: 1.55; }

.sw-offer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1.5px solid var(--gold);
  border-radius: 18px;
  padding: 18px;
}
.flow .sw-offer__label { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 4px; }
.flow .sw-offer__title { color: var(--ink); font-size: 17px; font-weight: 700; margin: 0; }
.flow .sw-offer__price { color: var(--ink); font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }

.flow .secure-line { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.secure-line .lock { width: 15px; height: 15px; }

.sw-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.sw-steps li { position: relative; padding: 0 0 16px 44px; counter-increment: s; line-height: 1.4; }
.sw-steps li:last-child { padding-bottom: 0; }
.sw-steps li span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.sw-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reviews { display: grid; gap: 12px; }
.review { margin: 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 18px; }
.flow .stars { color: var(--gold); letter-spacing: 0.18em; margin: 0 0 10px; font-size: 16px; }
.review blockquote { margin: 0 0 10px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.review figcaption { color: var(--muted); font-size: 14px; }

/* Wallet buttons: hide empty slots, round them like the inputs */
.wallet { display: none; margin-bottom: 10px; border-radius: 12px; overflow: hidden; }
.wallet.has-button { display: block; }
.wallet iframe { display: block; width: 100% !important; border: 0 !important; }
.wallets #applepaybutton, .wallets #googlepaybutton { min-height: 0; }

/* Sticky bar like the paywall's bottom button */
.funnel--sw .sticky-cta { background: var(--canvas); border-top: 1px solid var(--hairline); }

/* "Verifying as …" line when the funnel passed name and email */
.payer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.payer[hidden], #identity-fields[hidden] { display: none; }
.flow .payer p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--gold); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; flex: none; }

/* ==== Datemax Design Guide (DESIGN.md) — type styles, components, spacing ==== */
/* title: Space Grotesk 500 30/34 · eyebrow: system 12/600, 1.6px, uppercase, gold
   body: 17/24 · cardTitle: Space Grotesk 500 20/24 · headline: Space Grotesk 500 22/26
   button: 16/600, 0.3px, black on gold, 54pt capsule · cards: 20pt corners (18 compact)
   Superwall pages: 24px side margins. */
.flow { padding-left: 24px; padding-right: 24px; }
.sw-top { padding-left: 24px; padding-right: 24px; }

.flow h1,
.funnel--sw .flow h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  line-height: 34px;
  letter-spacing: normal;
}
@media (min-width: 600px) { .flow h1, .funnel--sw .flow h1 { font-size: 36px; line-height: 40px; } }

.sw-eyebrow, .eyebrow-gold, .flow .sw-offer__label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
}
.sw-eyebrow--plain { color: var(--muted); }
.sw-eyebrow .lock { width: 16px; height: 16px; }

.flow .sw-lead, .flow .muted { font-size: 17px; line-height: 24px; color: var(--body-text); }

.section-title { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 26px; }

/* Selected-card look for the offer: raised fill + gold border */
.sw-offer { background: var(--raised); border: 1.5px solid var(--gold); border-radius: 20px; }
.flow .sw-offer__title { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 24px; color: var(--ink); }
.flow .sw-offer__price { font-family: var(--font-display); font-weight: 500; font-size: 32px; line-height: 1; color: var(--gold); letter-spacing: normal; }

.pay-card, .card, .review { border-radius: 20px; }
.offer { border-radius: 20px; }

.btn { min-height: 54px; font-size: 16px; font-weight: 600; letter-spacing: 0.3px; color: #0A0A0B; }
.btn--ghost { background: var(--raised); border: 1px solid var(--hairline); color: var(--ink); min-height: 50px; }

/* Progress: gold fill on a raised track with a hairline edge */
.sw-progress span { background: var(--raised); box-shadow: inset 0 0 0 1px var(--hairline); }
.sw-progress span.on { background: var(--gold); box-shadow: none; }

/* Back: 36pt black circle at 55% with a 12% white edge, in a 44pt tap area */
.sw-back {
  width: 44px; height: 44px; margin-left: -4px;
  display: flex; align-items: center; justify-content: center;
}
.sw-back svg {
  width: 36px; height: 36px; padding: 8px; box-sizing: border-box;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* rowTitle for list items and FAQ questions */
.sw-steps li strong, .faq summary { font-size: 17px; font-weight: 600; }
.review blockquote { font-size: 17px; line-height: 24px; }
.flow .legal { font-size: 12px; line-height: 16px; }

/* Wordmark: system 15/600, 5px tracking, uppercase */
.funnel-top .wordmark { font-family: var(--font-body); font-size: 15px; font-weight: 600; letter-spacing: 5px; text-transform: uppercase; }

/* ==== Account portal (/account) ==== */
.funnel-top--split { justify-content: space-between; max-width: 100%; }
.funnel-top--split .wordmark:hover { text-decoration: none; }
.account section + section { margin-top: 0; }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.acct-head h1 { margin: 0 !important; }
.pill {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px; white-space: nowrap;
  background: var(--raised); border: 1px solid var(--hairline); color: var(--body-text);
}
.pill--trial, .pill--active { color: #0A0A0B; background: var(--gold); border-color: var(--gold); }
.pill--past_due { color: var(--ink); border-color: var(--danger); }
.pill--cancelled, .pill--ended, .pill--refunded { color: var(--muted); }

.acct-card { padding: 4px 20px 20px; }
.rows { margin: 0; }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.rows dt { color: var(--muted); font-size: 15px; flex: none; }
.rows dd { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.rows dd .link-btn { margin-left: 8px; }
.acct-actions { display: grid; gap: 10px; margin-top: 18px; }
.acct-actions .btn + .btn { margin-top: 0; }
.btn--quiet { background: transparent; color: var(--muted); border-color: transparent; }
.btn--quiet:hover { color: var(--ink); }
.btn--danger { background: var(--danger); color: var(--ink); }
#activation-out { margin: 12px 0 0; }
#activation-out[hidden], .confirm[hidden], .card-form[hidden] { display: none; }

.confirm, .card-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.confirm .btn + .btn, .card-form .btn + .btn { margin-top: 10px; }
.flow .card-form__title { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 24px; color: var(--ink); margin: 0 0 6px; }

.acct-payments { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 4px 18px; }
.acct-pay { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date amount" "card status"; gap: 2px 12px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.acct-pay:last-child { border-bottom: 0; }
.acct-pay__date { grid-area: date; color: var(--ink); font-weight: 600; font-size: 15px; }
.acct-pay__amount { grid-area: amount; color: var(--ink); font-weight: 600; font-size: 15px; text-align: right; }
.acct-pay__card { grid-area: card; color: var(--muted); font-size: 13px; }
.acct-pay__status { grid-area: status; font-size: 13px; text-align: right; color: var(--muted); }
.acct-pay__status--paid { color: var(--gold); }
.acct-pay__status--declined { color: var(--danger); }
.acct-payments > .small { padding: 14px 0; margin: 0; }

/* The hidden attribute always wins, whatever display a class sets (e.g. .btn is flex). */
[hidden] { display: none !important; }
.flow .acct-who { margin: -6px 0 16px; }
.acct-section { margin-top: 32px; }
