/* A small illustrated household ledger: warm paper, soft colors, rounded outlines. */
:root{--bg:#fff9ee;--ink:#373344;--muted:#817b8d;--line:#eee5d9;--purple:#7964c5;--light:#f0e9ff;--green:#398b72;--gl:#edf6e9}
body{background-color:var(--bg);background-image:radial-gradient(#e5d9c7 0.7px,transparent 0.7px);background-size:20px 20px}
.card{border:1.5px solid #e7ddce;border-radius:23px;box-shadow:0 4px 0 #e9ddcc70}
.top{border-color:#e8ddcc}.brandmark{border:2px solid #554387;box-shadow:2px 3px 0 #dfd1f1;rotate:-5deg}
.intro h1{font-weight:750}.eyebrow{letter-spacing:1.3px}.date-chip,.outline{border-color:#e7ddce;background:#fffdf8;border-radius:14px}
.stat:nth-child(1){background:#f0edff}.stat:nth-child(2){background:#fff2d9}.stat:nth-child(3){background:#edf5ec}
.inputbox,.select-button{background:#fcfaf6;border-color:#eee5d9;border-radius:13px}
.inputbox input:focus-visible{outline:none}
.inputbox:focus-within{border-color:#b6a4df;background:#fffdfb;box-shadow:0 0 0 3px #7964c510}
.primary{border:1.5px solid #61509b;border-radius:15px;box-shadow:0 4px 0 #d9cbed}.seg{background:#f4efe9}.seg button{border-radius:9px}
.family-settings{border:1px dashed #d9cbb7;border-radius:16px;background:#fffcf5;padding:13px}
.family-settings>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;list-style:none;font-size:14px;font-weight:650}
.family-settings>summary::-webkit-details-marker{display:none}.family-settings summary small{display:block;color:var(--muted);font-size:10px;font-weight:400;margin-top:3px}
.family-chevron{display:grid;place-items:center;border-radius:50%;background:#f0e9ff;color:var(--purple);width:26px;height:26px;font-size:19px;flex-shrink:0}
.family-settings[open] .family-chevron{transform:rotate(45deg)}.family-body{padding-top:1px}.family-body .label{flex-wrap:wrap;gap:3px}.family-body .help{color:#817568}
.family-apply{display:block;width:100%;padding:10px;margin-top:16px;background:#eee6fa;color:#604b9c;border:1px solid #d8c9ed;border-radius:12px;font-size:12px;font-weight:650}
#careCostField[hidden]{display:none}#familyError:empty{display:none}#familyError{color:#b4493c}
.pressure-panel{--tone:#398b72;--tint:#edf6e9;margin-top:20px;padding:22px 24px;background:#fffdf8;border-color:#e7ddce}
[data-tone=calm]{--tone:#398b72;--tint:#edf6e9}[data-tone=mild]{--tone:#7c853b;--tint:#f6f5dd}[data-tone=warm]{--tone:#ac762b;--tint:#fff1d8}[data-tone=hot]{--tone:#bd6844;--tint:#ffeadf}[data-tone=storm]{--tone:#b45461;--tint:#fce5e8}[data-tone=neutral]{--tone:#7964c5;--tint:#f0e9ff}
.stat.highlight{background:var(--tint,#f0e9ff);color:var(--tone,#7964c5);border-color:var(--tone,#7964c5);box-shadow:0 4px 0 #e9ddcc70}
.highlight .stat-title,.highlight .stat-num small,.highlight .stat-title .icon,.highlight .stat-foot{color:inherit}.pressureline{background:#ffffffa0}.pressureline i{background:var(--tone,#7964c5)}
.pressure-heading{display:flex;align-items:center;gap:15px}.pressure-face{display:grid;place-items:center;width:66px;height:66px;border-radius:23px;background:var(--tint);font-size:38px;flex-shrink:0;transform:rotate(-5deg);border:1px solid #00000009}
.pressure-heading h2{font-size:21px;color:var(--tone);margin:2px 0}.pressure-kicker{font-size:10px;color:var(--muted);letter-spacing:1px}.pressure-heading p{font-size:12px;color:#817b8d;margin:0}.pressure-heading .outline{margin-left:auto;flex-shrink:0;font-size:11px}
.pressure-bands{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:21px}.pressure-bands span{font-size:10px;text-align:center;padding:8px 3px;border-radius:9px;background:#f4f0e9;color:#888070;border-bottom:3px solid #ddd4c7}.pressure-bands span.active{background:var(--tint);color:var(--tone);border-color:var(--tone);font-weight:700}
.budget-formula{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:18px 0 12px;font-size:10px;color:var(--muted);flex-wrap:wrap}.budget-formula span{display:grid;gap:2px}.budget-formula b{font-size:17px;color:var(--ink);font-variant-numeric:tabular-nums}.budget-formula i{font-style:normal;color:#b9ac99}
.pressure-explain{font-size:11px;color:#82796a;line-height:1.9;margin:0}.pressure-explain strong{color:var(--tone)}
.buffer-details{margin-top:14px;border-top:1px dashed #e2d8c7;padding-top:12px;font-size:12px}.buffer-details>summary{cursor:pointer;color:#756283}.buffer-details ul{padding-left:20px;color:#82796a;font-size:11px;line-height:1.9}.buffer-details li+li{margin-top:5px}
.insight{border-radius:19px;border-color:#d8e6cf}.modal{border:2px solid #e7ddce;border-radius:25px;background:#fffdf8}.charttip{border-radius:14px;border-color:#e7ddce}.plan-number{border-radius:12px;rotate:-4deg}.footer{border-color:#e8ddcc}
.interest-paid{background:#e6b875}.paid-key{color:#b98642}.interest-split{font-size:10px;color:var(--muted);text-align:center;margin:9px 0 0;line-height:1.8}.interest-split b{font-weight:550;color:#81705b}.interest-bar-key{flex-wrap:wrap}
.interest-comparison{display:grid;grid-template-columns:minmax(170px,.7fr) minmax(0,2fr);gap:15px 25px;padding:21px 24px;margin-top:20px;background:#fffdf8}.interest-result>span{font-size:12px;color:#69846e}.interest-result>strong{display:block;font-size:32px;line-height:1.4;color:#398b72;font-variant-numeric:tabular-nums}.interest-result small{font-size:12px;font-weight:400}.interest-result p{margin:3px 0 0;font-size:11px;color:#817b8d}.interest-bars{align-self:center;min-width:0}.interest-bar-row{display:grid;grid-template-columns:78px minmax(0,1fr) 84px;gap:10px;align-items:center;margin:11px 0;font-size:11px;color:#82796a}.interest-bar-row b{font-size:12px;text-align:right;color:var(--ink);font-weight:550;font-variant-numeric:tabular-nums}.interest-bar-track{display:flex;height:20px;border-radius:6px;overflow:hidden;background:#f3eee5}.interest-bar-track i{display:block;height:100%;min-width:0;transition:width .25s}.interest-original,.interest-current{background:#9e8bdb}.interest-saved{background:repeating-linear-gradient(135deg,#d5ecd9 0 5px,#edf6e9 5px 10px)}.interest-bar-key{display:flex;gap:17px;justify-content:center;font-size:10px;color:#8875b7;margin:8px 0 0}.saved-key{color:#398b72}.interest-comparison-note{grid-column:1/-1;font-size:10px;color:var(--muted);margin:0;line-height:1.8}.scenario-controls{margin:15px 0 0;padding:12px;background:#fbf7ef;border:1px dashed #e4d7c3;border-radius:13px}.scenario-caption{display:flex;gap:10px;flex-wrap:wrap;font-size:11px;align-items:center}.scenario-caption strong{color:#776286}.scenario-caption>span{font-size:10px;color:var(--muted)}.scenario-switches{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}.scenario-switch{display:flex;align-items:center;gap:9px;padding:9px 12px;text-align:left;border:1px solid #e3dbd0;border-radius:11px;background:#f2efeb;color:#96909b}.scenario-switch.included{background:#f2edfc;border-color:#d7c8ed;color:#7964c5}.scenario-switch b{display:block;font-size:11px;font-weight:600}.scenario-switch small{display:block;font-size:9px;margin-top:2px}.scenario-switch-dot{width:22px;height:14px;border-radius:12px;background:#d1ccd6;position:relative;flex-shrink:0}.scenario-switch-dot:before{content:'';position:absolute;top:3px;left:3px;width:8px;height:8px;border-radius:50%;background:white}.included .scenario-switch-dot{background:#9d87d2}.included .scenario-switch-dot:before{left:11px}.payment-stages{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}.payment-stages[hidden]{display:none}.payment-stage{flex:1;min-width:180px;padding:12px 14px;border:1px solid #dce7d6;border-radius:12px;background:#f3f8ef;text-align:left}.payment-stage>span{display:block;color:#587a5e;font-size:11px}.payment-stage>b{display:block;font-size:15px;margin:3px 0;color:#3d6a50}.payment-stage>small{display:block;font-size:10px;color:#7a8b72;line-height:1.8}.payment-stage>em{display:block;margin-top:3px;font-size:9px;font-style:normal;color:#8e7ab5}.payment-stage.selected{border-color:#7964c5;background:#f3edfc}.payment-marker{cursor:pointer;outline:none}.payment-marker .repayment-label{fill:#edf6e9;stroke:#cbdcc5}.payment-marker .repayment-label-text{fill:#398b72}.payment-marker:hover .repayment-label,.payment-marker:focus-visible .repayment-label{stroke:#398b72;stroke-width:2}.payment-tooltip-note{font-size:10px;color:#398b72;border-top:1px solid var(--line);padding-top:5px;margin:5px 0 0;line-height:1.7;max-width:190px}.charttip{min-width:165px}.charttip strong{font-size:11px}
@media(max-width:740px){.interest-comparison{grid-template-columns:1fr;padding:18px 16px;gap:8px}.interest-result>strong{font-size:29px}.interest-bar-row{grid-template-columns:68px minmax(0,1fr) 76px;gap:7px;font-size:10px}.interest-bar-row b{font-size:11px}.interest-bar-track{height:17px}.scenario-controls{padding:10px}.scenario-switch{flex:1;min-width:130px;padding:8px}.payment-stage{min-width:145px}.charttip{min-width:145px}}
.chart #cursorLine,.chart #cursorDot{opacity:0;pointer-events:none}.chart:hover #cursorLine,.chart:hover #cursorDot,.chart:has(:focus-visible) #cursorLine,.chart:has(:focus-visible) #cursorDot{opacity:1}
.rate-marker{cursor:pointer;outline:none}.rate-marker:hover>circle:last-child,.rate-marker:focus-visible>circle:last-child{fill:#fff0d8;stroke-width:3}.chart .plan-path{stroke-linejoin:bevel}
.chart{height:280px}.chart svg{overflow:visible}.chart text{font-size:11px;letter-spacing:0;font-weight:400}.chart .repayment-label{fill:#f6f1ff;stroke:#dfd3f3;stroke-width:1}.chart .repayment-label-text{font-size:10px;fill:#7964c5}.repayment-guide{stroke:#b6a4df;stroke-width:1;stroke-dasharray:3 4;opacity:.6}.repayment-marker{cursor:pointer;outline:none}.repayment-marker:focus-visible .repayment-label,.repayment-marker:hover .repayment-label{stroke:#7964c5;stroke-width:2}.repayment-hit{fill:transparent;stroke:none}.chart-range-note{font-size:10px;color:var(--muted);line-height:1.8;margin:7px 0 0}.repayment-tooltip{border-top:1px solid var(--line);margin-top:5px;padding-top:5px}.chart .plan-path,.chart .base-path,.chart .grid,.chart .cursor{vector-effect:non-scaling-stroke}
@media(max-width:740px){.chart{height:260px}.chart text{font-size:10px}.chart .repayment-label-text{font-size:9px}.charttip{font-size:10px;min-width:125px}.timeline-labels{gap:8px;flex-wrap:wrap}}
.parameter-update-status{display:flex;align-items:center;gap:7px;min-height:18px;font-size:11px;color:var(--muted);line-height:1.6;margin:5px 0 0}.parameter-update-status i{display:inline-grid;place-items:center;width:13px;height:13px;flex-shrink:0;font-style:normal}.parameter-update-status[data-state=loading]{color:#7964c5}.parameter-update-status[data-state=loading] i{border:2px solid #dfd4ef;border-top-color:#7964c5;border-radius:50%;animation:parameter-spin .7s linear infinite}.parameter-update-status[data-state=success]{color:#398b72}.parameter-update-status[data-state=success] i:after{content:'✓';font-weight:700}.parameter-update-status[data-state=error]{color:#b45461}.parameter-update-status[data-state=error] i:after{content:'!';font-weight:700}@keyframes parameter-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.parameter-update-status[data-state=loading] i{animation:none}}
.parameters-overlay{position:fixed;inset:0;z-index:15;display:flex;align-items:center;justify-content:center;padding:24px;background:#302a404d;backdrop-filter:blur(5px)}.parameters-overlay[hidden]{display:none}.parameters-dialog{width:700px;max-width:100%;max-height:90dvh;display:flex;flex-direction:column;overflow:hidden;background:#fffdf8;border:2px solid #e7ddce;border-radius:24px;box-shadow:0 24px 90px #302a4030}.parameters-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:20px 24px 16px;border-bottom:1px solid #eee5d9;flex-shrink:0}.parameters-dialog-header h2{font-size:20px;margin:0}.parameters-dialog-header p{font-size:11px;color:var(--muted);margin:4px 0 0}.parameters-dialog-scroll{overflow:auto;overscroll-behavior:contain;padding:20px 24px;scrollbar-width:thin;scrollbar-color:transparent transparent}.parameters-dialog-scroll.is-scrolling{scrollbar-color:#a6aabb transparent}.parameters-dialog-scroll::-webkit-scrollbar{width:6px}.parameters-dialog-scroll::-webkit-scrollbar-thumb{background:transparent;border-radius:6px}.parameters-dialog-scroll.is-scrolling::-webkit-scrollbar-thumb{background:#a6aabb}.parameters-dialog .aside{width:100%}.parameters-dialog .config{padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}.parameters-dialog .secondary-note{padding-bottom:0;font-size:10px}.parameters-dialog .family-settings{scroll-margin:16px}
@media(max-width:740px){.parameters-overlay{padding:12px}.parameters-dialog{max-height:92dvh;border-radius:20px}.parameters-dialog-header{padding:16px}.parameters-dialog-scroll{padding:16px}.parameters-dialog .loan-fields{display:block}.parameters-dialog .loan-fields .fields2{display:grid}.parameters-dialog .optional-fields{display:block}}
.parameters-bar{position:relative;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;margin-bottom:22px;background:#fffdf8;border:1.5px solid #e7ddce;border-radius:18px;box-shadow:0 4px 0 #e9ddcc70}.parameters-summary{display:flex;align-items:center;gap:12px;min-width:0}.parameters-symbol{display:grid;place-items:center;width:39px;height:39px;flex-shrink:0;background:#f0e9ff;border-radius:13px;font-size:22px}.parameters-summary strong{font-size:13px}.parameters-summary p{font-size:11px;color:var(--muted);margin:3px 0 0}.parameters-bar .outline{color:var(--purple);flex-shrink:0;font-size:12px;background:#f4effc;border-color:#e0d5ee}.parameters-bar.has-pending-changes{border-color:#dcb574}.parameters-bar.has-pending-changes strong{color:#a26d28}.layout.parameters-collapsed{grid-template-columns:minmax(0,1fr)}.aside[hidden]{display:none!important}#dashboard,.family-settings{scroll-margin-top:20px}
@media(max-width:740px){.parameters-bar{padding:12px;margin-bottom:19px;gap:9px}.parameters-summary{gap:8px}.parameters-symbol{display:none}.parameters-summary strong{font-size:12px}.parameters-summary p{font-size:10px}.parameters-bar .outline{font-size:10px;padding:8px 9px}.layout.parameters-collapsed{gap:0}}
.rate-config-button{display:block;width:100%;text-align:left;font-size:11px;color:#70568e;background:#f1eaf9;border:1px dashed #d6c7e7;border-radius:11px;padding:10px 11px;margin-top:13px}
.rate-assumption{font-size:10px!important}.rate-audit{margin-top:20px;padding:22px 24px;background:#fffdf8}.rate-audit .section-head{margin-bottom:7px}.rate-audit h2{font-size:16px}.rate-loan-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:15px 0}.rate-loan-cards>div{border:1px solid #eee2d2;border-radius:14px;padding:13px;background:#fcf8f1;min-width:0}.rate-current{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px}.rate-current b{color:#7964c5;font-size:20px}.rate-current button{margin-left:auto;font-size:10px}.rate-loan-cards summary{cursor:pointer;font-size:11px;color:#7964c5;margin-top:10px}.rate-table-wrap{overflow:auto;max-width:100%}.rate-table-wrap td{white-space:normal;font-size:10px;padding:9px 6px}.rate-table-wrap td small{display:block;color:#98909d}.rate-table-wrap th{padding:8px 6px;font-size:10px}.actual-rate-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 28px;gap:8px;align-items:end;margin-top:12px}.actual-rate-row input{font-size:14px}.actual-rate-row .inputbox{padding:8px;min-height:42px}.actual-rate-row .iconbtn{margin-bottom:6px}.modal input[type=month]{font-size:14px}.modal h3{font-size:15px;margin-top:22px}.rate-audit a,.modal .help a{color:#7964c5;text-decoration:underline;text-underline-offset:3px}
@media(max-width:960px){.rate-loan-cards{grid-template-columns:1fr}}
@media(max-width:740px){.rate-audit{padding:19px 16px}.rate-audit .section-head{align-items:flex-start;flex-wrap:wrap}.rate-audit h2{font-size:15px}}
@media(max-width:960px){.pressure-heading{flex-wrap:wrap}.pressure-heading .outline{margin-left:81px}.pressure-bands{grid-template-columns:repeat(2,1fr)}}
@media(max-width:740px){.pressure-panel{padding:19px 16px}.pressure-heading{gap:11px}.pressure-face{width:50px;height:50px;font-size:30px;border-radius:18px}.pressure-heading h2{font-size:19px}.pressure-heading>div{flex:1;min-width:0}.pressure-heading .outline{margin-left:61px}.pressure-bands{grid-template-columns:repeat(2,1fr)}.budget-formula{display:grid;grid-template-columns:1fr 20px 1fr}.budget-formula span:last-child{background:var(--tint);padding:8px;border-radius:9px}.budget-formula b{font-size:16px}.family-body .optional-fields{display:block}}
