/* Payday Runway — George Mercer house style. Static, no build step. */
:root {
  --bg: #12110e; --bg-elev: #1b1914; --bg-elev-2: #221f19; --bg-inset: #0e0d0b;
  --ink: #efe8d8; --muted: #a89f8d; --faint: #7a7466;
  --line: #34302775; --line-solid: #3a362c; --line-strong: #5a5346;
  --accent: #e0a44b; --accent-soft: rgba(224, 164, 75, 0.14); --accent-ink: #1a150c;
  --sage: #8faf90; --sage-soft: rgba(143, 175, 144, 0.16);
  --pos: #8fcf9a; --neg: #e07a69; --neg-soft: rgba(224, 122, 105, 0.14); --caution: #e8b860; --caution-soft: rgba(232, 184, 96, 0.14);
  --actual: #7fb2ec; --actual-soft: rgba(127, 178, 236, 0.16);
  --proj: #3fd27a; --proj-soft: rgba(63, 210, 122, 0.16); --proj-ink: #06210f;
  --c-fixed: #e0a44b; --c-flex: #b49ad6; --c-save: #8faf90; --c-left: #4e5a49; --c-income: #7fb2ec;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38); --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius: 20px; --radius-sm: 12px;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3efe4; --bg-elev: #fffcf5; --bg-elev-2: #f8f3e8; --bg-inset: #ece6d6;
  --ink: #1c1914; --muted: #5f584c; --faint: #857d6e;
  --line: #ddd5c3; --line-solid: #ddd5c3; --line-strong: #b7ae9a;
  --accent: #9a6b1f; --accent-soft: rgba(154, 107, 31, 0.11); --accent-ink: #fffaf0;
  --sage: #2f6b45; --sage-soft: rgba(47, 107, 69, 0.11);
  --pos: #23703f; --neg: #a33a2c; --neg-soft: rgba(163, 58, 44, 0.1); --caution: #8a5a12; --caution-soft: rgba(138, 90, 18, 0.1);
  --actual: #2b62a8; --actual-soft: rgba(43, 98, 168, 0.1);
  --proj: #17a34a; --proj-soft: rgba(23, 163, 74, 0.12); --proj-ink: #ffffff;
  --c-fixed: #c48a2e; --c-flex: #8a6cb8; --c-save: #4f8a62; --c-left: #d9d2bf; --c-income: #2b62a8;
  --shadow: 0 24px 56px rgba(60, 45, 20, 0.12); --shadow-sm: 0 6px 18px rgba(60, 45, 20, 0.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 780px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .faint { color: var(--faint); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-solid); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; }
.brand-mark svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .fill { fill: var(--proj); stroke: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 19px; font-weight: 600; }
.brand-text span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14.5px; }
.nav a:hover { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-solid); background: var(--bg-elev); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
[data-theme="light"] .i-sun, :root:not([data-theme="light"]) .i-moon { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-text { background: transparent; color: var(--accent); padding: 0 6px; min-height: 40px; }
.btn-text.danger { color: var(--neg); }
.btn-green { background: var(--proj); color: var(--proj-ink); width: 100%; margin-top: 18px; }
.btn-actual { background: var(--actual-soft); color: var(--ink); border-color: color-mix(in srgb, var(--actual) 55%, transparent); width: 100%; margin-top: 6px; }
.dot-actual, .dot-proj { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.dot-actual { background: var(--actual); box-shadow: 0 0 0 3px var(--actual-soft); }
.dot-proj { background: var(--proj-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--proj-ink) 25%, transparent); }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-weight: 600; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.pill-beta { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.pill-beta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--proj); }
.hero h1 { font-family: var(--font-serif); font-size: clamp(38px, 5.2vw, 60px); line-height: 1.05; font-weight: 500; letter-spacing: -0.02em; max-width: 13ch; }
.lede { margin-top: 20px; font-size: 18.5px; color: var(--muted); max-width: 52ch; }
.hero .cta-row { margin-top: 30px; }
.chips { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.chips li { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }
.chips svg { width: 16px; height: 16px; fill: none; stroke: var(--pos); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.preview-card { background: var(--bg-elev); border: 1px solid var(--line-solid); border-radius: 24px; padding: 26px 26px 22px; box-shadow: var(--shadow); }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pv-tag { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--proj-soft); color: var(--pos); font-weight: 600; }
.pv-big { font-family: var(--font-serif); font-size: 52px; line-height: 1; margin-top: 18px; color: var(--ink); }
.pv-sub { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.pv-chart { width: 100%; height: 120px; margin: 18px 0 8px; overflow: visible; }
.pv-path { fill: none; stroke: var(--proj); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pv-start { fill: var(--actual); stroke: var(--bg-elev); stroke-width: 2; }
.pv-end { fill: var(--proj); stroke: var(--bg-elev); stroke-width: 2.5; }
.pv-chart .low, .chart-svg .low { stroke: var(--neg); stroke-width: 1.3; stroke-dasharray: 4 5; opacity: 0.75; vector-effect: non-scaling-stroke; }
.pv-events { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--line-solid); }
.pv-events li { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-solid); font-size: 14.5px; }
.pv-events .d { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.pv-events strong { font-family: var(--font-mono); font-weight: 500; }
.pv-foot { margin-top: 14px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- status pills ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.pos { background: var(--proj-soft); color: var(--pos); }
.status.caution { background: var(--caution-soft); color: var(--caution); }
.status.neg { background: var(--neg-soft); color: var(--neg); }

/* ---------- sections ---------- */
.section { padding: 88px 0; border-top: 1px solid var(--line-solid); }
.kicker { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.section h2 { font-family: var(--font-serif); font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; }
.steps3 { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step-card { position: relative; background: var(--bg-elev); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 28px 26px; }
.step-num { position: absolute; top: 22px; right: 24px; font-family: var(--font-mono); font-size: 13px; color: var(--faint); }
.step-ico { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.step-card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 15px; }
.badge { display: inline-block; margin-top: 16px; font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge-green { background: var(--proj-soft); color: var(--pos); }

/* ---------- app shell ---------- */
.app-section { background: var(--bg-inset); }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.private-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.private-note svg { width: 16px; height: 16px; fill: none; stroke: var(--pos); stroke-width: 1.8; }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--bg-elev); border: 1px solid var(--line-solid); border-radius: 18px; padding: 6px; margin-bottom: 26px; }
.stepper-tab { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; padding: 0 10px; }
.stepper-tab .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; border: 1px solid var(--line-strong); flex: none; }
.stepper-tab[aria-selected="true"] { background: var(--bg-elev-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.stepper-tab[aria-selected="true"] .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stepper-tab.done .n { background: var(--proj-soft); color: var(--pos); border-color: transparent; }
.panel { background: var(--bg-elev); border: 1px solid var(--line-solid); border-radius: var(--radius); padding: 26px; }
.view > * + * { margin-top: 20px; }
.vhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.vhead h3 { font-family: var(--font-serif); font-size: 30px; line-height: 1.15; }
.vhead p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.tag { display: inline-block; vertical-align: middle; font-family: var(--font-mono); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); letter-spacing: 0.02em; margin-left: 6px; }
.hint { color: var(--muted); font-size: 14.5px; }
.hint.small { font-size: 13px; margin-top: 10px; }

/* chooser */
.choose { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 34px; }
.choose-copy h3 { font-family: var(--font-serif); font-size: 28px; }
.choose-copy p { color: var(--muted); margin-top: 8px; max-width: 52ch; }
.choose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 20px 22px; min-width: 220px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--bg-elev-2); cursor: pointer; transition: border-color .15s, transform .15s; }
.choice:hover { border-color: var(--accent); transform: translateY(-1px); }
.choice strong { font-size: 16.5px; }
.choice span:last-child { color: var(--muted); font-size: 14px; }
.choice-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; margin-bottom: 10px; }
.choice-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- forms ---------- */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
input[type="text"], input[type="number"], input[type="date"], select {
  width: 100%; min-height: 46px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: var(--bg); font-size: 16px; min-width: 0;
}
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="number"] { font-family: var(--font-mono); }
input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }
.money-wrap { position: relative; display: block; }
.money-wrap > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--font-mono); pointer-events: none; }
.money-wrap input { padding-left: 26px; }
.row-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-top: 16px; }
.row-fields > .fld { flex: 1 1 170px; }
.row-fields > .fld-day { flex: 0 1 170px; }
.check-inline { display: flex; align-items: center; gap: 8px; min-height: 46px; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--accent); }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 22px; cursor: pointer; font-weight: 500; }
.switch-row small { color: var(--muted); font-weight: 400; }
.switch-row input, .mini-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-elev); transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
input:checked + .switch { background: var(--proj); }
input:checked + .switch::after { transform: translateX(18px); }
input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini-switch { display: flex; align-items: center; min-height: 46px; cursor: pointer; position: relative; }
.icon-x { width: 40px; height: 40px; flex: none; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--faint); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.icon-x:hover { color: var(--neg); border-color: var(--line-strong); }
.add { margin-top: 12px; }

