.calculator-hero { padding-bottom: 48px; }
.calculator-heading { display: flex; max-width: 880px; align-items: start; gap: 20px; }
.calculator-heading h1 { margin-bottom: 15px; font-size: clamp(2.35rem, 5vw, 4rem); }
.calculator-heading p { max-width: 750px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.tool-icon-large { width: 64px; height: 64px; margin-top: 5px; font-size: 1.6rem; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(330px, .88fr); align-items: start; gap: 25px; padding-block: 55px; }
.calculator-shell, .result-panel { border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 12px 40px rgba(24,57,47,.07); }
.calculator-form { padding: 30px; }
.form-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.form-heading > span { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: var(--green-900); border-radius: 50%; font-weight: 900; }
.form-heading h2 { margin: 0 0 3px; font-size: 1.35rem; }
.form-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.calculator-form label { display: grid; gap: 7px; color: #34443d; font-size: .82rem; font-weight: 750; }
.calculator-form [hidden] { display: none !important; }
.calculator-form input, .calculator-form select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #cfdad4; border-radius: 10px; outline: none; color: var(--ink); background: #fff; font-weight: 500; }
.calculator-form input:focus, .calculator-form select:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(84,163,127,.13); }
.input-affix { display: flex; align-items: center; overflow: hidden; border: 1px solid #cfdad4; border-radius: 10px; background: #fff; }
.input-affix:focus-within { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(84,163,127,.13); }
.input-affix input { min-width: 0; border: 0; box-shadow: none !important; }
.input-affix b { padding: 0 12px; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.switch-row { display: flex !important; align-items: center; grid-template-columns: auto 1fr; gap: 10px !important; margin-top: 22px; cursor: pointer; }
.switch-row > input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 42px; height: 24px; background: #cbd5d0; border-radius: 20px; transition: background .2s; }
.switch:after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--green-700); }
.switch-row input:checked + .switch:after { transform: translateX(18px); }
.conditional-field { max-width: 48%; margin-top: 18px; }
.form-help { margin: 16px 0 0; color: var(--muted); font-size: .78rem; }
.calculate-button { width: 100%; margin-top: 25px; }
.form-error { padding: 11px 13px; margin-top: 18px; border-radius: 9px; color: #852e32; background: #fff0f0; font-size: .82rem; }
.result-panel { position: sticky; top: 100px; min-height: 450px; overflow: hidden; }
.result-placeholder { display: grid; min-height: 450px; place-content: center; padding: 35px; color: var(--muted); text-align: center; }
.result-placeholder h2 { margin-bottom: 10px; color: var(--ink); font-size: 1.4rem; }
.result-illustration { display: grid; width: 75px; height: 75px; place-items: center; margin: 0 auto 20px; border-radius: 50%; color: var(--green-700); background: var(--mint); font-size: 2rem; }
.result-content { padding: 30px; }
.result-kicker { display: block; margin-bottom: 5px; color: var(--green-700); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.result-main { padding: 24px; margin-bottom: 18px; border-radius: 17px; color: #fff; background: var(--green-900); }
.result-main span { display: block; color: #b9d4c7; font-size: .78rem; }
.result-main strong { display: block; margin-top: 4px; font-size: 2.25rem; letter-spacing: -.04em; }
.result-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.result-stat { padding: 15px; border-radius: 12px; background: #f4f7f5; }
.result-stat span, .strategy-card span { display: block; color: var(--muted); font-size: .7rem; }
.result-stat strong { font-size: 1.03rem; }
.result-note { padding: 14px; margin: 16px 0; border-left: 3px solid var(--gold); color: #665627; background: #fff9e8; font-size: .82rem; }
.progress-block { margin-top: 18px; }
.progress-label { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 7px; color: var(--muted); font-size: .72rem; }
.progress-track { height: 11px; overflow: hidden; border-radius: 20px; background: #e7eee9; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.budget-bars { display: grid; gap: 11px; margin-top: 20px; }
.budget-bar-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; font-size: .72rem; }
.budget-bar-heading span { color: var(--muted); }
.budget-bar-track { height: 9px; overflow: hidden; border-radius: 20px; background: #e7eee9; }
.budget-bar-track span { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: var(--green-500); }
.budget-bar:nth-child(2n) .budget-bar-track span { background: var(--gold); }
.health-list { display: grid; gap: 8px; padding: 0; margin: 16px 0 0; list-style: none; }
.health-list li { position: relative; padding: 11px 12px 11px 36px; border-radius: 10px; color: #44524c; background: #f4f7f5; font-size: .78rem; }
.health-list li:before { content: "→"; position: absolute; left: 13px; color: var(--green-700); font-weight: 900; }
.health-list li.warning { color: #79552d; background: #fff7e8; }
.health-list li.warning:before { content: "!"; color: #a86f22; }
.result-actions { display: flex; gap: 8px; margin-top: 16px; }
.result-actions button { flex: 1; padding: 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-900); background: #fff; font-size: .76rem; font-weight: 800; cursor: pointer; }
.chart-wrap { padding-top: 20px; }
.chart-wrap canvas { width: 100%; height: 170px; }
.table-wrap { max-height: 260px; overflow: auto; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; }
.result-table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.result-table th, .result-table td { padding: 9px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.result-table th:first-child, .result-table td:first-child { text-align: left; }
.result-table tr.selected-row td { color: var(--green-900); background: var(--mint); font-weight: 800; }
.strategy-card { padding: 16px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; }
.strategy-card.best { border-color: #9ec6b3; background: var(--mint); }
.strategy-card h3 { margin: 5px 0 8px; font-size: 1rem; }
.strategy-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.debt-item { position: relative; padding: 20px; margin: 0 0 15px; border: 1px solid var(--line); border-radius: 14px; }
.debt-item legend { padding: 0 7px; color: var(--green-700); font-size: .77rem; font-weight: 900; }
.remove-debt { position: absolute; top: -12px; right: 10px; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.add-debt { width: 100%; min-height: 43px; margin-bottom: 22px; border-style: dashed; }
.monthly-budget { padding-top: 20px; border-top: 1px solid var(--line); }
.calculator-content { max-width: 900px; padding-bottom: 90px; }
.content-section { padding-top: 75px; }
.content-section h2 { margin-bottom: 20px; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.content-section > p { color: var(--muted); font-size: 1.03rem; }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 88px; padding: 20px 20px 20px 58px; border: 1px solid var(--line); border-radius: 14px; counter-increment: steps; }
.steps li:before { content: counter(steps); position: absolute; left: 18px; top: 19px; display: grid; width: 27px; height: 27px; place-items: center; color: #fff; background: var(--green-700); border-radius: 50%; font-size: .75rem; font-weight: 900; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.faq-list summary { padding: 18px; font-weight: 800; cursor: pointer; }
.faq-list p { padding: 0 18px 18px; margin: 0; color: var(--muted); }
.related-grid { grid-template-columns: repeat(3, 1fr); }
.ebook-cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 38px; margin-top: 75px; border-radius: 22px; color: #fff; background: var(--green-900); }
.ebook-cta .eyebrow { color: #9cc8b3; }
.ebook-cta h2 { max-width: 570px; margin-bottom: 10px; font-size: 2rem; }
.ebook-cta p { max-width: 620px; margin: 0; color: #c0d6cb; }
.ebook-cta .button { flex: 0 0 auto; }
.disclaimer-box { padding: 18px; margin-top: 65px; border: 1px solid #e6dbb9; border-radius: 12px; color: #6e633d; background: #fffbef; font-size: .82rem; }

@media (max-width: 900px) {
    .calculator-layout { grid-template-columns: 1fr; }
    .result-panel { position: static; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .calculator-heading { flex-direction: column; }
    .calculator-form, .result-content { padding: 20px; }
    .form-grid, .steps, .related-grid { grid-template-columns: 1fr; }
    .conditional-field { max-width: 100%; }
    .result-stats { grid-template-columns: 1fr 1fr; }
    .ebook-cta { align-items: stretch; flex-direction: column; padding: 26px; }
    .ebook-cta .button { width: 100%; }
}
