/* Shared funnel UI. Brand pages override the tokens in :root. */
:root {
  --brand: #3b5bdb; --brand-ink: #fff; --brand-soft: #eef2ff; --accent: #f59f00;
  --ink: #141824; --muted: #5b6475; --line: #e3e6ee; --bg: #f7f8fb; --card: #fff;
  --ok: #0f9d58; --bad: #d64545; --radius: 16px; --shadow: 0 10px 30px rgba(20, 24, 36, .08);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --base: 17px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--base)/1.55 var(--font); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 6vw, 48px); }
h2 { font-size: clamp(24px, 4.2vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(620px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.center { text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }

/* header / footer */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.logo i { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-style: normal; font-size: 16px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; margin-left: 18px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 60px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
.foot a { color: var(--muted); }

/* buttons */
.btn { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 28px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); font: 700 18px var(--font); text-decoration: none; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid var(--line); }
.btn.link { background: none; box-shadow: none; color: var(--muted); min-height: 44px; font-weight: 600; font-size: 16px; text-decoration: underline; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* hero */
.hero { padding: 48px 0 32px; }
.hero .grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero .grid { grid-template-columns: 1.05fr .95fr; } .hero { padding: 72px 0 56px; } }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 560px; }
.hero .cta-row { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.trust span::before { content: "✓ "; color: var(--ok); font-weight: 800; }
.price-note { font-size: 14px; color: var(--muted); }
.price-note b { color: var(--ink); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.section { padding: 56px 0; }
.section.alt { background: var(--card); border-block: 1px solid var(--line); }
.cols { display: grid; gap: 18px; }
@media (min-width: 760px) { .cols.c3 { grid-template-columns: repeat(3, 1fr); } .cols.c2 { grid-template-columns: repeat(2, 1fr); } }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; margin-bottom: 12px; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps-list li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps-list li::before { content: counter(s); flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }
details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; font-size: 22px; color: var(--brand); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

/* quiz shell */
.quiz { min-height: 100svh; display: flex; flex-direction: column; }
.quiz-top { padding: 14px 0 8px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.quiz-top .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.back { appearance: none; background: none; border: 0; color: var(--muted); font: 600 15px var(--font); cursor: pointer; padding: 8px 4px; min-height: 44px; }
.back[disabled] { visibility: hidden; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .35s ease; }
.screen { padding: 22px 0 40px; animation: rise .28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .bar > i { transition: none; } }
.screen h2 { font-size: clamp(24px, 5vw, 30px); }
.hint { color: var(--muted); margin-top: -4px; }
.opts { display: grid; gap: 12px; margin-top: 18px; }
.opt { appearance: none; text-align: left; width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 64px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font: 600 17px var(--font); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s, transform .08s; }
.opt:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.opt:active { transform: scale(.995); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.opt .ic { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 20px; }
.opt .tx { display: flex; flex-direction: column; gap: 2px; }
.opt .sub { font-weight: 500; font-size: 14.5px; color: var(--muted); }
.opt .chk { margin-left: auto; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); flex: 0 0 24px; display: grid; place-items: center; color: #fff; font-size: 14px; }
.opt[aria-pressed="true"] .chk { background: var(--brand); border-color: var(--brand); }
.opt.right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.opt.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--card)); }
.feedback { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--card); border-left: 5px solid var(--ok); box-shadow: var(--shadow); }
.feedback.miss { border-left-color: var(--accent); }
.sticky-cta { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.inter { text-align: center; padding-top: 28px; }
.inter .big { font-size: 54px; width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 28px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.inter .fact { font-size: 14px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 18px auto 0; max-width: 520px; }
table.data { border-collapse: collapse; width: 100%; margin: 12px 0; background: var(--card); border-radius: 12px; overflow: hidden; font-size: 16px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tr:first-child th { background: var(--brand-soft); }
.field { display: grid; gap: 6px; margin: 16px 0; text-align: left; }
.field label { font-weight: 700; font-size: 15px; }
.input { width: 100%; min-height: 56px; padding: 0 16px; border-radius: 12px; border: 2px solid var(--line); font: 17px var(--font); background: var(--card); color: var(--ink); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; text-align: left; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px; accent-color: var(--brand); }
.err { color: var(--bad); font-weight: 600; font-size: 15px; min-height: 1.2em; }
.loader { text-align: center; padding-top: 40px; }
.ring { width: 140px; height: 140px; margin: 0 auto 22px; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; }
.loader ul { list-style: none; padding: 0; max-width: 360px; margin: 18px auto 0; text-align: left; }
.loader li { padding: 8px 0; color: var(--muted); display: flex; gap: 10px; }
.loader li.done { color: var(--ink); }
.loader li.done::before { content: "✓"; color: var(--ok); font-weight: 800; }
.loader li:not(.done)::before { content: "•"; }

/* paywall / checkout */
.pay { display: grid; gap: 22px; }
@media (min-width: 920px) { .pay { grid-template-columns: 1.1fr .9fr; align-items: start; } .pay .sticky { position: sticky; top: 80px; } }
.lockrow { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.lockrow .lk { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.blur { filter: blur(6px); user-select: none; }
.plan-card { border: 2px solid var(--brand); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); padding: 22px; }
.plan-card .now { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan-card .now strong { font-size: 40px; letter-spacing: -.03em; }
.terms-box { font-size: 14.5px; background: var(--brand-soft); border-radius: 12px; padding: 12px 14px; margin: 14px 0; line-height: 1.5; }
.list-check { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 9px; }
.list-check li { display: flex; gap: 10px; }
.list-check li::before { content: "✓"; color: var(--ok); font-weight: 900; flex: 0 0 auto; }
#payment-element { margin: 16px 0 8px; min-height: 60px; }
.secure { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: #fff4e0; color: #9a5b00; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.review { border-left: 3px solid var(--brand); padding: 4px 0 4px 14px; margin: 14px 0; }
.review p { margin: 0 0 4px; }
.review small { color: var(--muted); }

/* member area */
.member-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; }
.member-nav a { padding: 9px 14px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.member-nav a.on { background: var(--brand-soft); color: var(--brand); }
.lib-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); margin-bottom: 10px; }
.lib-item:hover { border-color: var(--brand); }
.lib-item .meta { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.lib-item .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 26px; display: grid; place-items: center; font-size: 13px; }
.lib-item.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.prose h2 { margin-top: 1.4em; font-size: 22px; }
.prose pre { white-space: pre-wrap; background: var(--brand-soft); padding: 12px; border-radius: 10px; font-size: 14px; }
.notice { padding: 14px 16px; border-radius: 12px; background: #fff8e6; border: 1px solid #f3d48b; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; z-index: 50; }
@media print { .top, .foot, .member-nav, .btn, .no-print { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }

.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.mbar .btn { flex: 1; min-height: 52px; font-size: 17px; }
.mbar small { color: var(--muted); font-size: 12.5px; line-height: 1.3; max-width: 120px; }
@media (min-width: 920px) { .mbar { display: none; } }
