/* Dreama checkout. Layout modelled on a classic two-column checkout:
   white form on the left, grey order summary on the right, black "Pay now". DM Sans throughout. */
:root {
  --ink: #111;
  --text: #1b1b1b;
  --muted: #707070;
  --faint: #9a9a9a;
  --line: #dedede;
  --line-soft: #e8e8e8;
  --panel: #f5f5f5;
  --hi: #f7f3fc;          /* highlight fill (selected rows, upgrade card) */
  --hi-line: #1b1133;     /* highlight border */
  --brand: #6b3fa0;
  --star: #f2b01e;
  --free: #1f7a3a;
  --error: #b42318;
  --error-soft: #fdecec;
  --r: 5px;
  /* legacy names used by the thank-you page */
  --purple: #6b3fa0;
  --purple-soft: #f1eaf8;
  --gold: #e6cf94;
  --gold-ink: #4a3b12;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: #fff;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.test-banner { background: #111; color: #fff; font-size: 13px; text-align: center; padding: 8px 16px; }
.test-banner b { color: var(--gold); }

/* ---------- header ---------- */
.hd { background: #fff; border-bottom: 1px solid var(--line); }
.hd-in { max-width: 1100px; margin: 0 auto; height: 64px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.hd-ico { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #555; }
.hd-ico svg { width: 20px; height: 20px; }
.hd-logo img { height: 24px; width: auto; }
@media (min-width: 1000px) { .hd-in { height: 80px; } .hd-logo img { height: 26px; } }

/* ---------- layout ---------- */
/* Phones: summary bar on top, form, then guarantee + reviews. */
.split { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "sum" "main" "proof"; }
.sum { grid-area: sum; }
.main { grid-area: main; }
.proof { grid-area: proof; }
.col-in { width: 100%; padding: 0 16px; }

.sum { background: var(--panel); border-bottom: 1px solid var(--line); }
.sum-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel); border: 0; padding: 16px; cursor: pointer; font-size: 14px; }
.sum-toggle-l { display: flex; align-items: center; gap: 8px; color: var(--brand); }
.sum-toggle-l svg { width: 18px; height: 18px; }
.sum-toggle .chev { width: 14px; height: 14px; transition: transform .2s; }
.sum-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sum-toggle b { font-size: 17px; font-weight: 600; color: var(--ink); }
.sum-body { display: none; border-top: 1px solid var(--line); padding: 20px 0 22px; }
.sum.open .sum-body { display: block; }

.main .col-in { padding-top: 24px; padding-bottom: 32px; }
.proof { background: #fff; }
.proof .col-in { padding-bottom: 40px; }

@media (min-width: 1000px) {
  .split {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas: "main sum" "main proof";
    background: linear-gradient(90deg, #fff 50%, var(--panel) 50%);
  }
  .sum, .proof { background: var(--panel); border-left: 1px solid var(--line); border-bottom: 0; }
  .sum-toggle { display: none; }
  .sum-body { display: block; border-top: 0; padding: 0; }
  .col-l { max-width: 660px; margin-left: auto; padding: 38px 38px 64px 24px; }
  .col-r { max-width: 520px; padding: 38px 24px 0 38px; }
  .main .col-in { padding-top: 38px; padding-bottom: 64px; }
  .proof .col-in { padding-top: 32px; padding-bottom: 64px; }
  .sum { position: relative; }
}

/* ---------- order lines ---------- */
.lines { display: grid; gap: 14px; }
.line { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.thumb { position: relative; width: 62px; height: 62px; border-radius: 8px; border: 1px solid rgba(0,0,0,.1); background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.qty { position: absolute; top: -8px; right: -8px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: rgba(60,60,60,.9); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.line-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.line-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.line-price { text-align: right; font-size: 14px; color: var(--ink); white-space: nowrap; }
.line-price s { display: block; font-size: 12.5px; color: var(--faint); }
.free { font-weight: 600; color: var(--ink); }
.plan-chip { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 600; color: var(--brand); background: var(--purple-soft); padding: 2px 8px; border-radius: 99px; }

.link-btn { background: none; border: 0; padding: 0; margin-top: 16px; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

/* pack + plan picker */
.editor { margin-top: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.editor-label { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.pack { position: relative; border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: 12px 4px 10px; text-align: center; cursor: pointer; }
.pack b { display: block; font-size: 14px; font-weight: 600; }
.pack span { font-size: 12.5px; color: var(--muted); }
.pack[aria-pressed="true"] { border-color: var(--hi-line); background: var(--hi); box-shadow: 0 0 0 1px var(--hi-line); }
.pack .pop { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--hi-line); color: #fff; font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.plans { display: grid; gap: 8px; }
.plan { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 1px solid var(--line); background: #fff; border-radius: var(--r); padding: 12px; cursor: pointer; }
.plan input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: #111; }
.plan.on { border-color: var(--hi-line); background: var(--hi); }
.plan-name { display: block; font-weight: 600; font-size: 14px; }
.plan-desc { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.plan-price { text-align: right; font-weight: 600; white-space: nowrap; }
.plan-price s { display: block; font-weight: 400; font-size: 12.5px; color: var(--faint); }

/* totals */
.totals { margin: 22px 0 0; display: grid; grid-template-columns: 1fr auto; row-gap: 8px; font-size: 14px; }
.totals dt { color: var(--text); }
.totals dd { margin: 0; text-align: right; color: var(--ink); }
.totals .muted { color: var(--muted); font-size: 13px; }
.totals .total-row { font-size: 18px; font-weight: 600; color: var(--ink); padding-top: 10px; }
.totals .cur { font-size: 12px; font-weight: 400; color: var(--muted); margin-right: 6px; }
.totals .save { color: var(--free); font-weight: 600; }
.recurring-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* ---------- guarantee + reviews ---------- */
.proof-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.proof-rows { padding: 22px 20px; display: grid; gap: 18px; }
.proof-row { display: flex; gap: 16px; align-items: flex-start; }
.proof-ico { width: 34px; height: 34px; flex: none; border: 1px solid #3a3a3a; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #333; }
.proof-ico svg { width: 18px; height: 18px; }
.proof-row h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.proof-row p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.proof-rating { border-top: 1px solid var(--line-soft); padding: 14px 20px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; color: var(--ink); }
.stars { color: var(--star); font-size: 19px; letter-spacing: 1px; line-height: 1; }
.reviews { display: grid; }
.review { border-top: 1px solid var(--line-soft); padding: 14px 20px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.review img, .review .av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.review .av { background: var(--purple-soft); color: var(--brand); font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.review-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.review-top .stars { font-size: 12px; }
.badge { font-size: 10px; font-weight: 600; background: #111; color: #fff; padding: 1px 5px; border-radius: 3px; }
.review p { margin: 4px 0 0; font-size: 12.5px; color: #333; }

/* ---------- form ---------- */
.main h2 { font-size: 21px; font-weight: 600; color: var(--ink); margin: 0 0 14px; line-height: 1.2; }
.block { margin-bottom: 30px; }
.express { margin-bottom: 26px; }
.express-label { font-size: 14px; color: var(--muted); text-align: center; margin: 0 0 12px; }
.express-agree { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; margin: 20px 0 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; margin-top: 12px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 0; accent-color: #111; flex: none; }
.sub { font-size: 13px; color: var(--muted); margin: -10px 0 14px; }
.ph { border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; height: 52px; display: flex; align-items: center; color: var(--faint); background: #fff; margin-bottom: 10px; font-size: 14px; }
.ph-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.not-ready { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; font-size: 14px; margin-bottom: 24px; }

/* shipping method */
.ship-method { border: 1px solid var(--hi-line); background: var(--hi); border-radius: var(--r); padding: 16px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.radio-on { width: 18px; height: 18px; border-radius: 50%; background: #111; box-shadow: inset 0 0 0 5px #111, inset 0 0 0 9px #fff; }
.ship-method b { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.ship-method span { display: block; font-size: 12.5px; color: var(--muted); }
.ship-method .ship-price { font-weight: 600; color: var(--ink); font-size: 14px; }

/* upgrade card */
.upsell-label { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 12px; }
.upsell { width: 100%; text-align: left; display: grid; grid-template-columns: 44px minmax(0, 1fr) 22px; gap: 14px; align-items: center; padding: 16px; background: var(--hi); border: 1px solid var(--hi-line); border-radius: 10px; cursor: pointer; }
.upsell:hover { background: #f1eaf9; }
.upsell img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.upsell-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.upsell-desc { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.upsell-tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #111; display: flex; align-items: center; justify-content: center; }
.upsell-tick svg { width: 12px; height: 12px; opacity: 0; }
.upsell:hover .upsell-tick { background: #111; color: #fff; }
.upsell:hover .upsell-tick svg { opacity: 1; }

/* pay */
.pay-terms { font-size: 13.5px; color: var(--text); margin: 0 0 16px; }
.pay-terms p { margin: 0 0 12px; }
.pay-terms a { text-decoration: underline; text-underline-offset: 2px; }
.pay-btn { width: 100%; border: 0; border-radius: var(--r); background: #111; color: #fff; font-weight: 600; font-size: 17px; min-height: 58px; padding: 0 24px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; text-decoration: none; }
.pay-btn:hover { background: #2b2b2b; }
.pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pay-btn .spin { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secure-line { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.secure-line svg { width: 13px; height: 13px; }
.form-error { background: var(--error-soft); color: var(--error); border-radius: var(--r); padding: 10px 12px; font-size: 14px; margin: 12px 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 22px 16px 40px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 12px; }
.foot a { color: var(--muted); text-underline-offset: 2px; }

/* ---------- thank-you page (thank-you.html) ---------- */
.top { border-bottom: 1px solid var(--line); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: center; }
.logo img { height: 24px; width: auto; }
.ty .totals { border-top: 1px solid var(--line); padding-top: 14px; }
/* Thank-you page */
.ty { max-width: 640px; margin: 0 auto; padding: 28px 16px 56px; }
.ty h1 { font-size: 26px; margin: 0 0 6px; }
.ty-state { text-align: center; padding: 40px 0; }
.ty-state p { color: var(--muted); }
.ty-spin { width: 36px; height: 36px; margin: 0 auto 16px; border: 3px solid var(--purple-soft); border-top-color: var(--purple); border-radius: 50%; animation: spin 0.9s linear infinite; }
.ty-retry { max-width: 320px; margin: 20px auto 0; }
.ty-head { display: flex; gap: 14px; align-items: center; }
.ty-check { width: 48px; height: 48px; color: var(--purple); flex: none; }
.ty-number { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.ty-lead { color: var(--muted); margin: 10px 0 20px; }
.ty-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.ty-card h2 { font-size: 15px; margin: 0 0 6px; }
.ty-card p { margin: 0 0 12px; }
.ty-card p:last-child { margin-bottom: 0; }
.ty-vip { background: var(--purple-soft); border-color: transparent; }
.ty-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .ty-grid { grid-template-columns: 1fr 1fr; } }
.ty-back { text-align: center; margin-top: 24px; }
