/* SpendPool — rich light theme. Warm ivory paper, deep navy anchor, teal #0F8273 (you), coral #EF6B50 (shared). Light only. */
:root {
  --bg: #F3EFE7; --surface: #FFFFFF; --surface-2: #FBF8F2; --ink: #16323B; --ink2: #3A565E; --muted: #667E84; --line: #E6E0D4; --line2: #D7D0C1; --divider: #EDE8DD;
  --hero: linear-gradient(152deg, #1A3A42 0%, #0E242A 100%); --hero-ink: #F3EFE7; --hero-muted: #A3BBBF; --hero-track: rgba(255,255,255,.16);
  --accent: #0F8273; --accent-ink: #0B6E61; --tip-bg: #FCE6DF; --tip-ink: #A33D2C;
  --seg: #ECE7DC; --seg-on: #FFFFFF; --chip: #EFEADF;
  --tagc-bg: #D4EDE7; --tagc-ink: #0B5F54; --tagp-bg: #E8E3D8; --tagp-ink: #5E7378;
  --danger: #C2392D; --ok-bg: #D4EDE7; --ok-ink: #0B5F54; --warn-bg: #FCE6DF; --warn-ink: #A33D2C;
  --coral: #EF6B50;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: Inter, system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; font-size: 16px; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
/* Manrope ExtraBold for the wordmark and big headings; Inter for everything else */
.wordmark, .top h1, .bar h1, .hero .total, .list-title, .login h1 { font-family: Manrope, Inter, sans-serif; }
.wordmark, .login h1 { font-weight: 800; letter-spacing: -0.035em; }
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.app.no-nav { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* Header */
.top { padding: calc(20px + env(safe-area-inset-top)) 20px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; }
.bar { padding: calc(12px + env(safe-area-inset-top)) 12px 0; display: flex; align-items: center; gap: 4px; }
.bar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 800; }
.icon-btn { width: 44px; height: 44px; border: none; background: none; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.icon-btn:active { background: var(--seg); }
.avatars { display: flex; }
.avatar { width: 40px; height: 40px; border-radius: 20px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; border: 2px solid var(--bg); }
.avatar + .avatar { margin-left: -10px; }
.month { display: flex; align-items: center; gap: 2px; margin-left: -10px; }
.month button { width: 36px; height: 36px; border: none; background: none; color: var(--muted); border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; }
.month span { font-size: 13px; color: var(--muted); font-weight: 700; min-width: 96px; text-align: center; }

/* Pills and segments */
.pills { padding: 0 20px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill { min-height: 44px; padding: 0 18px; border-radius: 22px; font-size: 14px; font-weight: 700; border: 1px solid var(--line2); background: transparent; color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { margin: 0 20px; padding: 4px; background: var(--seg); border-radius: 16px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.seg button { min-height: 44px; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; background: transparent; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.hint { padding: 8px 20px 0; font-size: 12px; color: var(--muted); text-align: center; }
.hint.left { text-align: left; }

/* Hero */
.hero { margin: 16px 20px 0; background: var(--hero); color: var(--hero-ink); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 44px -26px rgba(14,36,42,.55); }
.hero .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--hero-muted); font-weight: 600; }
.hero .total { font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.track { height: 8px; background: var(--hero-track); border-radius: 4px; overflow: hidden; }
.track > div { height: 100%; border-radius: 4px; background: #2DD4BF; transition: width .3s; }
.track > div.hot { background: #F97316; }
.hero .left { font-size: 13px; color: var(--hero-muted); }

.banner { margin: 12px 20px 0; min-height: 52px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); width: calc(100% - 40px); text-align: left; }
.badge { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: #C2410C; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex: none; }
.banner span.t { flex: 1; font-size: 14px; font-weight: 700; }

.section-h { padding: 18px 20px 8px; display: flex; justify-content: space-between; align-items: baseline; }
.section-h h2 { margin: 0; font-size: 17px; font-weight: 800; }
.section-h a, .section-h button { font-size: 13px; font-weight: 700; text-decoration: none; color: var(--accent-ink); background: none; border: none; padding: 8px 0; }
.label { display: block; padding: 18px 20px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }

.stack { margin: 0 20px; height: 14px; border-radius: 7px; overflow: hidden; display: flex; gap: 2px; background: var(--seg); }
.cats { padding: 8px 20px 0; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.cat-row .n { flex: 1; font-weight: 600; }
.cat-row .p { font-size: 13px; color: var(--muted); width: 44px; text-align: right; }
.cat-row .a { font-weight: 700; min-width: 84px; text-align: right; }
.tip { margin: 14px 20px 0; padding: 14px 16px; background: var(--tip-bg); color: var(--tip-ink); border-radius: 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.tip svg { flex: none; margin-top: 1px; }
.empty { margin: 24px 20px; padding: 28px 20px; text-align: center; color: var(--muted); background: var(--surface); border-radius: 18px; font-size: 14px; }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Bottom nav */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
nav.tabs .in { max-width: 480px; margin: 0 auto; height: 72px; display: flex; justify-content: space-around; align-items: center; }
nav.tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); background: none; border: none; min-width: 52px; padding: 6px 0; position: relative; }
nav.tabs .ndot { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #C2410C; color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
nav.tabs button[aria-current="page"] { color: var(--accent-ink); }
nav.tabs .fab { width: 56px; height: 56px; min-width: 56px; border-radius: 28px; background: var(--accent); color: #fff; margin-top: -26px; box-shadow: 0 6px 16px rgba(15,118,110,.35); justify-content: center; }

/* Forms */
.amount { padding: 12px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.amount .in { display: flex; align-items: baseline; gap: 4px; }
.amount .cur { font-size: 32px; font-weight: 700; color: var(--muted); }
.amount input { width: 1ch; min-width: 1ch; max-width: 280px; box-sizing: content-box; font-size: 52px; font-weight: 800; letter-spacing: -1px; border: none; background: transparent; text-align: left; outline: none; padding: 0; }
.amount input::placeholder { color: var(--line2); }
.chips { padding: 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; font-size: 14px; font-weight: 700; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); }
.chip .dot { width: 10px; height: 10px; border-radius: 3px; }
.chip[aria-pressed="true"] { color: #fff; }
.chip[aria-pressed="true"] .dot { background: #fff !important; }
.payers { padding: 0 20px; display: flex; gap: 8px; }
.payer { flex: 1; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 14px; font-size: 15px; font-weight: 700; background: var(--surface); border: 2px solid var(--line); }
.payer[aria-pressed="true"] { border-color: var(--ink); }
.mini-av { width: 26px; height: 26px; border-radius: 13px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.grid2 { margin: 18px 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); font-size: 16px; }
input[type="date"].input { -webkit-appearance: none; appearance: none; }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; border-radius: 18px; border: none; background: var(--accent); color: #fff; font-size: 17px; font-weight: 800; }
.primary:disabled { opacity: .6; }
.secondary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 800; }
.danger-link { background: none; border: none; color: var(--danger); font-weight: 800; font-size: 15px; min-height: 44px; width: 100%; }
.save-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.save-bar .in { max-width: 440px; margin: 0 auto; }

/* History */
.day-h { display: flex; justify-content: space-between; padding: 16px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.list { padding: 0 20px; }
.card-list { background: var(--surface); border-radius: 16px; padding: 0 14px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.item:last-child { border-bottom: none; }
.item .ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: #fff; }
.item .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; background: none; border: none; text-align: left; padding: 0; }
.item .mid .t { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .mid .m { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item .r .a { font-size: 15px; font-weight: 800; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; border: none; }
button.tag { min-height: 30px; padding: 2px 10px; border-radius: 10px; }
.tag.c { background: var(--tagc-bg); color: var(--tagc-ink); }
.tag.p { background: var(--tagp-bg); color: var(--tagp-ink); }

/* Review */
.rcards { padding: 6px 20px 0; display: flex; flex-direction: column; gap: 12px; }
.rcard { background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rcard .head { display: flex; gap: 12px; align-items: flex-start; }
.rcard .head .w { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rcard .head .w input { font-size: 16px; font-weight: 800; border: none; background: transparent; padding: 0; min-height: 24px; width: 100%; }
.rcard .head .w span { font-size: 12px; color: var(--muted); }
.rcard .amt { font-size: 18px; font-weight: 800; }
.rcard .catline { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.select-chip { position: relative; display: inline-flex; align-items: center; }
.select-chip .dot { position: absolute; left: 12px; width: 10px; height: 10px; border-radius: 3px; pointer-events: none; }
.select-chip select { -webkit-appearance: none; appearance: none; min-height: 36px; padding: 0 30px 0 30px; border-radius: 18px; border: 1px solid var(--line2); background: var(--chip); font-size: 14px; font-weight: 700; }
.select-chip svg { position: absolute; right: 10px; pointer-events: none; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.two .primary { min-height: 44px; border-radius: 12px; font-size: 15px; }
.two .secondary { min-height: 44px; border-radius: 12px; }
.raw { font-size: 12px; color: var(--muted); }
.raw summary { cursor: pointer; padding: 4px 0; }
.raw p { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; }

/* Settings */
.panel { margin: 0 20px; background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.panel .row { display: flex; gap: 8px; }
.panel .row .input { flex: 1; min-width: 0; background: var(--chip); }
.panel .row button { min-height: 46px; padding: 0 16px; border: none; border-radius: 12px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; white-space: nowrap; }
.small { font-size: 12px; line-height: 1.45; color: var(--muted); margin: 0; }
.status { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 10px; background: var(--ok-bg); color: var(--ok-ink); }
.status.off { background: var(--warn-bg); color: var(--warn-ink); }
.steps { margin: 0 20px; background: var(--surface); border-radius: 18px; padding: 4px 16px; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: none; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 13px; background: var(--accent); color: #fff; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.steps b { display: block; font-size: 14px; }
.steps span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.steps code { font-size: 12px; background: var(--chip); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
textarea.input { font-family: inherit; min-height: 96px; padding: 10px 14px; resize: vertical; font-size: 14px; }
.result { font-size: 13px; padding: 10px 12px; border-radius: 12px; background: var(--chip); }
.mailtest { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.mailtest.ok { background: var(--ok-bg); color: var(--ok-ink); }
.mailtest.bad { background: var(--warn-bg); color: var(--warn-ink); }
.mailtest code { display: block; margin-top: 6px; font-size: 11px; opacity: .85; word-break: break-word; white-space: pre-wrap; }

/* Login */
.login { padding: calc(48px + env(safe-area-inset-top)) 24px 24px; display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin: 0 auto; }
.login .logo { width: 132px; margin-bottom: 4px; }
.brandmark { display: block; width: 100%; }
.brandmark svg { width: 100%; height: auto; }
/* brand mark: show the light or dark ring version to match the theme */
.brandmark svg.m-light { display: block; }
.brandmark svg.m-dark { display: none; }
.login h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.login p { margin: 0 0 8px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 20px; }

/* Toast and sheet */
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 700; z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }

/* ---- Multi-user additions ---- */
.scope-row { padding: 0 20px; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scope-row::-webkit-scrollbar { display: none; }
.scope-row .pill { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 7px; }
.sdot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

.list-title { padding: 20px 20px 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.space-card { margin: 0 20px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.space-card .head { display: flex; align-items: center; gap: 12px; }
.space-emblem { width: 44px; height: 44px; border-radius: 13px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.space-card .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.space-card .meta .n { font-size: 16px; font-weight: 800; }
.space-card .meta .s { font-size: 12px; color: var(--muted); }
.kind-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 7px; background: var(--chip); color: var(--muted); }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.member-row .mini-av { width: 30px; height: 30px; border-radius: 15px; font-size: 13px; }
.member-row .who { flex: 1; min-width: 0; }
.member-row .who .n { font-size: 14px; font-weight: 700; }
.member-row .who .u { font-size: 12px; color: var(--muted); }
.role-tag { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.space-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { min-height: 40px; padding: 0 14px; border-radius: 12px; font-family: inherit; font-size: 14px; font-weight: 700; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.btn-sm.solid { background: var(--accent); color: #fff; border: none; }
.invite-card { margin: 0 20px 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.invite-card .t { font-size: 15px; font-weight: 800; }
.invite-card .s { font-size: 13px; color: var(--muted); }
.dest-wrap { padding: 0 20px; }
.dest-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.dest { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; font-size: 14px; font-weight: 700; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); }
.dest[aria-pressed="true"] { border-color: var(--ink); border-width: 2px; }
.dest .sdot { width: 10px; height: 10px; border-radius: 3px; }
.auth-toggle { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 10px; font-size: 14px; }
.auth-toggle span { color: var(--muted); font-weight: 600; }
.auth-toggle button { background: none; border: none; color: var(--accent-ink); font-size: 14px; font-weight: 700; padding: 6px 2px; cursor: pointer; }
.code-box { display: flex; align-items: center; gap: 8px; }
.code-box .code { flex: 1; font-size: 20px; font-weight: 800; letter-spacing: 2px; text-align: center; background: var(--chip); border-radius: 12px; padding: 12px; }
.seg-pills { padding: 0 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.kind-pick { display: flex; gap: 8px; }
.kind-pick button { flex: 1; min-height: 60px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font-family: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 700; }
.kind-pick button[aria-pressed="true"] { border-color: var(--ink); border-width: 2px; }
.kind-pick .ic { font-size: 20px; }

/* ---- Multi-select in History ---- */
.sel-head { padding: 0 20px 4px; display: flex; justify-content: space-between; align-items: center; min-height: 36px; }
.sel-head .lbl { font-size: 13px; font-weight: 700; color: var(--muted); }
.sel-head button { background: none; border: none; color: var(--accent-ink); font-size: 14px; font-weight: 800; padding: 6px 2px; }
.item.selectable { cursor: pointer; }
.item .cbox { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line2); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.item.on .cbox { background: var(--accent); border-color: var(--accent); }
.item.dim { opacity: .45; }
.selbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); z-index: 6; }
.selbar .in { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.selbar .count { font-size: 13px; font-weight: 700; color: var(--muted); }
.selbar .row2 { display: flex; gap: 8px; align-items: stretch; }
.selbar .select-chip { flex: 1; }
.selbar .select-chip select { width: 100%; min-height: 48px; }
.selbar .mv { min-height: 48px; padding: 0 18px; border: none; border-radius: 14px; background: var(--accent); color: #fff; font-family: inherit; font-size: 15px; font-weight: 800; }
.selbar .del { min-height: 48px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); color: var(--danger); font-family: inherit; font-size: 15px; font-weight: 800; }

/* ======================= Landing page ======================= */
.app.landing { max-width: none; padding-bottom: 0; }
.lp { width: 100%; overflow-x: hidden; }
.lp-back { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 16px; display: inline-flex; align-items: center; gap: 2px; background: none; border: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 6px 8px; cursor: pointer; }
.lp-back svg { width: 18px; height: 18px; }

/* top bar */
.lp-top { max-width: 1080px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 20px 8px; display: flex; align-items: center; justify-content: space-between; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-family: Manrope, sans-serif; font-weight: 800; font-size: 19px; color: var(--ink); }
.lp-brand .brandmark { width: 30px; display: block; }
.lp-brand .brandmark svg { width: 100%; height: auto; }
.lp-brand.small { font-size: 17px; }
.lp-brand.small .brandmark { width: 26px; }
.lp-signin { background: none; border: none; color: var(--ink); font-weight: 700; font-size: 15px; padding: 8px 10px; cursor: pointer; }

/* hero */
.lp-hero { max-width: 1080px; margin: 0 auto; padding: 20px 20px 36px; display: grid; gap: 30px; align-items: center; }
.lp-hero-text h1 { font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(34px, 8.5vw, 52px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--ink); }
.lp-hero-text p { font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 44ch; margin: 0 0 24px; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-cta .primary { width: auto; min-height: 52px; padding: 0 30px; border-radius: 15px; font-size: 16px; }
.lp-ghost { background: none; border: 1.5px solid var(--line2); color: var(--ink); font-weight: 700; font-size: 16px; border-radius: 15px; padding: 0 22px; min-height: 52px; cursor: pointer; }
.lp-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* hero preview (real app components) */
.lp-hero-visual { display: flex; justify-content: center; }
.lp-prev { width: 100%; max-width: 356px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 16px; box-shadow: 0 34px 64px -30px rgba(19,38,43,.55); }
.lp-prev-scope { display: flex; gap: 8px; margin-bottom: 14px; }
.lp-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--chip); border-radius: 999px; padding: 7px 14px; }
.lp-pill.on { background: var(--hero); color: var(--hero-ink); }
.lp-pill.on svg { width: 14px; height: 14px; }
.lp-pill .d { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); }
.lp-prevcard { margin: 0; }
.lp-prev-rows { margin-top: 12px; display: flex; flex-direction: column; }
.lp-prev-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--divider); }
.lp-prev-row:first-child { border-top: none; }
.lp-prev-row .ic { width: 30px; height: 30px; border-radius: 9px; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.lp-prev-row .n { flex: 1; font-weight: 600; color: var(--ink); }
.lp-prev-row .a { font-weight: 800; color: var(--ink); }

/* bento features */
.lp-bento { max-width: 1080px; margin: 0 auto; padding: 8px 20px; display: grid; grid-template-columns: 1fr; gap: 14px; }
.lp-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.lp-cell h3 { font-family: Manrope, sans-serif; font-weight: 800; font-size: 19px; margin: 15px 0 8px; color: var(--ink); }
.lp-cell p { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0; }
.lp-ic { display: inline-flex; width: 46px; height: 46px; border-radius: 13px; align-items: center; justify-content: center; background: var(--chip); color: var(--ink); }
.lp-ic svg { width: 24px; height: 24px; }
.lp-cell.teal { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 18%, var(--line)); }
.lp-cell.teal .lp-ic { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-ink); }
.lp-cell.coral { background: color-mix(in srgb, var(--coral) 8%, var(--surface)); border-color: color-mix(in srgb, var(--coral) 20%, var(--line)); }
.lp-cell.coral .lp-ic { background: var(--tip-bg); color: var(--coral); }

/* how it works */
.lp-steps { max-width: 720px; margin: 0 auto; padding: 48px 20px 8px; }
.lp-steps h2 { font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(26px, 6vw, 33px); text-align: center; color: var(--ink); margin: 0 0 26px; letter-spacing: -0.01em; }
.lp-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lp-steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.lp-steps .num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.lp-steps b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 3px; font-weight: 800; }
.lp-steps li span:not(.num) { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

/* privacy band (one deliberate brand-navy block) */
.lp-band { max-width: 1080px; margin: 44px auto; padding: 46px 26px; text-align: center; background: linear-gradient(140deg, #117C6E 0%, #0C5248 100%); border-radius: 28px; }
.lp-band .lp-ic.big { width: 62px; height: 62px; border-radius: 18px; background: rgba(255,255,255,.16); color: #fff; margin-bottom: 14px; }
.lp-band .lp-ic.big svg { width: 32px; height: 32px; }
.lp-band h2 { font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(24px, 5.5vw, 32px); color: #FFFFFF; margin: 0 0 12px; letter-spacing: -0.01em; }
.lp-band p { font-size: 16px; line-height: 1.55; color: rgba(255,255,255,.86); max-width: 48ch; margin: 0 auto; }

/* final cta */
.lp-final { max-width: 720px; margin: 0 auto; padding: 16px 20px 44px; text-align: center; }
.lp-final h2 { font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(26px, 6vw, 34px); color: var(--ink); margin: 0 0 20px; letter-spacing: -0.01em; }
.lp-final .primary { width: auto; min-height: 54px; padding: 0 36px; border-radius: 15px; margin: 0 auto; display: inline-flex; }

/* footer */
.lp-foot { border-top: 1px solid var(--line); max-width: 1080px; margin: 0 auto; padding: 24px 20px calc(30px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; }
.lp-link { background: none; border: none; color: var(--accent-ink); font-weight: 700; font-size: 15px; padding: 8px 10px; cursor: pointer; }

/* desktop */
@media (min-width: 760px) {
  .lp-hero { grid-template-columns: 1.05fr .95fr; gap: 48px; padding: 40px 24px 56px; }
  .lp-hero-visual { justify-content: flex-end; }
  .lp-bento { grid-template-columns: 1fr 1fr; padding: 8px 24px; gap: 16px; }
  .lp-cell.wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; }
  .lp-cell.wide .lp-ic { margin: 0; flex: none; width: 56px; height: 56px; }
  .lp-cell.wide h3 { margin: 0 0 6px; font-size: 22px; }
  .lp-cell.wide > div { flex: 1; }
}

/* motion: gentle, optional, reduced-motion safe */
@media (prefers-reduced-motion: no-preference) {
  .lp-hero-text, .lp-hero-visual, .lp-cell, .lp-steps li, .lp-band, .lp-final { animation: lpUp .6s cubic-bezier(.16,1,.3,1) both; }
  .lp-hero-visual { animation-delay: .06s; }
  .lp-cell:nth-child(2) { animation-delay: .04s; } .lp-cell:nth-child(3) { animation-delay: .08s; }
  .lp-cell:nth-child(4) { animation-delay: .12s; } .lp-cell:nth-child(5) { animation-delay: .16s; }
}
@keyframes lpUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pin-in { font-size: 30px; letter-spacing: 14px; text-align: center; padding-left: 14px; }

/* legal pages + footer links */
.lp-foot-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.inline-link { background: none; border: none; padding: 0; color: var(--accent-ink); font-weight: 700; font-size: inherit; cursor: pointer; text-decoration: underline; }
.lp-legal { max-width: 720px; margin: 0 auto; padding: 10px 22px 56px; }
.lp-legal h1 { font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(28px, 7vw, 38px); color: var(--ink); margin: 8px 0 4px; letter-spacing: -0.02em; }
.lp-legal .upd { font-size: 13px; color: var(--muted); margin: 0 0 22px; }
.lp-legal h2 { font-family: Manrope, sans-serif; font-weight: 800; font-size: 19px; color: var(--ink); margin: 28px 0 8px; }
.lp-legal p { font-size: 15.5px; line-height: 1.6; color: var(--ink2, var(--ink)); margin: 0 0 12px; }
.lp-legal ul { margin: 0 0 12px; padding-left: 20px; }
.lp-legal li { font-size: 15.5px; line-height: 1.55; color: var(--ink2, var(--ink)); margin-bottom: 7px; }
.lp-legal-foot { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lp-legal-foot .primary { width: auto; min-height: 48px; padding: 0 26px; border-radius: 14px; }