/* ---------- wizard ---------- */
.wiz-progress { margin-bottom: 18px; }
.wiz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wiz-dot { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--faint); min-width: 0; }
.wiz-dot b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500; border: 1px solid var(--line-strong); flex: none; }
.wiz-dot em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-dot.on { color: var(--ink); } .wiz-dot.on b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wiz-dot.done b { background: var(--proj-soft); color: var(--pos); border-color: transparent; }
.wiz-bar { height: 4px; border-radius: 4px; background: var(--line-solid); margin-top: 12px; overflow: hidden; }
.wiz-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.wiz-main { padding: 32px; }
.q { font-family: var(--font-serif); font-size: 28px; line-height: 1.2; margin-bottom: 8px; }
.radio-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.radio-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--bg-elev-2); cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card strong { font-size: 15.5px; }
.radio-card span { font-size: 13px; color: var(--muted); }
.radio-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.radio-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sub-card { margin-top: 14px; padding: 4px 18px 18px; border-radius: 14px; background: var(--bg-elev-2); border: 1px solid var(--line-solid); }
.edit-list { display: flex; flex-direction: column; }
.edit-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 0; border-bottom: 1px solid var(--line-solid); }
.edit-row:last-child { border-bottom: 0; }
.edit-row > .fld-name { flex: 2 1 180px; }
.edit-row > .fld-money { flex: 1 1 130px; }
.edit-row > .fld { flex: 1 1 140px; }
.edit-row > .fld-day { flex: 0 1 160px; }
.edit-row.off > :not(.mini-switch):not(.icon-x) { opacity: 0.45; }
.edit-row.cushion > .fld-money { flex: 0 1 300px; }
.prompt-list { margin-top: 10px; }
.prompt-row { padding: 16px 0; border-bottom: 1px solid var(--line-solid); }
.prompt-row .row-fields { margin-top: 8px; }
.prompt-q { font-size: 17px; font-weight: 500; }
.card-fields { margin-top: 14px; }
.wiz-error { color: var(--neg); font-size: 14.5px; min-height: 1.4em; margin-top: 16px; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line-solid); }
.wiz-side { position: sticky; top: 84px; }
.pv-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-solid); font-size: 15px; }
.pv-line span { color: var(--muted); }
.pv-line strong { font-family: var(--font-mono); font-weight: 500; }
.pv-line.total { border-bottom: 0; font-size: 17px; }
.pv-line.total span { color: var(--ink); font-weight: 600; }

