@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');
:root{font-family:'DM Sans',system-ui,sans-serif;color:#173442;background:#f1f5f7;font-synthesis:none;font-size:16px;--ink:#173442;--line:#dce5e9;--accent:#f8ab54}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #dc8509;outline-offset:3px}button:disabled{cursor:default;opacity:.5}[hidden]{display:none!important}.topbar{max-width:1260px;margin:auto;display:flex;justify-content:space-between;align-items:center;padding:24px 36px 20px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink);font-size:22px}.brand b{font-weight:400;color:#637d89}.brand-mark{background:#173442;color:#ffb45e;font-family:'IBM Plex Mono',monospace;font-size:15px;font-weight:600;padding:9px 7px;border-radius:8px}.header-actions{display:flex;gap:12px}.quiet{border:0;background:none;color:#325665;padding:9px 12px;font-size:14px}.quiet:hover{background:#e3ecf0;border-radius:7px}main{max-width:1188px;margin:16px auto 32px;display:grid;grid-template-columns:410px minmax(0,1fr);gap:48px;align-items:start;padding:0 24px}.calculator{background:linear-gradient(145deg,#1c3945,#112832);border:1px solid #2c4651;border-radius:25px;padding:25px 22px 22px;box-shadow:0 18px 38px -18px #17344280,0 2px 1px #ffffff inset}.case-title{display:flex;justify-content:space-between;align-items:center;color:#ecf2f4;margin-bottom:20px}.case-title h1{font-size:24px;margin:0;font-weight:500;letter-spacing:-1px}.case-title span{font-size:10px;letter-spacing:1.5px;color:#bccbd0}.lcd{border:1px solid #0b232d;border-radius:9px;padding:16px 16px 12px;background:#d7e8d7;color:#233d30;box-shadow:0 2px 8px #0002 inset;min-height:127px;font-family:'IBM Plex Mono',monospace}.lcd-top{display:flex;justify-content:space-between;gap:5px;font-size:12px;min-height:19px}#display{display:block;text-align:right;font-size:clamp(28px,3.4vw,39px);font-weight:500;letter-spacing:-1.5px;min-height:54px;overflow-wrap:anywhere;padding-top:4px}#display-note{font-size:12px;min-height:18px;overflow-wrap:anywhere;color:#3c5846}.tvm-keys{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:22px 0 14px}.tvm-keys button,.keypad button{position:relative;border:1px solid #40535d;border-radius:8px;background:#304a56;box-shadow:0 3px 0 #081e28;color:#f6f9fa;min-height:57px;padding:17px 3px 7px;transition:background .12s,transform .1s,box-shadow .1s;touch-action:manipulation;font-size:17px}.tvm-keys button{background:#234d5c;border-color:#487080}.tvm-keys strong{font-weight:600;font-size:16px}.tvm-keys small,.keypad small{position:absolute;top:4px;left:0;width:100%;text-align:center;color:#ffb660;font-size:9px;line-height:11px;letter-spacing:.3px}.tvm-keys button:hover,.keypad button:hover{background:#456370}.tvm-keys button:active,.keypad button:active,.calculator button.pressed{transform:translateY(2px);box-shadow:0 1px 0 #081e28;background:#587982}.keypad{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 9px}.keypad button{padding:10px 3px;min-height:51px}.keypad button:has(small){padding-top:19px}.keypad .number{background:#f3f6f7;color:#193847;border-color:#e0e8eb;font-size:23px;font-weight:500}.keypad .number:hover{background:#fff}.keypad .shift{background:#f5a954;border-color:#f5a954;color:#233946;font-size:25px}.keypad .shift[aria-pressed=true]{background:#ffcd91;box-shadow:0 0 0 2px #ffd69b}.keypad .equals{background:#d8edf0;color:#123846}.keypad .equals small{color:#486372}.case-footer{margin-top:21px;display:flex;flex-direction:column;gap:5px;text-align:center;font-size:12px;color:#b7cbd3}.work-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:8px 0 28px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:700;color:#718894}h2{font-size:24px;font-weight:500;letter-spacing:-.7px;margin:7px 0 0}.example{border:1px solid #b8cdd7;background:transparent;padding:10px 13px;color:#24526a;border-radius:7px;font-size:13px;max-width:155px}.example:hover{background:#e1edf2}.settings{display:flex;gap:16px;align-items:end;padding-bottom:25px;flex-wrap:wrap}label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:#526c79}input,select{border:1px solid #bfcfd7;border-radius:6px;padding:9px 10px;background:#fff;color:#193c4d;min-height:42px;min-width:0}#py{width:116px}.tabs{display:flex;gap:23px;border-bottom:1px solid #c8d7de;margin-bottom:18px}.tabs button{background:none;border:none;border-bottom:2px solid transparent;padding:13px 0;color:#607b88;font-size:14px}.tabs button[aria-selected=true]{color:#143e52;border-bottom-color:#214f64;font-weight:600}.registers{display:flex;flex-direction:column}.register-row{display:grid;grid-template-columns:65px 1fr minmax(110px,170px) 34px;gap:12px;align-items:center;border-bottom:1px solid var(--line);padding:12px 0}.register-row .key-name{font-family:'IBM Plex Mono',monospace;font-size:15px;color:#24596b;font-weight:600}.register-row .description{font-size:14px;color:#607b89}.register-row input{font-family:'IBM Plex Mono',monospace;text-align:right;width:100%;border:1px solid transparent;background:transparent;padding:6px;font-size:16px;min-height:35px;border-radius:4px}.register-row input:hover,.register-row input:focus{border-color:#9cb5c1;background:#fff}.solve-button{border:0;background:#e0ebef;color:#1b4c61;width:32px;height:32px;border-radius:5px;font-size:18px}.solve-button:hover{background:#c6dce6}.register-row.solved{background:#e0eee9}.panel-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:19px 0 27px}.secondary{border:1px solid #aac2ce;background:#fff;border-radius:6px;padding:10px 15px;font-size:14px;color:#214e64;white-space:nowrap}.secondary:hover{background:#e4edf1}.text-button{border:0;background:none;font-size:13px;color:#537381;padding:10px 0}.timeline-section{border-top:1px solid #d2dfe5;padding-top:19px}.section-label{display:flex;justify-content:space-between;gap:14px;align-items:center}.section-label h3{font-size:14px;font-weight:600;margin:0}.section-label span{font-size:11px;color:#758b96}.timeline{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:20px 0 12px;gap:0}.timeline-item{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0;position:relative}.timeline-value{font-family:'IBM Plex Mono',monospace;font-size:13px;overflow-wrap:anywhere;text-align:center}.timeline-arrow{font-size:24px;line-height:24px;border-bottom:1px solid #92abb7;width:100%;text-align:center;color:#377567}.timeline-arrow.out{color:#ae6748}.timeline-label{font-size:11px;color:#6a828e;text-align:center}.footnote{color:#6a828d;font-size:12px;line-height:1.6;margin:12px 0}#notice{padding:12px 14px;border-radius:7px;background:#e3edf1;color:#355e72;font-size:13px;line-height:1.6;margin-top:18px;min-height:45px}#notice.error{background:#fbe7de;color:#853820}.recent{margin-top:15px;font-size:12px;color:#6a828d}.recent summary{cursor:pointer;width:fit-content}.history{font-family:'IBM Plex Mono',monospace;line-height:2;margin-top:8px;overflow-wrap:anywhere}.page-footer{display:flex;gap:14px;justify-content:space-between;max-width:1188px;padding:0 24px 28px;margin:auto;color:#7a909b;font-size:11px}.page-footer a{color:#597784;text-underline-offset:3px}.cf-intro{font-size:14px;line-height:1.7;color:#5d7885}.flow-form,.cf-bottom{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.flow-form label:first-child{flex:1}.flow-form input{width:100%}#cf-count{width:76px}.table-wrap{max-height:370px;overflow:auto;margin:20px 0}table{border-collapse:collapse;width:100%;font-size:13px;text-align:right;font-variant-numeric:tabular-nums}th{color:#6c8490;font-weight:500;font-size:12px;background:#eff5f7;position:sticky;top:0}td,th{padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}td:first-child,th:first-child{text-align:left}.flow-table button{background:none;border:0;color:#8e4d39;font-size:20px}.cf-bottom input{width:120px}.flow-result{font-family:'IBM Plex Mono',monospace;font-size:20px;margin-top:20px}.empty{text-align:left;color:#7a909b}.focus-mode main{grid-template-columns:minmax(290px,450px);justify-content:center}.focus-mode .workspace{display:none}.focus-mode .page-footer{justify-content:center}.focus-mode .page-footer span:last-child{display:none}dialog{border:1px solid #d7e2e6;border-radius:16px;color:#173442;padding:28px;max-width:830px;width:calc(100% - 32px);max-height:85dvh;box-shadow:0 25px 80px #0f29394d}dialog::backdrop{background:#0f293978;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}.dialog-head h2{margin:0}.dialog-head button{border:0;background:#e8eff3;border-radius:50%;width:36px;height:36px;font-size:24px;color:#284e63}.help-content{max-width:650px;font-size:16px;line-height:1.7}.help-content p{margin:0 0 18px}#amort-form{display:flex;align-items:end;gap:14px;flex-wrap:wrap}#amort-form input[type=number]{width:112px}.checkbox{flex-direction:row;align-items:center;padding-bottom:7px}.checkbox input{min-height:0;width:18px;height:18px}.amort-summary{display:flex;gap:25px;flex-wrap:wrap;font-size:14px}.amort-summary strong{display:block;font-family:'IBM Plex Mono',monospace;font-size:21px;font-weight:500;margin-top:6px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(min-width:1450px){main{margin-top:35px}}@media(max-width:1000px){main{grid-template-columns:360px minmax(0,1fr);gap:25px}.calculator{padding:22px 18px}.work-heading{align-items:start;flex-direction:column;gap:15px;margin-bottom:20px}.work-heading h2{font-size:21px}.example{max-width:none}.register-row{grid-template-columns:48px 1fr 125px 28px;gap:4px}.register-row .description{font-size:12px}.register-row input{font-size:14px}.settings{gap:10px}.section-label span{display:none}.page-footer{flex-direction:column}.case-title span{font-size:9px}.tvm-keys,.keypad{gap:8px}}@media(max-width:760px){.topbar{padding:18px 18px 10px}.brand{font-size:19px}.header-actions{gap:0}.quiet{font-size:12px;padding:8px}.topbar .brand-mark{display:none}main{display:flex;flex-direction:column;align-items:stretch;gap:30px;padding:0 16px;max-width:480px;margin-top:12px}.calculator{width:100%;padding:22px}.case-title span{font-size:10px}#display{font-size:36px}.keypad button{min-height:54px}.workspace{width:100%}.work-heading{flex-direction:row;align-items:center}.work-heading h2{font-size:20px}.example{max-width:135px}.register-row{grid-template-columns:52px 1fr 138px 30px;gap:6px}.register-row .description{font-size:13px}.register-row input{font-size:15px}.settings{justify-content:space-between}.settings label{font-size:12px}.settings input,.settings select{font-size:14px;padding:8px}#py{width:95px}.page-footer{max-width:480px;padding:0 16px 24px}.focus-mode main{display:block}.flow-form{gap:8px}.flow-form button{width:100%}dialog{padding:20px}.dialog-head h2{font-size:22px}}@media(max-width:370px){.calculator{padding:18px 14px}.case-title span{font-size:9px}.register-row{grid-template-columns:45px 1fr 105px 28px}.register-row .description{font-size:12px}.settings{gap:7px}.settings label:first-child{width:95px}.settings label:nth-child(2){width:150px}.work-heading{flex-direction:column;align-items:start}.example{max-width:none}.tvm-keys strong{font-size:14px}.keypad,.tvm-keys{gap:7px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.hp-keyboard{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 10px;margin-top:20px}.hp-key{position:relative;min-height:47px;border-radius:7px;border:1px solid #5c6870;background:linear-gradient(#46545c,#293942);box-shadow:0 3px 0 #071b25;color:#f8fafb;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px 2px;transition:transform .1s,background .15s;touch-action:manipulation}.hp-key strong{font-size:16px;font-weight:500;line-height:1.2}.hp-key.number strong{font-size:21px}.hp-key small{font-size:10px;line-height:1.1;color:#ffc479;min-height:11px;margin-top:3px}.hp-key .purple-label{position:absolute;top:-12px;left:0;width:100%;text-align:center;font-size:9px;line-height:10px;color:#d2bef7}.hp-key[data-row="5"],.hp-key[data-row="6"]{margin-top:8px}.hp-key.financial{background:linear-gradient(#416271,#243f4d)}.hp-key:hover{background:#546e7b}.hp-key:active,.hp-key.pressed{transform:translateY(2px);box-shadow:0 1px 0 #081e28;background:#6c8793}.hp-key.orange-shift{background:#e9a550;border-color:#f3b560;color:transparent}.hp-key.purple-shift{background:#9c89c3;border-color:#b6a4d5;color:transparent}.hp-key.orange-shift[aria-pressed="true"]{box-shadow:0 0 0 3px #ffcf84}.hp-key.purple-shift[aria-pressed="true"]{box-shadow:0 0 0 3px #d3bafa}.hp-key.lesson-target{outline:4px solid #ffc164;outline-offset:3px;background:#67542e;box-shadow:0 0 0 8px #ffb84626,0 3px 0 #071b25}.hp-key.lesson-target::after{content:'•';position:absolute;right:4px;top:0;color:#ffe2a9;font-size:18px}.hp-key.lesson-target.pressed{background:#a77826;outline-color:#fff1bf}.course-panel{border:1px solid #bed2dc;background:#e7f0f4;border-radius:13px;padding:18px;margin-bottom:26px}.course-heading{display:flex;justify-content:space-between;gap:15px;margin-bottom:13px}.course-heading #course-progress{font:12px 'IBM Plex Mono',monospace;color:#416574}.course-panel>label{font-size:12px}.course-mode{display:flex;gap:4px;margin:15px 0;background:#d1e0e7;padding:4px;border-radius:7px}.course-mode button{flex:1;border:0;border-radius:4px;color:#476977;background:transparent;padding:8px 6px;font-size:13px;white-space:nowrap}.course-mode button[aria-pressed=true]{background:#fff;color:#153f52;box-shadow:0 1px 3px #18354215}#course-instruction{font-size:14px;line-height:1.6;min-height:45px;color:#234f63}.course-controls{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin-top:14px}.course-controls .secondary{padding:8px 11px}.course-controls label{font-size:11px;margin-left:auto;gap:5px}.course-controls select{font-size:12px;min-height:35px;padding:7px}.workspace .work-heading h2{font-size:21px}.workspace .work-heading{margin-bottom:20px}.focus-mode .calculator{max-width:450px;margin:auto}.calculator{position:sticky;top:20px}.case-footer{font-size:11px}.lcd{min-height:120px}.keypad{display:none}.hp-key{min-height:46px}.tvm-keys{display:none}@media(max-width:760px){.calculator{position:static}.hp-key{min-height:48px}.hp-keyboard{gap:12px 10px}.course-controls label{margin-left:0}.course-mode button{font-size:13px}.course-panel{padding:16px}}@media(max-width:370px){.hp-keyboard{gap:12px 8px}.hp-key strong{font-size:14px}.hp-key small{font-size:9px}}@media(min-width:761px) and (max-height:850px){.calculator{position:static}}
