:root {
	--amber: #ffb703;
	--sky: #8ecae6;
	--paper: #f2f9fc;
	--card: #ffffff;
	--ink: #023047;
	--ink-2: #44606f;
	--leaf: #219ebc;
	--leaf-2: #8ecae6;
	--forest: #023047;
	--coral: #fb8500;
	--line: #d3e8f1;
	--radius: 14px;
	--serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Noto Serif', Georgia, serif;
	--sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.5 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
main { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.btn { display: block; width: 100%; border: 0; border-radius: 999px; padding: 16px 20px; font-weight: 650; font-size: 17px; cursor: pointer; transition: transform .1s; text-align: center; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.light { background: var(--amber); color: var(--ink); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- landing ---------- */
.landing { height: 100dvh; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; color: var(--ink); }
.landing .bg { position: absolute; inset: 0; z-index: -1; background: var(--sky) url('data:image/webp;base64,UklGRmQAAABXRUJQVlA4IFgAAADwAwCdASoKABIAPu1iqk2ppaQiMAgBMB2JaACdACK3lnpUThIpsGuAAP7fYwgCkljj2LgyCBm9S7VpLToEDCjAH1VVAWm989/K5YaVQRVO1RfDL7yegmQA') center/cover; }
.landing .bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.landing .brand { position: absolute; top: calc(22px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font-weight: 700; font-size: 15px; letter-spacing: .02em; margin: 0; }
.landing-mid { padding: 0 28px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.landing h1 { font-size: clamp(36px, 11vw, 46px); line-height: 1.05; max-width: 11ch; }
.landing .btn.primary { width: 100%; max-width: 320px; }
.lede { font-size: 17px; line-height: 1.45; max-width: 30ch; margin: 0; }
.inapp { font-size: 13px; text-align: center; background: rgba(0,0,0,.25); border-radius: 10px; padding: 8px 10px; }
.landing .btn.primary { background: var(--ink); color: #fff; }

/* ---------- flow (questions, value screens, upload) ---------- */
.flow { min-height: 100dvh; display: flex; flex-direction: column; }
.flow-head { display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 8px; position: sticky; top: 0; background: var(--paper); z-index: 2; }
.back { border: 0; background: none; font-size: 22px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.progress { flex: 1; height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--leaf); border-radius: 6px; transition: width .35s ease; }
.flow-body { min-width: 0; flex: 1; display: flex; flex-direction: column; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); }
.q-title { font-size: 27px; line-height: 1.15; margin: 10px 0 8px; }
.q-sub { color: var(--ink-2); font-size: 15px; margin-bottom: 18px; }
.opts { display: grid; gap: 10px; margin-bottom: 18px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 15px 16px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; }
.opt .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #a9cbdb; flex: none; display: grid; place-items: center; }
.opt.multi .tick { border-radius: 6px; }
.opt[aria-pressed='true'] { border-color: var(--leaf); background: #e6f4fa; }
.opt[aria-pressed='true'] .tick { background: var(--leaf); border-color: var(--leaf); }
.opt .tick .ic { color: #fff; font-size: 15px; opacity: 0; }
.opt[aria-pressed='true'] .tick .ic { opacity: 1; }
.spacer { flex: 1; }

/* value screens */
.value { display: flex; flex-direction: column; flex: 1; }
.value .art { margin: 4px -4px 18px; border-radius: 18px; background: var(--sky); overflow: hidden; aspect-ratio: 1 / 0.86; position: relative; }
.value .art svg { width: 100%; height: 100%; display: block; }
.value h2 { font-size: 26px; line-height: 1.15; margin-bottom: 10px; }
.value p { color: var(--ink-2); }

/* upload */
.checklist { list-style: none; padding: 0; margin: 4px 0 16px; display: grid; gap: 2px; }
.check-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px; font-size: 15px; border-bottom: 1px solid var(--line); }
.hint { font-size: 14px; color: var(--ink-2); background: #e1f0f7; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.files { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
.file { min-width: 0; grid-template-columns: minmax(0, 1fr); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.file-top { display: flex; align-items: center; gap: 10px; }
.file-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-state { font-size: 13px; color: var(--ink-2); }
.file-state.ok { color: var(--leaf); }
.file-state.bad { color: var(--coral); }
.file .x { border: 0; background: none; font-size: 18px; color: var(--ink-2); cursor: pointer; padding: 0 4px; }
.pw { display: flex; gap: 8px; }
.pw input { flex: 1; min-width: 0; font: inherit; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.pw input.bad { border-color: var(--coral); }
.pw button { border: 0; border-radius: 10px; background: var(--ink); color: #fff; padding: 0 14px; font-weight: 600; }
.pw-msg { font-size: 13px; color: var(--coral); }
.pick { display: grid; place-items: center; gap: 4px; padding: 22px; border-radius: var(--radius); border: 2px dashed #8ecae6; background: var(--card); cursor: pointer; text-align: center; margin-bottom: 14px; }
.pick b { font-size: 16px; }
.pick span { font-size: 13px; color: var(--ink-2); }
.small { font-size: 13px; color: var(--ink-2); }
.center { text-align: center; }

/* ---------- processing ---------- */
.plain { min-height: 100dvh; padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
.processing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 30px; }
.processing h2 { font-size: 24px; }
.sprout { width: 96px; height: 96px; }
.sprout .soil { fill: #8a6a45; }
.sprout .stem { stroke: #386641; stroke-width: 4; stroke-linecap: round; fill: none; stroke-dasharray: 40; animation: grow 2.4s ease-in-out infinite alternate; }
.sprout .leaf { fill: #6a994e; transform-origin: 60px 60px; animation: leaf 2.4s ease-in-out infinite alternate; }
.sprout .l2 { fill: #386641; animation-delay: .3s; }
@keyframes grow { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes leaf { 0%, 40% { transform: scale(0); } 100% { transform: scale(1); } }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { overflow-wrap: anywhere; display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink-2); }
.steps li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #a9cbdb; flex: none; }
.steps li.active { color: var(--ink); font-weight: 600; }
.steps li.active::before { border-color: var(--leaf); border-top-color: transparent; animation: spin 1s linear infinite; }
.steps li.done::before { background: var(--leaf); border-color: var(--leaf); }
@keyframes spin { to { transform: rotate(360deg); } }
.note { font-size: 13.5px; color: var(--ink-2); }

/* ---------- results ---------- */
.result, .report, .pay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--leaf); }
.headline { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.card { min-width: 0; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.flows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flows .n { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.flows .l { font-size: 13px; color: var(--ink-2); }
.match { font-size: 13.5px; color: var(--leaf); font-weight: 600; }
.match.warn { color: var(--coral); }
.bars { display: grid; gap: 10px; }
.bar { display: grid; gap: 4px; }
.bar .row { display: flex; justify-content: space-between; font-size: 15px; }
.bar .row b { font-variant-numeric: tabular-nums; }
.bar .track { height: 8px; background: #e1f0f7; border-radius: 8px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--leaf); border-radius: 8px; }
.finding { display: grid; gap: 8px; }
.finding .amt { font-size: 24px; font-weight: 750; color: var(--coral); font-variant-numeric: tabular-nums; }
.finding h3 { font-size: 19px; line-height: 1.25; }
.finding .action { background: #e6f4fa; border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.finding .items { display: grid; gap: 6px; font-size: 14.5px; }
.finding .items div { display: flex; justify-content: space-between; gap: 10px; }
.finding .items > div > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.blur { filter: blur(6px); user-select: none; }
.locked-list { display: grid; gap: 8px; }
.locked { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); }
.locked b { font-variant-numeric: tabular-nums; color: var(--coral); }
.paywall { background: var(--forest); color: #fff; border-radius: 18px; padding: 18px; display: grid; gap: 12px; }
.paywall h3 { font-size: 22px; }
.paywall ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.qr { background: #fff; border-radius: 18px; padding: 16px; display: grid; justify-items: center; gap: 10px; }
.qr img { width: 240px; height: 240px; image-rendering: pixelated; }
.field { display: grid; gap: 6px; font-size: 14px; }
.field input { font: inherit; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.question { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 14px; cursor: pointer; }
.chip[aria-pressed='true'] { border-color: var(--leaf); background: #e6f4fa; }
.legal { padding: 28px 20px 40px; display: grid; gap: 14px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 20px; margin-top: 8px; }
.legal p, .legal li { color: var(--ink-2); }
footer.mini { text-align: center; font-size: 12.5px; color: var(--ink-2); padding: 8px 0 0; }
footer.mini a { color: var(--ink-2); }
.files-steps { padding-top: 14px; border-top: 1.5px solid var(--line); }
.files-steps li, .files-steps li.active { font-size: 14px; font-weight: 500; }
.field.email { margin: 4px 0 16px; }
.field.email b { font-size: 15px; }
.bars-run { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.run { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; opacity: .45; transition: opacity .3s; }
.run.active, .run.finished { opacity: 1; }
.run-top { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.run-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pct { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.vine { height: 12px; border-radius: 12px; background: #e1f0f7; position: relative; }
.vine span { display: block; height: 100%; width: 0; border-radius: 12px; background: linear-gradient(90deg, #6a994e, #386641); transition: width .45s ease-out; position: relative; }
.vine span::after { content: ''; position: absolute; right: -6px; top: -7px; width: 12px; height: 8px; background: #6a994e; border-radius: 12px 0; transform: rotate(-20deg); opacity: 0; transition: opacity .3s; }
.run.active .vine span::after { opacity: 1; animation: sway 1.6s ease-in-out infinite alternate; }
.run.finished .vine span { background: linear-gradient(90deg, #6a994e, #219ebc); }
.run.finished .vine span::after { opacity: 1; width: 10px; height: 10px; top: 1px; right: 1px; border-radius: 50%; background: var(--amber); transform: none; }
@keyframes sway { from { transform: rotate(-30deg); } to { transform: rotate(5deg); } }
.cap { font-size: 13.5px; color: var(--ink-2); min-height: 1.4em; }
.run.finished .cap { color: var(--ink); }
.early:empty, .asks:empty { display: none; }
.asks { display: grid; gap: 10px; }
.ic { flex: none; vertical-align: -0.15em; }
.back { display: grid; place-items: center; }
.back .ic { font-size: 22px; }
.file .x { display: grid; place-items: center; font-size: 18px; }
.pick-ic { font-size: 26px; color: var(--leaf); }
.with-ic { display: flex; align-items: center; justify-content: center; gap: 8px; }
.with-ic .ic { font-size: 20px; }
.hidden-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.blk { display: inline-block; height: 10px; border-radius: 4px; background: #c9e2ee; filter: blur(1.5px); }
/* Once they exist, the exact headline and the questions sit above the bars. */
.processing .early { order: 1; }
.processing .asks { order: 2; }
.processing .bars-run { order: 3; }
.field.day select { font: inherit; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.note-card { background: #e1f0f7; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; color: var(--ink); }
.opts.two { grid-template-columns: 1fr 1fr; }
.opts.two .opt { padding: 13px 12px; font-size: 15px; }
.check-item .st { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--leaf); }
.check-item .st .ic { font-size: 16px; }
/* iPhone Safari's floating toolbar covers the bottom ~80px: keep the CTA and terms above it. */
.flow-body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- upload: what each file turned out to be ---------- */
.check-item { justify-content: flex-start; gap: 10px; }
.check-item .ci { display: inline-flex; font-size: 18px; color: var(--ink-2); opacity: .5; }
.check-item.done .ci { color: var(--leaf); opacity: 1; }
.check-item .st { margin-left: auto; }
.file .accts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.file .accts li, .icon-list li, .nudge { display: flex; gap: 8px; align-items: flex-start; }
.file .accts .ic { color: var(--leaf); flex: none; margin-top: 2px; }
.found:empty { display: none; }
.found { margin: 12px 0; }
.nudge { margin: 8px 0 0; font-size: 14.5px; font-weight: 600; }
.nudge .ic, .icon-list .ic { flex: none; font-size: 18px; margin-top: 1px; }
.icon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.paywall ul.icon-list { padding: 0; }

/* ---------- preview ---------- */
.accts-flow { display: grid; gap: 12px; }
.acct-n { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.card .items { display: grid; gap: 6px; font-size: 14.5px; }
.card .items div { display: flex; justify-content: space-between; gap: 10px; }
.card .items > div > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-card .btn { margin-top: 10px; }
footer.mini { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; }

.value .btn { margin-top: 28px; }

/* Long labels and notes wrap; only the amount column stays on one line. */
.items > div > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.finding h3, .finding .action, .card p { overflow-wrap: anywhere; }

/* Resuming: no landing flash (class set by the inline script in index.html). */
.resume [data-screen=landing] { display: none; }
