/* Funnel components (checkout, upsells, thank-you, member portal, legal). Tokens come from brand.css (load it first). */

/* ── header / footer ── */
.f-header { background: var(--evergreen); color: #fff; border-bottom: 3px solid var(--gold); }
.f-header-inner { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.f-logo { font-family: var(--font-head); font-size: 21px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap; }
.f-logo span { color: var(--gold-soft); }
.f-logo img { height: 60px; width: auto; display: block; }
.f-secure { font-size: 15px; color: var(--gold-soft); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.f-footer { padding: 28px 16px 40px; text-align: center; font-size: 15px; color: var(--ink-soft); border-top: 1px solid var(--line); margin-top: 40px; }
.f-footer a { color: var(--ink-soft); margin: 0 5px; display: inline-block; padding: 4px 0; }
.f-footer p { margin: 0 0 8px; }

/* ── generic ── */
.f-main { max-width: 1080px; margin: 0 auto; padding: 20px 16px 0; }
.f-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 18px; margin-bottom: 18px; }
.f-card h2 { font-size: 25px; }
.f-label { display: block; font-weight: 700; font-size: 17px; margin: 0 0 6px; }
.f-input { width: 100%; font: inherit; font-size: 19px; padding: 14px 14px; border: 1.5px solid #CFC5B3; border-radius: 10px; background: #fff; color: var(--ink); }
.f-input:focus { outline: 3px solid var(--gold-soft); border-color: var(--evergreen); }
.f-input.err { border-color: var(--cranberry); background: #FFF6F6; }
.f-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 520px) { .f-grid2 { grid-template-columns: 1fr 1fr; } }
.f-error { display: none; background: #FDECEC; color: var(--cranberry-dark); border-radius: 10px; padding: 12px 14px; margin: 12px 0 0; font-size: 17px; }
.f-btn-block { display: block; width: 100%; max-width: none; }
.f-link { background: none; border: 0; padding: 6px 0; color: var(--ink-soft); text-decoration: underline; font: inherit; font-size: 17px; cursor: pointer; }
.f-steps { display: flex; gap: 8px; justify-content: center; font-size: 15px; color: var(--ink-soft); margin: 4px 0 16px; flex-wrap: wrap; }
.f-steps b { color: var(--evergreen); }
.f-steps .on { color: var(--evergreen); font-weight: 700; }
.f-note { font-size: 16px; color: var(--ink-soft); }

/* ── checkout ── */
.co-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .co-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .co-side { position: sticky; top: 16px; } }
.co-hero { display: flex; gap: 14px; align-items: center; }
.co-hero img { width: 92px; flex: 0 0 92px; border-radius: 8px; box-shadow: var(--shadow); }
.co-hero h1 { font-size: clamp(24px, 5vw, 32px); margin: 0 0 4px; }
.co-price { font-size: 18px; margin: 0; }
.co-price .now { font-size: 26px; color: var(--cranberry); font-weight: 700; }
.co-known { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.co-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--evergreen); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex: 0 0 46px; }

/* bonus stack */
.bonus-band { background: var(--evergreen); color: #fff; border-radius: 10px 10px 0 0; margin: -20px -18px 14px; padding: 14px 18px; }
.bonus-band small { display: block; color: var(--gold-soft); font-size: 14px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700; }
.bonus-band strong { font-family: var(--font-head); font-size: 22px; }
.bonus { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.bonus:last-of-type { border-bottom: 0; }
.bonus-thumb { width: 58px; height: 72px; flex: 0 0 58px; border-radius: 6px; background: var(--sage); display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.bonus-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bonus-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.bonus-title { font-weight: 700; font-size: 18px; }
.bonus-price { font-size: 16px; white-space: nowrap; }
.bonus-price s { color: var(--ink-soft); margin-right: 6px; }
.bonus-price b { color: var(--evergreen); }
.bonus p { margin: 2px 0 0; font-size: 17px; color: var(--ink-soft); line-height: 1.45; }
.bonus-total { margin: 12px 0 0; font-weight: 700; text-align: right; font-size: 17px; }
.bonus-total span { background: var(--gold-soft); padding: 2px 10px; border-radius: 999px; margin-left: 6px; }

/* order bumps */
.bump { display: block; position: relative; background: #FFFDF7; border: 2px dashed var(--gold); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bump.on { border-style: solid; border-color: var(--evergreen); background: #F4F8F3; }
.bump-row { display: flex; align-items: flex-start; gap: 12px; }
.bump-box { width: 30px; height: 30px; flex: 0 0 30px; border: 2.5px solid var(--cranberry); border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.bump.on .bump-box { background: var(--evergreen); border-color: var(--evergreen); }
.bump.on .bump-box::after { content: ''; width: 9px; height: 16px; border: solid #fff; border-width: 0 3.5px 3.5px 0; transform: rotate(45deg) translate(-1px, -2px); }
.bump-title { font-weight: 700; font-size: 19px; color: var(--cranberry-dark); line-height: 1.3; }
.bump.on .bump-title { color: var(--evergreen); }
.bump-price { font-weight: 700; font-size: 19px; white-space: nowrap; margin-left: auto; padding-left: 8px; }
.bump-body { display: flex; gap: 12px; margin-top: 10px; }
.bump-body img { width: 78px; flex: 0 0 78px; height: auto; align-self: flex-start; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.bump-body p { margin: 0; font-size: 18px; line-height: 1.5; }
.bump-flag { position: absolute; top: -13px; left: 14px; background: var(--gold); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }

/* summary */
.sum-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 17px; border-bottom: 1px solid #F1EBDF; }
.sum-line.free { color: var(--evergreen); font-size: 16px; }
.sum-line .was { color: var(--ink-soft); text-decoration: line-through; margin-right: 6px; font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 21px; padding: 12px 0 4px; }
.guarantee { display: flex; gap: 12px; align-items: flex-start; background: var(--sage); border-radius: 10px; padding: 14px; font-size: 16px; line-height: 1.5; margin-top: 14px; }
.guarantee-seal { flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%; background: var(--evergreen); color: #fff; border: 3px solid var(--gold); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; line-height: 1; font-size: 19px; }
.guarantee-seal small { font-size: 10px; letter-spacing: .05em; }
.pay-recap { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--sage); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 17px; }

/* ── upsell pages ── */
.up-progress { background: var(--sage); padding: 12px 16px; text-align: center; font-size: 16px; }
.up-progress b { color: var(--evergreen); }
.up-bar { height: 8px; max-width: 420px; margin: 8px auto 0; background: #fff; border-radius: 999px; overflow: hidden; }
.up-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.up-wrap { max-width: 720px; margin: 0 auto; padding: 22px 16px 0; }
.up-eyebrow { text-align: center; margin: 0 0 8px; }
.up-wrap h1 { text-align: center; font-size: clamp(28px, 6.4vw, 42px); }
.up-sub { text-align: center; font-size: 20px; color: var(--ink-soft); }
.up-cover { max-width: 300px; margin: 8px auto 20px; border-radius: 8px; box-shadow: 0 10px 30px rgba(31,61,43,.18); }
.up-list { list-style: none; padding: 0; margin: 0 0 18px; }
.up-list li { position: relative; padding: 0 0 12px 34px; }
.up-list li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--evergreen); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.up-table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 6px 0 18px; }
.up-table th, .up-table td { border-bottom: 1px solid var(--line); padding: 9px 6px; text-align: left; vertical-align: top; }
.up-table th { background: var(--sage); color: var(--evergreen); font-size: 15px; }
.offer-box { background: var(--paper); border: 3px solid var(--evergreen); border-radius: 16px; padding: 22px 18px; text-align: center; box-shadow: var(--shadow); margin: 18px 0; }
.offer-price { font-size: 20px; margin: 0 0 4px; }
.offer-price .now { font-size: 40px; font-weight: 700; color: var(--cranberry); font-family: var(--font-head); }
.offer-fine { font-size: 15px; color: var(--ink-soft); margin: 10px 0 0; }
.offer-box .btn { margin: 12px 0 6px; }
.no-thanks { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--ink-soft); text-decoration: underline; font: inherit; font-size: 17px; cursor: pointer; padding: 8px; }
.down-state { display: none; }
/* Downsell = final-offer popup over the offer page (like GBM upsell-v2's modal). */
.is-down { overflow: hidden; }
.is-down .down-state { display: flex; position: fixed; inset: 0; z-index: 1000; background: rgba(21, 43, 30, .74); align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.down-card { position: relative; background: var(--paper); border-radius: 20px; max-width: 520px; width: 100%; padding: 30px 22px 22px; box-shadow: 0 24px 60px rgba(0,0,0,.35); text-align: center; margin: auto; animation: downIn .25s ease; }
@keyframes downIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.down-card h1 { font-size: clamp(24px, 6vw, 30px); margin: 4px 0 10px; }
.down-card .up-cover { max-height: 170px; width: auto; margin: 0 auto 12px; }
.down-card .up-sub { font-size: 17px; }
.down-card .offer-box { border: 0; box-shadow: none; padding: 6px 0 0; margin: 10px 0 0; }
.down-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--sage); color: var(--evergreen); font-size: 22px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .down-card { animation: none; } }
.down-banner { background: var(--gold-soft); border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; text-align: center; font-size: 18px; }
.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1100; background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: 17px; width: min(92vw, 480px); text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.fallback { display: none; margin: 18px 0; }

/* ── thank-you / member ── */
.ty-check { width: 64px; height: 64px; border-radius: 50%; background: var(--evergreen); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 6px auto 12px; border: 3px solid var(--gold); }
.dl { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dl:last-child { border-bottom: 0; }
.dl-cover { width: 70px; flex: 0 0 70px; height: 88px; border-radius: 6px; background: var(--sage); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.dl-cover img { width: 100%; height: 100%; object-fit: cover; }
.dl h3 { font-size: 20px; margin: 4px 0 4px; }
.dl p { margin: 0 0 10px; font-size: 17px; color: var(--ink-soft); line-height: 1.45; }
.dl .btn { font-size: 18px; padding: 12px 18px; width: auto; }
.dl-group { margin: 22px 0 4px; }
.dl-group h2 { font-size: 23px; margin: 0; }
.code-input { letter-spacing: .4em; font-size: 26px; text-align: center; font-family: Menlo, Consolas, monospace; }
.msg { border-radius: 10px; padding: 12px 14px; font-size: 17px; margin: 12px 0 0; }
.msg.ok { background: var(--sage); color: var(--evergreen); }
.msg.err { background: #FDECEC; color: var(--cranberry-dark); }
.path li { margin-bottom: 10px; }

/* ── legal ── */
.legal { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; }
.legal h1 { font-size: clamp(30px, 6vw, 40px); }
.legal h2 { font-size: 24px; margin-top: 1.6em; }
.legal li { margin-bottom: 8px; }
.legal .updated { color: var(--ink-soft); font-size: 16px; }
.legal .box { background: var(--sage); border-radius: 12px; padding: 18px; margin: 18px 0; }

@media (max-width: 420px) { .f-logo { font-size: 18px; } .f-logo img { height: 54px; } .f-secure { font-size: 13px; } .f-header-inner { padding: 12px; } }
[hidden] { display: none !important; }