/* ---------- budget page ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--bg-elev); border: 1px solid var(--line-solid); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-k { font-size: 13px; color: var(--muted); }
.tile-v { font-family: var(--font-serif); font-size: 30px; line-height: 1.1; font-weight: 500; }
.tile-s { font-size: 12.5px; color: var(--faint); font-family: var(--font-mono); }
.tile.small { padding: 14px 16px; }
.tile.small .tile-v { font-size: 24px; }
.where-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.where-head h4, .chart-head h4, .hist-head h4, .edit-sec h4 { font-size: 19px; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
.seg-fixed { background: var(--c-fixed); } .seg-flex { background: var(--c-flex); } .seg-save { background: var(--c-save); } .seg-left { background: var(--c-left); } .seg-income { background: var(--c-income); }
.stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--bg-inset); gap: 2px; }
.stack .seg { height: 100%; min-width: 3px; transition: width .3s ease; }
.wiz-side .stack { margin-top: 14px; height: 12px; }
.warn { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--neg-soft); color: var(--neg); font-size: 14.5px; }
.note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.hbars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; margin-top: 22px; }
.hbar-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 10px 0 6px; }
.hbar { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 0; }
.hbar-label { display: flex; flex-direction: column; min-width: 0; }
.hbar-label span { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-label small { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.hbar-amt { font-family: var(--font-mono); font-weight: 500; font-size: 14px; min-width: 64px; text-align: right; }
.edit-wrap > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 6px 0; }
.edit-wrap > summary::-webkit-details-marker { display: none; }
.edit-wrap > summary span { font-family: var(--font-serif); font-size: 24px; }
.edit-wrap > summary span::after { content: " ▾"; font-size: 15px; color: var(--muted); }
.edit-wrap:not([open]) > summary span::after { content: " ▸"; }
.edit-wrap > summary small { color: var(--muted); font-size: 14px; }
.edit-sections { display: grid; gap: 16px; margin-top: 14px; }
.edit-sec { padding: 22px 24px; }
.edit-sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.edit-sec-head p { color: var(--muted); font-size: 14px; margin-top: 2px; max-width: 70ch; }
.edit-sec-head .add { margin-top: 0; }
.card-total { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; min-height: 46px; justify-content: flex-end; }
.card-total strong { font-family: var(--font-mono); font-weight: 500; min-height: 46px; display: flex; align-items: center; }
.next-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 26px; border-radius: var(--radius); border: 1px dashed var(--line-strong); }
.next-cta p { color: var(--muted); }

/* ---------- calculator ---------- */
.calc-top { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-left, .calc-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.result-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: end; }
.result-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.result-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.low-line { font-size: 14px; color: var(--muted); }
.low-line strong { color: var(--ink); }
.result-side .btn-green { margin-top: 6px; }
.cpanel { display: flex; flex-direction: column; gap: 14px; }
.panel-step { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.panel-step span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 12.5px; background: var(--accent-soft); color: var(--accent); flex: none; }
.big-money input { font-size: 22px; min-height: 56px; }
.big-money .money-wrap > span { font-size: 20px; }
.feedback { font-size: 14px; color: var(--muted); min-height: 1.2em; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: 14px; cursor: pointer; }
.pill.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.result { background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2)); border-color: var(--line-strong); }
.big-num { font-family: var(--font-serif); font-size: clamp(44px, 4.6vw, 58px); line-height: 1; letter-spacing: -0.02em; }
.big-num.neg { color: var(--neg); }
.result-line { color: var(--muted); font-size: 14.5px; }
.status-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.status-row strong { color: var(--ink); }
.whatif-note { font-size: 13.5px; padding: 8px 12px; border-radius: 10px; background: var(--caution-soft); color: var(--caution); }
.result-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; border: 1px dashed var(--line-strong); border-radius: 14px; }
.result .btn-green { white-space: normal; text-align: center; line-height: 1.25; padding: 10px 18px; }
.breakdown > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.breakdown > summary::-webkit-details-marker { display: none; }
.breakdown > summary span::before { content: "▸ "; color: var(--muted); }
.breakdown[open] > summary span::before { content: "▾ "; }
.breakdown > summary small { color: var(--muted); font-family: var(--font-mono); font-weight: 400; }
#bd-body { margin-top: 16px; }
.bd-start, .bd-end, .bd-ghead { display: flex; justify-content: space-between; gap: 12px; }
.bd-start, .bd-end { padding: 12px 14px; border-radius: 12px; background: var(--bg-inset); }
.bd-end { margin-top: 14px; font-weight: 600; }
.bd-start strong, .bd-end strong, .bd-ghead strong, .bd-group li > strong { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
.bd-group { margin-top: 16px; }
.bd-ghead { font-weight: 600; font-size: 15px; padding-bottom: 6px; border-bottom: 1px solid var(--line-solid); }
.bd-group ul { list-style: none; margin: 0; padding: 0; }
.bd-group li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-solid); font-size: 14.5px; }
.bd-group li label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; min-width: 0; }
.bd-group li input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--proj); flex: none; }
.bd-date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); min-width: 52px; padding-top: 1px; }
.bd-name { display: flex; flex-direction: column; min-width: 0; }
.bd-lines { color: var(--faint); font-size: 12.5px; }
.bd-group li.skipped .bd-name, .bd-group li.skipped > strong { text-decoration: line-through; opacity: 0.5; }

