/* Zerotin design system. Tokens first, then base, layout, components, views, motion. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#f5f8ef, #0a0e0b);
  --surface: light-dark(#ffffff, #121812);
  --surface-2: light-dark(#eef3e4, #182018);
  --ink: light-dark(#101612, #eef4e6);
  --muted: light-dark(#5b6a52, #9aa990);
  --line: light-dark(#dfe7d3, #263023);
  --mint: light-dark(#86cc14, #b0f12b);
  --lime: #b0f12b;
  --mint-deep: light-dark(#3d6b05, #c3f553);
  --mint-pale: light-dark(#eaf8cc, rgba(176, 241, 43, .13));
  --sky: #6cc6ec;
  --sky-pale: light-dark(#e5f5fc, rgba(108, 198, 236, .12));
  --sky-ink: light-dark(#1b6485, #8fd7f4);
  --sun: #ffd25a;
  --sun-pale: light-dark(#fff4d6, rgba(255, 210, 90, .12));
  --sun-ink: light-dark(#6a4a00, #ffdc7c);
  --coral: #ee7b69;
  --coral-pale: light-dark(#ffeee9, rgba(238, 123, 105, .13));
  --coral-ink: light-dark(#a53f2e, #ff9f8f);
  --deep: light-dark(#121a12, #0d130d);
  --deep-ink: #eef4e6;
  --deep-muted: #a9b89e;
  --btn-bg: light-dark(#121912, #eef4e6);
  --btn-ink: light-dark(#ffffff, #0a0e0b);
  --glass: light-dark(rgba(255, 255, 255, .74), rgba(17, 34, 32, .74));
  --glass-line: light-dark(rgba(255, 255, 255, .8), rgba(255, 255, 255, .07));
  --shadow: light-dark(0 20px 44px -22px rgba(34, 56, 12, .28), 0 20px 44px -22px rgba(0, 0, 0, .65));
  --shadow-lg: light-dark(0 34px 80px -30px rgba(34, 56, 12, .38), 0 34px 80px -30px rgba(0, 0, 0, .8));
  --focus: light-dark(#14688f, #8fd7f4);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --font-display: "Outfit", "Geist", ui-rounded, system-ui, sans-serif;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* tree palette, switched by [data-tree] */
  --leaf-a: #9be04a; --leaf-b: #d3f59b; --leaf-c: #6fb92f; --trunk: #7a5a3a; --trunk-2: #5b4128; --fruit: #ffd25a; --ground: light-dark(#e3f3c4, #1c2a17);
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-tree="blossom"] { --leaf-a: #f19bb2; --leaf-b: #f9cfdc; --leaf-c: #e0758f; --fruit: #fff1b8; --ground: light-dark(#f8d9e2, #3a2530); }
:root[data-tree="autumn"] { --leaf-a: #f0a247; --leaf-b: #f8cf85; --leaf-c: #dd7a3a; --trunk: #8a5a3b; --trunk-2: #6a4129; --fruit: #c8442f; --ground: light-dark(#f6dfbd, #3a2e1a); }
:root[data-tree="moon"] { --leaf-a: #7ec4d6; --leaf-b: #c3eaf3; --leaf-c: #5aa6bd; --trunk: #56798a; --trunk-2: #3e5d6c; --fruit: #f4f1c9; --ground: light-dark(#cfe6ee, #1a3038); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; }
a { color: var(--mint-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
::selection { background: color-mix(in srgb, var(--mint) 40%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.tnum { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: .78rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--mint-deep); margin-bottom: 10px; }
.muted { color: var(--muted); }

/* ambient background */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; will-change: transform; }
.aurora i:nth-child(1) { width: 62vmax; height: 62vmax; left: -22vmax; top: -30vmax; background: radial-gradient(closest-side, light-dark(rgba(176, 241, 43, .22), rgba(176, 241, 43, .13)), transparent); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 56vmax; height: 56vmax; right: -24vmax; top: 6vmax; background: radial-gradient(closest-side, light-dark(rgba(108, 198, 236, .22), rgba(108, 198, 236, .10)), transparent); animation: drift-b 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 46vmax; height: 46vmax; left: 20vmax; bottom: -30vmax; background: radial-gradient(closest-side, light-dark(rgba(255, 210, 90, .22), rgba(255, 210, 90, .07)), transparent); animation: drift-a 38s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate3d(8vmax, 6vmax, 0); } }
@keyframes drift-b { to { transform: translate3d(-9vmax, 8vmax, 0); } }

/* shell + header */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 24px 140px; }
.app-header { position: sticky; top: 0; z-index: 20; height: 74px; display: flex; align-items: center; gap: 12px; margin: 0 -24px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 1.28rem; letter-spacing: -.03em; }
.logo { width: 36px; height: 36px; }
.wordmark { height: 30px; width: auto; display: block; overflow: visible; }
.wordmark .seg { stroke-dasharray: 100; stroke-dashoffset: 100; animation: seg-draw 1.1s var(--ease-out) .25s forwards; }
@keyframes seg-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .wordmark .seg { animation: none; stroke-dashoffset: 0; } }
.brand:active .wordmark { transform: scale(.97); }
.header-spacer { flex: 1; }
.streak-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 11px; border-radius: 999px; background: var(--sun-pale); color: var(--sun-ink); font-weight: 650; font-size: .85rem; font-variant-numeric: tabular-nums; border: 1px solid color-mix(in srgb, var(--sun) 45%, transparent); }
.streak-pill .icon { color: #f0a500; width: 1.1em; height: 1.1em; }
.streak-pill[hidden] { display: none; }
.chip-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: .85rem; transition: transform 160ms var(--ease-out), border-color 160ms, background 160ms; }
.chip-btn:active { transform: scale(.97); }
.sos { display: inline-flex; align-items: center; gap: 7px; border: 0; color: #fff; background: linear-gradient(135deg, #f08a77, #e4624f); border-radius: 999px; font-weight: 700; letter-spacing: .02em; padding: 10px 17px; box-shadow: 0 10px 22px -10px rgba(228, 98, 79, .75); transition: transform 160ms var(--ease-out), box-shadow 200ms; position: relative; }
.sos::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(240, 138, 119, .6); animation: sos-ping 3.2s var(--ease-out) infinite; pointer-events: none; }
@keyframes sos-ping { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.35, 1.7); opacity: 0; } }
.sos:active { transform: scale(.96); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 16px; font-weight: 650; font-size: 1rem; letter-spacing: -.005em; background: var(--btn-bg); color: var(--btn-ink); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--btn-bg) 80%, transparent); transition: transform 160ms var(--ease-out), box-shadow 200ms, background 200ms, opacity 200ms; text-decoration: none; position: relative; }
.btn:active { transform: scale(.97); }
.btn.mint { background: linear-gradient(180deg, #c8f760, var(--lime)); color: #1b2b00; box-shadow: 0 12px 24px -12px rgba(120, 180, 20, .75), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.sun { background: linear-gradient(180deg, #ffdf7e, var(--sun)); color: #4a3200; box-shadow: 0 12px 24px -12px rgba(220, 160, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: .9rem; border-radius: 13px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .icon { width: 1.2em; height: 1.2em; }
.link-btn { border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-size: .88rem; padding: 6px 2px; }
.link-btn.danger { color: var(--coral-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: scale(.97); }
  .chip-btn:hover { border-color: var(--mint); }
  .sos:hover { box-shadow: 0 16px 30px -10px rgba(228, 98, 79, .85); transform: translateY(-1px); }
  .link-btn:hover { color: var(--ink); }
}

/* views */
.view { display: none; }
.view.active { display: block; animation: view-in 520ms var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.page-title { padding-top: 38px; max-width: 700px; }
.page-title h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; margin-bottom: 16px; }
.page-title p { color: var(--muted); font-size: 1.1rem; line-height: 1.6; max-width: 56ch; }

/* cards */
.card { position: relative; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); padding: 26px; min-width: 0; box-shadow: var(--shadow); isolation: isolate; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), color-mix(in srgb, var(--mint) 16%, transparent), transparent 62%); opacity: 0; transition: opacity 300ms; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .card:hover::before { opacity: 1; } }
.card.tint-mint { background: linear-gradient(160deg, var(--mint-pale), var(--surface) 85%); }
.card.tint-sun { background: linear-gradient(160deg, var(--sun-pale), var(--surface) 90%); }
.card.tint-sky { background: linear-gradient(160deg, var(--sky-pale), var(--surface) 90%); }
.card.tint-coral { background: linear-gradient(160deg, var(--coral-pale), var(--surface) 90%); }
.card.deep { background: radial-gradient(120% 120% at 100% 0%, #33521a, transparent 60%), var(--deep); color: var(--deep-ink); border-color: transparent; }
.card.deep .muted, .card.deep .label { color: var(--deep-muted); }
.label { color: var(--muted); font-size: .84rem; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.label .icon { width: 1.1em; height: 1.1em; }
.big-num { font-family: var(--font-display); font-weight: 600; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.small { font-size: .9rem; line-height: 1.5; color: var(--muted); }
.bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--mint), #b9ee52); transition: transform 1100ms var(--ease-out); }
.bar.sun > i { background: linear-gradient(90deg, #ffc23d, var(--sun)); }
.bar.sky > i { background: linear-gradient(90deg, #45b4e0, var(--sky)); }

/* ---------- LANDING ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 40px; align-items: center; padding: clamp(24px, 4vw, 54px) 0 30px; min-height: min(740px, calc(100dvh - 90px)); }
.hero h1 { font-size: clamp(3.1rem, 8vw, 6.4rem); line-height: .93; letter-spacing: -.055em; margin-bottom: 26px; max-width: 9.5ch; font-weight: 650; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--mint-deep), #6fae10 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.62; max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; padding: 0; list-style: none; color: var(--muted); font-size: .88rem; }
.hero-tags li { display: inline-flex; align-items: center; gap: 7px; }
.hero-tags .icon { color: var(--mint-deep); width: 1.05em; height: 1.05em; }
.hero-visual { position: relative; aspect-ratio: 1 / 1.04; max-height: 640px; display: grid; place-items: center; }
.hero-orb { position: absolute; inset: 4% 2% 8%; border-radius: 50%; background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--sun) 50%, transparent), transparent 40%), radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--mint) 30%, var(--surface)), color-mix(in srgb, var(--lime) 16%, var(--surface)) 75%); border: 1px solid var(--glass-line); box-shadow: var(--shadow-lg); animation: orb-float 9s ease-in-out infinite alternate; }
@keyframes orb-float { to { transform: translateY(-14px) scale(1.012); } }
.hero-tree { position: relative; width: 78%; z-index: 1; filter: drop-shadow(0 26px 24px rgba(40, 70, 10, .22)); transform: translate3d(var(--px, 0), var(--py, 0), 0); will-change: transform; }
.float-note { position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-line); font-size: .8rem; line-height: 1.3; color: var(--muted); animation: note-bob 6s ease-in-out infinite alternate; }
.float-note strong { display: block; font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.float-note .ni { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.float-note .ni .icon { width: 22px; height: 22px; }
.note-one { top: 9%; right: -2%; } .note-one .ni { background: var(--sun-pale); color: var(--sun-ink); }
.note-two { bottom: 14%; left: -3%; animation-delay: -2.2s; } .note-two .ni { background: var(--mint-pale); color: var(--mint-deep); }
.note-three { bottom: 2%; right: 6%; animation-delay: -4s; } .note-three .ni { background: var(--sky-pale); color: var(--sky-ink); }
@keyframes note-bob { to { transform: translateY(-9px); } }
.leaf-fall { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.leaf-fall i { position: absolute; top: -8%; width: 16px; height: 16px; border-radius: 0 80% 0 80%; background: var(--leaf-a); opacity: 0; animation: leaf-drift var(--d, 14s) linear infinite; animation-delay: var(--delay, 0s); left: var(--x, 50%); }
@keyframes leaf-drift { 0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; } 8% { opacity: .85; } 50% { transform: translate3d(40px, 55vh, 0) rotate(160deg); } 92% { opacity: .6; } 100% { transform: translate3d(-30px, 108vh, 0) rotate(340deg); opacity: 0; } }

.section { padding: clamp(56px, 9vw, 110px) 0 0; }
.section-head { max-width: 640px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.03; letter-spacing: -.035em; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; line-height: 1.6; }

.ticker { display: flex; overflow: hidden; margin: 6px -24px 0; padding: 16px 0; border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; flex: 0 0 auto; gap: 44px; padding-right: 44px; animation: ticker 48s linear infinite; }
.ticker span { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; color: var(--muted); font-size: .98rem; }
.ticker b { color: var(--ink); font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
.ticker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
@keyframes ticker { to { transform: translateX(-100%); } }

.calc { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.calc-controls { display: grid; gap: 28px; align-content: center; }
.range-field label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 14px; }
.range-field output { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; cursor: pointer; --fill: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--mint) var(--fill), color-mix(in srgb, var(--ink) 12%, transparent) var(--fill)); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
input[type=range]::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--mint); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: #fff; border: 3px solid var(--mint); box-shadow: 0 6px 14px -4px rgba(30, 60, 8, .45); transition: transform 160ms var(--ease-out); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--mint); box-shadow: 0 6px 14px -4px rgba(30, 60, 8, .45); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
.calc-out { display: grid; align-content: space-between; gap: 22px; }
.calc-out .big-num { font-size: clamp(3.2rem, 7vw, 5.4rem); }
.calc-rows { display: grid; gap: 0; }
.calc-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid color-mix(in srgb, var(--deep-ink) 14%, transparent); color: var(--deep-muted); }
.calc-rows b { color: var(--deep-ink); font-variant-numeric: tabular-nums; font-weight: 650; }

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.bento .card { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 290px; }
.bento h3 { font-size: 1.6rem; letter-spacing: -.03em; margin: 10px 0 8px; line-height: 1.1; }
.bento p { color: var(--muted); margin: 0; max-width: 40ch; }
.b-body { margin: 10px 0 8px; } .b-body + p { margin-top: 0; }
.b1 { grid-column: span 4; } .b2 { grid-column: span 2; } .b3 { grid-column: span 2; } .b4 { grid-column: span 4; }
.mini-bars { display: grid; gap: 11px; }
.mini-bars > div { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; font-size: .84rem; color: var(--muted); }
.mini-bars b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 650; }
.mini-orb { width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #eafff7 0 10%, var(--mint) 60%, #68b012); box-shadow: 0 14px 30px -10px rgba(130, 190, 30, .55); animation: orb-mini 6s var(--ease-in-out) infinite; }
@keyframes orb-mini { 0%, 100% { transform: scale(.82); } 45%, 60% { transform: scale(1.08); } }
.mini-forest { display: flex; align-items: flex-end; gap: 8px; height: 64px; }
.mini-forest svg { width: 34px; height: auto; transform-origin: bottom; animation: sway 5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.7s); }
.mini-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-badges span { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--sun-pale); color: var(--sun-ink); border: 1px solid color-mix(in srgb, var(--sun) 40%, transparent); }
.mini-badges span.off { background: var(--surface-2); color: var(--muted); border-color: var(--line); opacity: .7; }

.steps-list { display: grid; gap: 0; counter-reset: s; }
.step-row { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 34px 0; border-top: 1px solid var(--line); align-items: start; }
.step-row:last-child { border-bottom: 1px solid var(--line); }
.step-row .num { font-family: var(--font-display); font-size: 4.6rem; line-height: .85; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1.5px var(--mint); }
.step-row h3 { font-size: 1.6rem; letter-spacing: -.03em; margin-bottom: 8px; }
.step-row p { color: var(--muted); max-width: 54ch; margin: 0; }
.step-row:nth-child(even) { padding-left: clamp(0px, 12vw, 160px); }

.h-scroll { display: flex; gap: 14px; overflow-x: auto; margin: 0 -24px; padding: 4px 24px 26px; scroll-snap-type: x proximity; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.tl-card { flex: 0 0 min(300px, 78vw); scroll-snap-align: start; padding: 24px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tl-card .when { font-family: var(--font-display); font-size: 2.1rem; letter-spacing: -.04em; color: var(--mint-deep); line-height: 1; margin-bottom: 14px; }
.tl-card h3 { font-size: 1.15rem; margin-bottom: 6px; letter-spacing: -.02em; }
.tl-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.faq { display: grid; gap: 0; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 2px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 550; letter-spacing: -.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 300ms var(--ease-out); color: var(--mint-deep); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details > div { padding: 0 2px 24px; color: var(--muted); max-width: 64ch; animation: view-in 400ms var(--ease-out) both; }
.cta-band { margin-top: clamp(56px, 9vw, 110px); border-radius: 36px; padding: clamp(36px, 7vw, 80px); position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
.cta-band h2 { font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -.04em; line-height: 1; margin-bottom: 16px; }
.cta-band p { color: var(--deep-muted); max-width: 44ch; margin-bottom: 26px; }
.cta-band .mini-tree { width: min(260px, 70%); justify-self: center; opacity: .95; }
.footer { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; line-height: 1.6; display: grid; gap: 8px; max-width: 760px; }

/* ---------- ONBOARDING ---------- */
.onboard { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; max-width: 1020px; margin: 34px auto 0; align-items: start; }
.onboard-main { padding: clamp(26px, 5vw, 50px); min-height: 560px; display: flex; flex-direction: column; }
.steps { display: flex; gap: 6px; margin-bottom: 36px; }
.steps i { height: 5px; flex: 1; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); position: relative; overflow: hidden; }
.steps i::after { content: ""; position: absolute; inset: 0; background: var(--mint); transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease-out); }
.steps i.done::after { transform: scaleX(1); }
.form-step { display: none; flex: 1; }
.form-step.active { display: block; animation: step-in 480ms var(--ease-out) both; }
.form-step.back.active { animation-name: step-in-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes step-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.form-step h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.04em; line-height: 1.02; margin-bottom: 14px; }
.form-step > p { color: var(--muted); font-size: 1.05rem; max-width: 46ch; }
.field { margin-top: 26px; }
.field > label, .field-label { display: block; font-size: .86rem; font-weight: 650; color: var(--muted); margin-bottom: 9px; }
.text-input, .field textarea, .field select, .field input[type=datetime-local] { width: 100%; padding: 15px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1.1rem; transition: border-color 160ms, box-shadow 160ms; outline: none; }
.text-input:focus, .field textarea:focus, .field input:focus-visible { border-color: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 22%, transparent); }
.field textarea { resize: vertical; min-height: 96px; font-size: 1rem; line-height: 1.5; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.stepper button { width: 60px; height: 60px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; transition: transform 160ms var(--ease-out), border-color 160ms, background 160ms; flex: 0 0 auto; }
.stepper button:active { transform: scale(.92); }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { border-color: var(--mint); background: var(--mint-pale); } }
.stepper output { font-family: var(--font-display); font-size: clamp(3.4rem, 10vw, 5.2rem); letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; flex: 1; }
.stepper small { display: block; font-family: var(--font); font-size: .9rem; letter-spacing: 0; color: var(--muted); margin-top: 4px; font-weight: 500; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.choice { border: 1.5px solid var(--line); background: var(--surface); border-radius: 20px; text-align: left; padding: 18px; min-height: 100px; display: grid; gap: 10px; align-content: space-between; font-weight: 650; transition: transform 160ms var(--ease-out), border-color 160ms, background 160ms, box-shadow 200ms; }
.choice .icon { width: 26px; height: 26px; color: var(--mint-deep); }
.choice:active { transform: scale(.97); }
.choice.selected { background: var(--mint-pale); border-color: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 18%, transparent); }
@media (hover: hover) and (pointer: fine) { .choice:hover { border-color: var(--mint); transform: translateY(-2px); } }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 15px; font-weight: 600; font-size: .92rem; transition: transform 160ms var(--ease-out), background 160ms, border-color 160ms; }
.pill:active { transform: scale(.96); }
.pill.selected { background: var(--mint-pale); border-color: var(--mint); color: var(--mint-deep); }
.form-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 34px; }
.onboard-side { position: sticky; top: 96px; padding: 26px; display: grid; gap: 20px; }
.onboard-side .big-num { font-size: 3rem; }
.side-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--deep-ink) 14%, transparent); color: var(--deep-muted); font-size: .92rem; }
.side-row b { color: var(--deep-ink); font-variant-numeric: tabular-nums; }
.error-text { color: var(--coral-ink); font-size: .88rem; min-height: 22px; margin: 10px 0 0; }

