:root {
  --navy: #0A3D16; --navy2: #0E6B27; --gold: #7CD43F; --gold-ink: #3E7D12;
  --bg: #F2F7F0; --card: #ffffff; --ink: #0B120D; --muted: #55635B; --line: #DCE6D8;
  --ok: #2f7d4f; --ok-bg: #e7f4ec; --bad: #b23b3b; --bad-bg: #fbeaea; --soft: #E8F2E4;
  --r: 26px; --shadow: 0 6px 24px rgba(10,61,22, .07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}
[data-theme="dark"] { --bg: #04140A; --card: #0C2414; --ink: #EAF5EC; --muted: #9FB3A4; --line: #1E3F26; --soft: #15331C; --ok-bg: #173a2a; --bad-bg: #3a1a1a; }
[data-text="lg"] { font-size: 18.5px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); background: var(--bg); }
@media (min-width: 620px) { body { background: #D7E3D3; } [data-theme="dark"] body { background: #020A04; } .app { box-shadow: 0 0 60px rgba(10,61,22,.18); } }

/* header */
.top { background: var(--navy); color: #fff; border-radius: 0 0 34px 34px; padding: calc(18px + env(safe-area-inset-top)) 22px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 56px; height: 64px; object-fit: contain; background: #000; border-radius: 16px; padding: 2px; }
.brand b { display: block; font-size: 1.75rem; font-weight: 900; letter-spacing: .5px; line-height: 1; }
.brand small { display: block; font-size: .9rem; opacity: .85; margin-top: 4px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 900; display: grid; place-items: center; text-decoration: none; flex: none; }
.avatar[aria-current] { outline: 3px solid #fff; }

main { padding: 22px 18px 8px; }
section > * + * { margin-top: 16px; }
h1 { font-size: 2.05rem; font-weight: 900; letter-spacing: -.5px; line-height: 1.08; margin: 6px 0 0; }
h2 { font-size: 1.3rem; font-weight: 900; margin: 0; letter-spacing: -.2px; }
h3 { margin: 0; font-weight: 800; }
h2.sec { margin-top: 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: 3px; font-weight: 900; color: var(--gold-ink); font-size: .8rem; margin: 0; }
.eyebrow.light { color: var(--gold); }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* cards */
.card { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card > * + * { margin-top: 12px; }
.card.accent { border-left: 6px solid var(--gold); }
.card.accent a { text-decoration: none; display: block; }
.card.accent p { margin: 6px 0 0; color: var(--muted); font-weight: 600; }
.hero, .paycard, .fundcard { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%); color: #fff; border-radius: 30px; padding: 26px 24px; box-shadow: 0 14px 30px rgba(10,61,22,.25); position: relative; overflow: hidden; }
.hero h1 { color: #fff; margin-top: 4px; }
.hero p { font-size: 1.1rem; opacity: .92; margin: 10px 0 18px; font-weight: 600; }
.hero::after, .paycard::after { content: "⚓"; position: absolute; right: -10px; bottom: -34px; font-size: 150px; opacity: .07; }
.label { text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; font-size: .85rem; opacity: .85; margin: 0; }
.big { font-size: 3rem; font-weight: 900; margin: 6px 0 4px; letter-spacing: -1px; }
.sub { margin: 0 0 16px; opacity: .9; font-weight: 600; }
.verse { font-size: 1.3rem !important; font-weight: 800 !important; line-height: 1.35; }
.remember { font-size: 1.35rem; font-weight: 900; line-height: 1.3; }
.link-light { display: inline-block; margin-top: 14px; color: var(--gold); font-weight: 800; text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 18px; padding: 15px 26px; font: inherit; font-weight: 900; font-size: 1.05rem; cursor: pointer; text-decoration: none; background: var(--navy); color: #fff; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.sm { padding: 10px 16px; font-size: .95rem; border-radius: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* stat + tiles */
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--card); border-radius: 22px; padding: 18px 10px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.9rem; font-weight: 900; }
.stat span { color: var(--muted); font-weight: 600; font-size: .9rem; }
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.statgrid .stat { background: var(--soft); box-shadow: none; text-align: left; padding: 14px 16px; }
.statgrid .stat b { font-size: 1.6rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { background: var(--card); border-radius: var(--r); padding: 20px; text-decoration: none; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.tile .emo { font-size: 2rem; margin-bottom: 8px; }
.tile b { font-weight: 900; font-size: 1.05rem; }
.tile small { color: var(--muted); font-weight: 600; font-size: .92rem; }

/* tags, meters */
.tag { display: inline-block; padding: 7px 14px; border-radius: 999px; font-weight: 900; font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; background: var(--soft); color: var(--muted); text-decoration: none; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: #EEF7E3; color: var(--gold-ink); }
.tag.gold { background: var(--gold); color: var(--navy); }
.meter { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter.lg { height: 16px; }
.meter.dark { background: rgba(255,255,255,.2); }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .4s; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 16px 0 0; }
.kv dt { color: var(--muted); font-weight: 600; font-size: 1.05rem; }
.kv dd { margin: 0; font-weight: 900; font-size: 1.3rem; text-align: right; }
.big-num { font-size: 1.5rem; font-weight: 900; margin: 0; }

/* lists */
.list { list-style: none; margin: 8px 0 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li > div, .list .grow { flex: 1; min-width: 0; text-decoration: none; }
.list b { display: block; font-weight: 900; font-size: 1.08rem; }
.list small { display: block; color: var(--muted); font-weight: 600; margin-top: 2px; }
.list .empty { color: var(--muted); }
.list p { margin: 4px 0 0; }
.ico { width: 52px; height: 52px; flex: none; border-radius: 16px; background: var(--soft); display: grid; place-items: center; font-size: 1.5rem; text-decoration: none; font-weight: 900; }
.focus .ico input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.focus .ico span { width: 26px; height: 26px; border: 3px solid var(--navy); border-radius: 8px; display: block; }
.focus .ico input:checked + span { background: var(--navy); }
.focus .ico input:checked + span::after { content: "✓"; color: #fff; display: grid; place-items: center; font-size: 16px; height: 100%; }
[data-theme="dark"] .focus .ico span { border-color: var(--gold); }
.focus.is-done b { text-decoration: line-through; opacity: .6; }
.focus .ico { cursor: pointer; position: relative; }
.x { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }
.chev { color: var(--muted); font-size: 1.6rem; }
.list select { font: inherit; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }

/* forms */
.form { display: grid; gap: 10px; }
.form label { font-weight: 700; display: grid; gap: 6px; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid2 .btn, .grid2 p { grid-column: 1 / -1; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
input, select, textarea { font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); width: 100%; }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--navy); flex: none; }
input[type="range"] { padding: 0; accent-color: var(--gold); border: 0; }
.inline { display: flex; gap: 8px; margin-top: 14px; }
.inline input { min-width: 0; }
.done-msg { color: var(--ok); font-weight: 900; }

/* journey */
.journey { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 18px 0 0; position: relative; }
.journey::before { content: ""; position: absolute; top: 20px; left: 8%; right: 8%; height: 5px; background: var(--line); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; }
.step i { font-style: normal; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--muted); font-weight: 900; }
.step.done i, .step.now i { background: var(--gold); color: var(--navy); }
.step span { font-size: .72rem; font-weight: 700; color: var(--muted); }
.step.now span { color: var(--ink); font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.phase { padding: 14px 0; border-top: 1px solid var(--line); }
.phase:first-child { border-top: 0; }
.phase.current h4 { color: var(--gold-ink); }
.phase h4 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.phase .meter { margin-top: 8px; height: 8px; }
.checks { list-style: none; padding: 0; margin: 10px 0 0; }
.checks label { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; font-weight: 600; }
.badges { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.badge { background: var(--soft); border-radius: 16px; padding: 12px 4px; text-align: center; color: var(--muted); }
.badge b { display: block; font-size: 1.1rem; }
.badge span { font-size: .72rem; font-weight: 700; }
.badge.hit { background: var(--gold); color: var(--navy); }

/* chart */
.sub-h { font-size: 1rem; margin-top: 18px !important; }
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 130px; align-items: end; }
.col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.bars { flex: 1; width: 100%; display: flex; align-items: flex-end; gap: 2px; justify-content: center; }
.bars i { width: 45%; border-radius: 4px 4px 0 0; min-height: 2px; }
.bars i.mood, .legend i.mood { background: var(--navy2); }
.bars i.crav, .legend i.crav { background: var(--gold); }
[data-theme="dark"] .bars i.mood, [data-theme="dark"] .legend i.mood { background: #7CD43F; }
.col small { color: var(--muted); font-size: .7rem; margin-top: 4px; }
.legend { color: var(--muted); font-size: .85rem; font-weight: 600; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; }

/* chips, posts, plans */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { border: 0; background: var(--card); color: var(--ink); border-radius: 999px; padding: 10px 16px; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; }
.stack { display: grid; gap: 14px; }
.post { display: grid; grid-template-columns: 110px 1fr; gap: 14px; text-decoration: none; padding: 14px; }
.post img { width: 110px; height: 110px; object-fit: cover; border-radius: 18px; }
.post h3 { font-size: 1.05rem; font-weight: 900; }
.post p { color: var(--muted); margin: 4px 0; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post small { color: var(--muted); font-weight: 600; }
.plan img { border-radius: 16px; aspect-ratio: 16/9; object-fit: cover; }
.plan h3 { font-size: 1.25rem; font-weight: 900; }
.price b { font-size: 2rem; font-weight: 900; }
.price { margin: 0; color: var(--muted); font-weight: 700; }
.fee { margin: 0; color: var(--muted); font-weight: 600; font-size: .92rem; }
.perks { padding-left: 20px; margin: 8px 0; } .perks li { margin: 4px 0; }
.plan .btn { width: 100%; }
.alert { background: var(--bad-bg); color: var(--bad); padding: 12px 16px; border-radius: 14px; font-weight: 700; }
.reading { list-style: none; padding: 0; columns: 2; }
.reading li { display: flex; justify-content: space-between; gap: 6px; padding: 6px 4px; break-inside: avoid; }
.reading label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.reading a { color: var(--navy2); font-weight: 700; text-decoration: none; }
[data-theme="dark"] .reading a { color: var(--gold); }
details summary { cursor: pointer; font-weight: 800; color: var(--navy2); margin-top: 6px; }
[data-theme="dark"] details summary { color: var(--gold); }

/* support */
.help { display: grid; gap: 10px; }
.help > * + * { margin-top: 0; }
.helpline { display: block; background: var(--soft); border-radius: 18px; padding: 16px 18px; text-decoration: none; }
.helpline b { display: block; font-weight: 900; font-size: 1.1rem; }
.helpline small { color: var(--muted); font-weight: 600; }
.helpline.urgent { background: var(--navy); color: #fff; }
.helpline.urgent small { color: #D4EFC4; }

/* tab bar */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 10px 6px calc(12px + env(safe-area-inset-bottom)); z-index: 10; }
.tabbar a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: .82rem; }
.tabbar span { font-size: 1.6rem; line-height: 1; font-weight: 900; }
.tabbar a[aria-current] { color: var(--navy); font-weight: 900; }
[data-theme="dark"] .tabbar a[aria-current] { color: var(--gold); }

/* sub pages */
.back { display: inline-block; color: #fff; text-decoration: none; font-weight: 800; }
.cover { border-radius: var(--r); width: 100%; max-height: 260px; object-fit: cover; }
.prose { line-height: 1.65; font-size: 1.05rem; }
.prose img { border-radius: 16px; }
.prose blockquote { border-left: 4px solid var(--gold); margin: 14px 0; padding: 4px 16px; font-weight: 700; }