/* BudgetForge AI — site styles (no build step, plain CSS) */
:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface-2: #f1efe9;
  --ink: #121826;
  --ink-2: #3b4455;
  --muted: #6b7384;
  --line: #e5e1d8;
  --line-2: #d8d3c7;
  --brand: #ea580c;        /* ember: primary CTA */
  --brand-hover: #c2410c;
  --brand-soft: #fff1e6;
  --steel: #16263d;        /* dark sections */
  --steel-2: #1f3353;
  --good: #16a34a;
  --good-soft: #e8f7ee;
  --warn: #b45309;
  --warn-soft: #fff7e6;
  --info-soft: #eaf1fb;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(18, 24, 38, .06), 0 8px 24px rgba(18, 24, 38, .08);
  --shadow-lg: 0 2px 6px rgba(18, 24, 38, .08), 0 24px 60px rgba(18, 24, 38, .16);
  --font-head: "Plus Jakarta Sans", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a, td a { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
p a:hover, li a:hover { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-hover); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--brand); border-radius: 2px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { font-size: 1.1rem; color: var(--ink-2); }
.center { text-align: center; margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 12px; font-weight: 700; font-family: var(--font-head); font-size: 1rem; line-height: 1; border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(234, 88, 12, .28); }
.btn-primary:hover { background: var(--brand-hover); box-shadow: 0 8px 22px rgba(234, 88, 12, .34); }
.btn-lg { padding: 18px 30px; font-size: 1.12rem; border-radius: 14px; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); padding-inline: 12px; }
.btn-ghost:hover { color: var(--brand-hover); }
.btn-light { background: #fff; color: var(--steel); }
.btn-light:hover { background: #f3f1ec; }
.btn-meta { display: block; margin-top: 10px; font-size: .88rem; color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(248, 247, 244, .86); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo img { width: 32px; height: 32px; }
.logo span { color: var(--muted); font-weight: 600; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav .btn { padding: 11px 18px; font-size: .95rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .nav .btn-header { display: none; }
}

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(50% 60% at 70% 30%, rgba(234, 88, 12, .10), transparent 70%), radial-gradient(40% 50% at 15% 20%, rgba(22, 38, 61, .08), transparent 70%); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 540px; margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; padding: 0; list-style: none; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.hero-trust svg { width: 18px; height: 18px; color: var(--good); }
.hero-shot { position: relative; }
.hero-shot img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); }
.hero-badge { position: absolute; left: -14px; bottom: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .88rem; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.hero-badge b { color: var(--good); font-size: 1.05rem; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-badge { left: 8px; bottom: -14px; }
}

/* Logo strip / stats */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; }
.strip-item { display: flex; gap: 12px; align-items: flex-start; }
.strip-item svg { width: 26px; height: 26px; color: var(--brand); flex: none; margin-top: 2px; }
.strip-item b { display: block; font-family: var(--font-head); }
.strip-item span { color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) { .strip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .strip-grid { grid-template-columns: 1fr; } }

/* Cards / grids */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: 0 1px 2px rgba(18, 24, 38, .04); }
.card h3 { margin-top: 14px; }
.card p { color: var(--ink-2); margin: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-hover); display: grid; place-items: center; }
.card .icon svg { width: 24px; height: 24px; }
.card--shot { padding: 0; overflow: hidden; }
.card--shot .card-body { padding: 24px 26px 26px; }
.card--shot img { border-bottom: 1px solid var(--line); }

/* Feature rows (alternating) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(32px, 5vw, 64px) 0; }
.feature-row:nth-child(even) .feature-media { order: -1; }
.feature-row img { border-radius: var(--radius-lg); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.feature-row ul { padding-left: 0; list-style: none; margin: 18px 0 0; }
.feature-row li { display: flex; gap: 10px; margin-bottom: 10px; color: var(--ink-2); }
.feature-row li svg { width: 20px; height: 20px; color: var(--good); flex: none; margin-top: 3px; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } .feature-row:nth-child(even) .feature-media { order: 0; } }

/* Steps */
.steps-grid { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--steel); color: #fff; font-family: var(--font-head); font-weight: 800; margin-bottom: 16px; }
.step p { color: var(--ink-2); margin: 0; }
@media (max-width: 800px) { .steps-grid { grid-template-columns: 1fr; } }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
table.compare { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .97rem; }
table.compare th, table.compare td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare thead th { background: var(--surface-2); font-family: var(--font-head); font-size: .9rem; letter-spacing: .02em; }
table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare td:first-child { font-weight: 600; color: var(--ink); }
table.compare .us { background: var(--brand-soft); font-weight: 600; }
table.compare thead th.us { background: #ffe4cf; color: var(--brand-hover); }
.yes, .no, .partial { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.yes { color: var(--good); } .no { color: #b91c1c; } .partial { color: var(--warn); }
.yes svg, .no svg, .partial svg { width: 18px; height: 18px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; padding: 18px 36px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 14px; font-size: 1.5rem; color: var(--brand); font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }
.faq details p + p { margin-top: -6px; }

/* Dark CTA */
.cta-dark { background: linear-gradient(135deg, var(--steel) 0%, var(--steel-2) 100%); color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 72px); text-align: center; position: relative; overflow: hidden; }
.cta-dark::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, rgba(234, 88, 12, .35), transparent 65%); pointer-events: none; }
.cta-dark h2 { color: #fff; }
.cta-dark p { color: rgba(255, 255, 255, .78); max-width: 620px; margin-inline: auto; font-size: 1.1rem; }
.cta-dark .btn-meta { color: rgba(255, 255, 255, .6); }
.cta-dark > * { position: relative; }

/* Blog cards */
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.post-card .cat { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand-hover); }
.post-card h3 { font-size: 1.15rem; margin: 0; }
.post-card p { color: var(--ink-2); margin: 0; font-size: .97rem; flex: 1; }
.post-card .meta { color: var(--muted); font-size: .85rem; }