/* chart */
.chart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.chart-head p, .hist-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.lg-actual { background: var(--actual); border-radius: 50%; }
.lg-proj { background: transparent; border: 2px dashed var(--proj); border-radius: 50%; position: relative; }
.lg-proj::after { content: ""; position: absolute; inset: 2px; background: var(--proj); border-radius: 50%; }
.lg-low { height: 0; border-top: 2px dashed var(--neg); border-radius: 0; width: 16px; }
.lg-proj-dot { background: var(--proj); border-radius: 50%; width: 10px; height: 10px; }
.chart { width: 100%; min-height: 250px; }
.chart-svg { width: 100%; height: auto; overflow: visible; font-family: var(--font-mono); }
.chart-svg .grid { stroke: var(--line-solid); stroke-width: 1; }
.chart-svg .zero { stroke: var(--line-strong); stroke-width: 1.3; }
.chart-svg .axis { fill: var(--faint); font-size: 11.5px; }
.chart-svg .today { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 4; opacity: 0.8; }
.chart-svg .today-lbl { fill: var(--accent); font-size: 11px; }
.chart-svg .low-lbl { fill: var(--neg); font-size: 11px; }
.chart-svg .actual-line { fill: none; stroke: var(--actual); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .actual-dot { fill: var(--actual); stroke: var(--bg-elev); stroke-width: 2.5; cursor: pointer; }
.chart-svg .proj-line { stroke: var(--proj); stroke-width: 2.2; stroke-dasharray: 7 6; stroke-linecap: round; }
.chart-svg .proj-start { fill: var(--bg-elev); stroke: var(--proj); stroke-width: 1.8; }
.chart-svg .proj-marker { fill: var(--proj); stroke: var(--bg-elev); stroke-width: 3; cursor: pointer; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--proj) 55%, transparent)); }
.chart-svg circle[tabindex]:focus { outline: none; stroke: var(--ink); }
.chart-empty { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 20px; }
.chart-empty svg { width: 36px; height: 36px; fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linecap: round; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--bg-elev-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); max-width: 240px; }
.chart-tip[hidden] { display: none; }
.chart-tip strong { font-family: var(--font-serif); font-size: 22px; color: var(--ink); font-weight: 500; }
.chart-tip .tt-k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.chart-tip.is-proj .tt-k { color: var(--pos); } .chart-tip.is-actual .tt-k { color: var(--actual); }
.chart-tip .tt-n { color: var(--faint); font-size: 12.5px; }

