/* Teal finance palette and shared spacing keep desktop and stacked mobile surfaces consistent. */
.comparison.has-custom{grid-template-columns:repeat(2,minmax(0,1fr))}
/* Smaller phones retain readable amounts inside each comparison column. */
@media(max-width:370px){.comparison{grid-template-columns:1fr!important}.plan-card{padding:19px!important}.monthly-amount{font-size:30px!important}.monthly-amount small{display:inline!important;margin-left:5px!important}.decrease{height:auto!important}.plan-numbers div{display:flex!important}.plan-numbers strong{display:inline!important}.house{width:80px!important;opacity:.45!important}}
:root{--bg:#f6f8f8;--surface:#fff;--ink:#193c35;--text:#243b36;--muted:#77847f;--teal:#17695c;--teal-dark:#105346;--pale:#eaf3ef;--line:#e3eae6;--orange:#eea46c;--blue:#849db5;--radius:15px;font-family:Inter,-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);font-size:14px;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;transition:background .15s,border-color .15s,transform .15s}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:3px solid #81b9aa;outline-offset:3px}button:hover:not(:disabled){filter:brightness(.96)}[hidden]{display:none!important}a{color:inherit;text-decoration:none}.site-header{height:78px;background:#fff;border-bottom:1px solid var(--line)}.header-inner{max-width:1320px;padding:0 36px;height:100%;margin:auto;display:flex;align-items:center;gap:22px}.brand{display:flex;align-items:center;gap:10px;color:var(--teal-dark)}.brand svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linejoin:round}.brand strong{font-size:24px;letter-spacing:1px}.brand-divider{height:23px;width:1px;background:#d8e3dd}.header-label{font-size:14px;font-weight:500}.header-link{margin-left:auto;color:#6c8076;font-size:13px}.header-link span{margin-left:8px}.shell{max-width:1320px;padding:0 36px;margin:auto}.intro{display:flex;align-items:center;justify-content:space-between;padding:35px 0 29px;gap:20px}.intro h1{margin:0 0 13px;color:#173e34;font-size:32px;letter-spacing:-1px;font-weight:650;line-height:1.4}.intro h1 span{color:var(--teal)}.intro p{margin:0;font-size:13px;color:#76857c;line-height:1.7}.house{width:230px;height:95px;flex:none}.workspace{display:grid;grid-template-columns:290px minmax(0,1fr);gap:24px;align-items:start}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 3px 15px #213f2c03}.section-title{display:flex;align-items:center;justify-content:space-between;gap:14px}.section-title h2{margin:0;font-size:16px;font-weight:650;color:#263e35;letter-spacing:.2px}.section-title p{font-size:12px;color:var(--muted);margin:8px 0 0;line-height:1.6}.settings{padding:23px 22px}.text-button{border:0;background:none;color:#7a8a80;font-size:11px;padding:4px 0}.field{display:block;margin-top:23px}.field>span:first-child{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:550;margin-bottom:10px}.input-box{display:flex;align-items:center;gap:7px;border:1px solid #dce5df;border-radius:7px;background:#fff;min-height:44px;padding:0 12px;color:#6f8176;font-size:12px;transition:border .15s,box-shadow .15s}.input-box:focus-within{border-color:#4e9682;box-shadow:0 0 0 3px #dfeee7}.input-box input{min-width:0;width:100%;border:0;outline:0;background:none;padding:10px 0;font-size:17px;font-weight:550;color:#233f34;font-variant-numeric:tabular-nums;appearance:textfield}.input-box input:focus-visible{outline:0}.input-box input::-webkit-inner-spin-button{appearance:none}.input-box>span{white-space:nowrap}.input-box .prefix{color:var(--muted)}.input-box input::placeholder{font-size:12px;font-weight:400;color:#9ca89f}.field-error{display:block;font-size:11px;color:#bb4b42;line-height:1.6;margin-top:5px}.field-error:empty{display:none}input[aria-invalid=true]{color:#bb4b42}.field-note{display:block;font-size:10px;font-weight:400;color:#94a197;line-height:1.7;margin:7px 0 0}.hint{font-size:9px;font-weight:400;color:#98a398}.loan-split{display:flex;justify-content:space-between;gap:6px;background:#eef5f0;border-radius:7px;padding:13px 9px;margin-top:15px;font-size:10px;color:#6a7e6f}.loan-split strong{font-size:15px;color:var(--teal);margin:0 3px;font-weight:600}.rate-field{margin-top:24px}.term-field{border:0;padding:0;margin:23px 0 0}.term-field legend{font-size:12px;font-weight:550;padding:0;margin-bottom:10px}.term-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.term-buttons button,.detail-terms button{border:1px solid var(--line);background:#fff;color:#6e8173;border-radius:6px;padding:9px 3px;font-size:11px}.term-buttons button.active,.detail-terms button.active{border-color:var(--teal);color:var(--teal);background:#eaf3ed;font-weight:600}.custom-input{margin-top:9px}.optional{font-size:10px;color:#98a598;font-weight:400}.budget-field{margin-top:24px}.budget-field input{font-size:15px}.prepay-section{border-top:1px solid var(--line);padding-top:20px;margin-top:23px}.check-label{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:550;cursor:pointer;position:relative}.check-label input{width:15px;height:15px;accent-color:var(--teal);margin:0}.switch-decoration{margin-left:auto;width:27px;height:15px;background:#e0e8e1;border-radius:20px;position:relative}.switch-decoration:after{content:"";position:absolute;width:11px;height:11px;border-radius:50%;top:2px;left:2px;background:white;box-shadow:0 1px 3px #234b2930}.check-label input:checked~.switch-decoration{background:var(--teal)}.check-label input:checked~.switch-decoration:after{left:14px}.prepay-section .field{margin-top:17px}select{width:100%;border:1px solid #dce5df;min-height:40px;border-radius:6px;background:white;color:var(--text);padding:8px;font-size:12px}.prepay-note{font-size:10px}.primary-button{border:1px solid var(--teal);background:var(--teal);color:#fff;border-radius:7px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:8px;padding:13px}.calculate-button{width:100%;margin-top:26px}.primary-button svg,.outline-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.autosave-note{text-align:center;font-size:10px;color:#98a69a;margin:12px 0 1px}.results{min-width:0}.method-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);background:#edf1ed;padding:4px;border-radius:10px;gap:4px}.method-tabs button{display:flex;align-items:center;justify-content:center;gap:10px;padding:13px 8px;border:0;background:none;color:#7b897e;border-radius:7px;font-weight:500;font-size:14px}.method-tabs button small{font-size:10px;font-weight:400;opacity:.7}.method-tabs button.active{background:#fff;color:var(--teal-dark);box-shadow:0 2px 7px #29452d09}.method-explanation{margin:13px 2px 17px;font-size:11px;color:#8d9a90;line-height:1.6}.comparison{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.plan-card{padding:18px 15px 16px;background:#fff;border:1px solid var(--line);border-radius:11px;position:relative;transition:border .15s}.plan-card.selected{border-color:#5f9e84;background:#fdfefd;box-shadow:0 0 0 1px #5f9e8410}.plan-card-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.plan-card-heading h3{font-weight:600;margin:0;font-size:15px}.plan-card-heading small{font-size:9px;color:#9ba99c}.plan-card .monthly-label{margin:23px 0 6px;color:#8a998b;font-size:10px}.monthly-amount{color:var(--teal-dark);font-size:29px;font-weight:600;letter-spacing:-.9px;white-space:nowrap;font-variant-numeric:tabular-nums;line-height:1.3}.monthly-amount small{font-weight:400;font-size:10px;color:#829382;margin-left:4px;letter-spacing:0}.decrease{height:28px;font-size:9px;line-height:1.5;color:#94a193;margin-top:4px}.plan-numbers{border-top:1px solid #edf1eb;padding-top:13px;margin-top:8px}.plan-numbers div{display:flex;justify-content:space-between;gap:4px;margin:9px 0;font-size:10px;color:#8a998b}.plan-numbers strong{font-size:11px;color:#47624b;font-weight:500;font-variant-numeric:tabular-nums}.cost-bar{display:flex;height:5px;background:#e8efea;border-radius:3px;overflow:hidden;margin-top:17px}.cost-bar span:first-child{background:#428875}.cost-bar span:last-child{background:var(--orange)}.plan-detail-button{display:block;width:100%;background:none;border:0;color:#8c9d8e;font-size:10px;margin-top:15px;padding:2px}.selected .plan-detail-button{color:var(--teal)}.plan-detail-button span{margin-left:6px}.insight{display:flex;align-items:flex-start;gap:11px;background:#eaf3ee;color:#67836c;border:1px solid #deebe1;border-radius:9px;margin-top:17px;padding:14px 16px;font-size:11px;line-height:1.9}.insight .checkmark{display:inline-flex;flex:none;align-items:center;justify-content:center;width:19px;height:19px;background:var(--teal);color:white;border-radius:50%;margin-top:1px;font-size:11px}.insight strong{font-weight:600;color:var(--teal)}.chart-panel{padding:23px;margin-top:21px}.legend{display:flex;gap:15px;font-size:10px;color:#8b998c;flex-shrink:0}.legend span:before{content:"";display:inline-block;width:7px;height:7px;border-radius:2px;background:var(--teal);margin-right:5px}.legend .interest-dot:before{background:var(--orange)}.legend .extra-dot:before{background:var(--blue)}#chart{margin-top:17px;width:100%}#chart svg{display:block;width:100%;height:auto;overflow:visible}.chart-note{font-size:10px;color:#9ba69b;margin:8px 0 0;line-height:1.7}.recommendation{margin-top:21px;padding:23px}.mini-label{color:#93a091;font-size:10px}.recommendation h3{font-size:19px;font-weight:550;color:var(--teal-dark);margin:20px 0 13px}.recommendation-copy p,#recommendation-copy p{color:#788c78;font-size:11px;line-height:1.95;margin:9px 0}.recommendation-copy p:last-child,#recommendation-copy p:last-child{font-size:10px;color:#9aab98;border-top:1px solid #edf1eb;padding-top:12px;margin-top:14px}.details{margin-top:21px;padding:23px}.outline-button{display:flex;align-items:center;justify-content:center;gap:7px;background:#fff;border:1px solid #a4c4b1;color:var(--teal);border-radius:6px;font-size:11px;font-weight:500;padding:9px 12px;white-space:nowrap}.detail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:21px;margin-bottom:14px}.detail-terms{display:flex;gap:6px;flex-wrap:wrap}.detail-terms button{padding:7px 10px;font-size:10px}.year-select{display:flex;align-items:center;gap:8px;color:#8b9b88;font-size:10px;white-space:nowrap}.year-select select{width:90px;min-height:31px;padding:5px;font-size:10px}.table-scroll{overflow:auto;border-radius:7px;border:1px solid #e9eee7}table{border-collapse:collapse;width:100%;font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums}th{background:#f0f5ef;color:#71886e;font-weight:500;padding:12px 9px;text-align:right}th:first-child,td:first-child{text-align:left;padding-left:15px}td{padding:12px 9px;text-align:right;color:#60785a;border-bottom:1px solid #edf1eb}tbody tr:nth-child(even){background:#fafcf9}tbody tr:last-child td{border-bottom:0}tfoot td{background:#f1f6ef;border-top:1px solid #e3ebdf;font-weight:550;color:#4f7046}.extra-cell{color:var(--teal);font-weight:600}.table-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:14px;font-size:10px;color:#95a38f}.table-bottom>div{display:flex;gap:6px}.table-bottom button{border:1px solid var(--line);background:#fff;border-radius:5px;width:29px;height:25px;color:#70906a}.export-hint{font-size:10px;color:#8b9e83;line-height:1.8;margin:17px 0 0}.export-status{font-size:11px;color:var(--teal);line-height:1.7;margin:6px 0 0}.export-status:empty{display:none}.invalid-state{padding:50px 25px;line-height:1.8;color:#82917b}.invalid-state span{font-size:20px;color:var(--teal-dark)}.footer{display:flex;align-items:center;gap:12px;padding:25px 0 29px;margin-top:10px;color:#8c9b84;font-size:9px;line-height:1.9}.footer p{margin:0;max-width:890px}.footer strong{color:#788e70;font-weight:500;margin-right:8px}.footer-mark{display:flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;border:1px solid #90a18a;flex:none}.footer-brand{margin-left:auto;white-space:nowrap;font-size:9px;color:#a4b09d}html{scroll-behavior:smooth;scroll-padding-top:20px}@media(min-width:1450px){.shell,.header-inner{max-width:1380px}.workspace{grid-template-columns:305px minmax(0,1fr)}.monthly-amount{font-size:33px}}@media(max-width:1100px){.shell,.header-inner{padding-left:24px;padding-right:24px}.workspace{grid-template-columns:260px minmax(0,1fr);gap:17px}.settings{padding:21px 17px}.comparison{gap:8px}.plan-card{padding:15px 11px}.monthly-amount{font-size:23px}.plan-card-heading h3{font-size:14px}.plan-numbers div{font-size:9px}.plan-numbers strong{font-size:10px}.chart-panel,.recommendation,.details{padding:20px}.intro h1{font-size:29px}.house{width:190px}}@media(max-width:850px){.workspace{grid-template-columns:1fr}.settings{padding:22px}.settings form{display:grid;grid-template-columns:1fr 1fr;gap:0 22px;align-items:start}.field{margin-top:21px}.loan-split{grid-column:1/-1;justify-content:center;gap:50px;margin-bottom:0}.rate-field,.term-field{margin-top:22px}.budget-field{grid-column:1/-1}.prepay-section{grid-column:1/-1}.calculate-button,.autosave-note{grid-column:1/-1}.monthly-amount{font-size:32px}.plan-card{padding:21px}.plan-numbers div{font-size:11px}.plan-numbers strong{font-size:12px}.plan-card-heading h3{font-size:17px}.comparison{gap:12px}.house{width:160px}.intro h1{font-size:28px}.footer-brand{display:none}.hint{font-size:10px}}@media(max-width:560px){.site-header{height:64px}.shell,.header-inner{padding-left:18px;padding-right:18px}.header-inner{gap:13px}.brand strong{font-size:21px}.brand svg{width:28px;height:28px}.header-label{font-size:12px}.header-link{display:none}.brand-divider{height:19px}.intro{padding:27px 0 24px}.intro h1{font-size:27px;letter-spacing:-.8px;margin-bottom:11px;line-height:1.5}.intro h1 span{display:block}.intro p{font-size:11px;max-width:260px;line-height:1.9}.house{width:105px;position:absolute;right:18px;top:100px;opacity:.7;pointer-events:none}.intro>div{max-width:100%}.settings{padding:22px 19px}.settings form{gap:0 15px}.field>span:first-child{font-size:11px}.input-box{padding:0 10px}.input-box input{font-size:17px}.settings .hint{display:none}.loan-split{gap:24px}.term-field{grid-column:1/-1;grid-row:5}.rate-field{grid-column:1/-1}.budget-field{grid-column:1/-1}.term-buttons button{font-size:12px;padding:11px 3px}.check-label{font-size:12px}.results{margin-top:4px}.method-tabs button{flex-direction:column;gap:4px;font-size:14px;padding:11px 4px}.method-tabs button small{font-size:9px}.method-explanation{font-size:10px;line-height:1.8;margin:12px 1px 15px}.comparison{gap:7px}.plan-card{padding:14px 9px 12px;border-radius:9px}.plan-card-heading h3{font-size:14px}.plan-card-heading small{font-size:8px}.plan-card .monthly-label{font-size:9px;margin-top:17px}.monthly-amount{font-size:22px;letter-spacing:-.8px}.monthly-amount small{display:block;margin-left:0;font-size:9px;margin-top:3px}.decrease{font-size:8px;height:35px;margin-top:7px}.plan-numbers{padding-top:8px;margin-top:7px}.plan-numbers div{display:block;font-size:9px;line-height:1.9;margin:7px 0}.plan-numbers strong{display:block;font-size:11px}.cost-bar{margin-top:12px;height:4px}.plan-detail-button{font-size:9px;padding:0;margin-top:13px}.plan-detail-button span{margin-left:2px}.insight{font-size:10px;line-height:1.9;padding:13px 12px;gap:9px}.insight .checkmark{width:17px;height:17px;font-size:10px}.chart-panel,.recommendation,.details{padding:20px 15px;margin-top:17px;border-radius:12px}.section-title h2{font-size:14px}.section-title p{font-size:10px}.chart-panel .section-title{align-items:flex-start;flex-direction:column;gap:12px}.legend{font-size:9px;gap:13px}.chart-note{font-size:9px;line-height:1.8}.recommendation h3{font-size:18px;line-height:1.5;margin-top:19px}.mini-label{font-size:9px}#recommendation-copy p{font-size:11px;line-height:2.05}.detail-heading{align-items:flex-start}.outline-button{font-size:10px;padding:8px;gap:5px}.outline-button svg{width:14px;height:14px}.detail-toolbar{align-items:flex-start;flex-direction:column;gap:12px}.year-select{align-self:flex-end}.table-scroll table{min-width:605px;font-size:10px}.detail-terms button{font-size:10px;padding:7px 11px}.export-hint{font-size:9px}.footer{align-items:flex-start;font-size:9px;padding:23px 0;gap:8px}.footer-mark{margin-top:2px}.section-title{gap:8px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* A keyboard-accessible selection control covers each card; the detail action stays above it. */
.plan-select-button{position:absolute;inset:0;z-index:1;width:100%;border:0;border-radius:inherit;background:transparent;padding:0}
.plan-detail-button{position:relative;z-index:2}
.plan-card:hover{border-color:#78a993}
.table-mobile-value{display:none}
/* Fixed column proportions let all six columns fit a phone without dropping cents or extra repayments. */
@media(max-width:560px){
  .table-scroll{overflow:visible}
  .table-scroll table{min-width:0;width:100%;table-layout:fixed;font-size:clamp(8px,2.35vw,10.5px);letter-spacing:-.15px}
  .table-scroll th,.table-scroll td{padding:10px 2px}
  .table-scroll th:first-child,.table-scroll td:first-child{padding-left:3px;width:8%;text-align:center;white-space:normal}
  .table-scroll th:nth-child(2),.table-scroll th:nth-child(3),.table-scroll th:nth-child(4),.table-scroll th:nth-child(5){width:17%}
  .table-scroll th:nth-child(5){width:19%}
  .table-scroll th:last-child{width:22%}
  .table-scroll td:last-child,.table-scroll th:last-child{padding-right:3px}
  .table-desktop-value,.period-affix{display:none}
  .table-mobile-value{display:inline}
  .table-scroll th{font-size:10px;white-space:normal;line-height:1.5}
  .table-scroll tfoot td{font-size:clamp(7px,2.1vw,9.5px);line-height:1.5}
}
/* Narrower phone gutters preserve usable space; stronger labels improve chart and table legibility. */
@media(max-width:560px){
  .shell,.header-inner{padding-left:12px;padding-right:12px}
  .settings{padding:20px 16px}
  .chart-panel,.recommendation,.details{padding:18px 10px}
  .legend{font-size:10px;font-weight:600;color:#5c725f}
  .chart-note{font-size:10px;color:#71836d}
  .table-scroll th{font-weight:650;color:#4c6253}
  .table-scroll tbody td{font-weight:500;color:#4f674a}
  .table-scroll tfoot td{font-weight:700}
}

/* Share a toolbar row when space permits, while narrow phones can wrap the year selector. */
@media(max-width:560px){
  .detail-toolbar{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;margin-top:17px}
  .detail-terms{gap:4px}
  .year-select{align-self:auto;margin-left:auto}
}
/* Desktop comparison uses the available display width and keeps a custom fourth term on the same row. */
@media(min-width:561px){
  .shell,.header-inner{max-width:1920px;padding-left:clamp(16px,2vw,32px);padding-right:clamp(16px,2vw,32px)}
  .comparison.has-custom{grid-template-columns:repeat(4,minmax(0,1fr))}
  .comparison.has-custom .plan-card{padding:18px clamp(9px,1vw,18px)}
  .comparison.has-custom .monthly-amount{font-size:clamp(22px,2vw,33px)}
  .comparison.has-custom .monthly-amount small{display:block;margin:3px 0 0}
}
@media(min-width:561px) and (max-width:1100px){
  .comparison.has-custom .plan-card-heading h3{font-size:14px}
  .comparison.has-custom .plan-card-heading small{font-size:8px;white-space:nowrap}
}