/* Article */
.article-head { padding: clamp(36px, 6vw, 72px) 0 24px; }
.article-head .meta { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.article-head .cat { color: var(--brand-hover); font-weight: 700; }
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.article-head .lead { font-size: 1.15rem; color: var(--ink-2); }
.article { padding-bottom: clamp(40px, 6vw, 80px); }
.article .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 32px; }
.article .toc b { font-family: var(--font-head); display: block; margin-bottom: 8px; }
.article .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; font-size: .95rem; }
.article .toc li { margin-bottom: 4px; break-inside: avoid; }
.article .toc a { color: var(--ink-2); text-decoration: none; }
.article .toc a:hover { color: var(--brand-hover); }
@media (max-width: 600px) { .article .toc ol { columns: 1; } }
.prose h2 { font-size: 1.65rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand); color: var(--ink-2); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose thead th { background: var(--surface-2); font-family: var(--font-head); font-size: .88rem; }
.prose tbody tr:last-child td { border-bottom: 0; }
.callout { background: var(--info-soft); border: 1px solid #cfdcf0; border-radius: var(--radius); padding: 16px 20px; margin: 1.4em 0; color: var(--ink-2); }
.callout.warn { background: var(--warn-soft); border-color: #f1d9a8; }
.callout p:last-child { margin-bottom: 0; }
.cta-inline { background: var(--surface); border: 1px solid var(--line-2); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 22px 24px; margin: 2em 0; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.cta-inline p { margin: 0; font-weight: 600; color: var(--ink); flex: 1 1 280px; }
figure.steps { margin: 1.4em 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 18px 22px; }
figure.steps ol { margin: 0; padding-left: 22px; }
figure.steps li { margin-bottom: .6em; }
.article-faq { margin-top: 3em; }
.article-cta { margin: 48px 0 0; }
.related { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }

/* Download page */
.dl-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 5vw, 56px); text-align: center; }
.dl-hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 640px; margin: 0 auto 28px; }
.dl-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); max-width: 640px; margin: 0 auto; }
.dl-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.dl-specs li { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.dl-specs b { display: block; font-family: var(--font-head); color: var(--ink); }
.dl-specs span { color: var(--muted); font-size: .82rem; }
@media (max-width: 520px) { .dl-specs { grid-template-columns: 1fr; } }
.progress { margin-top: 18px; display: none; }
.progress.show { display: block; }
.progress-bar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, var(--brand), #fb923c); border-radius: 99px; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }

/* Misc */
.note { background: var(--surface-2); border-radius: var(--radius); padding: 16px 20px; color: var(--ink-2); font-size: .95rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.pill-list li { background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-hover); }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--ink-2); }

/* Footer */
.site-footer { background: var(--steel); color: rgba(255, 255, 255, .78); padding: 56px 0 28px; margin-top: clamp(40px, 6vw, 80px); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer .logo span { color: rgba(255, 255, 255, .5); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 36px; padding-top: 22px; font-size: .85rem; color: rgba(255, 255, 255, .55); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Cookie notice */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow-lg); display: none; gap: 14px; align-items: center; flex-wrap: wrap; max-width: 720px; margin-inline: auto; font-size: .9rem; }
.cookie.show { display: flex; }
.cookie p { margin: 0; flex: 1 1 320px; color: var(--ink-2); }
.cookie .btn { padding: 10px 16px; font-size: .9rem; }

/* Sticky mobile CTA */
.sticky-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(248, 247, 244, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.sticky-cta .btn { width: 100%; }
@media (max-width: 700px) { .sticky-cta.on { display: block; } body.has-sticky { padding-bottom: 76px; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .progress-bar i { animation: none; width: 100%; } }