/* history */
.hist-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.acc-tiles { display: flex; gap: 12px; flex-wrap: wrap; }
.acc-tiles .tile { min-width: 150px; background: var(--bg-elev-2); }
.table-wrap { width: 100%; overflow-x: auto; }
.hist { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.hist th { text-align: left; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); }
.hist td { padding: 8px 10px; border-bottom: 1px solid var(--line-solid); vertical-align: middle; white-space: nowrap; }
.hist td strong { font-weight: 600; }
.hist .note-cell { width: 34%; white-space: normal; }
.hist .note-cell input { min-height: 38px; font-size: 14.5px; background: transparent; border-color: var(--line-solid); }
.hist .del-cell { width: 44px; }
.proj-list { margin-top: 18px; }
.proj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--proj-soft); font-size: 13.5px; }
.proj-chip small { color: var(--muted); }
.chip-x { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 17px; }
.chip-x:hover { color: var(--neg); }
.hist-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.disclaim-mini { font-size: 13px; color: var(--faint); text-align: center; }

/* data bar */
.data-bar { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--line-solid); background: var(--bg-elev); }
.data-copy { display: flex; flex-direction: column; }
.data-copy span { color: var(--muted); font-size: 14px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* faq */
.faq h2 { margin-bottom: 26px; }
.acc { border-bottom: 1px solid var(--line-solid); }
.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 18px 0; font-weight: 600; font-size: 17px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 20px; margin-left: 8px; }
.acc[open] summary::after { content: "–"; }
.acc .read { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--faint); font-weight: 400; white-space: nowrap; }
.acc-body { padding: 0 0 20px; color: var(--muted); max-width: 66ch; }