/* ---------- DASHBOARD ---------- */
.welcome { padding: 34px 0 26px; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.welcome h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.04em; line-height: 1; margin: 0; }
.welcome p { color: var(--muted); margin: 10px 0 0; font-size: 1.05rem; }
.dash { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .95fr); grid-template-areas: "time time tree" "money health tree" "quests checkin level" "stats stats thought"; }
.a-time { grid-area: time; } .a-tree { grid-area: tree; } .a-money { grid-area: money; } .a-health { grid-area: health; } .a-quests { grid-area: quests; } .a-checkin { grid-area: checkin; } .a-level { grid-area: level; } .a-stats { grid-area: stats; } .a-thought { grid-area: thought; }
.clock { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: clamp(14px, 3vw, 34px); margin: 22px 0 24px; }
.clock div { display: grid; gap: 6px; }
.clock b { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: .9; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.clock span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--deep-muted); }
.next-line { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--deep-ink) 14%, transparent); }
.next-line .bar { background: rgba(255, 255, 255, .13); }
.next-line p { margin: 0; color: var(--deep-muted); font-size: .92rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.next-line b { color: var(--deep-ink); }
.a-tree { display: flex; flex-direction: column; justify-content: space-between; min-height: 420px; background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 16%, var(--surface)), var(--mint-pale) 70%); }
.tree-stage { position: relative; flex: 1; display: grid; place-items: end center; margin: 6px -10px 14px; min-height: 250px; }
.tree-stage::before { content: ""; position: absolute; bottom: 8px; width: 78%; height: 44px; border-radius: 50%; background: var(--ground); filter: blur(1px); }
.tree-stage .tree { position: relative; width: min(100%, 300px); }
.tree-meta { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.tree-meta h2 { font-size: 1.7rem; letter-spacing: -.035em; margin: 6px 0 0; line-height: 1.05; }
.lvl-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: .8rem; }
.a-money .big-num { font-size: clamp(2.8rem, 4.6vw, 4.2rem); margin: 18px 0 8px; }
.a-money { display: flex; flex-direction: column; justify-content: space-between; }
.goal-line { display: grid; gap: 9px; margin-top: 20px; }
.goal-line p { margin: 0; display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; color: var(--sun-ink); }
.ring-wrap { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.ring { width: 112px; height: 112px; flex: 0 0 auto; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .trk { stroke: color-mix(in srgb, var(--ink) 10%, transparent); }
.ring .val { stroke: var(--sky); stroke-dasharray: 289; stroke-dashoffset: calc(289 - 289 * var(--p, 0)); transition: stroke-dashoffset 1400ms var(--ease-out); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.a-health h3 { font-size: 1.28rem; letter-spacing: -.025em; margin: 0 0 6px; line-height: 1.15; }
.quest-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 11px 14px 11px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform 160ms var(--ease-out), background 200ms, border-color 200ms, opacity 200ms; }
.quest:active { transform: scale(.98); }
.quest .tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: background 220ms var(--ease-out), border-color 220ms, color 220ms, transform 300ms var(--ease-out); }
.quest .tick .icon { width: 15px; height: 15px; stroke-width: 3; }
.quest b { font-weight: 600; font-size: .95rem; line-height: 1.25; display: block; }
.quest small { color: var(--muted); font-size: .8rem; }
.quest em { font-style: normal; font-weight: 700; font-size: .78rem; color: var(--sun-ink); background: var(--sun-pale); border-radius: 99px; padding: 4px 9px; font-variant-numeric: tabular-nums; }
.quest.done { background: var(--mint-pale); border-color: color-mix(in srgb, var(--mint) 45%, transparent); }
.quest.done .tick { background: var(--mint); border-color: var(--mint); color: #1b2b00; transform: scale(1.06); }
.quest.done b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); color: var(--muted); }
.quest-foot { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 18px 0; }
.week div { display: grid; justify-items: center; gap: 7px; font-size: .72rem; font-weight: 650; color: var(--muted); }
.week i { width: 100%; max-width: 36px; aspect-ratio: 1; border-radius: 12px; background: color-mix(in srgb, var(--ink) 8%, transparent); display: grid; place-items: center; color: transparent; transition: background 300ms var(--ease-out), transform 300ms var(--ease-out); }
.week i .icon { width: 16px; height: 16px; stroke-width: 3; }
.week .on i { background: var(--mint); color: #1b2b00; }
.week .today i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--mint); }
.streak-big { display: flex; align-items: baseline; gap: 8px; }
.streak-big b { font-family: var(--font-display); font-size: 2.8rem; letter-spacing: -.05em; line-height: 1; font-weight: 600; }
.a-level .big-num { font-size: 2.3rem; margin: 12px 0 14px; }
.a-level .bar { margin-bottom: 10px; }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stats-strip div { padding: 0 18px; border-left: 1px solid var(--line); }
.stats-strip div:first-child { padding-left: 0; border-left: 0; }
.stats-strip b { display: block; font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.04em; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 6px; }
.a-stats { display: flex; align-items: center; }
.a-stats .stats-strip { width: 100%; }
.a-thought h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.025em; margin: 10px 0; }
.a-thought p.fact { color: var(--sky-ink); margin: 0; line-height: 1.55; font-size: .95rem; }

