:root {
  --navy: #0E2A47; --navy2: #163A5F; --accent: #F26B1D; --accent-d: #C9520E;
  --bg: #F3F5F8; --card: #fff; --text: #1D2733; --muted: #66717F; --border: #DFE4EA;
  --success: #1F9D55; --danger: #D64545; --r: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
body { min-height: 100vh; }
#root { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
a { color: var(--navy); font-weight: 600; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.muted { color: var(--muted); } .muted-light { color: #B9C6D4; display: block; }
.small { font-size: 14px; } .tiny { font-size: 12px; line-height: 1.45; } .center { text-align: center; } .strong { font-weight: 700; color: var(--navy); margin-top: 6px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.splash { min-height: 100vh; display: grid; place-items: center; background: var(--navy); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(14,42,71,.2); border-top-color: var(--navy); animation: spin .8s linear infinite; display: inline-block; margin: auto; }
.spinner.light, .btn-primary .spinner, .btn-secondary .spinner { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--navy); color: #fff; padding: calc(10px + var(--safe-t)) 12px 10px; min-height: 52px; }
.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back, .link-light { background: none; border: 0; color: #fff; font-size: 16px; font-weight: 600; padding: 6px 4px; min-width: 64px; text-align: left; cursor: pointer; }
.link-light { text-align: right; }
.brand-dot { width: 64px; }
.main { padding-bottom: calc(24px + var(--safe-b)); }
.screen { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: 0 3px 12px rgba(14,42,71,.06); }
.card.flush { padding: 0; overflow: hidden; } .card .pad { padding: 12px 14px; }
.card.navy { background: var(--navy); color: #fff; display: flex; flex-direction: column; gap: 3px; }
.card.soft { background: #F8FAFC; box-shadow: none; border: 1px solid var(--border); }
.big { font-size: 34px; font-weight: 800; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 12px; }
.section-title h3 { font-size: 12px; font-weight: 800; letter-spacing: 1.3px; color: var(--accent); text-transform: uppercase; }

.btn { width: 100%; min-height: 52px; border-radius: var(--r); border: 0; font-size: 16px; font-weight: 700; letter-spacing: .2px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; transition: transform .05s, opacity .2s; }
.btn:active { transform: scale(.99); } .btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; } .btn-primary:hover { background: var(--accent-d); }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-danger { background: transparent; color: var(--danger); min-height: 40px; }
.btn-row { display: flex; gap: 10px; } .btn-row .btn { flex: 1; }
.link, .link-accent, .link-danger, .link-success { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; cursor: pointer; color: var(--navy); }
.link-accent { color: var(--accent); } .link-danger { color: var(--danger); } .link-success { color: var(--success); }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input-wrap { display: flex; align-items: center; background: #F8FAFC; border: 1px solid var(--border); border-radius: 10px; }
.input-wrap:focus-within { border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgba(14,42,71,.08); }
.input-wrap input, .input-wrap textarea { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); padding: 12px; outline: none; }
.input-wrap textarea { resize: vertical; min-height: 110px; }
.affix { padding: 0 12px; color: var(--muted); font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.switch-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
.switch { appearance: none; width: 50px; height: 30px; border-radius: 15px; background: #C9D1DA; position: relative; flex: none; cursor: pointer; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch:checked { background: var(--accent); } .switch:checked::after { left: 23px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
.row > span:first-child { color: var(--muted); } .row > span:last-child { font-weight: 600; text-align: right; }
.row.bold > span { color: var(--navy) !important; font-size: 19px; font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat { background: #F4F6F9; border-radius: 10px; padding: 10px; }
.stat b { display: block; font-size: 19px; color: var(--navy); } .stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { border: 0; background: #EEF1F4; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; } .chip.accent { background: #FFF4EC; color: var(--accent-d); font-size: 12px; border-radius: 14px; }
.chips.quick { margin-top: 12px; }
.segmented { display: flex; background: #E4E9EF; border-radius: 10px; padding: 3px; }
.segmented button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 8px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.segmented button.on { background: #fff; color: var(--navy); }
.note { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.note.warn { background: #FFF4EC; color: var(--accent-d); } .note.info { background: #EAF4EE; color: #176B3C; }

.steps { display: flex; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted); }
.step i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: #C9D1DA; color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 3px; }
.step.done i { background: var(--accent); } .step.cur span { color: var(--navy); font-weight: 700; }

.hero-bar { background: var(--navy); padding: 6px 16px 16px; text-align: center; }
.hero-bar p { color: #B9C6D4; font-size: 13px; margin: 12px 0 0; }
.empty { text-align: center; padding: 60px 24px; } .empty h2 { color: var(--navy); font-size: 19px; margin-bottom: 8px; } .empty p { color: var(--muted); }
.job { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.job-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.money { color: var(--navy); font-weight: 800; font-size: 17px; } .big-money { font-size: 22px; }
.badge { font-size: 11px; font-weight: 800; color: var(--accent-d); background: #FFF4EC; padding: 3px 8px; border-radius: 10px; }

.hero-img { display: block; width: 100%; aspect-ratio: 640/420; object-fit: cover; background: var(--navy2); }
.hero-img.rounded { border-radius: var(--r); }
.hero-ph { aspect-ratio: 640/420; background: var(--navy2); color: #B9C6D4; display: grid; place-items: center; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; } .thumbs img { width: 150px; height: 98px; object-fit: cover; border-radius: 8px; flex: none; }
.gallery { display: grid; gap: 12px; } .gallery figure { margin: 0; } .gallery img { width: 100%; border-radius: var(--r); display: block; aspect-ratio: 640/420; object-fit: cover; }
.gallery figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (min-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; } }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.tbl th { background: var(--navy); color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 7px 8px; text-align: left; }
.tbl th:first-child { border-radius: 6px 0 0 6px; } .tbl th:last-child { border-radius: 0 6px 6px 0; }
.tbl td { padding: 8px; border-bottom: 1px solid #EEF1F4; } .tbl .r { text-align: right; } .tbl tr.hl td { background: #FFF4EC; font-weight: 700; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

.line-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
.with-footer { padding-bottom: 150px; }
.sticky-total { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 12px 16px calc(14px + var(--safe-b)); max-width: 640px; margin: 0 auto; z-index: 5; }

.logo-drop { display: grid; place-items: center; height: 120px; border-radius: 10px; border: 1.5px dashed var(--border); background: #F8FAFC; color: var(--muted); font-weight: 600; cursor: pointer; margin-bottom: 8px; }
.logo-drop img { max-width: 80%; max-height: 100px; object-fit: contain; }
.item { display: flex; justify-content: space-between; gap: 12px; width: 100%; background: none; border: 0; border-bottom: 1px solid #EEF1F4; padding: 14px 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.item span:last-child { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }

.auth, .welcome, .paywall { min-height: 100vh; background: var(--navy); color: #fff; padding: calc(28px + var(--safe-t)) 20px calc(28px + var(--safe-b)); }
.auth-hero { text-align: center; margin: 12px 0 22px; } .auth-hero img { border-radius: 18px; }
.auth-hero h1 { font-size: 28px; margin-top: 12px; } .auth-hero p { color: #B9C6D4; margin-top: 6px; }
.auth-card { color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.auth-card h2 { font-size: 20px; color: var(--navy); margin-bottom: 4px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 10px 0 4px; }
.welcome { display: flex; flex-direction: column; align-items: center; text-align: center; }
.welcome img { border-radius: 20px; margin-top: 20px; } .welcome h1 { font-size: 30px; margin-top: 14px; } .sub { color: #B9C6D4; }
.points { list-style: none; padding: 0; margin: 30px 0; display: grid; gap: 18px; text-align: left; flex: 1; }
.points li { display: flex; flex-direction: column; padding-left: 22px; position: relative; } .points li::before { content: ''; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.points b { font-size: 17px; } .points span { color: #B9C6D4; font-size: 14px; }
.paywall .close { background: none; border: 0; color: #B9C6D4; font-size: 16px; float: right; cursor: pointer; }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: 1.5px; margin-top: 30px; }
.paywall h1 { font-size: 28px; } .paywall a { color: #B9C6D4; }
.features { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.features li::before { content: '✓  '; color: var(--accent); font-weight: 800; }
.plan { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: var(--navy2); color: #fff; border: 2px solid #2A4C70; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; font: inherit; cursor: pointer; }
.plan.on { border-color: var(--accent); }
.plan-head { display: flex; justify-content: space-between; align-items: center; } .plan-head b { font-size: 17px; }
.plan-head i { font-style: normal; background: var(--accent); font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 10px; }
.price { font-size: 26px; font-weight: 800; } .price small { font-size: 15px; color: #B9C6D4; font-weight: 400; }
.paywall .btn { margin: 6px 0 14px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); background: #1D2733; color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: 90vw; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
/* Free-report steps */
.free-card { cursor: default; gap: 10px; }
.free-step { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.12); }
.free-step > div { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.free-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.free-step.done .free-n { background: var(--success, #1E9E62); }
.free-step.done b { opacity: .75; }
.free-actions { display: flex; gap: 18px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.free-actions .link-light { min-width: 0; text-align: left; }
.btn-light { background: #fff; color: var(--navy); border: 0; }
.free-actions .btn { width: auto; padding-left: 26px; padding-right: 26px; }
/* Referrals */
.refer-banner { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: linear-gradient(135deg, #FFF3EA, #FFE4D1); border: 1.5px solid #F7C3A0; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; cursor: pointer; font: inherit; color: var(--navy); }
.refer-banner b { font-size: 16px; } .refer-banner span { font-size: 14px; color: #8A4B22; }
.refer-hero h2 { font-size: 21px; color: var(--navy); margin: 4px 0 8px; line-height: 1.25; }
.refer-hero .eyebrow { color: var(--accent); }
.refer-link { background: #F3F5F8; border: 1px dashed #B9C6D4; border-radius: 10px; padding: 12px; margin: 12px 0; font-weight: 700; color: var(--navy); word-break: break-all; text-align: center; }
.refer-actions { display: flex; gap: 10px; margin-top: 10px; } .refer-actions .btn { flex: 1; }
