:root,:root[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f6f3fb;--surface:#fff;--text:#2a2540;--text-muted:#5c5672;--primary:#cbb9f6;--on-primary:#2a2540;--error:#a8324b;--border:#e6e0f1;--input-border:#867e9e;--focus:#6a50d3;--mint:#d6f2e5;--peach:#ffe4d1;--butter:#fff2c9;--rose:#f8d5df;--wash:#efeafb;--band:#faf8fe;--scrim:#2a25406b;--shadow-card:0 1px 2px #2a25400d, 0 10px 30px #6a50d314;--shadow-dialog:0 24px 60px #2a254038;--press:#2a25401a;--chart-principal:#6a50d3;--chart-interest:#c4512e;--font-sans:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-7:28px;--space-8:40px;--radius-card:28px;--radius-tile:20px;--radius-input:14px;--radius-pill:999px;--control-h:48px}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#16141e;--surface:#201d2b;--text:#eeeaf8;--text-muted:#b4adc9;--primary:#c9b8f6;--on-primary:#16141e;--error:#ff9db2;--border:#332e43;--input-border:#7f7699;--focus:#c9b8f6;--mint:#1e3a30;--peach:#3d2b22;--butter:#36311d;--rose:#3d2230;--wash:#2a2638;--band:#24212f;--scrim:#06050aa8;--shadow-card:0 1px 2px #00000059, 0 10px 30px #00000040;--shadow-dialog:0 24px 60px #00000080;--press:#0000002e;--chart-principal:#957eec;--chart-interest:#d4703c}@media (prefers-color-scheme:dark){:root:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#16141e;--surface:#201d2b;--text:#eeeaf8;--text-muted:#b4adc9;--primary:#c9b8f6;--on-primary:#16141e;--error:#ff9db2;--border:#332e43;--input-border:#7f7699;--focus:#c9b8f6;--mint:#1e3a30;--peach:#3d2b22;--butter:#36311d;--rose:#3d2230;--wash:#2a2638;--band:#24212f;--scrim:#06050aa8;--shadow-card:0 1px 2px #00000059, 0 10px 30px #00000040;--shadow-dialog:0 24px 60px #00000080;--press:#0000002e;--chart-principal:#957eec;--chart-interest:#d4703c}}*,:before,:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;background:var(--bg)}body{font-family:var(--font-sans);color:var(--text);background:var(--bg);margin:0;font-size:16px;line-height:1.5}h1,h2,p,dl,dd,ul{margin:0}:focus{outline:3px solid var(--focus);outline-offset:3px}.page{max-width:1200px;margin:0 auto;padding:36px 40px 56px}.app-header{justify-content:space-between;align-items:flex-end;gap:var(--space-4) var(--space-6);margin-bottom:var(--space-7);flex-wrap:wrap;display:flex}.app-header>div:first-child{min-width:0;padding-left:68px;position:relative}.app-header>div:first-child:before{content:"";background:linear-gradient(var(--primary), var(--primary)) 10px 12px / 8px 28px no-repeat, linear-gradient(#bfe6d3, #bfe6d3) 22px 19px / 8px 21px no-repeat, linear-gradient(#ffcfb0, #ffcfb0) 34px 27px / 8px 13px no-repeat, var(--wash);border-radius:16px;width:52px;height:52px;margin-top:-26px;position:absolute;top:50%;left:0}:root[data-theme=dark] .app-header>div:first-child:before{background:linear-gradient(var(--primary), var(--primary)) 10px 12px / 8px 28px no-repeat, linear-gradient(#9fd9be, #9fd9be) 22px 19px / 8px 21px no-repeat, linear-gradient(#f7be9c, #f7be9c) 34px 27px / 8px 13px no-repeat, var(--wash)}.app-header h1{letter-spacing:-.025em;font-size:30px;font-weight:780;line-height:1.15}.tagline{margin-top:var(--space-1);color:var(--text-muted);font-size:15px}.app-header .theme-field{width:180px;margin:0}.layout{gap:var(--space-6);grid-template-columns:minmax(0,1fr);display:grid}.layout-main{gap:var(--space-6);grid-template-columns:minmax(0,4fr) minmax(0,6fr);align-items:start;display:grid}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-card);min-width:0;padding:var(--space-7);box-shadow:var(--shadow-card)}.history-card{grid-column:1/-1}.form-card :is(input,select,button){scroll-margin:12px}.results-card{scroll-margin-top:12px}@media (width>=769px){.form-card{top:var(--space-6);max-height:calc(100vh - 2 * var(--space-6));position:sticky;overflow-y:auto}}.field{flex-direction:column;gap:6px;min-width:0;margin-bottom:18px;display:flex}label{font-size:14px;font-weight:650}input,select{font:inherit;color:var(--text);background-color:var(--surface);border:1.5px solid var(--input-border);border-radius:var(--radius-input);min-height:var(--control-h);font-variant-numeric:tabular-nums;width:100%;max-width:100%;padding:10px 14px}input:hover,select:hover{border-color:var(--text-muted)}select{appearance:none;cursor:pointer;background-image:linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);background-position:calc(100% - 22px) 52%,calc(100% - 16px) 52%;background-repeat:no-repeat;background-size:6px 6px;padding-right:42px}select option{color:var(--text);background:var(--surface)}input[aria-invalid=true]{border:2px solid var(--error);background-color:var(--rose)}.field-error{gap:var(--space-2);color:var(--error);align-items:flex-start;font-size:14px;font-weight:650;line-height:1.35;display:flex}.field-error:empty:before{content:none}.field-error:before{content:"!";content:"!" / "";background:var(--error);width:18px;height:18px;color:var(--surface);border-radius:50%;flex:none;place-items:center;margin-top:1px;font-size:12px;font-weight:850;display:grid}.hint{color:var(--text-muted);font-size:13px;line-height:1.4}.tenure-row{gap:var(--space-3);grid-template-columns:minmax(0,1fr) minmax(0,1fr);display:grid}.actions{gap:var(--space-3);flex-wrap:wrap;margin-top:6px;display:flex}button{font:inherit;min-height:var(--control-h);border-radius:var(--radius-pill);cursor:pointer;min-width:44px;max-width:100%;padding:10px 22px;font-weight:680;line-height:1.2}button.primary{background:var(--primary);color:var(--on-primary);border:1.5px solid var(--primary);box-shadow:inset 0 -3px 0 var(--press)}button.primary:hover{filter:brightness(.97)saturate(1.1)}button.primary:active{box-shadow:inset 0 2px 0 var(--press)}button.secondary{color:var(--text);border:1.5px solid var(--input-border);background:0 0}button.secondary:hover{background:var(--wash)}button.secondary:active{background:var(--border)}.form-card .actions .primary{flex:180px}button:disabled,button:disabled:hover{background:var(--bg);color:var(--text-muted);border:1.5px dashed var(--input-border);box-shadow:none;filter:none;cursor:not-allowed}.results-card .status{align-items:center;gap:var(--space-4);padding:22px var(--space-6);border-radius:var(--radius-tile);background:var(--wash);border:1.5px dashed var(--input-border);font-weight:600;line-height:1.4;display:flex}.results-card .status:before{content:"";background-color:var(--surface);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%232A2540' stroke-linecap='round'%3E%3Crect x='12' y='9' width='16' height='22' rx='3.5' stroke-width='2'/%3E%3Cpath d='M16 14h8M16 20h.01M20 20h.01M24 20h.01M16 25h.01M20 25h.01M24 25h.01' stroke-width='2.4'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:40px 40px;border-radius:50%;flex:none;width:40px;height:40px}:root[data-theme=dark] .results-card .status:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23EEEAF8' stroke-linecap='round'%3E%3Crect x='12' y='9' width='16' height='22' rx='3.5' stroke-width='2'/%3E%3Cpath d='M16 14h8M16 20h.01M20 20h.01M24 20h.01M16 25h.01M20 25h.01M24 25h.01' stroke-width='2.4'/%3E%3C/svg%3E")}.results-card .status.status-stale{background:var(--peach);border:2px solid var(--text)}.results-card .status.status-stale:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%232A2540' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 16a9 9 0 0 0-15.5-2.5M12 24a9 9 0 0 0 15.5 2.5M12 9v5h5M28 31v-5h-5'/%3E%3C/svg%3E")}:root[data-theme=dark] .results-card .status.status-stale:before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23EEEAF8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 16a9 9 0 0 0-15.5-2.5M12 24a9 9 0 0 0 15.5 2.5M12 9v5h5M28 31v-5h-5'/%3E%3C/svg%3E")}.summary{gap:var(--space-3);grid-template-columns:minmax(0,1fr) minmax(0,1fr);display:grid}.figure{min-width:0;padding:var(--space-4) var(--space-5);border-radius:var(--radius-tile);background:var(--bg)}.figure dt{text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);font-size:12px;font-weight:700}.figure dd{margin-top:var(--space-1);font-variant-numeric:tabular-nums;overflow-wrap:break-word;font-size:22px;font-weight:720;line-height:1.2}.figure.headline{background:var(--mint);padding:22px var(--space-6) var(--space-6);grid-column:1/-1}.figure.headline dt{font-size:13px}.figure.headline dd{margin-top:var(--space-2);letter-spacing:-.03em;font-size:clamp(1.875rem,1.25rem + 4vw,3rem);font-weight:800;line-height:1.05}.rounding-note{margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-radius:var(--radius-input);background:var(--butter);align-items:flex-start;gap:10px;font-size:14px;line-height:1.4;display:flex}.rounding-note:before{content:"";background:var(--text);border-radius:50%;flex:none;width:8px;height:8px;margin-top:6px}.schedule h2{margin:var(--space-7) 0 var(--space-3);letter-spacing:-.01em;font-size:18px;font-weight:750}.schedule-scroll{border:1px solid var(--border);border-radius:var(--radius-tile);background:var(--surface);overscroll-behavior:contain;max-height:min(60vh,480px);overflow:auto}.schedule table{border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums;width:100%;font-size:14px}.schedule th{z-index:1;padding:var(--space-3) var(--space-4);background:var(--wash);border-bottom:1.5px solid var(--input-border);color:var(--text-muted);text-transform:uppercase;letter-spacing:.06em;text-align:right;white-space:nowrap;font-size:12px;font-weight:700;position:sticky;top:0}.schedule td{padding:10px var(--space-4);border-bottom:1px solid var(--border);text-align:right;white-space:nowrap}.schedule th:first-child,.schedule td:first-child{text-align:left}.schedule td:first-child{color:var(--text-muted);font-weight:650}.schedule tbody tr:nth-child(2n) td{background:var(--band)}.schedule tbody tr:nth-child(12n) td{border-bottom:2px solid var(--primary)}.schedule tbody tr:last-child td{border-bottom:0}.schedule tbody tr:last-child td:last-child{background:var(--mint);font-weight:800}.history-card h2{margin-bottom:var(--space-4);letter-spacing:-.01em;border-radius:8px;font-size:20px;font-weight:750}.history-card>.status{margin-bottom:var(--space-4);padding:18px var(--space-5);background:var(--bg);color:var(--text-muted);border-radius:18px;line-height:1.45}.history-list{gap:var(--space-3);grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));margin:0 0 18px;padding:0;list-style:none;display:grid}.history-entry{justify-content:space-between;align-items:center;gap:var(--space-3) var(--space-4);padding:var(--space-4) 18px;border:1px solid var(--border);border-radius:var(--radius-tile);background:var(--bg);flex-wrap:wrap;min-width:0;display:flex}.entry-text{flex:200px;min-width:0}.entry-text p{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.entry-line1{font-weight:700}.entry-time{color:var(--text-muted);margin-top:2px;font-size:13px}.entry-actions{flex-wrap:wrap;gap:10px;display:flex}.entry-actions button{padding:8px 18px}.entry-actions button:last-child{color:var(--error);border-color:var(--error)}.entry-actions button:last-child:hover{background:var(--rose)}.history-card .field-error{margin-bottom:var(--space-4);padding:var(--space-3) var(--space-4);border-radius:var(--radius-input);background:var(--rose)}.history-card .field-error:empty{display:none}.confirm-dialog{width:min(440px,100vw - 32px);max-width:440px;padding:var(--space-6);border:1px solid var(--border);background:var(--surface);color:var(--text);box-shadow:var(--shadow-dialog);border-radius:26px}.confirm-dialog::backdrop{background:var(--scrim);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#2a25406b}:root[data-theme=dark] .confirm-dialog::backdrop{background:#06050aa8}.dialog-text{letter-spacing:-.01em;margin-bottom:6px;font-size:20px;font-weight:760;line-height:1.3}.confirm-dialog .hint{font-size:14px}.confirm-dialog .actions{justify-content:flex-end;gap:10px;margin-top:22px}.confirm-dialog .actions button{flex:120px}.confirm-dialog button.primary{background:var(--rose);color:var(--text);border:2px solid var(--error);box-shadow:none;font-weight:760}@media (width<=768px){.page{padding:28px 24px 40px}.layout,.layout-main{gap:var(--space-4);grid-template-columns:minmax(0,1fr)}.history-card{grid-column:auto}.card{padding:var(--space-6);border-radius:26px}}@media (width<=560px){.page{padding:20px 16px 32px}.app-header{align-items:stretch;gap:var(--space-4);margin-bottom:var(--space-5);flex-direction:column}.app-header>div:first-child{padding-left:58px}.app-header>div:first-child:before{transform-origin:0;transform:scale(.85)}.app-header h1{letter-spacing:-.02em;font-size:24px}.tagline{font-size:14px;line-height:1.4}.app-header .theme-field{width:100%}.card{padding:var(--space-5);border-radius:22px}.field{margin-bottom:var(--space-4)}.results-card .status{align-items:flex-start;gap:var(--space-3);padding:var(--space-5);flex-direction:column}.summary{grid-template-columns:minmax(0,1fr);gap:10px}.figure{padding:14px var(--space-4)}.figure dd{font-size:21px;line-height:1.25}.figure.headline{padding:18px 18px var(--space-5)}.schedule h2{margin-top:var(--space-6)}.schedule th,.schedule td{padding-left:14px;padding-right:14px}.schedule th:first-child,.schedule td:first-child{z-index:2;position:sticky;left:0}.schedule th:first-child{z-index:3}.schedule td:first-child{background:var(--surface);box-shadow:1px 0 0 var(--border)}.schedule tbody tr:nth-child(2n) td:first-child{background:var(--band)}.history-list{grid-template-columns:minmax(0,1fr)}.history-entry{padding:var(--space-4);flex-direction:column;align-items:stretch}.entry-text{flex:none}.entry-actions button{flex:1 1 0;padding:8px 14px}}@media (width<=300px){.page{padding:16px 10px 24px}.app-header>div:first-child{padding-top:52px;padding-left:0}.app-header>div:first-child:before{margin-top:0;top:0}.card{border-radius:18px;padding:14px}.tenure-row{grid-template-columns:minmax(0,1fr);gap:0}.actions button,.entry-actions button{flex:100%}button{padding-left:14px;padding-right:14px}.figure.headline dd{font-size:26px}.figure dd{font-size:18px}}@media (prefers-reduced-motion:no-preference){button,input,select{transition:background-color .12s,border-color .12s}}.fatal{max-width:280px;padding:var(--space-4);text-align:center;color:var(--text);background:var(--bg);margin:20vh auto 0;font-size:18px;font-weight:650}.chart-block{margin-top:var(--space-6);min-width:0}.chart-title{margin:0 0 var(--space-3);letter-spacing:-.01em;color:var(--text);font-size:16px;font-weight:750}figure.chart{min-width:0;padding:var(--space-4);border:1px solid var(--border);border-radius:var(--radius-tile);background:var(--surface);margin:0}.chart figcaption{margin-top:var(--space-3);color:var(--text);overflow-wrap:anywhere;font-size:14px;font-weight:600;line-height:1.4}.chart-plot-wrap{position:relative}.chart-plot{cursor:crosshair;width:100%;height:140px;display:block}.mark-principal{fill:var(--chart-principal)}.mark-interest{fill:var(--chart-interest)}.chart-hover-band{fill:var(--text);opacity:.08;pointer-events:none}.chart-axis{margin-top:var(--space-1);font-variant-numeric:tabular-nums;color:var(--text-muted);justify-content:space-between;font-size:12px;display:flex}.chart-legend{gap:6px var(--space-4);margin:var(--space-3) 0 0;color:var(--text);flex-wrap:wrap;padding:0;font-size:13px;font-weight:650;list-style:none;display:flex}.chart-legend li{align-items:center;gap:var(--space-2);display:inline-flex}.swatch{border-radius:4px;width:12px;height:12px}.swatch-principal{background:var(--chart-principal)}.swatch-interest{background:var(--chart-interest)}.chart-tooltip{top:var(--space-1);z-index:4;border:1px solid var(--input-border);background:var(--surface);max-width:100%;box-shadow:var(--shadow-card);color:var(--text);font-variant-numeric:tabular-nums;pointer-events:none;border-radius:10px;padding:6px 10px;font-size:13px;font-weight:650;position:absolute}.cost-bar{gap:2px;height:18px;display:flex}.cost-segment{flex-basis:0;min-width:0;height:100%;display:block}.cost-segment[data-segment=loan]{background:var(--chart-principal);border-radius:6px 0 0 6px}.cost-segment[data-segment=interest]{background:var(--chart-interest);border-radius:0 6px 6px 0}.cost-segment:only-child{border-radius:6px}.yearly-scroll{margin-top:var(--space-4);overflow-x:auto}.yearly-table{border-collapse:separate;border-spacing:0;font-variant-numeric:tabular-nums;width:100%;font-size:14px}.yearly-table thead th{padding:var(--space-2) var(--space-3);background:var(--wash);border-bottom:1.5px solid var(--input-border);color:var(--text-muted);letter-spacing:.06em;text-align:right;text-transform:uppercase;font-size:12px;font-weight:700}.yearly-table td,.yearly-table tbody th{padding:8px var(--space-3);border-bottom:1px solid var(--border);text-align:right;overflow-wrap:anywhere}.yearly-table th:first-child,.yearly-table td:first-child{text-align:left}.yearly-table tbody th{font-weight:inherit}.yearly-table tbody tr:nth-child(2n) td,.yearly-table tbody tr:nth-child(2n) th{background:var(--band)}@media (width<=560px){figure.chart{padding:var(--space-3)}.chart-plot{height:120px}.yearly-table th,.yearly-table td{padding-left:var(--space-2);padding-right:var(--space-2)}}@media (forced-colors:active){.cost-segment,.swatch,.chart-plot path{forced-color-adjust:none}.cost-segment,.swatch,.figure.headline,.rounding-note{border:1px solid canvastext}}
