:root{
  --navy:#142b42;--navy-dark:#102337;--navy-mid:#203b54;--ink:#1c3145;
  --muted:#718294;--muted-2:#94a3b0;--border:#e3eaf0;--surface:#fff;
  --app-bg:#f4f7fa;--mint:#a0edcc;--teal:#168668;--teal-dark:#107354;
  --blue:#4778a4;--orange:#cf8650;--danger:#c04451;--danger-bg:#fff1f1;
  --radius:17px;--shadow:0 5px 23px rgba(33,56,77,.037);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:26px}
body{margin:0;min-width:320px;background:var(--app-bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);line-height:1.45;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}
button:disabled{opacity:.47;cursor:not-allowed}
.svg-defs{position:absolute;width:0;height:0;overflow:hidden}
.icon{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.shell{display:flex;min-height:100vh}
.sidebar{width:245px;flex:0 0 245px;height:100vh;position:sticky;top:0;background:var(--navy);color:#d6e3ef;display:flex;flex-direction:column;padding:34px 17px 20px;z-index:10}
.brand{display:flex;align-items:center;gap:12px;padding:0 12px;margin-bottom:58px}
.brand-icon{width:40px;height:40px;border:1px solid rgba(255,255,255,.18);background:linear-gradient(145deg,#8fe6c6,#52acaa);border-radius:12px;display:grid;place-items:center;transform:rotate(-4deg);box-shadow:0 7px 20px rgba(22,173,149,.2)}
.brand-icon-mark{font-weight:900;color:#17483c;font-size:24px;letter-spacing:-.15em;padding-right:4px;transform:rotate(4deg)}
.brand-words{display:flex;flex-direction:column;line-height:1.05;gap:5px}.brand-words strong{color:#fff;font-size:18px;letter-spacing:-.04em}.brand-words small{font-size:10px;letter-spacing:.33em;font-weight:800;color:#8ee0c2}
.nav-label{font-size:10px;font-weight:750;letter-spacing:.22em;color:#8297aa;margin:0 14px 14px}
.nav-main{display:grid;gap:5px}.nav-item{min-height:46px;display:flex;gap:13px;align-items:center;padding:0 15px;color:#a9bdce;font-size:13px;font-weight:600;border-radius:10px;transition:background .17s,color .17s}.nav-item:hover{color:#fff;background:rgba(255,255,255,.07)}.nav-item.active{color:#fff;background:#29465d}.nav-item.active .icon{color:#8fe7c7}.nav-item .icon{width:17px;height:17px}
.sidebar-bottom{margin-top:auto;display:grid;gap:27px}.privacy-card{display:flex;gap:12px;border:1px solid #37516a;border-radius:12px;padding:15px 12px;background:rgba(255,255,255,.035)}.privacy-card>.icon{color:var(--mint);width:17px;height:17px;margin-top:2px}.privacy-card span{display:flex;flex-direction:column;gap:5px}.privacy-card strong{font-size:12px;color:#fff}.privacy-card small{font-size:11px;line-height:1.5;color:#9fb4c5}.app-state{font-size:10px;letter-spacing:.03em;display:flex;align-items:center;gap:8px;color:#aec0cf;padding:0 11px}.connection-dot{height:7px;width:7px;display:inline-block;border-radius:50%;background:#7de4b3;box-shadow:0 0 0 4px rgba(125,228,179,.09)}.connection-dot.offline{background:#d7b56e;box-shadow:none}.version{margin-left:auto;color:#708da6}
.main-content{flex:1;min-width:0}.app-header{height:79px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(22px,3.8vw,58px);background:#fff;border-bottom:1px solid var(--border)}.header-tag{font-size:10px;font-weight:800;letter-spacing:.19em;color:#6c8191;display:flex;align-items:center;gap:10px}.header-tag-dot{height:7px;width:7px;border-radius:50%;background:#44b698}.header-actions{display:flex;gap:9px;align-items:center}.mobile-brand,.mobile-tabs{display:none}
.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;border-radius:10px;border:1px solid transparent;font-size:13px;font-weight:750;line-height:1.15;min-height:43px;padding:12px 16px;white-space:nowrap;transition:filter .15s,transform .15s,background .15s,border-color .15s}.button:hover:not(:disabled){filter:brightness(.96);transform:translateY(-1px)}.button .icon{width:16px;height:16px}.button-solid{background:var(--navy);border-color:var(--navy);color:#fff}.button-outline{background:white;border-color:#d5dfe9;color:var(--ink)}.button-quiet{background:#f5f8fa;color:var(--ink);border-color:#e7edf2}.button-dashed{color:#436d86;border:1.5px dashed #b8cbd9;background:#f9fbfc}.button-danger{background:#fff3f3;border-color:#f1d3d3;color:#b83c4a}.button-small{padding:9px 13px;min-height:37px;font-size:11.5px}.button-small .icon{width:15px;height:15px}.icon-button{background:transparent;color:var(--muted);display:grid;place-items:center;border:0;border-radius:7px;padding:7px}.icon-button:hover{background:#e9eef2;color:var(--ink)}.icon-button .icon{width:16px;height:16px}
.page-body{max-width:1510px;margin:0 auto;padding:37px clamp(22px,3.8vw,58px) 36px}.overview-section{scroll-margin-top:24px}.page-heading{margin:0 0 24px;max-width:700px}.eyebrow,.section-kicker{font-size:10px;font-weight:850;letter-spacing:.19em;color:var(--teal);text-transform:uppercase}.eyebrow{display:inline-flex;gap:7px;align-items:center}.eyebrow .icon{width:14px;height:14px}.page-heading h1{font-size:clamp(29px,3.1vw,46px);line-height:1.17;letter-spacing:-.065em;margin:8px 0 12px;font-weight:820}.page-heading h1 span{color:#778fa3}.page-heading p{font-size:13px;color:var(--muted);max-width:610px;margin:0;line-height:1.75}
.hero-card{position:relative;min-height:235px;border-radius:19px;background:linear-gradient(109deg,#142b42 15%,#1a3c50 70%,#246456 145%);color:#fff;overflow:hidden;padding:30px 34px;box-shadow:0 17px 32px rgba(19,47,70,.105)}.hero-inner{position:relative;z-index:1}.hero-decoration{position:absolute;inset:0;overflow:hidden;pointer-events:none}.hero-decoration span{position:absolute;border:1px solid rgba(152,239,207,.15);width:380px;height:380px;border-radius:50%;right:-35px;top:-150px}.hero-decoration span:nth-child(2){width:530px;height:530px;right:-110px;top:-220px}.hero-decoration span:nth-child(3){width:690px;height:690px;right:-190px;top:-305px}.hero-eyebrow{font-size:10px;font-weight:800;letter-spacing:.18em;color:#a8c3ce;display:flex;align-items:center;gap:9px}.live-dot{height:7px;width:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 0 5px rgba(160,237,204,.12)}.hero-label{margin:20px 0 0;font-size:13px;color:#c6d9e1}.hero-money{font-size:clamp(37px,5vw,60px);font-weight:790;line-height:1.25;letter-spacing:-.065em;color:var(--mint);font-variant-numeric:tabular-nums;margin:3px 0}.hero-description{font-size:12px;color:#b5ced4;margin:4px 0 18px;max-width:560px}.hero-footer{display:flex;gap:13px;align-items:center;flex-wrap:wrap}.hero-metric-label{font-size:9px;font-weight:800;letter-spacing:.16em;color:#9cb6c2}.hero-footer strong{font-size:12px;color:#f4fff9}.hero-footer-divider{height:15px;width:1px;background:#476277;margin:0 5px}.hero-card.invalid .hero-money{color:#ffb5b5}.hero-card.invalid .live-dot{background:#ffb5b5}
.summary-grid{margin-top:16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.summary-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:18px 19px;box-shadow:var(--shadow);min-width:0}.summary-head{display:flex;justify-content:space-between;align-items:center;gap:4px;margin-bottom:9px}.summary-head>span:first-child{font-size:11px;color:#617789;font-weight:700}.summary-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:10px}.summary-icon .icon{width:16px;height:16px}.summary-icon.blue{background:#eaf2fb;color:#547fa9}.summary-icon.green{background:#e2f6eb;color:#258469}.summary-icon.gold{background:#fff2e4;color:#c08241}.summary-card strong{font-size:clamp(18px,2vw,27px);display:block;letter-spacing:-.045em;line-height:1.15;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.summary-card small{display:block;color:#8a9aab;font-size:10.5px;margin-top:7px}
.layout-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(310px,.85fr);gap:19px;align-items:start;margin-top:23px}.input-column,.insight-column{display:grid;gap:18px;min-width:0}.panel{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:23px;box-shadow:var(--shadow);scroll-margin-top:25px}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:20px}.panel-heading h2,.section-title-row h2{font-size:19px;line-height:1.2;letter-spacing:-.045em;margin:7px 0;font-weight:800}.panel-heading p,.section-title-row p{font-size:11.5px;line-height:1.65;color:var(--muted);margin:5px 0 0;max-width:480px}.panel-heading.compact{align-items:center;margin-bottom:19px}.panel-icon{width:36px;height:36px;flex-shrink:0;border-radius:11px;background:#eaf1fa;color:#4c7197;display:grid;place-items:center}.panel-icon.teal{background:#e5f6ee;color:#2a8c71}.panel-icon.peach{background:#fff0e5;color:#bc7e53}.panel-icon.violet{background:#f0ebfa;color:#7c70aa}.panel-icon .icon{width:19px;height:19px}
.fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 14px}.field{min-width:0;display:flex;flex-direction:column;gap:7px;font-size:11px;color:#4e6275;font-weight:700}.field>span{line-height:1.45}.unit{color:#9ba9b4;font-size:9px;font-weight:700;letter-spacing:.08em;margin-left:3px}.field.full{grid-column:1/-1}.field>input,.input-wrap,input.static-input{width:100%;min-width:0;height:43px;border:1px solid #dbe5ec;border-radius:9px;background:#fbfcfe;color:#1a3044;font-size:13px;font-weight:650;outline:none;transition:border-color .15s,box-shadow .15s}.field>input{padding:0 12px}.field input[type=date]{font-size:12px;color-scheme:light;min-width:0;padding:0 9px}.field input:focus,.input-wrap:focus-within{border-color:#4ba88a;box-shadow:0 0 0 3px rgba(72,173,144,.13)}.field input:focus{outline:none}.input-wrap{display:flex;align-items:center;position:relative;overflow:hidden}.input-wrap input{width:100%;flex:1;min-width:0;background:transparent;border:0;outline:0;padding:0 12px;font-weight:700;font-size:13px;color:var(--ink);font-variant-numeric:tabular-nums}.input-wrap .prefix{font-size:12px;color:#9aaebd;margin-left:12px}.input-wrap .prefix+input{padding-left:6px}.input-wrap .suffix{font-size:12px;color:#8ea0ac;margin-right:12px}.field input[type=number]{appearance:textfield;-moz-appearance:textfield}.field input[type=number]::-webkit-inner-spin-button,.field input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.info-line{display:flex;align-items:flex-start;gap:9px;color:#7c8b99;background:#f7f9fb;border-radius:9px;padding:12px 13px;margin-top:18px;font-size:10.5px;line-height:1.6}.info-line .icon{height:16px;width:16px;color:#6d91ab;margin-top:1px}
.entry-list{display:grid;gap:10px;margin-bottom:12px}.entry{background:#f8fafc;border:1px solid #e9eef3;border-radius:12px;padding:16px;display:grid;gap:13px}.entry-title{display:flex;justify-content:space-between;align-items:center;gap:7px}.entry-title strong{font-size:11.5px;letter-spacing:.01em}.entry-title .icon-button{padding:6px}.entry-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.entry-fields.three{grid-template-columns:repeat(2,minmax(0,1fr))}.entry-fields.three .payment-amount{grid-column:1/-1}.entry-fields .field{font-size:10.5px}.entry-fields .field>input,.entry-fields .input-wrap{height:40px;background:#fff}.day-picker{display:flex;gap:7px}.day-option{background:white;border:1px solid #d9e3ea;padding:8px 14px;border-radius:8px;font-size:11px;font-weight:750;color:#7890a1}.day-option.selected{background:#e5f6ed;border-color:#84ccb0;color:#126c51}.day-picker-label{font-size:10.5px;font-weight:700;color:#4e6275}.day-section{display:grid;gap:7px}.add-button{width:100%;margin-top:4px}
.sticky-card{position:sticky;top:14px}.validation-banner{padding:13px;display:flex;gap:11px;align-items:flex-start;border-radius:11px;background:#e9f7ef;border:1px solid #caedda;margin-bottom:14px;color:#156a4b}.validation-banner .validation-symbol{height:26px;width:26px;flex-shrink:0;border-radius:8px;display:grid;place-items:center;background:#d5f2e3}.validation-banner .icon{width:16px;height:16px}.validation-banner strong{font-size:12px}.validation-banner p{margin:3px 0 0;font-size:10.5px;line-height:1.5;color:#43836e}.validation-banner.loading{background:#f3f7fb;border-color:#dbe6ee;color:#486c88}.validation-banner.loading .validation-symbol{background:#e3edf5}.validation-banner.loading p{color:#7b93a4}.validation-banner.invalid{background:var(--danger-bg);border-color:#f0ced1;color:#b43e4b}.validation-banner.invalid .validation-symbol{background:#ffe0e1}.validation-banner.invalid p{color:#b7656b}.validation-errors{background:#fff7f7;color:#b44852;border:1px solid #f2d9db;border-radius:9px;padding:11px 13px;font-size:11px;margin-bottom:13px}.validation-errors p{margin:0 0 6px}.validation-errors p:last-child{margin-bottom:0}
.table-scroll{overflow-x:auto;max-width:100%}table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}th{font-size:9.5px;font-weight:800;color:#90a0af;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;padding:10px 6px 13px;border-bottom:1px solid var(--border)}th:first-child,td:first-child{padding-left:0}th:last-child,td:last-child{padding-right:0}th:not(:first-child),td:not(:first-child){text-align:right}td{padding:13px 6px;border-bottom:1px solid #eef2f6;font-size:11px;color:#506577}tbody tr:last-child td{border-bottom:0}td strong{color:var(--ink)}.allowance-table td:first-child{font-size:10px}.bad-value{color:var(--danger)!important;font-weight:800}.good-value{color:var(--teal-dark)!important;font-weight:780}.panel-footnote{font-size:10px;color:#8a99a8;line-height:1.6;margin:15px 0 0}.warning-line{font-size:11px;background:#fff5ee;border-radius:9px;color:#9c6a43;padding:10px 12px;margin:10px 0 0}
.breakdown-panel{scroll-margin-top:20px}.breakdown-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eef2f5}.breakdown-row:last-child{border-bottom:0}.breakdown-row span{font-size:11px;color:#637789;line-height:1.5}.breakdown-row strong{font-size:12px;letter-spacing:-.015em;white-space:nowrap;font-variant-numeric:tabular-nums}.breakdown-row.total{padding-top:18px;margin-top:4px;border-top:1px solid #d8e2e9}.breakdown-row.total span,.breakdown-row.total strong{font-size:13px;font-weight:800;color:var(--ink)}.breakdown-row .negative{color:var(--teal)}.placeholder-lines{display:grid;gap:12px}.placeholder-lines span{height:12px;background:#eff3f6;border-radius:5px}.placeholder-lines span:nth-child(2){width:75%}.placeholder-lines span:nth-child(3){width:90%}
.results-section,.scenarios-section{margin-top:32px;scroll-margin-top:28px}.section-title-row{display:flex;align-items:end;justify-content:space-between;gap:15px;margin-bottom:18px}.section-title-row h2{font-size:24px;margin:6px 0 4px}.results-actions,.scenario-actions{display:flex;gap:9px;flex-wrap:wrap}.chart-panel{margin-bottom:17px}.chart-container{width:100%;overflow:hidden;position:relative;border-radius:10px}.chart-container svg{width:100%;height:auto;display:block;aspect-ratio:900 / 320;touch-action:pan-y}.chart-legend{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.chart-legend span{font-size:10px;color:#6f8292;display:flex;align-items:center;gap:7px;white-space:nowrap}.legend-dot{height:8px;width:8px;border-radius:50%;display:inline-block}.legend-dot.noextra{background:#a4b7c6}.legend-dot.withextra{background:#22a078}.chart-bottom{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:#96a3b0;margin-top:7px}.chart-bottom span:nth-child(2){text-align:center}.chart-tooltip{position:absolute;pointer-events:none;background:var(--navy);color:#fff;padding:10px 13px;border-radius:9px;font-size:11px;box-shadow:0 8px 20px rgba(11,32,50,.2);line-height:1.6;z-index:2;white-space:nowrap}.chart-tooltip strong{color:#a5efd1}.chart-tooltip div:nth-child(2){color:#b8cbd6}.comparison-table{min-width:520px}.comparison-table td,.comparison-table th{padding:13px 11px}.comparison-table th{font-size:10px}.comparison-table td{font-size:11.5px}.comparison-table td:first-child{min-width:210px}.comparison-table tr:last-child td{background:#f6fafb;font-weight:800;color:var(--ink)}.comparison-table tr:last-child td:first-child{padding-left:10px;border-radius:9px 0 0 9px}.comparison-table tr:last-child td:last-child{border-radius:0 9px 9px 0;padding-right:10px}
.blocked-panel{text-align:center;border:1px solid #eed1d2;background:#fffafa;border-radius:var(--radius);padding:44px 20px;margin-bottom:18px}.blocked-panel[hidden],#results-content[hidden],.validation-errors[hidden]{display:none}.blocked-icon{width:55px;height:55px;border-radius:15px;background:#ffebec;color:#ba4750;display:grid;place-items:center;margin:0 auto 14px}.blocked-icon .icon{height:23px;width:23px}.blocked-panel h3{font-size:19px;letter-spacing:-.025em;margin:0 0 8px}.blocked-panel p{color:#7d8d9b;font-size:12px;max-width:440px;margin:0 auto 20px}
.scenarios-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.scenario-card{border:1px solid var(--border);background:#fff;border-radius:14px;padding:17px;box-shadow:var(--shadow);min-width:0}.scenario-card-header{display:flex;justify-content:space-between;gap:10px}.scenario-card-header>.icon{color:var(--teal);height:18px;width:18px}.scenario-card h3{font-size:14px;letter-spacing:-.02em;margin:12px 0 4px;overflow-wrap:anywhere}.scenario-card time{font-size:10px;color:#97a7b6}.scenario-metric{font-size:21px;font-weight:800;letter-spacing:-.04em;color:var(--teal);margin:16px 0 3px;font-variant-numeric:tabular-nums}.scenario-card p{font-size:10px;color:#8e9fb0;margin:0}.scenario-card-actions{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}.scenario-card-actions .button{flex:1;min-width:60px}.scenario-card-actions .icon-button{border:1px solid #e5ebf0}.scenario-card.invalid .scenario-metric{color:var(--danger)}.empty-scenarios{border:1px dashed #bdcbd8;border-radius:14px;padding:31px 20px;text-align:center;grid-column:1/-1;background:#f8fbfd}.empty-scenarios .icon{width:25px;height:25px;color:#829aaa}.empty-scenarios h3{font-size:14px;margin:10px 0 4px}.empty-scenarios p{font-size:11px;color:#8495a5;margin:0 auto 15px;max-width:380px}.small-note{font-size:10.5px;color:#8799a6;margin:13px 0 0;line-height:1.6}.site-footer{margin-top:41px;display:flex;justify-content:space-between;gap:12px;padding-top:18px;border-top:1px solid #dce4eb;color:#98a6b2;font-size:10px;flex-wrap:wrap}
.scenario-dialog{border:1px solid #e3e8ee;border-radius:18px;padding:26px;width:min(440px,calc(100vw - 32px));box-shadow:0 27px 100px rgba(13,35,55,.25);color:var(--ink)}.scenario-dialog::backdrop{background:rgba(14,31,46,.5);backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center}.dialog-symbol{width:39px;height:39px;border-radius:11px;display:grid;place-items:center;background:#e4f6ec;color:#1c8967}.scenario-dialog h2{margin:15px 0 5px;letter-spacing:-.04em}.scenario-dialog p{margin:0 0 22px;font-size:12px;color:var(--muted)}.scenario-dialog .field>input{margin:4px 0}.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:24px}
.toast{position:fixed;z-index:30;bottom:24px;left:50%;transform:translate(-50%,120px);border-radius:11px;background:var(--navy);color:#fff;padding:13px 18px;box-shadow:0 10px 24px rgba(18,45,67,.3);font-size:12px;font-weight:700;transition:transform .2s ease;max-width:90vw}.toast.show{transform:translate(-50%,0)}
*:focus-visible{outline:3px solid #57af92;outline-offset:3px}
@media(max-width:1240px){.sidebar{width:210px;flex-basis:210px}.page-body{padding-left:25px;padding-right:25px}.app-header{padding:0 25px}.layout-grid{grid-template-columns:minmax(0,1.1fr) minmax(285px,.9fr)}.panel{padding:19px}.hero-card{padding:27px 26px}.scenarios-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.sidebar{display:none}.app-header{height:67px;padding:0 23px}.header-tag{display:none}.mobile-brand{display:flex;align-items:center;gap:9px;font-size:16px;letter-spacing:-.05em}.mobile-brand-mark{background:var(--navy);height:30px;width:30px;color:#a9edcc;display:grid;place-items:center;border-radius:9px;font-size:20px;font-weight:850;letter-spacing:-.14em;padding-right:3px}.mobile-tabs{display:flex;gap:20px;padding:0 23px;overflow-x:auto;white-space:nowrap;background:white;border-bottom:1px solid var(--border);scrollbar-width:none;position:sticky;top:0;z-index:9}.mobile-tabs::-webkit-scrollbar{display:none}.mobile-tabs a{font-size:11px;font-weight:750;color:#7990a1;padding:12px 1px;border-bottom:2px solid transparent}.mobile-tabs a:hover{color:var(--navy);border-color:var(--teal)}.page-body{padding:27px 23px}.layout-grid{grid-template-columns:minmax(0,1fr) minmax(275px,.85fr)}.sticky-card{position:static}}
@media(max-width:760px){.layout-grid{grid-template-columns:1fr}.insight-column{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.summary-card{padding:13px}.summary-card strong{font-size:18px}.summary-head>span:first-child{font-size:10px}.panel{padding:20px}.scenarios-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-card{min-height:216px}}
@media(max-width:580px){.app-header{padding:0 16px}.header-actions .button{padding:8px 9px;min-height:34px}.header-actions .button:first-child span{display:none}.mobile-tabs{padding:0 16px;gap:18px}.page-body{padding:25px 15px 30px}.page-heading h1{font-size:36px}.page-heading p{font-size:12px}.hero-card{padding:23px 19px;min-height:220px}.hero-money{font-size:43px}.hero-footer{gap:7px}.hero-metric-label{font-size:8px}.hero-footer strong{font-size:10px}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.summary-card:last-child{grid-column:1/-1}.summary-card{padding:14px}.summary-head>span:first-child{font-size:10px}.summary-card strong{font-size:22px}.summary-card small{font-size:9.5px}.layout-grid{margin-top:14px}.insight-column{grid-template-columns:1fr}.fields-grid{gap:13px 10px}.panel{padding:17px;border-radius:14px}.panel-heading{margin-bottom:16px}.panel-heading h2{font-size:18px}.field{font-size:10px}.field>input,.input-wrap{height:41px}.field>input[type=date]{font-size:11px}.section-title-row{align-items:start;flex-direction:column;gap:14px}.section-title-row h2{font-size:23px}.section-title-row .results-actions,.scenario-actions{width:100%}.results-actions .button,.scenario-actions .button{flex:1}.chart-panel{padding:15px}.chart-panel .panel-heading{flex-direction:column;align-items:start}.chart-container svg{min-height:195px}.chart-bottom{font-size:9px}.scenarios-grid{grid-template-columns:1fr}.comparison-table{min-width:470px}.site-footer{font-size:9px;gap:5px}.entry{padding:13px}}
@media(max-width:360px){.page-heading h1{font-size:31px}.summary-card strong{font-size:19px}.fields-grid{grid-template-columns:1fr}.entry-fields{grid-template-columns:1fr}.entry-fields.three .payment-amount{grid-column:1}.hero-money{font-size:36px}}
@media print{html,body{background:#fff!important;font-size:10pt;color:#162e43}.sidebar,.mobile-tabs,.app-header,.input-column,.sidebar-bottom,.site-footer,.scenarios-section,.results-actions,.scenario-actions,.icon-button,.add-button{display:none!important}.main-content{width:100%}.page-body{max-width:none;padding:0}.page-heading{margin-bottom:12px}.page-heading h1{font-size:26pt}.hero-card{print-color-adjust:exact;-webkit-print-color-adjust:exact;min-height:170px;padding:19px}.hero-money{font-size:37pt}.summary-grid{margin-top:9px;gap:6px}.summary-card{box-shadow:none;padding:10px}.layout-grid{display:block;margin-top:12px}.insight-column{display:grid;grid-template-columns:1fr 1fr;gap:10px}.insight-column .panel{break-inside:avoid}.results-section{margin-top:18px}.panel{break-inside:avoid;box-shadow:none;border:1px solid #d9e0e5;padding:12px}.chart-container svg{max-height:260px}#blocked-panel,.blocked-panel{display:none!important}.section-title-row{margin-bottom:10px}.site-footer{display:none!important}}

.reset-row{display:flex;justify-content:flex-end;margin-top:13px}.reset-row .button{font-size:10.5px}

/* v1.2: inputs first, results last, on every screen size. */
.page-body{max-width:1180px}
.page-heading{margin-bottom:14px}.page-heading h1{font-size:clamp(28px,3vw,40px);margin:10px 0}
.overview-section{margin-bottom:18px}
.layout-grid{display:block;margin-top:18px}
.input-column{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;max-width:100%}
.insight-column{display:none}.sticky-card{position:static}
.results-section{margin-top:28px;display:grid;gap:18px;scroll-margin-top:24px}
.results-section .section-title-row{margin-bottom:0}
.results-section .hero-card{margin:0}
.results-section .summary-grid{margin:0}
.results-section .breakdown-panel{margin:0}
#results-content{display:grid;gap:18px}
.flow-steps{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.flow-steps span{display:inline-flex;gap:7px;align-items:center;background:white;border:1px solid var(--border);border-radius:30px;padding:9px 12px;font-size:12px;color:#426075;font-weight:680}
.flow-steps b{display:grid;place-items:center;border-radius:50%;width:20px;height:20px;background:#e1f4eb;color:#21624f;font-size:11px}
.field[hidden]{display:none!important}
.field select{width:100%;height:43px;border:1px solid #d7e2e9;border-radius:9px;color:#21384c;background:#fff;padding:0 12px;max-width:100%}
.field select:focus-visible{outline:3px solid #98d9c4;outline-offset:1px}
.payment-preview{margin-top:17px;display:flex;gap:20px;align-items:center;flex-wrap:wrap;border-radius:12px;background:#eef8f5;padding:15px 19px;border:1px solid #cbe9df}
.payment-preview div{display:flex;flex-direction:column;gap:4px}
.payment-preview small{font-size:11px;color:#47766b;font-weight:700}
.payment-preview strong{font-size:24px;letter-spacing:-.03em;color:#183b38;font-variant-numeric:tabular-nums}
.payment-preview p{font-size:12px;color:#466c67;line-height:1.5;flex:1;min-width:170px;margin:0}
.disclaimer-link{border:0;background:transparent;color:#477f75;text-decoration:underline;padding:5px;cursor:pointer;font-size:12px}
.disclaimer-dialog{border:0;border-radius:20px;padding:0;width:min(92vw,540px);box-shadow:0 30px 100px #10233466;max-height:calc(100dvh - 42px);overflow:auto;color:var(--ink)}
.disclaimer-dialog::backdrop{background:#102436b3;backdrop-filter:blur(4px)}
.disclaimer-card{padding:clamp(24px,4vw,40px);display:flex;flex-direction:column;align-items:flex-start}
.disclaimer-symbol{display:grid;place-items:center;border-radius:15px;background:#e4f3ed;color:#28785e;font-weight:900;font-size:24px;width:48px;height:48px;margin-bottom:20px}
.disclaimer-card h2{font-size:clamp(22px,4vw,28px);letter-spacing:-.045em;margin:10px 0 8px;line-height:1.2}
.disclaimer-card p{font-size:13px;line-height:1.75;color:#627588;margin:8px 0}
.disclaimer-confirm{align-self:stretch;margin-top:20px;font-size:14px;min-height:48px}
@media(max-width:980px){.layout-grid{display:block}.page-body{max-width:860px}}
@media(max-width:760px){.layout-grid{display:block}.flow-steps{gap:6px}.flow-steps span{font-size:11px;padding:7px 10px}}
@media(max-width:580px){.layout-grid{display:block}.results-section{margin-top:22px;gap:14px}.payment-preview{padding:13px}.flow-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.flow-steps span{justify-content:flex-start;font-size:10px}.page-heading h1{font-size:30px}}
@media print{.layout-grid{display:block!important}.disclaimer-dialog,.disclaimer-link,.flow-steps{display:none!important}#results{display:block!important}.hero-card,.summary-grid{break-inside:avoid}.panel{break-inside:avoid}}
/* Prevent results toolbar/table min-content sizing from pushing narrow phones sideways. */
.results-section{grid-template-columns:minmax(0,1fr);min-width:0}
.results-section>*{min-width:0;max-width:100%}
.section-title-row{min-width:0}
.results-actions{min-width:0;max-width:100%}
.results-actions .button{min-width:0;flex:1 1 125px;white-space:normal}
.table-scroll{max-width:100%;overflow-x:auto}
#results-content{grid-template-columns:minmax(0,1fr);min-width:0}
#results-content>*{min-width:0;max-width:100%}
[hidden]{display:none!important}
/* v1.3: deliberate progressive disclosure for advanced mortgage tools. */
.advanced-panel{margin:15px 0 12px;border:1px solid #dce9e6;background:#f8fcfa;border-radius:13px;overflow:hidden}
.advanced-panel summary{padding:14px 16px;color:#235b50;font-size:12px;font-weight:750;cursor:pointer;list-style-position:inside}
.advanced-panel[open] summary{border-bottom:1px solid #dce9e6}
.advanced-panel .advanced-fields{margin:14px 16px 6px}
.advanced-panel .panel-footnote{margin:8px 16px 15px}
.policy-selector{display:block;margin:0 0 17px}
.policy-selector select{width:100%;margin-top:7px;height:43px;border:1px solid var(--border);border-radius:9px;padding:0 12px;background:#fff;color:var(--ink)}
#separate-policy-fields{margin-top:8px}
.entry .panel-footnote{margin:10px 0 0;font-size:11px}
.entry-fields.three{align-items:end}
.entry-fields .field[hidden]{display:none!important}
.target-panel .panel-heading{margin-bottom:16px}
.target-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.target-advice{margin-top:12px;padding:14px 17px;border:1px solid #dce6ec;border-radius:12px;background:#f7fbfd;color:#38576c;font-size:12px;line-height:1.6}
.target-advice strong{display:block;font-size:21px;font-weight:800;letter-spacing:-.025em;color:#178666}
.target-advice p{margin:4px 0 0}
.expandable-results{padding:0;overflow:hidden}
.expandable-results>summary{list-style:none;cursor:pointer;padding:20px 23px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.expandable-results>summary::-webkit-details-marker{display:none}
.expandable-results>summary::after{content:'+';font-size:24px;color:#6d8799;line-height:1;margin-left:auto}
.expandable-results[open]>summary::after{content:'−'}
.expandable-results>summary span:first-child{display:grid;gap:4px}
.expandable-results>summary strong{font-size:16px;letter-spacing:-.02em}
.expandable-results>summary small{font-size:11px;color:#7f90a0;line-height:1.5}
.expandable-results>.table-scroll{margin:0 19px 16px}
.expandable-results>.panel-footnote{margin:0 20px 16px}
.expandable-results .comparison-table{min-width:650px}
.ledger-table{min-width:780px}
.yearly-table small{font-size:9px;color:#8397a7}
.ledger-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:5px 20px 16px}
.scenario-comparison{margin-top:17px;padding:22px}
.scenario-comparison h3{font-size:17px;margin:0 0 5px}
.scenario-comparison .comparison-table{min-width:590px}
.compare-checkbox{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650;margin-top:12px;color:#39596e;cursor:pointer}
.compare-checkbox input{width:17px;height:17px;accent-color:#218d6c}
.hero-footer{flex-wrap:wrap;row-gap:9px}
.hero-footer strong{white-space:nowrap}
@media(max-width:580px){
 .advanced-panel .advanced-fields{grid-template-columns:1fr}
 .target-actions .button{flex:1;min-width:140px}
 .expandable-results>summary{padding:16px}
 .expandable-results>.table-scroll{margin:0 12px 12px}
 .hero-footer{gap:5px 8px}
 .hero-footer-divider{display:none}
 #target-panel .fields-grid{grid-template-columns:1fr}
 .policy-selector select{font-size:12px}
}
@media print{.advanced-panel,.target-panel,.scenario-comparison,.ledger-actions,.compare-checkbox{display:none!important}.expandable-results{break-inside:avoid}.expandable-results:not([open])>summary{display:block}}

/* v1.4 | Clear four-tab information architecture and guided, accessible reporting */
[data-tab-panel]{scroll-margin-top:24px}
body[data-tab="plan"] [data-tab-panel]:not([data-tab-panel="plan"]),
body[data-tab="results"] [data-tab-panel]:not([data-tab-panel="results"]),
body[data-tab="tools"] [data-tab-panel]:not([data-tab-panel="tools"]),
body[data-tab="more"] [data-tab-panel]:not([data-tab-panel="more"]){display:none!important}
body[data-tab="plan"] .layout-grid{display:block}
body[data-tab="results"] .results-section{display:grid;margin-top:0}
.tab-page{display:grid;gap:18px;min-width:0}
.tab-page .section-title-row{margin-bottom:2px}
.plan-footer-actions{display:flex;gap:18px;justify-content:space-between;align-items:center;background:#ecf8f3;border:1px solid #cee8d9;border-radius:16px;padding:17px 18px}
.plan-footer-actions span{font-size:12px;color:#477267;line-height:1.5}
.plan-footer-actions .button{flex-shrink:0}
.section-help{display:grid;place-items:center;flex-shrink:0;border:1px solid #d3e2e8;background:#f3f8fa;border-radius:100%;font-size:15px;font-weight:850;width:30px;height:30px;color:#56778c;min-width:30px;cursor:pointer}
.section-help:hover,.section-help:focus-visible{background:#dbf4ec;color:#166a52;outline:2px solid #7acaaf;outline-offset:2px}
.section-title-row:has(.section-help)>.section-help{margin-left:auto}
.estimate-note{display:flex;gap:10px;align-items:center;background:#f6f9fb;border:1px solid #e4ebf0;border-radius:11px;color:#678090;font-size:11px;line-height:1.55;padding:11px 14px}
.estimate-note .icon{width:16px;height:16px;color:#8a9fae;align-self:flex-start;margin-top:1px}
.estimate-note strong{color:#526c7e}
.subtle-link{background:none;border:0;color:#367e71;text-decoration:underline;text-underline-offset:2px;font-weight:730;font-size:inherit;padding:0;white-space:normal}
.payoff-note{display:flex;align-items:start;gap:10px;background:#eaf9f1;border:1px solid #a9d9c4;border-radius:12px;padding:14px;color:#175b45}
.payoff-note .icon{color:#198866}
.payoff-note div{display:flex;flex-direction:column;gap:4px}
.payoff-note strong{font-size:13px}.payoff-note span{font-size:11px;line-height:1.5}
.chart-tabs,.schedule-controls{display:flex;align-items:stretch;gap:6px;flex-wrap:wrap;border:1px solid #e4eaf0;background:#f4f7fa;padding:5px;border-radius:12px;margin-bottom:14px}
.chart-tabs button,.schedule-controls button{flex:1;min-width:118px;border:0;background:transparent;color:#637c90;font-size:12px;font-weight:720;border-radius:8px;padding:11px 10px;min-height:44px}
.chart-tabs button.is-active,.schedule-controls button.is-active{color:#155b4a;background:#fff;box-shadow:0 2px 9px #123c541a}
.chart-tabs button:focus-visible,.schedule-controls button:focus-visible{outline:3px solid #75c9ad;outline-offset:2px}
.chart-view{position:relative;min-width:0}
.chart-view .chart-legend{justify-content:flex-end;margin:3px 0 10px}
.color-legend{display:flex;gap:14px;align-items:center;flex-wrap:wrap;color:#6d8091;font-size:11px;margin:5px 0 12px}
.color-legend span{display:flex;align-items:center;gap:6px}.color-swatch{width:10px;height:10px;border-radius:3px;display:inline-block}
#savings-chart,#composition-chart{width:100%;height:auto;min-height:190px;overflow:visible}
#chart-tooltip,.chart-tooltip{pointer-events:none;z-index:3}
.payment-explorer{padding:22px;min-width:0}
.payment-explorer .panel-heading{margin-bottom:14px}
.schedule-group-list{display:grid;gap:10px}
.schedule-year,.schedule-month{border:1px solid #e2eaf0;border-radius:12px;overflow:hidden;background:#fff}
.schedule-year>summary,.schedule-month>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;cursor:pointer;background:#f7fafc}
.schedule-year>summary::-webkit-details-marker,.schedule-month>summary::-webkit-details-marker{display:none}
.schedule-year>summary span:first-child,.schedule-month>summary span:first-child{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.schedule-year>summary strong{font-size:15px}.schedule-month>summary strong{font-size:12px}
.schedule-year>summary small{color:#708595;font-size:10px}
.schedule-amounts{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:0;text-align:right}
.schedule-amounts b{font-size:12px;white-space:nowrap}.schedule-amounts small{color:#6f8493;font-size:10px}
.schedule-year[open]>summary,.schedule-month[open]>summary{border-bottom:1px solid #e2eaf0;background:#eef6f3}
.schedule-details{padding:15px 16px;display:grid;gap:13px}
.schedule-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.schedule-metrics>div{border:1px solid #e5edf2;border-radius:9px;padding:10px;display:grid;gap:5px}
.schedule-metrics small{font-size:9.8px;color:#678092;line-height:1.4}
.schedule-metrics strong{font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:-.02em;overflow-wrap:anywhere}
.schedule-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:8px 20px}
.schedule-breakdown>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;border-bottom:1px solid #edf1f4;padding:6px 0}
.schedule-breakdown span{font-size:10.5px;color:#64798a}.schedule-breakdown b{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.schedule-month{margin-top:8px;background:#fbfcfe}.schedule-month>summary{padding:12px;background:#f9fbfd}
.extra-label{font-size:9px;letter-spacing:.02em;background:#dff4e9;border-radius:5px;padding:3px 6px;color:#177557;font-style:normal;font-weight:700}
.month-payment-details>summary{color:#277b68;font-size:11px;font-weight:740;cursor:pointer}
.month-payment-details>.table-scroll{margin-top:10px}
.month-transactions{min-width:490px}
.month-transactions th{font-size:10px}.month-transactions td{font-size:10px}
.extra-event{background:#eff9f3}
#schedule-monthly .schedule-month-toolbar{display:flex;gap:14px;align-items:center;margin:0 0 14px}
.schedule-month-toolbar label{font-size:12px;font-weight:700;color:#526c7c}
.schedule-month-toolbar select{border:1px solid #d8e5ec;border-radius:9px;padding:9px 12px;font-size:13px;background:#fff;color:#1a3044}
#schedule-payment .ledger-table{min-width:940px}
#schedule-payment .ledger-actions{margin:15px 0 6px}
.release-notes{display:grid;gap:10px}.release-notes details{border:1px solid #e0eaf0;border-radius:11px;overflow:hidden}
.release-notes summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 15px;background:#f8fafc;font-size:12px;color:#698091}
.release-notes summary strong{color:#21495e;font-size:13px}.release-notes details p{font-size:12px;line-height:1.8;color:#536d7c;padding:10px 15px 15px;margin:0}
.help-description,.guide-steps{color:#566f81;font-size:12px;line-height:1.85}
.guide-steps{padding-left:22px}.guide-steps li{margin:9px 0}
.more-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.help-dialog{border:0;border-radius:20px;padding:0;width:min(92vw,490px);max-height:calc(100vh - 32px);box-shadow:0 32px 100px #0e263c60;color:#1f3548}
.help-dialog::backdrop{background:#142a42a8}
.help-modal-content{padding:27px;display:grid;gap:13px}
.help-modal-content .dialog-heading{display:flex;align-items:center;justify-content:space-between}
.help-modal-content h2{margin:0;font-size:22px;letter-spacing:-.035em}
.help-modal-content p{font-size:13px;line-height:1.8;color:#577183;margin:0}
.help-modal-example{font-size:12px;line-height:1.7;background:#e9f6f1;padding:14px;border-radius:10px;color:#2d6755}
.help-modal-content .button{min-height:44px}
#print-report{display:none}
@media(max-width:980px){
  body .mobile-tabs{position:fixed;bottom:0;left:0;right:0;top:auto;z-index:19;padding:5px max(10px,env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right));height:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;box-shadow:0 -5px 25px #15314e1c;border-bottom:0;border-top:1px solid #dde6eb}
  body .mobile-tabs a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:8px 3px;border-radius:10px;border:0;min-height:49px;font-size:10px}
  body .mobile-tabs a .icon{width:18px;height:18px}
  body .mobile-tabs a.active{color:#176850;background:#e8f8ef}
  body .page-body{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
  .app-header{position:relative}
}
@media(max-width:680px){
  .plan-footer-actions{flex-direction:column;align-items:stretch}.plan-footer-actions .button{width:100%;white-space:normal;text-align:center}
  .payment-explorer{padding:15px}
  .schedule-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .schedule-breakdown{grid-template-columns:1fr}
  .schedule-year>summary,.schedule-month>summary{padding:12px;gap:6px}
  .schedule-amounts b{font-size:10.5px}
  .schedule-year>summary small,.schedule-amounts small{font-size:9px}
  .schedule-details{padding:10px}
  .chart-tabs button,.schedule-controls button{min-width:75px;font-size:10px;min-height:45px;padding:8px 5px}
  .chart-panel .panel-heading{flex-direction:row;flex-wrap:wrap}
  .color-legend{gap:10px;font-size:10px}
  .release-notes summary span{font-size:11px}
}
@media print{
  body,html{background:white!important}
  body>.shell,body>dialog,.toast{display:none!important}
  body>#print-report{display:block!important;margin:0 auto;padding:0 8mm;color:#213747;font-family:Arial,sans-serif;font-size:9pt;max-width:100%}
  #print-report h1{font-size:18pt;margin:0 0 6mm}#print-report h2{font-size:12pt;margin:7mm 0 3mm}
  #print-report p{font-size:9pt;line-height:1.6}
  #print-report table{width:100%;border-collapse:collapse;font-size:8pt;table-layout:fixed}
  #print-report tr{break-inside:avoid}#print-report td,#print-report th{padding:4pt 2pt;border-bottom:1px solid #dde5ea;text-align:right;overflow-wrap:anywhere}
  #print-report td:first-child,#print-report th:first-child{text-align:left}
  #print-report thead{display:table-header-group}
  #print-report .print-disclaimer{margin-top:9mm;border-top:1px solid #9eb0bc;padding-top:5mm;color:#637d8c}
}

@media(max-width:980px){.section-help{width:42px;height:42px;min-width:42px;font-size:17px}}
