/* Spend-Tracer — site styles. No external fonts or scripts (strict CSP). */
:root {
  --bg: #fbfbfd;
  --bg-2: #f2f3f6;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #0b8a63;
  --accent-2: #2f6bff;
  --accent-3: #8b5cf6;
  --warm: #ff7a1a;
  --accent-soft: rgba(11, 138, 99, 0.10);
  --warm-soft: rgba(255, 122, 26, 0.12);
  --shadow-lg: 0 40px 80px -30px rgba(17, 24, 39, 0.35), 0 12px 30px -12px rgba(17, 24, 39, 0.18);
  --shadow-md: 0 18px 40px -20px rgba(17, 24, 39, 0.25);
  --radius: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #0d0d10;
    --surface: #161618;
    --glass: rgba(22, 22, 24, 0.72);
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #6e6e73;
    --line: rgba(255, 255, 255, 0.10);
    --accent: #30d19c;
    --accent-2: #5b8cff;
    --accent-3: #a78bfa;
    --warm: #ff9f43;
    --accent-soft: rgba(48, 209, 156, 0.14);
    --warm-soft: rgba(255, 159, 67, 0.16);
    --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-md: 0 18px 40px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 26px; height: 26px; }
.nav-links a { color: var(--muted); font-size: 14px; margin-left: 22px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding: 96px 0 40px; text-align: center; overflow: hidden; }
.aurora { position: absolute; inset: -20% -10% auto; height: 760px; pointer-events: none; z-index: -1; filter: blur(70px); opacity: 0.55; }
.aurora span { position: absolute; border-radius: 50%; }
.aurora .a1 { width: 520px; height: 520px; left: 8%; top: 60px; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.aurora .a2 { width: 560px; height: 560px; right: 6%; top: 0; background: radial-gradient(circle, var(--accent-2) 0%, transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
.aurora .a3 { width: 440px; height: 440px; left: 38%; top: 260px; background: radial-gradient(circle, var(--accent-3) 0%, transparent 65%); animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.12); } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
h1.display {
  font-size: clamp(44px, 8.4vw, 96px); line-height: 1.03; letter-spacing: -0.034em; font-weight: 700; margin: 0 auto 22px; max-width: 1040px;
}
.grad { background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.4; color: var(--muted); max-width: 680px; margin: 0 auto 32px; letter-spacing: -0.01em; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-size: 16px; font-weight: 500; }
.btn:hover { text-decoration: none; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { color: var(--accent-2); }
.btn-ghost:hover { text-decoration: underline; }

/* ── Device stage ────────────────────────────────────── */
.stage { position: relative; margin: 72px auto 0; max-width: 980px; height: 600px; }
.mac {
  position: absolute; left: 0; right: 120px; top: 30px; height: 520px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
  display: grid; grid-template-columns: 200px 1fr; grid-template-rows: 40px 1fr;
  animation: rise 1s cubic-bezier(.2,.7,.2,1) both;
}
.mac-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mac-bar i { width: 12px; height: 12px; border-radius: 50%; }
.mac-bar .r { background: #ff5f57; } .mac-bar .y { background: #febc2e; } .mac-bar .g { background: #28c840; }
.mac-bar b { margin-left: auto; margin-right: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.mac-side { border-right: 1px solid var(--line); padding: 18px 12px; text-align: left; background: var(--bg-2); }
.mac-side p { margin: 0 0 4px; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mac-side p.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mac-side p i { width: 8px; height: 8px; border-radius: 3px; background: currentColor; opacity: 0.6; }
.mac-main { padding: 26px 200px 26px 30px; text-align: left; min-width: 0; }
.kicker { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin: 0 0 4px; }
.big-num { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.big-num small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.cat-list { margin-top: 22px; display: grid; gap: 13px; }
.cat { display: grid; grid-template-columns: 112px 1fr 64px; align-items: center; gap: 12px; font-size: 13px; }
.cat span:first-child { color: var(--muted); }
.cat span:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.track b { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: grow-x 1.4s cubic-bezier(.2,.7,.2,1) both; }
.c1 { background: var(--accent); } .c2 { background: var(--accent-2); } .c3 { background: var(--accent-3); } .c4 { background: #f5b301; } .c5 { background: #ff5c8a; }
.w92 { width: 92%; } .w64 { width: 64%; } .w48 { width: 48%; } .w31 { width: 31%; } .w18 { width: 18%; }
@keyframes grow-x { from { transform: scaleX(0); } }
.mac-chip { display: inline-block; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
.stat { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; }
.stat small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.stat strong { font-size: 20px; letter-spacing: -0.02em; }
.stat strong.ok { color: var(--accent); }
.stat strong.warn { color: var(--warm); }

.phone {
  position: absolute; right: 0; top: 0; width: 290px; height: 590px;
  border-radius: 48px; padding: 12px; background: #1d1d1f;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #3a3a3c;
  animation: rise 1s .15s cubic-bezier(.2,.7,.2,1) both;
}
.screen { position: relative; height: 100%; border-radius: 37px; background: var(--surface); overflow: hidden; padding: 52px 18px 18px; text-align: left; }
.island { position: absolute; top: 11px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; }
.status { position: absolute; top: 15px; left: 26px; right: 22px; display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.screen h4 { margin: 4px 0 2px; font-size: 26px; letter-spacing: -0.02em; }
.screen .sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.ring-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ring { width: 74px; height: 74px; }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: var(--bg-2); }
.ring .fg { stroke: url(#ringGrad); stroke-linecap: round; stroke-dasharray: 201; stroke-dashoffset: 52; transform: rotate(-90deg); transform-origin: 50% 50%; animation: ring 1.6s .3s cubic-bezier(.2,.7,.2,1) both; }
@keyframes ring { from { stroke-dashoffset: 201; } }
.ring-wrap strong { display: block; font-size: 22px; letter-spacing: -0.02em; }
.ring-wrap span { font-size: 12px; color: var(--muted); }

.weeks { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 128px; padding-top: 8px; margin-bottom: 8px; }
.cap { position: absolute; left: -4px; right: -4px; bottom: 88px; border-top: 2px dashed var(--faint); }
.cap em { position: absolute; right: 0; top: -20px; font-size: 10px; font-style: normal; font-weight: 600; color: var(--faint); }
.bar { position: relative; border-radius: 10px 10px 6px 6px; background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, transparent) 100%); transform-origin: bottom; animation: grow-y 1.2s cubic-bezier(.2,.7,.2,1) both; }
.bar.over { background: linear-gradient(180deg, var(--warm) 0%, var(--warm) 22%, var(--accent) 22%, color-mix(in srgb, var(--accent) 60%, transparent) 100%); }
.bar.now { background: linear-gradient(180deg, var(--accent-2) 0%, color-mix(in srgb, var(--accent-2) 55%, transparent) 100%); }
.bar b { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; font-weight: 700; color: var(--warm); background: var(--warm-soft); padding: 2px 6px; border-radius: 6px; }
.h70 { height: 70%; } .h58 { height: 58%; } .h88 { height: 88%; } .h64 { height: 64%; } .h40 { height: 40%; }
.d1 { animation-delay: .35s; } .d2 { animation-delay: .45s; } .d3 { animation-delay: .55s; } .d4 { animation-delay: .65s; } .d5 { animation-delay: .75s; }
@keyframes grow-y { from { transform: scaleY(0); } }
.wk-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; font-size: 10px; color: var(--faint); text-align: center; margin-bottom: 14px; }
.txn { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.txn .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; flex: none; }
.txn .t { flex: 1; min-width: 0; }
.txn .t b { display: block; font-weight: 600; }
.txn .t span { font-size: 11px; color: var(--muted); }
.txn .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }

/* ── Sections ────────────────────────────────────────── */
section.block { padding: 120px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head .kicker { color: var(--accent); font-size: 14px; letter-spacing: 0.08em; }
h2.headline { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.06; letter-spacing: -0.027em; margin: 8px 0 18px; font-weight: 700; }
.section-head p { font-size: 20px; color: var(--muted); margin: 0; line-height: 1.45; }

/* Budget-month timeline */
.timeline { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-md); padding: 34px 34px 26px; max-width: 900px; margin: 0 auto; }
.tl-axis, .tl-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 16px; }
.tl-axis { margin-bottom: 14px; }
.tl-axis .ticks { min-width: 0; display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl-row { height: 46px; }
.tl-row .lbl { font-size: 14px; font-weight: 600; }
.tl-row .lbl span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.tl-track { position: relative; height: 14px; border-radius: 99px; background: var(--bg-2); }
.tl-track b { position: absolute; top: 0; bottom: 0; border-radius: 99px; transform-origin: left; animation: grow-x 1.2s cubic-bezier(.2,.7,.2,1) both; }
.s-a { left: 0%; width: 64%; background: var(--accent-3); }
.s-b { left: 16%; width: 63%; background: var(--accent-2); }
.s-c { left: 32%; width: 68%; background: var(--accent); }
.s-d { left: 32%; width: 68%; background: #f5b301; }
.tl-window { display: grid; grid-template-columns: 130px 1fr; gap: 16px; margin-top: 14px; }
.tl-window div { border: 2px solid var(--accent); border-radius: 14px; padding: 10px 14px; font-size: 13px; color: var(--accent); font-weight: 600; text-align: center; background: var(--accent-soft); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 30px; position: relative; overflow: hidden; }
.tile h3 { font-size: 26px; letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 10px; }
.tile p { color: var(--muted); margin: 0; font-size: 16px; }
.span-4 { grid-column: span 4; } .span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-6 { grid-column: span 6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 99px; background: var(--bg-2); color: var(--ink); animation: pop .6s cubic-bezier(.2,.7,.2,1) both; }
.chip.k1 { background: var(--accent-soft); color: var(--accent); }
.chip.k2 { background: rgba(47,107,255,.12); color: var(--accent-2); }
.chip.k3 { background: rgba(139,92,246,.13); color: var(--accent-3); }
.chip.k4 { background: var(--warm-soft); color: var(--warm); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
.flow { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.flow code { font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-2); padding: 6px 10px; border-radius: 8px; color: var(--ink); }
.flow .arrow { color: var(--faint); }

.mini-weeks { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 26px; position: relative; }
.mini-weeks .bar { flex: 1; }
.mini-weeks .cap { bottom: 80px; left: 0; right: 0; }

.insight { margin-top: 22px; background: var(--bg-2); border-radius: 18px; padding: 18px; display: grid; gap: 12px; }
.insight-top { display: flex; align-items: center; gap: 12px; }
.insight-top .dot { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #1f3a93, #6b5cff); display: grid; place-items: center; color: #fff; font-weight: 700; }
.insight-top b { display: block; font-size: 15px; }
.insight-top span { font-size: 13px; color: var(--muted); }
.save { display: flex; gap: 10px; }
.save div { flex: 1; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.save small { display: block; font-size: 11px; color: var(--muted); }
.save strong { font-size: 18px; color: var(--accent); letter-spacing: -0.02em; }
.actions { display: flex; gap: 8px; }
.actions span { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 9px; border-radius: 10px; }
.actions .keep { background: var(--surface); color: var(--ink); }
.actions .cut { background: var(--ink); color: var(--bg); }

.tile .ai-quote { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; margin: 18px 0 0; }
.tile .ai-quote mark { background: none; color: var(--warm); }
.ai-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent-3); }

.lock { width: 64px; height: 64px; margin-bottom: 18px; }
.ticks-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks-list li { display: flex; gap: 10px; font-size: 15px; color: var(--muted); }
.ticks-list li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 5px var(--accent-soft), inset 0 0 0 9px var(--accent); }

.dark-tile { background: #0b0b0d; color: #f5f5f7; }
.dark-tile p { color: #a1a1a6; }
@media (prefers-color-scheme: dark) { .dark-tile { background: linear-gradient(160deg, #10241e, #0b0b0d 60%); } }

/* Closing */
.closing { text-align: center; padding: 120px 0 140px; position: relative; overflow: hidden; }
.closing .aurora { top: 0; height: 520px; opacity: 0.35; }
.closing h2 { margin-bottom: 14px; }
.closing p { color: var(--muted); font-size: 20px; margin: 0 0 30px; }

/* Footer + legal pages */
footer.site { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 13px; color: var(--muted); }
footer.site .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--muted); }
footer.site span { margin-left: auto; }
article.legal { max-width: 760px; margin: 0 auto; padding: 72px 22px 40px; }
article.legal h1 { font-size: clamp(40px, 6vw, 56px); letter-spacing: -0.04em; line-height: 1.05; margin: 0 0 8px; }
article.legal .meta { color: var(--muted); margin: 0 0 36px; }
article.legal h2 { font-size: 24px; letter-spacing: -0.02em; margin: 44px 0 10px; }
article.legal p, article.legal li { color: var(--ink); }
article.legal ul { padding-left: 20px; }
article.legal li { margin: 6px 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-md); margin: 12px 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.faq { display: grid; gap: 14px; margin-top: 20px; }
.faq div { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-md); padding: 20px 22px; }
.faq b { display: block; margin-bottom: 4px; }
.faq span { color: var(--muted); }
.mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 18px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 12px 18px; border-radius: 14px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .stage { height: 560px; }
  .mac { right: 40px; grid-template-columns: 1fr; }
  .mac-main { padding-right: 230px; }
  .stats { grid-template-columns: 1fr; }
  .mac-side { display: none; }
  .phone { transform: scale(.92); transform-origin: top right; }
  .bento { grid-template-columns: 1fr 1fr; }
  .span-4, .span-3, .span-6 { grid-column: span 2; }
  .span-2 { grid-column: span 1; }
}
@media (max-width: 640px) {
  .hero { padding-top: 64px; }
  .stage { height: 600px; }
  .mac { display: none; }
  .phone { left: 50%; right: auto; margin-left: -145px; transform: none; }
  section.block { padding: 84px 0; }
  .bento { grid-template-columns: 1fr; }
  .span-4, .span-3, .span-2, .span-6 { grid-column: span 1; }
  .tile { padding: 24px; }
  .timeline { padding: 22px 18px; }
  .tl-axis, .tl-row, .tl-window { grid-template-columns: 84px 1fr; gap: 10px; }
  .tl-row .lbl span { display: none; }
  .tl-axis .ticks span:nth-child(even) { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-links a { margin-left: 16px; }
  footer.site span { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.dark-tile .ai-quote { color: #f5f5f7; }
