.tn-loan-page{--loan-paper:#faf6ee;--loan-ink:#1a1208;--loan-muted:#5a4a30;--loan-line:#b8a888;--loan-soft:#ddd4be;--loan-surface:#fffaf0;--loan-wash:#f5efdf;--loan-accent:#c44a00;--loan-good:#2f7d54;--loan-primary:#1a1208;--loan-primary-text:#faf6ee;--loan-secondary:#ede6d4;max-width:1180px;margin:0 auto;color:var(--loan-ink)}
.tn-loan-tool,.tn-loan-tool *{box-sizing:border-box}.tn-loan-tool{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;border:1px solid var(--loan-line);background:var(--loan-paper);color:var(--loan-ink)}
.tn-loan-tool :is(p,dl,dd,dt){margin:0}.tn-loan-tool :is(ul,ol,li){margin:0;padding:0;list-style:none}.tn-loan-tool :is(code,pre,kbd,samp){padding:0;border:0;background:transparent;color:inherit;-webkit-text-fill-color:inherit}
.tn-loan-grid{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--loan-line)}.tn-loan-input,.tn-loan-result{display:grid;align-content:start;gap:14px;padding:18px}.tn-loan-input{border-right:1px solid var(--loan-line)}
.tn-loan-pane-label,.tn-loan-band-label{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--loan-muted);-webkit-text-fill-color:var(--loan-muted)}.tn-loan-fields{display:grid;gap:12px}
.tn-loan-methods{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.tn-loan-method{position:relative;display:grid}.tn-loan-method input{position:absolute;opacity:0}.tn-loan-method>span{display:grid;gap:3px;min-height:54px;padding:8px;border:1px solid var(--loan-soft);background:var(--loan-surface);cursor:pointer}.tn-loan-method strong{font-size:13px}.tn-loan-method small{font-size:11px;color:var(--loan-muted)}.tn-loan-method input:checked+span{border-color:var(--loan-accent);box-shadow:inset 0 -2px var(--loan-accent)}.tn-loan-method input:focus-visible+span{outline:2px solid var(--loan-accent);outline-offset:2px}
.tn-loan-band,.tn-loan-early{display:grid;gap:10px;padding:12px;border:1px solid var(--loan-soft);background:var(--loan-wash)}.tn-loan-band-grid,.tn-loan-early-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tn-loan-field{display:grid;align-content:start;gap:5px;min-width:0;font-size:12px;font-weight:700}.tn-loan-control{display:flex!important;align-items:center!important;height:36px;border:1px solid var(--loan-line);background:var(--loan-surface)}.tn-loan-control input{flex:1 1 auto;width:auto;min-width:0;height:34px;padding:0 10px;border:0!important;outline:0!important;background:transparent!important;color:var(--loan-ink)!important;-webkit-text-fill-color:var(--loan-ink)!important;font:700 14px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important}.tn-loan-control b{display:grid;place-items:center;align-self:stretch;min-width:36px;padding:0 8px;border-left:1px solid var(--loan-soft);font-size:11px;color:var(--loan-muted)}.tn-loan-control--prefix b{border-left:0;border-right:1px solid var(--loan-soft)}.tn-loan-control:has(input:focus-visible){outline:2px solid var(--loan-accent);outline-offset:-1px}.tn-loan-control input::placeholder{color:var(--loan-muted);opacity:.5}
.tn-loan-hint{min-height:18px;font-size:11px;line-height:18px;color:var(--loan-muted)}.tn-loan-chips{display:flex;flex-wrap:wrap;gap:6px}.tn-loan-chip{min-height:30px;padding:0 9px;border:1px solid var(--loan-soft);background:var(--loan-secondary);color:var(--loan-ink);font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;cursor:pointer}.tn-loan-chip:hover,.tn-loan-chip.is-active{border-color:var(--loan-accent);color:var(--loan-accent)}
.tn-loan-switch{display:flex;align-items:center;gap:8px;font-size:12px;line-height:20px;font-weight:800}.tn-loan-switch input{appearance:none;width:20px;height:20px;margin:0;border:1px solid var(--loan-line);background:var(--loan-surface)}.tn-loan-switch input:checked{background:var(--loan-accent);box-shadow:inset 0 0 0 4px var(--loan-surface)}.tn-loan-switch input:focus-visible{outline:2px solid var(--loan-accent);outline-offset:2px}
.tn-loan-command{display:grid;gap:10px}.tn-loan-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.tn-loan-secondary,.tn-loan-excel{display:grid;place-items:center;min-height:36px;padding:8px 10px;border:1px solid var(--loan-line);background:var(--loan-secondary);color:var(--loan-ink);-webkit-text-fill-color:var(--loan-ink);font:800 12px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;cursor:pointer}.tn-loan-primary{background:var(--loan-primary);color:var(--loan-primary-text);-webkit-text-fill-color:var(--loan-primary-text)}.tn-loan-secondary:hover,.tn-loan-excel:hover{border-color:var(--loan-accent)}.tn-loan-secondary:focus-visible,.tn-loan-excel:focus-visible{outline:2px solid var(--loan-accent);outline-offset:2px}.tn-loan-excel:disabled{opacity:.45;cursor:not-allowed}.tn-loan-status,.tn-loan-disclaimer,.tn-loan-schedule-note{padding:10px 12px;border:1px solid var(--loan-soft);background:var(--loan-surface);font-size:11px;line-height:1.55;color:var(--loan-muted)}.tn-loan-status[data-state=error]{border-color:var(--loan-accent);color:var(--loan-accent)}
.tn-loan-main{display:grid;gap:9px;padding:15px;border:1px solid var(--loan-line);background:var(--loan-surface)}.tn-loan-main>span{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--loan-muted)}.tn-loan-main strong{font-family:Georgia,'Times New Roman',serif;font-size:clamp(28px,4vw,46px);line-height:1.05;font-variant-numeric:lining-nums tabular-nums;letter-spacing:0}.tn-loan-main em{font-size:11px;line-height:1.5;color:var(--loan-muted);font-style:normal}.tn-loan-badge{padding:3px 6px;border:1px solid var(--loan-soft);background:var(--loan-wash)}
.tn-loan-ratio{display:grid;gap:8px}.tn-loan-ratio-bar{display:flex;height:14px;border:1px solid var(--loan-line);background:var(--loan-wash);overflow:hidden}.tn-loan-ratio-fill--principal{background:var(--loan-good)}.tn-loan-ratio-fill--interest{background:var(--loan-accent)}.tn-loan-ratio-legend{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:var(--loan-muted)}.tn-loan-metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.tn-loan-metrics>div{display:grid;gap:5px;padding:10px;border:1px solid var(--loan-soft);background:var(--loan-surface)}.tn-loan-metrics dt{font-size:11px;color:var(--loan-muted)}.tn-loan-metrics dd{font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.tn-loan-compare{display:grid;border:1px solid var(--loan-soft)}.tn-loan-compare-head,.tn-loan-compare-row{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:8px;padding:8px 10px;font-size:11px}.tn-loan-compare-head{background:var(--loan-wash);font-weight:800}.tn-loan-compare-row+div{border-top:1px solid var(--loan-soft)}.tn-loan-compare-row.is-selected{box-shadow:inset 0 -2px var(--loan-accent)}.tn-loan-compare-a,.tn-loan-compare-b{text-align:right}
.tn-loan-schedule{display:grid;gap:10px;padding:18px}.tn-loan-schedule-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.tn-loan-schedule-actions{display:flex;align-items:center;gap:10px;font-size:11px}.tn-loan-excel{display:flex;gap:7px}.tn-loan-excel-mark{font-size:9px}.tn-loan-schedule-wrap{overflow:visible}.tn-loan-schedule-table{width:100%;border-collapse:collapse;font-size:11px}.tn-loan-schedule-table th,.tn-loan-schedule-table td{padding:8px;border:1px solid var(--loan-soft);text-align:right;font-variant-numeric:tabular-nums}.tn-loan-schedule-table th{background:var(--loan-wash)}.tn-loan-schedule-table th:first-child,.tn-loan-schedule-table td:first-child{text-align:center}.tn-loan-schedule-table tr.is-early{background:var(--loan-surface)}
/* graduated options section */
.tn-loan-graduated{display:grid;gap:10px;padding:12px;border:1px solid var(--loan-soft);background:var(--loan-wash)}.tn-loan-graduated[hidden]{display:none}
.tn-loan-graduated-radios{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.tn-loan-graduated-radios label{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid var(--loan-soft);background:var(--loan-surface);font-size:12px;font-weight:700;cursor:pointer}.tn-loan-graduated-radios input{appearance:none;width:16px;height:16px;margin:0;border:1px solid var(--loan-line);border-radius:50%;background:var(--loan-surface);flex-shrink:0}.tn-loan-graduated-radios input:checked{background:var(--loan-accent);box-shadow:inset 0 0 0 3px var(--loan-surface)}.tn-loan-graduated-radios input:focus-visible{outline:2px solid var(--loan-accent);outline-offset:2px}
.tn-loan-graduated-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
/* dark mode */
body:is([data-scheme=dark],[data-scheme=inverse],[data-scheme=auto][data-l=dark],[data-scheme=auto][data-d=dark]) .tn-loan-page,html[data-scheme=dark] body:not([data-scheme=light]) .tn-loan-page{--loan-paper:#241d12;--loan-ink:#efe6d2;--loan-muted:#c3b492;--loan-line:#6f6047;--loan-soft:#574a37;--loan-surface:#322a1a;--loan-wash:#2c2517;--loan-accent:#e8823f;--loan-good:#66a77f;--loan-primary:#4a3116;--loan-primary-text:#f7ead1;--loan-secondary:#2f2115}
body:is([data-scheme=dark],[data-scheme=inverse],[data-scheme=auto][data-l=dark],[data-scheme=auto][data-d=dark]) .tn-loan-tool :is(button,input,select),html[data-scheme=dark] body:not([data-scheme=light]) .tn-loan-tool :is(button,input,select){color:var(--loan-ink)!important;-webkit-text-fill-color:var(--loan-ink)!important}
@media(max-width:720px){.tn-loan-page{margin-inline:5px}.tn-loan-grid{grid-template-columns:1fr}.tn-loan-input{border-right:0;border-bottom:1px solid var(--loan-line)}.tn-loan-input,.tn-loan-result,.tn-loan-schedule{padding:13px}.tn-loan-methods{grid-template-columns:1fr}.tn-loan-band-grid,.tn-loan-early-fields,.tn-loan-metrics,.tn-loan-graduated-row{grid-template-columns:repeat(2,minmax(0,1fr))}.tn-loan-graduated-radios{grid-template-columns:1fr}.tn-loan-actions{grid-template-columns:1fr}.tn-loan-schedule-head{align-items:flex-start;flex-direction:column}.tn-loan-schedule-actions{width:100%;justify-content:space-between}.tn-loan-schedule-table thead{display:none}.tn-loan-schedule-table,.tn-loan-schedule-table tbody,.tn-loan-schedule-table tr,.tn-loan-schedule-table td{display:block}.tn-loan-schedule-table tr{display:grid;grid-template-columns:repeat(2,1fr);margin-bottom:8px;border:1px solid var(--loan-soft)}.tn-loan-schedule-table td{display:grid;grid-template-columns:1fr 1fr;gap:6px;border:0;border-bottom:1px solid var(--loan-soft);text-align:right}.tn-loan-schedule-table td::before{content:attr(data-th);text-align:left;color:var(--loan-muted)}.tn-loan-schedule-table td:first-child{grid-column:1/-1;text-align:right}}
@media(max-width:380px){.tn-loan-band-grid,.tn-loan-early-fields,.tn-loan-metrics,.tn-loan-graduated-row{grid-template-columns:1fr}.tn-loan-compare-head,.tn-loan-compare-row{grid-template-columns:1fr 1fr}.tn-loan-compare-b{display:none}}
@media(prefers-reduced-motion:reduce){.tn-loan-tool *{scroll-behavior:auto!important;transition:none!important}}
