:root {
  --bg: #f7f4ec;
  --bg-alt: #efeadd;
  --surface: #ffffff;
  --ink: #1b2a24;
  --ink-soft: #4a5a53;
  --line: #dcd5c4;
  --brand: #1f5c45;
  --brand-ink: #ffffff;
  --accent: #c9821f;
  --contrib: #8fb5a3;
  --growth: #1f5c45;
  --danger: #a8432f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 42, 36, .06), 0 6px 20px rgba(27, 42, 36, .06);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111814;
    --bg-alt: #161f1a;
    --surface: #1c2621;
    --ink: #e8eee9;
    --ink-soft: #a6b5ad;
    --line: #2d3a33;
    --brand: #5fbf95;
    --brand-ink: #0d1411;
    --accent: #e6a648;
    --contrib: #3f6a57;
    --growth: #5fbf95;
    --danger: #e07c66;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111814;
  --bg-alt: #161f1a;
  --surface: #1c2621;
  --ink: #e8eee9;
  --ink-soft: #a6b5ad;
  --line: #2d3a33;
  --brand: #5fbf95;
  --brand-ink: #0d1411;
  --accent: #e6a648;
  --contrib: #3f6a57;
  --growth: #5fbf95;
  --danger: #e07c66;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: .6em; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .5em; margin: 0; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-size: 1rem; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); padding: 6px 12px; border-radius: 8px; font: inherit; font-size: .9rem; cursor: pointer; }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
}

/* Buttons */
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; font-size: .98rem; transition: transform .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.3fr 1fr; gap: 64px; } .hero { padding: 96px 0 104px; } }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.hero-card-label { font-size: .9rem; color: var(--ink-soft); margin-bottom: .3em; }
.hero-card-big { font-family: "Fraunces", Georgia, serif; font-size: clamp(2.4rem, 6vw, 3.2rem); font-weight: 700; color: var(--brand); margin: 0 0 .2em; font-variant-numeric: tabular-nums; }
.hero-card-sub { color: var(--ink-soft); }
.mini-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 18px 0 10px; }
.mini-bar-contrib { background: var(--contrib); }
.mini-bar-growth { background: var(--growth); }
.legend { display: flex; gap: 18px; font-size: .85rem; color: var(--ink-soft); flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot-contrib { background: var(--contrib); }
.dot-growth { background: var(--growth); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 44em; margin-bottom: 2em; }
.sub-h { margin-top: 2.4em; }

/* Start with $20 */
.guide { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .guide { grid-template-columns: 340px 1fr; gap: 40px; padding: 32px; } }
.guide-q { display: grid; gap: 22px; align-content: start; }
.guide-q fieldset { border: 0; padding: 0; margin: 0; }
.guide-q legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.guide-amount { display: grid; gap: 8px; font-weight: 600; }
.money-input { display: inline-flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; font-weight: 600; }
.money-input:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.money-input input { font: inherit; font-size: 1.3rem; width: 100%; min-width: 0; border: 0; background: none; color: var(--ink); padding: 10px 6px; outline: none; }
.choice { display: flex; gap: 10px; }
.choice label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; }
.choice label:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.choice input { accent-color: var(--brand); }
.guide-result { background: var(--bg); border-radius: 12px; padding: 24px; }
.guide-result .tag { background: var(--surface); }
.guide-result h3 { font-size: 1.6rem; color: var(--brand); }
.guide-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.guide-steps li { counter-increment: step; position: relative; padding: 0 0 14px 44px; margin: 0; }
.guide-steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: .9rem; }
.guide-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.habit { display: grid; gap: 24px; margin-top: 40px; align-items: center; }
@media (min-width: 900px) { .habit { grid-template-columns: 1fr 1fr; gap: 48px; } }
.habit-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; }
.habit-label .money-input { width: 120px; }
.data-table.habit-table { min-width: 0; font-variant-numeric: tabular-nums; }
.habit-table td:last-child { color: var(--brand); }
.dont { margin-top: 24px; }