/* footer */
.site-footer { border-top: 1px solid var(--line-solid); padding: 48px 0 40px; }
.foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; }
.foot-brand strong { font-family: var(--font-serif); font-size: 20px; font-weight: 600; }
.foot-brand span { color: var(--muted); font-size: 14px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.foot-links a:hover { color: var(--ink); }
.disclaimer-box { margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line-solid); font-size: 13.5px; color: var(--muted); }
.disclaimer-box strong { color: var(--ink); }
.foot-fine { margin-top: 18px; font-size: 13px; color: var(--faint); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 500; z-index: 80; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .calc-top { grid-template-columns: 1fr; }
  .calc-left { display: grid; grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .radio-cards { grid-template-columns: repeat(2, 1fr); }
  .wiz-grid { grid-template-columns: 1fr; }
  .wiz-side { position: static; }
  .nav { display: none; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 860px) {
  .hero { padding: 44px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps3 { grid-template-columns: 1fr; }
  .hbars { grid-template-columns: 1fr; }
  .choose { grid-template-columns: 1fr; }
  .wiz-dot em { display: none; }
  .wiz-dot.on em { display: inline; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .section { padding: 56px 0; }
  .topbar-inner { height: 58px; gap: 12px; }
  .brand-text span { display: none; }
  #top-cta { display: none; }
  .hero h1 { font-size: 38px; }
  .lede { font-size: 17px; }
  .hero .cta-row .btn { width: 100%; }
  .pv-big { font-size: 44px; }
  .preview-card { padding: 22px 18px 18px; }
  .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; }
  .stepper-tab { flex-direction: column; gap: 4px; min-height: 64px; font-size: 12.5px; text-align: center; line-height: 1.2; padding: 6px 4px; }
  .panel { padding: 20px 18px; }
  .wiz-main { padding: 22px 18px; }
  .q { font-size: 24px; }
  .choose { padding: 24px 18px; }
  .choose-grid { grid-template-columns: 1fr; }
  .choice { min-width: 0; }
  .calc-left { grid-template-columns: 1fr; }
  .result-body { grid-template-columns: 1fr; gap: 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile:last-child { grid-column: 1 / -1; }
  .tile-v { font-size: 25px; }
  .vhead h3 { font-size: 25px; }
  .vhead .cta-row, .vhead .cta-row .btn { width: 100%; }
  .hbar { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) auto; gap: 8px; }
  .hbar-amt { min-width: 0; }
  .edit-row > .fld-name, .edit-row > .fld-money, .edit-row > .fld, .edit-row > .fld-day { flex: 1 1 calc(50% - 12px); }
  .edit-row > .fld-name { flex-basis: calc(100% - 120px); }
  .row-fields > .fld, .row-fields > .fld-day { flex: 1 1 calc(50% - 14px); }
  .radio-cards { gap: 8px; }
  .radio-card { padding: 12px; }
  .wiz-nav .btn { flex: 1 1 auto; white-space: normal; text-align: center; }
  .next-cta .btn { width: 100%; white-space: normal; }
  .hist thead { display: none; }
  .hist, .hist tbody, .hist tr, .hist td { display: block; width: 100%; }
  .hist tr { position: relative; padding: 10px 0; border-bottom: 1px solid var(--line-strong); }
  .hist td { border: 0; padding: 3px 44px 3px 0; display: flex; justify-content: space-between; gap: 10px; white-space: normal; }
  .hist td::before { content: attr(data-l); color: var(--faint); font-family: var(--font-mono); font-size: 12px; }
  .hist .note-cell { width: 100%; padding-right: 0; display: block; }
  .hist .note-cell::before { display: none; }
  .hist .del-cell { position: absolute; top: 6px; right: 0; width: auto; padding: 0; }
  .data-actions .btn { flex: 1 1 calc(50% - 8px); }
  .acc summary { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
