/* ==========================================================================
   Checkout landing page — single column, mobile-first.
   Loaded on its own (no style.css/app.css) so nothing from the member area
   bleeds into it.
   ========================================================================== */

:root {
  --bg:          #fbeee5;
  --bg-soft:     #fef4ec;
  --card:        #ffffff;
  --ink:         #2a1d18;
  --muted:       #8a6f63;
  --rose:        #b35a55;
  --rose-dark:   #9a4945;
  --rose-tint:   #f5d9d4;
  --line:        #f0d8cd;
  --success:     #15803d;
  --star:        #f5b301;

  --scarcity-bg:     #fff3d1;
  --scarcity-border: #f5b301;
  --scarcity-ink:    #7a5c00;

  --free-bg:     #e8f7e8;
  --free-border: #4ade80;
  --free-ink:    #15803d;

  --error:       #dc2626;
  --error-bg:    #fef2f2;
  --error-line:  #fecaca;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--rose); }

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

/* ---------------- brand ---------------- */

.brand-header { text-align: center; padding: 6px 0 14px; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.brand-name span { color: var(--rose); }

.rating-row { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; }
.rating-stars { color: var(--star); letter-spacing: 1px; font-size: 14px; }
.rating-text { font-size: 13px; font-weight: 600; }
.rating-count { font-size: 13px; color: var(--muted); }

/* ---------------- order summary ---------------- */

.summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.line-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.line-item:last-of-type { border-bottom: 0; }
.line-icon {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
  background: var(--rose-tint); color: var(--rose-dark);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.line-icon-gift  { background: #e8f7e8; color: #15803d; }
.line-icon-books { background: #e6e2f0; color: #4a4270; }
.line-body { flex: 1; min-width: 0; }
.line-title { font-size: 14.5px; font-weight: 600; }
.line-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.line-price { font-size: 14.5px; font-weight: 700; white-space: nowrap; }
.line-price.is-free { color: var(--free-ink); }

.total-row {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 2px solid var(--ink); margin-top: 10px; padding-top: 14px;
}
.total-label {
  font-size: 12.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.total-value { font-size: 25px; font-weight: 800; letter-spacing: -.02em; }

.rebill-note {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 11px 13px;
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
}

/* ---------------- payment ---------------- */

.payment-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 18px;
}
.payment-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.payment-title { font-size: 15.5px; font-weight: 700; }
.payment-secure { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.field-group { margin-bottom: 13px; }
.field-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field-group input,
.field-group select {
  width: 100%; min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit; font-size: 15px;
  background: #fff; color: var(--ink);
}
.field-group input:focus,
.field-group select:focus {
  outline: none; border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(179, 90, 85, .14);
}
.field-hint { font-size: 11.5px; color: var(--muted); margin: 5px 0 0; }

.pay-mount { min-height: 150px; }
.pay-loading { text-align: center; color: var(--muted); font-size: 13.5px; padding: 40px 0; }

.error-box {
  display: none;
  background: var(--error-bg);
  border: 1px solid var(--error-line);
  color: var(--error);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13.5px;
  margin-bottom: 12px;
}
.error-box.show { display: block; }

/* ---------------- scarcity ---------------- */

.scarcity {
  display: flex; align-items: center; gap: 11px;
  background: var(--scarcity-bg);
  border: 1px solid var(--scarcity-border);
  color: var(--scarcity-ink);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0;
}
.scarcity-icon { font-size: 18px; }
.scarcity-body { flex: 1; }
.scarcity-title { font-size: 13.5px; font-weight: 700; }
.scarcity-time { font-variant-numeric: tabular-nums; font-weight: 800; }
.scarcity-sub { font-size: 12px; opacity: .85; margin-top: 1px; }

/* ---------------- terms + pay ---------------- */

.terms {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  margin: 14px 0;
  font-size: 12.5px;
  line-height: 1.65;
}
.terms strong { font-weight: 700; }
.terms ul { margin: 8px 0 0; padding-left: 17px; }
.terms li { margin-bottom: 5px; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 13px 0; font-size: 12.5px; line-height: 1.55; cursor: pointer; }
.consent input { margin-top: 2px; width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--rose); }

.pay-button {
  display: block; width: 100%;
  background: var(--rose); color: #fff;
  border: 0; border-radius: 12px;
  padding: 17px 20px;
  font: inherit; font-size: 16.5px; font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.pay-button:hover:not(:disabled) { background: var(--rose-dark); }
.pay-button:disabled { opacity: .55; cursor: not-allowed; }

.sub { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.6; }

/* ---------------- trust ---------------- */

.trust-badges { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin: 20px 0 6px; }
.trust-badge { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.trust-badge-icon { color: var(--success); font-size: 13px; }

/* ---------------- testimonials ---------------- */

.testimonials { margin-top: 26px; }
.testimonials-header { text-align: center; margin-bottom: 14px; }
.testimonials-title { font-size: 16px; font-weight: 700; }
.testimonials-verified { font-size: 12px; color: var(--muted); margin-top: 3px; }

.tcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.tcard-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.tcard-name { font-size: 13.5px; font-weight: 700; }
.tcard-stars { color: var(--star); font-size: 12px; letter-spacing: .5px; }
.tcard-badge { font-size: 11px; color: var(--free-ink); background: var(--free-bg); border: 1px solid var(--free-border); border-radius: 999px; padding: 1px 7px; margin-left: auto; }
.tcard-body { font-size: 13.5px; line-height: 1.6; color: var(--ink); }

/* ---------------- faq + footer ---------------- */

.faq { margin-top: 26px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; margin-bottom: 9px; }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.faq p { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 9px 0 0; }

.legal { text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: 26px; }
.legal a { color: var(--muted); text-decoration: underline; }
.legal-sep { margin: 0 5px; opacity: .5; }