/* Roadmap */
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: none; }
@media (min-width: 760px) { .roadmap { grid-template-columns: 1fr 1fr; } }
.roadmap li { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; }
.roadmap p { margin: 0; color: var(--ink-soft); }
.roadmap h3 { font-size: 1.1rem; margin-bottom: .3em; }
.step-num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 600; }

/* Cards */
.cards { display: grid; gap: 18px; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card-tight h4 { margin-bottom: .3em; }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bg-alt); color: var(--accent); margin-bottom: .8em; }

/* Investing */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1.4fr 1fr; gap: 48px; } }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 28px; position: relative; margin-bottom: .8em; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--brand); font-weight: 700; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 24px; }
.callout-wide { margin-top: 2.4em; }
.callout p:last-child { margin-bottom: 0; }
.fee-table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-variant-numeric: tabular-nums; }
.fee-table th, .fee-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fee-table th { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.fee-table td:last-child, .fee-table th:last-child { text-align: right; }
.fee-loss { color: var(--danger); font-size: .82rem; margin-left: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: var(--bg-alt); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.data-table tr:last-child td { border-bottom: 0; }

.cards-3 { margin-top: 1em; }
@media (min-width: 680px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

/* Tabs + calculators */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { font: inherit; font-size: .95rem; font-weight: 500; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .panel { padding: 32px; } }
.calc { display: grid; gap: 28px; }
@media (min-width: 900px) { .calc { grid-template-columns: 300px 1fr; gap: 40px; } }
.calc-form { display: grid; gap: 14px; align-content: start; }
.calc-form label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--ink-soft); }
.calc-form input, .calc-form select, .search {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%;
}
.calc-form input:focus, .calc-form select:focus, .search:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.hint { font-size: .82rem; color: var(--ink-soft); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--bg); border-radius: 10px; padding: 14px 16px; }
.stat-label { display: block; font-size: .8rem; color: var(--ink-soft); }
.stat-val { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stat-val.accent { color: var(--brand); }
.chart { width: 100%; height: 260px; margin-bottom: 10px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .axis text { fill: var(--ink-soft); font-size: 11px; font-family: "Inter", sans-serif; }
.chart .grid line { stroke: var(--line); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.compare-col { background: var(--bg); border-radius: 10px; padding: 18px; }
.compare-col p { margin: 0; }
.compare-good { outline: 2px solid var(--brand); }
.compare-h { font-size: .85rem; color: var(--ink-soft); }
.compare-big { font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; font-weight: 700; margin: 4px 0 8px !important; }
.result-note { background: color-mix(in srgb, var(--brand) 12%, transparent); border-radius: 10px; padding: 14px 16px; margin: 0; }
.result-note:empty { display: none; }
.result-note.warn { background: color-mix(in srgb, var(--danger) 14%, transparent); }

.budget-bar { display: flex; height: 44px; border-radius: 10px; overflow: hidden; margin-bottom: 18px; font-weight: 600; font-size: .9rem; }
.budget-bar span { display: grid; place-items: center; color: #fff; }
.b-needs { background: #3d6b8a; }
.b-wants { background: var(--accent); }
.b-save { background: var(--brand); color: var(--brand-ink) !important; }

.progress { height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.progress span { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s ease; }

/* Mistakes */
.mistakes { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 680px) { .mistakes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .mistakes { grid-template-columns: repeat(3, 1fr); } }
.mistake { background: var(--surface); padding: 24px; }
.mistake h3 { font-size: 1.1rem; color: var(--danger); }
.mistake p { margin: 0; color: var(--ink-soft); }

/* Glossary */
.search { max-width: 420px; margin-bottom: 24px; background: var(--surface); }
.glossary { display: grid; gap: 12px; margin: 0; }
@media (min-width: 760px) { .glossary { grid-template-columns: 1fr 1fr; } }
.glossary div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.glossary dt { font-weight: 600; margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Footer */
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); }
.disclaimer { font-size: .88rem; color: var(--ink-soft); max-width: 60em; margin-top: 1em; }

/* Buttons as <button> */
.btn { border: 1.5px solid transparent; }
.btn-ghost { border-color: var(--line); background: transparent; }
button.btn { font-family: inherit; font-weight: 600; font-size: .98rem; cursor: pointer; line-height: 1.3; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-soft); font: inherit; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

/* Learn by doing */
.play-block { margin-top: 48px; }
.play-block:first-of-type { margin-top: 8px; }
.play-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.play-head h3 { font-size: 1.6rem; margin-bottom: .25em; }
.play-head p { margin: 0; max-width: 40em; }
.play-num { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 1.1rem; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 10px; padding: 6px 10px; flex: none; }

.pill-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill { font: inherit; font-size: .9rem; font-weight: 500; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.pill:hover { border-color: var(--brand); }
.pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

.crash-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .crash-grid { grid-template-columns: 1fr 1.3fr; gap: 40px; } }
.crash-left { display: flex; flex-direction: column; gap: 0; }
.crash-date { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: .4em; }
.crash-news { font-family: "Fraunces", Georgia, serif; font-size: 1.3rem; line-height: 1.35; margin: 0 0 20px; min-height: 3.6em; border-left: 3px solid var(--line); padding-left: 16px; }
.crash-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.crash-left .result-note { margin-bottom: 14px; }
.crash-left .link-btn { align-self: flex-start; }
.stat-val.neg { color: var(--danger); }
.dot-sold { background: var(--danger); }

.tc-sentence { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; line-height: 1.45; background: var(--bg); border-radius: 12px; padding: 18px 20px; }
.tc-sentence strong { color: var(--brand); }

#scams .panel { display: grid; gap: 28px; }
@media (min-width: 900px) { #scams .panel { grid-template-columns: 1.6fr 1fr; gap: 40px; } }
.quiz-top { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ink-soft); margin-bottom: 12px; }
.quiz-msg { background: var(--bg); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 18px 20px; margin-bottom: 18px; min-height: 130px; }
.quiz-from { font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .5em; }
.quiz-text { font-size: 1.08rem; margin: 0; }
.quiz-final { font-family: "Fraunces", Georgia, serif; font-size: 2.6rem; font-weight: 700; color: var(--brand); margin: 0; }
.quiz-actions { display: flex; gap: 10px; }
.quiz-actions .btn { flex: 1; }
.quiz-verdict { font-weight: 700; font-size: 1.1rem; margin-bottom: .4em; }
.quiz-verdict.good { color: var(--brand); }
.quiz-verdict.bad { color: var(--danger); }
.red-flags { background: color-mix(in srgb, var(--danger) 8%, transparent); border-radius: 12px; padding: 20px 22px; align-self: start; }
.red-flags h4 { color: var(--danger); }
.red-flags ul { margin: 0; }

[hidden] { display: none !important; }

/* Hero points */
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9rem; color: var(--ink-soft); }
.hero-points li { margin: 0; }
.hero-points li::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* Money Finder */
.mf-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .mf-grid { grid-template-columns: 1fr 320px; gap: 32px; } }
.mf-list { display: grid; gap: 10px; }
.mf-item { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); transition: border-color .15s ease; }
.mf-item.on { border-color: var(--brand); }
.mf-toggle { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; }
.mf-check { width: 22px; height: 22px; accent-color: var(--brand); flex: none; margin: 0; }
.mf-text { flex: 1; display: grid; gap: 2px; }
.mf-title { font-weight: 600; }
.mf-q { font-size: .92rem; color: var(--ink-soft); }
.mf-amt { flex: none; font-family: "Fraunces", Georgia, serif; font-weight: 700; color: var(--brand); text-align: right; font-variant-numeric: tabular-nums; }
.mf-amt.soft { font-family: "Inter", sans-serif; font-weight: 500; font-size: .8rem; color: var(--accent); max-width: 9em; }
@media (max-width: 560px) {
  .mf-toggle { flex-wrap: wrap; }
  .mf-amt { flex-basis: 100%; text-align: left; padding-left: 36px; }
  .mf-amt.soft { max-width: none; }
}
.mf-body { padding: 0 18px 18px 54px; }
@media (max-width: 560px) { .mf-body { padding-left: 18px; } }
.mf-inputs { align-items: end; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mf-inputs label { display: grid; gap: 6px; font-size: .84rem; font-weight: 500; color: var(--ink-soft); }
.mf-inputs input { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; width: 100%; }
.mf-inputs input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.mf-steps { margin: 0 0 12px; padding-left: 1.3em; }
.mf-steps li { margin-bottom: .45em; }
.mf-link { font-weight: 600; font-size: .92rem; }
.mf-summary { background: var(--brand); color: var(--brand-ink); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
@media (min-width: 960px) { .mf-summary { position: sticky; top: 80px; } }
.mf-summary .muted { color: inherit; opacity: .75; margin: 14px 0 0; }
.mf-sum-label { margin: 0; opacity: .85; }
.mf-sum-big { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 3rem; line-height: 1.1; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.mf-sum-per { margin: 0 0 12px; opacity: .85; }
.mf-sum-extra { font-size: .9rem; margin-bottom: 10px; }
.mf-sum-extra:empty { display: none; }
.mf-sum-hint { font-size: .92rem; opacity: .9; }
.mf-summary .btn-primary { background: var(--brand-ink); color: var(--brand); width: 100%; margin-bottom: 10px; }
.mf-summary .link-btn { color: inherit; opacity: .8; }

/* Earn more */
.panel > h3 { margin-bottom: 1em; }
.earn-cards { margin-top: 24px; }
.tight-list { padding-left: 1.2em; margin: 0; }
.tight-list li { margin-bottom: .4em; }
.scripts-wrap { margin-top: 8px; }
.scripts { display: grid; gap: 16px; margin-top: 18px; }
@media (min-width: 900px) { .scripts { grid-template-columns: 1fr 1fr; } }
.script { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.script-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.script-head h4 { margin-bottom: .2em; }
.script-head .tag { margin-bottom: .5em; }
.script-saves { font-size: .85rem; color: var(--brand); font-weight: 600; margin: 0; }
.copy-btn { padding: 8px 14px; font-size: .88rem; flex: none; }
.script-text { white-space: pre-wrap; font-family: inherit; font-size: .94rem; line-height: 1.6; background: var(--bg); border-radius: 10px; padding: 14px 16px; margin: 0; flex: 1; }

/* Print: only the Money Finder plan */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, main > section:not(#finder), .mf-print, #mfClear, .mf-item:not(.on), .mf-check, #finder .section-lede { display: none !important; }
  #finder { background: #fff; padding: 0; }
  #finder h2::after { content: " — My money plan"; }
  .mf-grid { display: block; }
  .mf-summary { background: #fff; color: #000; border: 2px solid #000; box-shadow: none; margin-bottom: 16px; }
  .mf-item { break-inside: avoid; border-color: #999 !important; margin-bottom: 10px; }
  .mf-body { display: block !important; padding-left: 18px; }
  .mf-inputs input { border: 0; padding: 0; background: none; }
  .mf-link::after { content: " (" attr(href) ")"; font-weight: 400; }
}

/* Scam banner */
.scam-banner { display: flex; align-items: center; gap: 14px; margin-top: 40px; padding: 14px 18px; border-radius: 12px; text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--danger) 35%, transparent); transition: transform .15s ease, border-color .15s ease; }
.scam-banner:hover { transform: translateY(-1px); border-color: var(--danger); }
.scam-banner-icon { font-size: 1.4rem; flex: none; }
.scam-banner-text { flex: 1; font-size: .96rem; }
.scam-banner-cta { flex: none; font-weight: 600; color: var(--danger); white-space: nowrap; }
@media (max-width: 600px) {
  .scam-banner { flex-wrap: wrap; }
  .scam-banner-text { flex-basis: calc(100% - 50px); }
  .scam-banner-cta { padding-left: 42px; }
}
@media (min-width: 821px) and (max-width: 1100px) { .nav { gap: 14px; } .nav a { font-size: .88rem; } }
@media print { .scam-banner { display: none; } }

/* Alternate section shading automatically */
main > section.section:nth-of-type(even) { background: var(--bg-alt); }
main > section.section:nth-of-type(odd) { background: transparent; }

/* Credit score */
.rate-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.credit-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .credit-grid { grid-template-columns: 1fr 1.5fr; gap: 48px; } }
.credit-factors { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.factor-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.factor-list li { margin: 0; }
.factor-label { display: flex; justify-content: space-between; font-size: .92rem; margin-bottom: 4px; }
.factor-label b { color: var(--brand); }
.factor-bar { display: block; height: 8px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.factor-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.credit-steps { margin: 0; padding-left: 1.3em; }
.credit-steps li { margin-bottom: .8em; }
#credit .compare-h { font-weight: 600; }

/* Investing Quick Start */
.qs-path { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
@media (min-width: 760px) { .qs-path { grid-template-columns: repeat(4, 1fr); } }
.qs-path li { margin: 0; }
.qs-path a { display: flex; gap: 12px; align-items: center; height: 100%; padding: 14px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.qs-path a:hover { border-color: var(--brand); transform: translateY(-1px); }
.qs-path small { display: block; color: var(--ink-soft); font-size: .82rem; }
.qs-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.us-tag { display: inline-block; vertical-align: middle; font-family: "Inter", sans-serif; font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bg-alt); color: var(--ink-soft); margin-left: 6px; }
.qs-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .qs-grid { grid-template-columns: 1fr 1.1fr; gap: 36px; } }
.qs-questions { display: grid; gap: 20px; align-content: start; }
.qs-questions fieldset { border: 0; padding: 0; margin: 0; }
.qs-questions legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.qs-questions .pill-group { margin-bottom: 0; }
.choice-col { flex-direction: column; }
.choice-col label { justify-content: flex-start; padding: 10px 14px; }
.guide-result .guide-steps a { font-weight: 600; }

.mix-bar { display: flex; height: 48px; border-radius: 10px; overflow: hidden; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.mix-bar span { display: grid; place-items: center; color: #fff; transition: flex .3s ease; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .86rem; color: var(--ink-soft); margin-bottom: 16px; }
.mix-funds { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 600px) { .mix-funds { grid-template-columns: 1fr 1fr; } }
.mix-option { background: var(--bg); border-radius: 12px; padding: 16px 18px; }
.mix-option p, .mix-option ul { margin: 0; font-size: .94rem; }
.mix-option .tag { margin-bottom: .6em; background: var(--surface); }
.mix-option ul { padding-left: 1.1em; }

.qs-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-weight: 600; font-size: .92rem; }
.qs-progress .progress { flex: 1; margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; counter-reset: ck; }
.check-item { margin: 0; background: var(--bg); border: 1.5px solid transparent; border-radius: 12px; transition: border-color .15s ease, opacity .15s ease; }
.check-item label { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; cursor: pointer; }
.check-item input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; margin: 2px 0 0; }
.check-detail { display: block; color: var(--ink-soft); font-size: .93rem; margin-top: 4px; }
.check-item.done { border-color: var(--brand); }
.check-item.done strong { text-decoration: line-through; text-decoration-color: var(--brand); }

/* Hero promise link */
.hero-points a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* My Money Profile */
.profile-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .profile-grid { grid-template-columns: 1.05fr 1fr; gap: 32px; } }
.profile-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 18px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .profile-form { padding: 28px; } }
.pf-group { border: 0; padding: 0; margin: 0; }
.pf-group legend { font-weight: 700; font-size: 1.02rem; padding: 0; margin-bottom: 10px; }
.pf-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.pf-fields label { display: grid; gap: 6px; font-size: .84rem; font-weight: 500; color: var(--ink-soft); }
.pf-fields input, .pf-fields select { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%; }
.pf-fields input::placeholder { color: var(--ink-soft); opacity: .6; }
.pf-fields input:focus, .pf-fields select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.pf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.profile-form > .muted { margin: 0; }

.plan { background: var(--surface); border: 1.5px solid var(--brand); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
@media (min-width: 1000px) { .plan { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; } }
.plan h3 { font-size: 1.5rem; }
.plan-empty { text-align: center; padding: 24px 8px; }
.plan-empty-icon { font-size: 2.4rem; margin: 0 0 8px; }
.plan-empty h3 { font-size: 1.3rem; }
.plan-empty p { color: var(--ink-soft); margin: 0; }
.plan-summary { background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 10px; padding: 12px 14px; font-size: .95rem; }
.plan-summary.warn { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.plan-filled { font-size: .86rem; color: var(--brand); font-weight: 600; }
.plan-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.plan-item { display: flex; gap: 14px; margin: 0; padding: 14px; border-radius: 12px; background: var(--bg); border: 1.5px solid transparent; }
.plan-item h4 { margin: 0 0 .25em; font-size: 1.05rem; }
.plan-item p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.plan-item .plan-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.plan-links a { font-weight: 600; font-size: .9rem; }
.plan-badge { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-soft); }
.plan-item.next { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--bg)); }
.plan-item.next .plan-badge { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.plan-first { font-size: .74rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand) !important; margin-bottom: 2px !important; }
.plan-item.done { opacity: .75; }
.plan-item.done .plan-badge { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.plan-item.done h4 { text-decoration: line-through; text-decoration-color: var(--brand); }

/* About, promise, sources */
.about-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.about-text .section-lede { margin-bottom: 1em; }
.updated { font-weight: 600; color: var(--brand); }
.promise { background: var(--surface); border: 1.5px solid var(--brand); border-radius: var(--radius); padding: 24px; }
.promise-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.promise-list li { position: relative; padding-left: 30px; margin: 0; font-size: .96rem; }
.promise-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; display: grid; place-items: center; margin-top: 2px; }
.sources { display: grid; gap: 16px; margin: 16px 0 18px; }
@media (min-width: 700px) { .sources { grid-template-columns: 1fr 1fr; } }
.source-group { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.source-group h4 { margin-bottom: .5em; }
.source-group ul { margin: 0; padding-left: 1.1em; font-size: .92rem; color: var(--ink-soft); }
.source-group a { font-weight: 600; }
.src { font-size: .82rem; font-weight: 500; white-space: nowrap; }
.footer-links { font-size: .9rem; color: var(--ink-soft); }
@media print { #profile { display: none !important; } }

/* Path chooser (homepage) */
.path-cards { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width: 640px) { .path-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .path-cards { grid-template-columns: repeat(3, 1fr); } }
.path-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.path-card:hover, .path-card:focus-visible { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.path-card-emoji { font-size: 1.9rem; flex: none; width: 48px; height: 48px; display: grid; place-items: center; background: var(--bg-alt); border-radius: 12px; }
.path-card-text { flex: 1; display: grid; gap: 2px; }
.path-card-text strong { font-size: 1.02rem; }
.path-card-text small { color: var(--ink-soft); font-size: .86rem; line-height: 1.4; }
.path-card-arrow { color: var(--brand); font-weight: 700; flex: none; }

/* Currency picker */
.currency-pick { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 500; color: var(--ink-soft); }
.currency-pick select { font: inherit; font-size: .9rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.profile-form > .currency-pick { justify-self: start; }
.currency-pick-big { margin-top: 18px; font-size: 1rem; font-weight: 600; color: var(--ink); }
.currency-pick-big select { font-size: 1rem; padding: 10px 12px; background: var(--surface); }

/* Path pages */
.path-hero { padding: 40px 0 48px; }
@media (min-width: 900px) { .path-hero { padding: 56px 0 64px; } }
.path-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); max-width: 18em; }
.path-emoji { display: inline-block; margin-right: 4px; }
.back-link { display: inline-block; margin-bottom: 20px; font-weight: 600; font-size: .92rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.path-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .path-grid { grid-template-columns: 1.6fr 1fr; gap: 40px; } }
.path-steps .check-item { background: var(--surface); }
.path-steps .check-detail a { font-weight: 600; }
.watch { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--danger) 30%, transparent); border-radius: var(--radius); padding: 22px; }
@media (min-width: 960px) { .path-side { position: sticky; top: 80px; } }
.watch h3 { color: var(--danger); font-size: 1.2rem; }
.watch ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.watch li { margin: 0; font-size: .95rem; }
.path-tools { margin: 18px 0 24px; }
.tool-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
.tool-card:hover, .tool-card:focus-visible { border-color: var(--brand); transform: translateY(-2px); }
.tool-emoji { font-size: 1.7rem; margin-bottom: 8px; }
.tool-card h3 { font-size: 1.15rem; margin-bottom: .3em; }
.tool-card p { color: var(--ink-soft); font-size: .93rem; flex: 1; }
.tool-go { color: var(--brand); font-weight: 600; font-size: .92rem; }
.other-paths { font-size: .92rem; line-height: 1.9; color: var(--ink-soft); }
.other-paths a { white-space: nowrap; }

/* Region: hide U.S.-only content for visitors elsewhere, and vice versa */
.region-intl [data-us-only] { display: none !important; }
:root:not(.region-intl) [data-intl-only] { display: none !important; }
.intl-note { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 10px; padding: 12px 16px; font-size: .94rem; margin: 0 0 20px; max-width: 52em; }
.pf-where { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.pf-where-big { margin-top: 18px; }
.pf-where-big .currency-pick-big { margin-top: 0; }
.footer-settings { display: flex; flex-wrap: wrap; gap: 10px 20px; }

/* "Did this help?" */
.helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; font-size: .92rem; color: var(--ink-soft); }
.helpful-q { font-weight: 600; color: var(--ink); margin-right: 2px; }
.helpful-btn { font: inherit; font-size: .9rem; padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.helpful-btn:hover, .helpful-btn:focus-visible { border-color: var(--brand); }
.helpful-thanks { color: var(--brand); font-weight: 600; }
.mf-summary .helpful, .mf-summary .helpful-q, .mf-summary .helpful-thanks { color: inherit; }
.mf-summary .helpful-btn { background: transparent; color: inherit; border-color: rgba(255,255,255,.45); }
.mf-summary .link-btn { color: inherit; }
@media print { .helpful, .intl-note { display: none !important; } }

/* Demo mode */
.demo-link { margin: 18px 0 0; font-size: .95rem; }
.demo-link a { font-weight: 600; }
.is-demo .demo-link { display: none; }
.demo-banner { position: sticky; top: 60px; z-index: 9; background: var(--accent); color: #1b1305; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.demo-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 10px; padding-bottom: 10px; font-size: .93rem; }
.demo-banner .demo-exit { flex: none; padding: 8px 14px; font-size: .88rem; background: #1b1305; color: #fff; }
@media (max-width: 640px) {
  .demo-banner-inner { flex-direction: column; align-items: flex-start; font-size: .86rem; }
}
@media print { .demo-banner { display: none; } }

/* Leave room for the demo banner when jumping to a section */
html.is-demo { scroll-padding-top: 130px; }
@media (max-width: 640px) { html.is-demo { scroll-padding-top: 170px; } }