/* ---------- IMPACT ---------- */
.impact-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.im-a { grid-column: span 3; } .im-b { grid-column: span 3; } .im-c { grid-column: span 4; } .im-d { grid-column: span 2; } .im-e { grid-column: span 6; }
.impact-grid .card { min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.impact-grid .big-num { font-size: clamp(2.8rem, 6vw, 4.6rem); margin: 14px 0 8px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .area { fill: url(#gArea); }
.chart .line { fill: none; stroke: var(--mint-deep); stroke-width: 3; stroke-linecap: round; stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); }
.chart.in .line { transition: stroke-dashoffset 1800ms var(--ease-out); stroke-dashoffset: 0; }
.chart .proj { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .goal { stroke: var(--sun); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .now { fill: var(--surface); stroke: var(--mint-deep); stroke-width: 3; }
.landmark { position: relative; height: 56px; margin-top: 8px; }
.landmark .track { position: absolute; left: 0; right: 0; top: 24px; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.landmark .fill { position: absolute; left: 0; top: 24px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--sky), var(--mint)); transform-origin: left; transform: scaleX(var(--p, 0)); width: 100%; transition: transform 1400ms var(--ease-out); }
.landmark .lm { position: absolute; top: 0; transform: translateX(-100%); text-align: right; font-size: .78rem; color: var(--muted); right: 0; }
.motive-quote { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.03em; line-height: 1.2; margin: 14px 0 0; }
.impact-note { margin-top: 24px; color: var(--muted); font-size: .8rem; line-height: 1.55; max-width: 76ch; }

/* ---------- HEALTH ---------- */
.health-now { margin-top: 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: clamp(26px, 5vw, 46px); }
.health-now h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.04em; line-height: 1.05; margin: 8px 0 12px; }
.health-now p { color: var(--deep-muted); max-width: 52ch; margin: 0; }
.health-now .ring { width: 150px; height: 150px; }
.health-now .ring .val { stroke: var(--sun); }
.health-now .ring .trk { stroke: rgba(255, 255, 255, .14); }
.health-now .ring span { font-size: 2rem; color: var(--deep-ink); }
.timeline { position: relative; margin: 34px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.stage { position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 18px; }
.stage .node { position: relative; display: flex; justify-content: center; }
.stage .node::before { content: ""; position: absolute; top: 54px; bottom: -14px; width: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.stage:last-child .node::before { display: none; }
.stage .dot { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); position: relative; z-index: 1; transition: background 400ms, color 400ms, border-color 400ms, transform 500ms var(--ease-out); }
.stage.reached .dot { background: var(--mint); border-color: var(--mint); color: #1b2b00; }
.stage.reached .node::before { background: var(--mint); }
.stage .body { padding: 18px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.stage.reached .body { background: var(--mint-pale); border-color: color-mix(in srgb, var(--mint) 40%, transparent); }
.stage.current .body { border-color: var(--sky); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 20%, transparent); }
.stage .when { color: var(--mint-deep); font-weight: 700; font-size: .84rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.stage .when em { font-style: normal; color: var(--muted); font-weight: 600; }
.stage h3 { margin: 6px 0 5px; font-size: 1.22rem; letter-spacing: -.025em; }
.stage p { margin: 0; color: var(--muted); font-size: .95rem; }
.stage .bar { margin-top: 12px; height: 7px; }
.health-source { color: var(--muted); font-size: .84rem; line-height: 1.55; margin-top: 26px; max-width: 70ch; }

/* ---------- FOREST ---------- */
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); margin: 30px 0 22px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; padding: 10px 17px; border-radius: 13px; font-weight: 650; font-size: .92rem; color: var(--muted); white-space: nowrap; transition: background 200ms, color 200ms, transform 160ms var(--ease-out); }
.seg button:active { transform: scale(.96); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px -4px rgba(16, 70, 60, .25); }
.pane { display: none; } .pane.active { display: block; animation: view-in 440ms var(--ease-out) both; }
.level-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.level-hero .big-num { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 14px 0; }
.level-ladder { display: grid; gap: 0; }
.level-ladder li { list-style: none; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid color-mix(in srgb, var(--deep-ink) 14%, transparent); color: var(--deep-muted); font-size: .94rem; }
.level-ladder ul { margin: 0; padding: 0; }
.level-ladder li .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.level-ladder li.cur { color: var(--deep-ink); font-weight: 650; } .level-ladder li.cur .n { background: var(--sun); color: #4a3200; }
.level-ladder li.past .n { background: var(--mint); color: #1b2b00; }
.forest-field { position: relative; margin-top: 18px; padding: 26px; min-height: 280px; background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 15%, var(--surface)), var(--mint-pale)); }
.forest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px 4px; align-items: end; }
.forest-grid svg { width: 100%; height: auto; transform-origin: 50% 100%; animation: pop-tree 700ms var(--ease-out) both, sway 6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 28ms), calc(var(--i) * -.4s); }
@keyframes pop-tree { from { opacity: 0; transform: translateY(14px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes sway { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.forest-caption { margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.badge { position: relative; border-radius: 24px; padding: 20px; min-height: 196px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 14px; text-align: left; overflow: hidden; transition: transform 200ms var(--ease-out), box-shadow 200ms; }
.badge:active { transform: scale(.98); }
.badge-icon { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.badge-icon .icon { width: 26px; height: 26px; }
.badge strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -.02em; line-height: 1.15; }
.badge small { color: var(--muted); font-size: .84rem; line-height: 1.4; display: block; margin-top: 4px; }
.badge .bar { height: 6px; margin-top: 12px; }
.badge.locked .badge-icon { filter: saturate(.3); }
.badge.earned { background: linear-gradient(160deg, var(--sun-pale), var(--surface) 80%); border-color: color-mix(in srgb, var(--sun) 50%, transparent); }
.badge.earned .badge-icon { background: linear-gradient(145deg, #ffe58f, var(--sun)); color: #4a3200; box-shadow: 0 10px 20px -10px rgba(230, 170, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .6); }
.badge.earned::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); animation: shine 5.5s var(--ease-in-out) infinite; animation-delay: calc(var(--i) * .35s); pointer-events: none; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.reward-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.reward-list { display: grid; gap: 10px; margin-top: 16px; }
.reward { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.reward .ri { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.reward.ready { background: var(--sun-pale); border-color: color-mix(in srgb, var(--sun) 55%, transparent); } .reward.ready .ri { background: var(--sun); color: #4a3200; }
.reward.claimed { background: var(--mint-pale); } .reward.claimed .ri { background: var(--mint); color: #1b2b00; }
.reward b { display: block; line-height: 1.25; } .reward small { color: var(--muted); font-size: .82rem; }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.theme-card { border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface); padding: 12px; display: grid; gap: 8px; justify-items: center; text-align: center; font-weight: 600; font-size: .9rem; transition: transform 160ms var(--ease-out), border-color 160ms; }
.theme-card:active { transform: scale(.97); }
.theme-card svg { width: 76px; height: auto; }
.theme-card small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; }
.theme-card.selected { border-color: var(--mint); background: var(--mint-pale); }
.theme-card.locked { opacity: .55; }

/* ---------- ME ---------- */
.me-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 34px; align-items: start; }
.me-grid h2 { font-size: 1.5rem; letter-spacing: -.03em; margin: 8px 0 4px; }
.form-stack { display: grid; gap: 4px; }
.form-stack .field { margin-top: 16px; }
.mood-dots { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.mood-dots i { width: 22px; height: 22px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.mood-dots i[data-m="1"] { background: var(--mint); } .mood-dots i[data-m="2"] { background: #cdeb94; } .mood-dots i[data-m="3"] { background: var(--sun); } .mood-dots i[data-m="4"] { background: var(--coral); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.theme-seg { display: inline-flex; margin: 12px 0 0; }

/* ---------- NAV ---------- */
.bottom-nav { position: fixed; left: 50%; bottom: 20px; z-index: 30; transform: translateX(-50%); border: 1px solid var(--glass-line); background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); box-shadow: 0 18px 44px -14px rgba(10, 60, 50, .4), inset 0 1px 0 var(--glass-line); border-radius: 24px; padding: 6px; display: flex; gap: 2px; }
.nav-pill { position: absolute; left: 0; top: 6px; bottom: 6px; width: 70px; border-radius: 18px; background: var(--mint-pale); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mint) 35%, transparent); transform: translateX(var(--x, 6px)); width: var(--w, 70px); transition: transform 420ms var(--ease-drawer), width 420ms var(--ease-drawer); pointer-events: none; }
.nav-button { position: relative; color: var(--muted); border: 0; background: transparent; border-radius: 18px; padding: 9px 14px; min-width: 72px; display: grid; justify-items: center; gap: 3px; font-size: .7rem; font-weight: 650; transition: color 200ms, transform 160ms var(--ease-out); }
.nav-button .icon { width: 22px; height: 22px; }
.nav-button:active { transform: scale(.94); }
.nav-button.active { color: var(--mint-deep); }
.nav-dot { position: absolute; top: 7px; right: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px var(--surface); }
.nav-dot[hidden] { display: none; }

/* ---------- DIALOGS ---------- */
dialog { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 20px; border: 0; background: rgba(8, 14, 6, .52); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); opacity: 0; transition: opacity 240ms ease; overflow: auto; }
dialog[open] { display: grid; place-items: center; }
dialog.in { opacity: 1; }
dialog::backdrop { background: transparent; }
.dlg-card { position: relative; width: min(100%, 460px); border-radius: 32px; padding: 34px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(18px) scale(.96); transition: transform 380ms var(--ease-out); }
dialog.in .dlg-card { transform: none; }
.dlg-card h2 { font-size: 1.9rem; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 10px; }
.dlg-card > p, .dlg-card .lead { color: var(--muted); line-height: 1.55; }
.close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; transition: transform 160ms var(--ease-out), background 160ms; z-index: 2; }
.close:active { transform: scale(.92); }
.sheet { align-items: end; padding-bottom: 0; }
dialog.sheet[open] { place-items: end center; }
dialog.sheet .dlg-card { border-radius: 32px 32px 0 0; width: min(100%, 560px); transform: translateY(100%); transition: transform 460ms var(--ease-drawer); padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
dialog.sheet.in .dlg-card { transform: none; }
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0; }
.mood { border: 1.5px solid var(--line); background: var(--surface); border-radius: 20px; padding: 14px 6px; display: grid; justify-items: center; gap: 8px; font-weight: 600; font-size: .8rem; transition: transform 160ms var(--ease-out), border-color 160ms, background 160ms; }
.mood .icon { width: 34px; height: 34px; stroke-width: 1.6; }
.mood:active { transform: scale(.95); }
.mood.selected { border-color: var(--mint); background: var(--mint-pale); color: var(--mint-deep); }
.auth-tabs { display: flex; gap: 6px; margin: 22px 0; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.auth-tab { flex: 1; border: 0; color: var(--muted); border-radius: 12px; padding: 11px; background: transparent; font-weight: 650; transition: background 200ms, color 200ms; }
.auth-tab.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 8px rgba(30, 50, 10, .12); }
.account-view { display: none; } .account-view.active { display: block; }
.celebrate { text-align: center; padding-top: 44px; overflow: hidden; }
.celebrate .badge-icon { width: 96px; height: 96px; border-radius: 32px; margin: 0 auto 22px; background: linear-gradient(145deg, #ffe58f, var(--sun)); color: #4a3200; box-shadow: 0 20px 40px -14px rgba(230, 170, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .6); animation: badge-pop 900ms var(--ease-out) both; }
.celebrate .badge-icon .icon { width: 46px; height: 46px; }
@keyframes badge-pop { 0% { transform: scale(.6) rotate(-14deg); opacity: 0; } 55% { transform: scale(1.1) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.celebrate .rays { position: absolute; left: 50%; top: 40px; width: 320px; height: 320px; margin-left: -160px; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--sun) 28%, transparent) 0 8deg, transparent 8deg 24deg); -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent); animation: spin 24s linear infinite; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.celebrate .xp { display: inline-block; margin: 6px 0 22px; padding: 6px 14px; border-radius: 99px; background: var(--sun-pale); color: var(--sun-ink); font-weight: 700; }

/* SOS */
.sos-dialog { padding: 0; background: radial-gradient(120% 90% at 50% 0%, #3a5a14, #121c10 60%, #0a1209); color: #eef4e6; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sos-dialog[open] { display: block; }
.sos-inner { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; max-width: 560px; margin: 0 auto; padding: 20px 24px calc(24px + env(safe-area-inset-bottom)); }
.sos-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sos-top .seg { margin: 0; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); }
.sos-top .seg button { color: #b3c2a8; padding: 9px 14px; }
.sos-top .seg button.active { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.sos-dialog .close { position: static; background: rgba(255, 255, 255, .12); color: #fff; }
.sos-body { display: grid; place-items: center; text-align: center; align-content: center; gap: 18px; padding: 10px 0; }
.sos-pane { display: none; width: 100%; } .sos-pane.active { display: block; animation: view-in 420ms var(--ease-out) both; }
.orb-stage { position: relative; width: min(66vw, 300px); aspect-ratio: 1; margin: 0 auto 8px; display: grid; place-items: center; }
.orb-stage .ring-o { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(160, 235, 215, .35); animation: ring-out 7s var(--ease-out) infinite; }
.orb-stage .ring-o:nth-child(2) { animation-delay: -2.3s; } .orb-stage .ring-o:nth-child(3) { animation-delay: -4.6s; }
@keyframes ring-out { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.breath-orb { position: relative; width: 62%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 26%, #f1fffa 0 8%, #c9f76a 38%, #7cc61e 78%); box-shadow: 0 0 80px 10px rgba(190, 245, 70, .32), inset 0 -12px 30px rgba(10, 100, 80, .35); transform: scale(.72); transition: transform 4000ms cubic-bezier(.45, 0, .25, 1); }
.breath-orb.inhale { transform: scale(1.18); } .breath-orb.hold { transform: scale(1.18); transition-duration: 4000ms; } .breath-orb.exhale { transform: scale(.72); transition-duration: 6000ms; }
.breath-cue { font-family: var(--font-display); font-size: 2.2rem; letter-spacing: -.035em; min-height: 2.6rem; }
.timer { font-family: var(--font-mono); font-size: 1.1rem; color: #b3c2a8; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.sos-sub { color: #b3c2a8; max-width: 36ch; margin: 0 auto; }
.dur-row { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.dur-row .pill { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #e6f2d2; }
.dur-row .pill.selected { background: rgba(127, 227, 200, .22); border-color: #c9f76a; color: #fff; }
.sos-foot { display: grid; gap: 10px; }
.sos-foot .btn.mint { width: 100%; }
.sos-foot .btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.ground-list { display: grid; gap: 10px; text-align: left; margin: 0; padding: 0; list-style: none; }
.ground-list button { width: 100%; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 20px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; text-align: left; transition: transform 160ms var(--ease-out), background 220ms, opacity 220ms; }
.ground-list button:active { transform: scale(.98); }
.ground-list .gn { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; letter-spacing: -.05em; color: #c9f76a; text-align: center; }
.ground-list b { display: block; } .ground-list small { color: #b3c2a8; }
.ground-list button.done { background: rgba(127, 227, 200, .2); opacity: .7; } .ground-list button.done .gn { color: #fff; }
.why-card { padding: 26px; border-radius: 26px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); text-align: left; }
.why-card blockquote { margin: 12px 0 0; font-family: var(--font-display); font-size: 1.55rem; line-height: 1.22; letter-spacing: -.025em; }
.why-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.why-facts div { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); color: #b3c2a8; font-size: .85rem; } .why-facts b { display: block; color: #fff; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.03em; }
.crisis { margin-top: 6px; font-size: .84rem; color: #b3c2a8; } .crisis a { color: #c9f76a; }
.sos-done { text-align: center; } .sos-done h2 { font-size: 2.4rem; letter-spacing: -.04em; }

/* toast + confetti */
.toast { position: fixed; left: 50%; bottom: 108px; z-index: 80; transform: translate(-50%, 18px) scale(.97); opacity: 0; pointer-events: none; background: var(--btn-bg); color: var(--btn-ink); border-radius: 18px; padding: 13px 20px 13px 16px; font-weight: 600; font-size: .92rem; transition: transform 320ms var(--ease-out), opacity 240ms; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; max-width: min(92vw, 460px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .icon { color: var(--mint); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 120; }
.confirm-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; } .confirm-actions .btn { flex: 1; }

/* tree svg */
.tree { display: block; width: 100%; height: auto; overflow: visible; }
.tree .cw { transform-box: view-box; transform-origin: 100px 160px; transition: opacity 900ms var(--ease-out), transform 1300ms var(--ease-out); }
.tree .trunkfill { fill: var(--trunk); }
.tree .trunk { transform-origin: 100px 216px; transform: scaleY(var(--ts, 1)); transition: transform 1200ms var(--ease-out); }
.tree .crown { transform-origin: 100px 130px; animation: sway 7s ease-in-out infinite alternate; transition: opacity 800ms var(--ease-out), transform 1200ms var(--ease-out); }
.tree .crown.c2 { animation-duration: 9s; animation-delay: -2s; }
.tree .crown.c3 { animation-duration: 8s; animation-delay: -4s; }
.leaf-a { fill: var(--leaf-a); } .leaf-b { fill: var(--leaf-b); } .leaf-c { fill: var(--leaf-c); }
.wood { fill: none; stroke: var(--trunk); stroke-linecap: round; }
.tree .root { fill: none; stroke: var(--trunk-2); stroke-linecap: round; }
.tree .fruit { fill: var(--fruit); }
.tree .sprout-leaf { fill: var(--leaf-a); transform-origin: 100px 190px; animation: sway 4s ease-in-out infinite alternate; }
.tree[data-stage="0"] :is(.s1, .s2, .s3, .s4), .tree[data-stage="1"] :is(.s2, .s3, .s4), .tree[data-stage="2"] :is(.s3, .s4), .tree[data-stage="3"] .s4 { opacity: 0; transform: scale(.7); }
.tree:not([data-stage="0"]) .s0 { opacity: 0; }
.tree[data-stage="0"] { --ts: .5; } .tree[data-stage="1"] { --ts: .78; } .tree[data-stage="2"] { --ts: .92; }
.tree .fruit { animation: fruit-pulse 3.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes fruit-pulse { to { transform: scale(1.25); } }
.tree[data-stage="1"] .cw1 { transform: translateY(18px) scale(.55); }
.tree[data-stage="2"] :is(.cw1, .cw2) { transform: translateY(10px) scale(.85); }

/* responsive */
@media (max-width: 1020px) {
  .dash { grid-template-columns: 1fr 1fr; grid-template-areas: "time time" "tree money" "tree health" "quests checkin" "level thought" "stats stats"; }
  .onboard { grid-template-columns: 1fr; } .onboard-side { position: static; order: -1; padding: 18px 22px; } .onboard-side .side-hide { display: none; }
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 14px; } .hero-visual { max-width: 460px; margin: 0 auto; width: 100%; order: -1; }
  .calc, .level-hero, .reward-split, .me-grid, .cta-band { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; } .b1, .b4 { grid-column: span 2; } .b2, .b3 { grid-column: span 1; }
  .impact-grid { grid-template-columns: 1fr; } .im-a, .im-b, .im-c, .im-d, .im-e { grid-column: auto; }
  .step-row:nth-child(even) { padding-left: 0; } .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .health-now { grid-template-columns: 1fr; } .health-now .ring { order: -1; }
}
@media (max-width: 620px) {
  .shell { padding: 0 16px 128px; } .app-header { margin: 0 -16px; padding: 0 16px; height: 66px; } .ticker, .h-scroll { margin-left: -16px; margin-right: -16px; } .h-scroll { padding-left: 16px; padding-right: 16px; }
  .brand span { font-size: 1.15rem; } .streak-pill { display: none; } .chip-btn { padding: 8px 12px; }
  .card { padding: 22px; border-radius: 24px; }
  .dash { grid-template-columns: 1fr; grid-template-areas: "time" "checkin" "tree" "money" "health" "quests" "level" "stats" "thought"; }
  .a-tree { min-height: 380px; } .clock { gap: 14px; } .stats-strip { grid-template-columns: 1fr 1fr; row-gap: 22px; } .stats-strip div:nth-child(3) { padding-left: 0; border-left: 0; }
  .bento { grid-template-columns: 1fr; } .b1, .b2, .b3, .b4 { grid-column: auto; } .mini-bars div { grid-template-columns: 92px 1fr auto; }
  .step-row { grid-template-columns: 70px 1fr; gap: 14px; } .step-row .num { font-size: 3.2rem; }
  .bottom-nav { bottom: 10px; width: calc(100% - 20px); justify-content: space-between; } .nav-button { min-width: 0; flex: 1; padding: 9px 4px; } .nav-pill { top: 6px; }
  .choice-grid { grid-template-columns: 1fr 1fr; } .badge-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .badge { padding: 16px; min-height: 180px; } .theme-grid { grid-template-columns: 1fr 1fr; }
  .stage { grid-template-columns: 40px 1fr; gap: 12px; } .stage .dot { width: 40px; height: 40px; border-radius: 14px; } .stage .node::before { top: 40px; }
  .dlg-card { padding: 28px 22px; } .toast { bottom: 96px; } .mood-grid { gap: 7px; }
  .hero h1 { max-width: none; }
  .note-one { right: 0; } .note-two { left: 0; } .note-three { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; scroll-behavior: auto !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none !important; } .leaf-fall, .sos::after { display: none; }
  .breath-orb { transition: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .app-header, .bottom-nav, .float-note, dialog { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bottom-nav, .float-note { background: var(--surface); }
}
@media print { .bottom-nav, .app-header, .aurora, .sos { display: none; } }

[hidden] { display: none !important; }
body[data-view="landing"] .bottom-nav, body[data-view="onboarding"] .bottom-nav { display: none; }
body[data-view="landing"] .shell, body[data-view="onboarding"] .shell { padding-bottom: 48px; }
.mini-bars .bar i { transform: scaleX(0); }
.in .mini-bars .bar i { transform: scaleX(var(--p)); }

.mini-earned { display: flex; gap: 8px; margin: 18px 0 14px; flex-wrap: wrap; }
.mini-earned span { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(145deg, #ffe58f, var(--sun)); color: #4a3200; }
.mini-earned small { color: var(--deep-muted); }
