← Demos
Web Pages · Hello World

One breakdown. A clearer way forward.

ky-pfm.

by Riya Patel Nov 18, 2026 10 views 62.1 KB
Sandbox · one-breakdown-a-clearer-way-forward · no access to your account
View source — the whole page is this one file
<!-- Copyright (c) 2026 Riya Patel. Released under the MIT License. -->
<!DOCTYPE html>


<html lang="en">
<head>
<meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/>
<title>One Breakdown V5 | UK Student Emergency Recovery Planner</title>
<style>
:root{--blue:#153a72;--blue2:#0c264e;--sky:#eaf2ff;--ink:#19273b;--muted:#617087;--line:#dce5f0;--bg:#f6f8fc;--card:#fff;--teal:#087e7b;--red:#b8424b;--amber:#a76b15;--shadow:0 12px 38px rgba(15,42,82,.08)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #79b5ff;outline-offset:2px}header{background:var(--blue2);color:white;padding:18px max(24px,calc((100vw - 1240px)/2));display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:12px}.brandmark{display:grid;place-items:center;background:#3171b7;width:42px;height:42px;border-radius:14px;font-size:23px}.brand h1{font-size:19px;margin:0;letter-spacing:-.7px}.brand small{color:#c0d4ed;font-size:11px;display:block}.topactions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.button{border:1px solid var(--line);border-radius:10px;padding:10px 14px;background:white;color:var(--ink);font-weight:650;font-size:13px}.button.primary{background:var(--blue);color:white;border-color:var(--blue)}header .button{border-color:#5e7798;background:transparent;color:#fff}header .button.primary{background:#fff;color:var(--blue2)}.button:hover{filter:brightness(.96)}.pill{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--teal);font-weight:800}.hero{max-width:1240px;margin:auto;padding:35px 24px 20px;display:flex;align-items:end;justify-content:space-between;gap:20px}.hero h2{font-size:clamp(27px,4vw,39px);letter-spacing:-1.7px;line-height:1.15;margin:8px 0 10px}.hero p{color:var(--muted);max-width:680px;margin:0}.hero-note{font-size:12px;background:#e7eefb;border:1px solid #c9dcf4;padding:10px 14px;border-radius:12px;color:var(--blue);max-width:235px}.layout{max-width:1240px;margin:0 auto;padding:0 24px 35px;display:grid;grid-template-columns:365px minmax(0,1fr);gap:20px}.card{background:var(--card);border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}.sidebar{padding:22px;align-self:start}.sidebar h3,.panel h3{margin:0;font-size:18px;letter-spacing:-.4px}.sub{color:var(--muted);font-size:12px;margin:4px 0 16px}.sectionhead{border-top:1px solid var(--line);padding-top:18px;margin:20px 0 13px;display:flex;align-items:center;justify-content:space-between}.sectionhead h4{margin:0;font-size:14px}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field.wide{grid-column:1/-1}label{color:#3d4b62;font-size:12px;font-weight:700}input,select{width:100%;min-width:0;border:1px solid #cbd7e5;background:#fff;border-radius:9px;padding:9px 10px;color:var(--ink)}input[type=date]{font-size:12px}input[type=number]{font-variant-numeric:tabular-nums}.helper{font-size:11px;color:var(--muted)}.events{display:flex;flex-direction:column;gap:8px}.eventrow{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,.85fr) 26px;gap:5px;align-items:center}.eventrow input{font-size:12px;padding:8px 6px}.remove{width:26px;height:32px;border:0;border-radius:7px;background:#fcebec;color:#a12d37;font-size:18px}.smalladd{color:var(--blue);font-weight:700;border:0;background:none;padding:6px 0;font-size:12px}.main{min-width:0;display:flex;flex-direction:column;gap:18px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.stat{padding:20px}.stat .kicker{font-size:11px;font-weight:700;color:var(--muted)}.stat .big{font-size:29px;font-weight:800;letter-spacing:-1.1px;margin-top:7px;font-variant-numeric:tabular-nums}.stat .foot{font-size:11px;color:var(--muted);margin-top:5px}.danger{color:var(--red)!important}.ok{color:var(--teal)!important}.panel{padding:23px}.rowspace{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.tabs{display:flex;gap:5px;background:#eff3f9;padding:4px;border-radius:11px}.tabs button{border:0;background:none;padding:8px 12px;border-radius:8px;color:var(--muted);font-size:12px;font-weight:700}.tabs button.active{background:white;box-shadow:0 2px 8px #1b3d6c15;color:var(--blue)}.chart{width:100%;height:220px;display:block;margin-top:15px}.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:11px;color:var(--muted)}.dot{display:inline-block;width:9px;height:9px;border-radius:20px;margin-right:5px}.scenario-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:17px}.scenario{padding:16px;border:1px solid var(--line);border-radius:13px;background:#fff;text-align:left;color:var(--ink);transition:.15s}.scenario.chosen{border:2px solid var(--blue);background:#f0f5ff;padding:15px}.scenario b{display:block;font-size:13px}.scenario span{color:var(--muted);font-size:11px;display:block;margin:6px 0}.scenario strong{font-size:20px;display:block;font-variant-numeric:tabular-nums}.scenario .caption{font-size:10px;color:var(--muted);margin-top:3px}.insight{background:#eaf2ff;border:1px solid #d5e3f6;border-radius:12px;padding:15px;margin-top:15px;font-size:13px;color:#264365}.warning{background:#fff5e5;border:1px solid #f4d9a3;color:#754c11}.steps{display:grid;gap:10px;margin-top:15px}.step{display:flex;align-items:flex-start;gap:12px;padding:12px 13px;background:#f8fafd;border:1px solid var(--line);border-radius:11px}.step input{width:auto;margin-top:4px}.step b{display:block;font-size:13px}.step small{color:var(--muted);font-size:11px}.step.done b{text-decoration:line-through;color:var(--muted)}.miniheader{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.07em;color:var(--blue)}.notice{font-size:12px;line-height:1.6;color:var(--muted)}footer{max-width:1240px;margin:0 auto 30px;padding:0 24px;color:var(--muted);font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.status{font-size:11px;color:#d3e1f5}.error{color:var(--red);font-weight:700;font-size:12px}.details{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}.details summary{cursor:pointer;font-weight:700;font-size:12px;color:var(--blue)}.details p{font-size:12px;color:var(--muted)}@media(max-width:950px){.layout{grid-template-columns:1fr}.sidebar{order:1}.main{order:2}.hero{align-items:start}.hero-note{display:none}}@media(max-width:560px){.stats{grid-template-columns:1fr}.scenario-grid{grid-template-columns:1fr}.hero{padding-top:23px}.layout{padding:0 12px 24px}.panel,.sidebar{padding:17px}.stat{padding:15px}.formgrid{gap:9px}header{padding:14px}.eventrow{grid-template-columns:minmax(0,1fr) minmax(0,.95fr) minmax(0,.6fr) 23px}.topactions{gap:5px}.button{padding:8px 10px}.hero h2{font-size:29px}}
</style>
<style>
/* Focused four-step navigation */
.hero{padding:29px 24px 19px}.hero h2{font-size:clamp(25px,3.6vw,35px);margin:5px 0 8px}.hero p{max-width:730px}
.tab-layout{max-width:1240px;margin:0 auto;padding:0 24px 46px;display:grid;grid-template-columns:235px minmax(0,1fr);gap:24px;align-items:start}
.app-nav{position:sticky;top:18px;display:flex;flex-direction:column;gap:9px}
.nav-tab{display:flex;align-items:center;gap:13px;width:100%;padding:16px 13px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:left;color:var(--ink)}
.nav-tab:hover{background:#eef4fc}.nav-tab.is-active{border-color:#a9c4e9;background:#eaf2ff;box-shadow:0 5px 18px #153a7210}
.nav-number{display:grid;place-items:center;border-radius:9px;background:#eff3f9;color:var(--blue);width:34px;height:34px;font-size:12px;font-weight:800;flex-shrink:0}
.nav-tab.is-active .nav-number{background:var(--blue);color:#fff}.nav-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.nav-copy strong{font-size:13px}.nav-copy small{font-size:11px;color:var(--muted)}
.tab-content,.tab-panel{min-width:0}.tab-panel[hidden]{display:none!important}.tab-panel{display:flex;flex-direction:column;gap:16px}
.page-intro{padding:5px 2px 1px}.page-intro h2{margin:4px 0 3px;font-size:25px;letter-spacing:-.7px}.page-intro p{margin:0;color:var(--muted);font-size:13px}
.input-card{padding:25px}.input-card .formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.input-card .events{max-width:100%}
.input-card .sub{font-size:13px}.input-card .helper{font-size:12px}.input-card .sectionhead{margin-top:24px}
.page-controls{display:flex;justify-content:space-between;gap:12px;margin-top:6px}.page-controls .page-next{margin-left:auto;min-width:155px}
.stats{gap:13px}.panel{box-shadow:var(--shadow)}
@media(max-width:860px){.tab-layout{display:block}.app-nav{position:static;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:20px}.nav-tab{justify-content:center;padding:12px 6px}.nav-number,.nav-copy small{display:none}.nav-copy strong{text-align:center;font-size:12px}}
@media(max-width:560px){.tab-layout{padding:0 12px 30px}.app-nav{display:flex;flex-direction:row;overflow-x:auto;gap:7px;padding-bottom:5px}.nav-tab{min-width:118px;flex:1;padding:10px 6px}.nav-copy strong{font-size:11px}.input-card{padding:17px}.page-intro h2{font-size:23px}.stats{grid-template-columns:1fr}.scenario-grid{grid-template-columns:1fr}}
@media print{header .topactions,.app-nav,.page-controls{display:none!important}.tab-layout{display:block}.tab-panel{display:flex!important;break-before:page}.tab-panel[hidden]{display:flex!important}.hero{padding-top:10px}}
.scenario-metrics{border-top:1px solid var(--line);margin-top:11px;padding-top:9px;display:grid;gap:3px;font-size:11px;color:var(--ink);font-weight:600}.scenario:focus-visible{outline:3px solid #79b5ff}.info-tip{cursor:help}.step input[type=checkbox]{min-width:16px}.insight p{margin:6px 0 10px}.insight a{color:#164f94;font-weight:700}.helper{line-height:1.55}@media print{.scenario-metrics{font-size:10px}}
</style><style>
/* V4: accessible scenario controls and clearer decisions */
.affordability{border-left:5px solid var(--teal);margin-bottom:14px}.affordability.is-risk{border-left-color:var(--red)}.affordability h3{font-size:22px;margin-top:7px}.afford-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.afford-grid>div{background:#f3f7fc;border:1px solid #e1eaf6;padding:12px;border-radius:10px}.afford-grid span{display:block;font-size:11px;color:var(--muted)}.afford-grid strong{display:block;font-size:19px;margin-top:5px}.scenario-editor{margin:17px 0 22px;padding:17px;background:#f4f8fe;border:1px solid #d7e6f9;border-radius:14px}.editor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.editor-grid fieldset{margin:0;padding:13px;min-width:0;border:1px solid #d3e1f1;border-radius:11px;background:white}.editor-grid legend{font-size:12px;font-weight:800;color:var(--blue);padding:0 4px}.editor-grid label{display:block;margin:10px 0 4px}.editor-grid input{padding:8px;font-size:12px}.scenario-metrics{font-size:11px;color:var(--muted);margin-top:8px;line-height:1.65}.scenario-metrics strong{font-size:11px;color:var(--ink);font-weight:700;display:inline}.scenario .scenario-cost{font-size:13px;font-weight:750;color:var(--ink);margin-top:10px}.scenario .caption{line-height:1.45}.eventrow.semester{grid-template-columns:minmax(0,1.05fr) minmax(0,.8fr) minmax(0,.85fr) minmax(0,.7fr) 26px}.eventrow.semester select,.eventrow.semester input{font-size:12px;padding:8px 5px}.step .step-date{font-weight:800;color:var(--blue);font-size:10px;letter-spacing:.02em;margin-bottom:3px}.hint{color:var(--muted);font-size:11px;margin-top:8px}.warn-inline{color:var(--red);font-weight:700}.input-card .sectionhead{margin-top:24px}button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:850px){.editor-grid{grid-template-columns:1fr}.afford-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.afford-grid{grid-template-columns:1fr}.eventrow.semester{grid-template-columns:1fr 1fr}.eventrow.semester input:first-child{grid-column:1 / -1}.eventrow.semester .remove{justify-self:end}}
@media print{header .topactions,.app-nav,.page-controls,#scenarioEditor,.smalladd,.remove{display:none!important}.tab-panel{display:block!important}.tab-panel[hidden]{display:block!important}.tab-layout{display:block}.card{break-inside:avoid;box-shadow:none}.hero{padding:6px 0}.input-card{display:none}body{background:#fff}a{color:#153a72}}


.paypick{display:block;margin:9px 0 0;font-size:12px;font-weight:700;color:#40536f}.paypick select{margin-top:5px;font-size:12px}.explain-list{display:grid;gap:5px;margin-top:10px}.explain-row{display:flex;justify-content:space-between;gap:12px;padding:7px 9px;border-bottom:1px solid var(--line);font-size:12px}.explain-row span:first-child{max-width:72%}.quality{padding:14px 16px;border-radius:12px;background:#fff7e8;border:1px solid #f3d8a4;font-size:12px;line-height:1.6}.quality ul{padding-left:19px;margin:6px 0}.quality.okay{background:#ecf7f4;border-color:#b9e2d8}.summary-print{display:none}.tools-inline{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}.tool-hint{font-size:11px;color:var(--muted)}
@media print{body{background:#fff!important}.tab-layout,.hero,header,footer{display:none!important}.summary-print{display:block;padding:20px 24px;color:#19273b;font:13px/1.5 system-ui,sans-serif}.summary-print h1{font-size:24px}.summary-print h2{font-size:16px;margin:20px 0 8px}.summary-print li{margin:6px 0}.summary-print .note{font-size:11px;color:#555}}
</style></head>
<body>
<header><div class="brand"><div aria-hidden="true" class="brandmark">↗</div><div><h1>ONE BREAKDOWN<span style="color:#77b5ff">.</span></h1><small>A student financial recovery planner · Independent student project</small></div></div><div class="topactions"><span class="status" id="saveStatus" role="status">Sample scenario loaded</span><button class="button" id="resetBtn" type="button">Reset example</button><button class="button" id="openBtn" type="button">Open plan</button><button class="button primary" id="saveBtn" type="button">↓ Save plan</button><input accept=".json,application/json" aria-label="Open saved JSON plan" class="sr-only" id="fileInput" type="file"/></div></header>
<section class="hero"><div><div class="pill">Built for working commuter students in Kentucky</div><h2>One breakdown. A clearer way forward.</h2><p>A car breakdown can affect more than your commute. Make a plan one step at a time — no logins, no bank connections.</p></div></section>
<div class="tab-layout"><nav aria-label="Website sections" class="app-nav" role="tablist"><button aria-controls="panel-situation" aria-selected="true" class="nav-tab is-active" data-tab="situation" role="tab" type="button"><span class="nav-number">01</span><span class="nav-copy"><strong>My situation</strong><small>Your money &amp; breakdown</small></span></button><button aria-controls="panel-timeline" aria-selected="false" class="nav-tab" data-tab="timeline" role="tab" type="button"><span class="nav-number">02</span><span class="nav-copy"><strong>Financial timeline</strong><small>See the impact</small></span></button><button aria-controls="panel-compare" aria-selected="false" class="nav-tab" data-tab="compare" role="tab" type="button"><span class="nav-number">03</span><span class="nav-copy"><strong>Compare options</strong><small>Explore recovery choices</small></span></button><button aria-controls="panel-steps" aria-selected="false" class="nav-tab" data-tab="steps" role="tab" type="button"><span class="nav-number">04</span><span class="nav-copy"><strong>Next steps</strong><small>Your action plan</small></span></button></nav><div class="tab-content"><section aria-label="My situation" class="tab-panel is-active" id="panel-situation" role="tabpanel"><div class="page-intro"><div class="miniheader">STEP 01 / 04</div><h2>My situation</h2><p>Start here. Add your current money, upcoming income and bills, and the car emergency.</p></div><div class="card input-card"><h3>Your situation</h3><p class="sub">Start with fictional sample numbers, or enter your own. Figures should represent take-home pay, not gross pay.</p>
<div class="formgrid"><div class="field"><label for="cash">Available money ($) <span title="Cash you can spend today; do not include upcoming paychecks.">ⓘ</span></label><input id="cash" max="1000000" min="0" step="0.01" type="number"/></div><div class="field"><label for="reserve">Safety cushion ($) <span title="Money you want to keep available for unexpected costs.">ⓘ</span></label><input id="reserve" max="1000000" min="0" step="0.01" type="number"/></div><div class="field"><label for="startDate">Planning starts</label><input id="startDate" type="date"/></div><div class="field"><label for="horizon">Forecast length</label><select id="horizon"><option value="30">30 days</option><option value="60">60 days</option><option value="90">90 days</option></select></div></div>
<div class="sectionhead"><h4>Upcoming take-home income</h4></div><div class="events" id="incomeRows"></div><button class="smalladd" id="addIncome" type="button">+ Add paycheck</button><div class="helper">List each paycheck or aid refund with its expected arrival date.</div>
<div class="sectionhead"><h4>Upcoming bills &amp; essentials</h4></div><div class="events" id="billRows"></div><button class="smalladd" id="addBill" type="button">+ Add expense</button><div class="helper">Include rent, food, tuition payments, and any other expected expense.</div>
<div class="sectionhead"><h4>The car emergency</h4></div><div class="formgrid"><div class="field"><label for="repair">Repair estimate ($)</label><input id="repair" max="1000000" min="0" step="0.01" type="number"/></div><div class="field"><label for="repairDate">Breakdown begins (date)</label><input id="repairDate" type="date"/></div><div class="field"><label for="shiftPay">Take-home pay per shift ($) <span title="Pay deposited after expected deductions, not gross pay.">ⓘ</span></label><input id="shiftPay" max="10000" min="0" step="0.01" type="number"/></div><div class="field"><label for="ride">Backup transport per day ($)</label><input id="ride" max="10000" min="0" step="0.01" type="number"/></div></div><p class="helper">Missed wages are deducted from the next eligible expected paycheck(s), so enter the paycheck amounts you would receive if all planned shifts were worked. You can tailor lost shifts and ride days for each recovery choice in Compare options.</p>
<div><div class="sectionhead"><h4>Semester deadlines &amp; financial aid</h4></div>
<p class="helper">Add tuition payments, textbook costs, aid refunds, or important academic dates. Academic-only dates appear on your action plan but do not change your money.</p>
<div class="events" id="semesterRows"></div><button class="smalladd" id="addSemester" type="button">+ Add semester item</button>
<p class="helper">Tip: if you add an expense or aid refund here, don’t list the same transaction again under income or bills.</p></div></div><div class="page-controls"><button class="button primary page-next" data-to="timeline" type="button">Continue →</button></div></section><section aria-label="Financial timeline" class="tab-panel" hidden="" id="panel-timeline" role="tabpanel"><div class="page-intro"><div class="miniheader">STEP 02 / 04</div><h2>Financial timeline</h2><p>See when a breakdown could put your balance below your safety cushion.</p></div><div aria-live="polite" class="quality" id="qualityNotice" role="status">Checking assumptions…</div><section aria-live="polite" class="card panel affordability"><div class="miniheader">AT A GLANCE</div><h3 id="affordTitle">Checking your plan…</h3><p class="sub" id="affordDetail"></p><div class="afford-grid"><div><span>Shortfall to $0</span><strong id="shortZero">—</strong></div><div><span>Gap to safety cushion</span><strong id="shortCushion">—</strong></div><div><span>First essential bill at risk</span><strong id="billAtRisk">—</strong></div></div><p class="helper" id="affordCaveat"></p></section><section class="stats"><div class="card stat"><div class="kicker">Lowest projected balance</div><div class="big" id="lowest">—</div><div class="foot" id="lowestDate">—</div></div><div class="card stat"><div class="kicker">First day below safety cushion</div><div class="big" id="riskDay" style="font-size:19px">—</div><div class="foot" id="riskAmt">—</div></div><div class="card stat"><div class="kicker">End-of-forecast balance</div><div class="big" id="endBalance">—</div><div class="foot" id="endDate">—</div></div></section><section class="card panel"><div class="rowspace"><div><div class="miniheader">01 / Financial impact</div><h3>Your semester ripple effect</h3><p class="sub" style="margin-bottom:0">Daily projected money, with and without the breakdown.</p></div><div aria-label="Chart view" class="tabs" role="group"><button class="active" id="chart30" type="button">30 days</button><button id="chartAll" type="button">Full period</button></div></div><svg aria-label="Cash balance chart for baseline and selected breakdown scenario" class="chart" id="balanceChart" role="img" viewbox="0 0 760 220"></svg><div class="legend"><span><i class="dot" style="background:#77a2df"></i>No breakdown</span><span><i class="dot" style="background:#087e7b"></i>Selected recovery scenario</span><span><i class="dot" style="background:#c47a24"></i>Safety cushion</span></div><div class="insight" id="chartNote" role="status"></div></section><div class="page-controls"><button class="button ghost page-prev" data-to="situation" type="button">← Previous</button><button class="button primary page-next" data-to="compare" type="button">Continue →</button></div></section><section aria-label="Compare options" class="tab-panel" hidden="" id="panel-compare" role="tabpanel"><div class="page-intro"><div class="miniheader">STEP 03 / 04</div><h2>Compare options</h2><p>Explore three recovery paths and see how each changes your financial outlook.</p></div><section class="card panel"><div class="miniheader">02 / Decision lab</div><h3>Compare recovery options</h3><p class="sub">Choose a scenario to update the forecast. We compare timing and affordability, not just the up-front price.</p><div class="scenario-editor" id="scenarioEditor"><div class="rowspace"><div><div class="miniheader">CUSTOMIZE YOUR OPTIONS</div><h3>Change the assumptions</h3><p class="sub">Edit each option to match real quotes, ride availability, and affected shifts. Updates appear immediately.</p></div></div><div class="editor-grid">
<fieldset><legend>Repair now</legend><label for="repairNowDate">Repair payment date</label><input id="repairNowDate" type="date"/><label for="repairNowShifts">Missed shifts</label><input id="repairNowShifts" max="90" min="0" step="1" type="number"/><label for="repairNowRides">Backup ride days</label><input id="repairNowRides" max="90" min="0" step="1" type="number"/><label class="paypick" for="repairPaycheck">Paycheck affected by missed shifts <span title="Choose which expected paycheck includes the missed shifts. If none will be reduced, enter zero missed shifts.">ⓘ</span></label><select id="repairPaycheck"></select></fieldset>
<fieldset><legend>Repair + backup rides</legend><label for="bridgeDate">Repair payment date</label><input id="bridgeDate" type="date"/><label for="bridgeShifts">Missed shifts despite rides</label><input id="bridgeShifts" max="90" min="0" step="1" type="number"/><label for="bridgeRides">Paid backup ride days</label><input id="bridgeRides" max="90" min="0" step="1" type="number"/><label class="paypick" for="bridgePaycheck">Paycheck affected by missed shifts <span title="Choose which expected paycheck includes the missed shifts. If none will be reduced, enter zero missed shifts.">ⓘ</span></label><select id="bridgePaycheck"></select></fieldset>
<fieldset><legend>Delay the repair</legend><label for="delayDate">Later repair payment date</label><input id="delayDate" type="date"/><label for="delayShiftsCustom">Total missed shifts</label><input id="delayShiftsCustom" max="90" min="0" step="1" type="number"/><label for="delayRides">Paid backup ride days</label><input id="delayRides" max="90" min="0" step="1" type="number"/><label class="paypick" for="delayPaycheck">Paycheck affected by missed shifts <span title="Choose which expected paycheck includes the missed shifts. If none will be reduced, enter zero missed shifts.">ⓘ</span></label><select id="delayPaycheck"></select></fieldset>
</div><p class="helper">Every option uses the same repair quote and take-home pay per missed shift. Ride cost per day is set in My Situation. You can enter zero missed shifts if none would be lost. No option assumes financial aid, free rides, or extra income.</p></div><div class="scenario-grid" id="scenarioCards"></div><p class="helper">Compare the lowest balance, total added financial impact, and number of days below your cushion. Costs include repair, estimated backup rides, and lost take-home pay; the same repair may fall outside the chosen forecast if delayed.</p><div aria-live="polite" class="insight" id="scenarioInsight"></div><details class="details"><summary>See how these estimates are calculated</summary><p>Every recovery option has its own editable payment date, missed shifts, and paid ride days. Missed take-home earnings reduce your scheduled paychecks (they are not counted as bills). Estimated impact is repair cost + ride costs + lost earnings, while the forecast accounts for the actual dates money is paid or received. No rent extensions, grants or transportation availability are assumed. All plans remain estimates.</p></details></section><div class="card panel" id="mathDetails"><div class="miniheader">TRANSPARENT MATH</div><h3>How we calculated this</h3><p class="sub">See the dated money movements and which paycheck absorbs lost wages.</p><div class="notice" id="mathSummary"></div><div class="explain-list" id="mathLedger"></div></div><div class="page-controls"><button class="button ghost page-prev" data-to="timeline" type="button">← Previous</button><button class="button primary page-next" data-to="steps" type="button">Continue →</button></div></section><section aria-label="Next steps" class="tab-panel" hidden="" id="panel-steps" role="tabpanel"><div class="page-intro"><div class="miniheader">STEP 04 / 04</div><h2>Next steps</h2><p>Turn the numbers into manageable actions, then save or print your plan.</p></div><section class="card panel"><div class="rowspace"><div><div class="miniheader">03 / Action plan</div><h3>Your next steps</h3><p class="sub" style="margin-bottom:0">Prioritized suggestions based on your selected scenario. Check them off as you go.</p></div><button class="button" id="printBtn" type="button">Print summary</button></div><p class="helper" id="stepsOverview">Based on your selected option and upcoming dates.</p><div class="steps" id="steps"></div><div class="insight warning" style="margin-top:16px"><strong>UK student resources to explore</strong><br/><p><strong>UK Basic Needs / Emergency Wellness Grant:</strong> UK lists emergency car repairs for commuters among potentially covered expenses. Eligibility and funding aren't guaranteed. <a href="https://studentsuccess.uky.edu/financial-wellness/services/emergency-basic-needs-resources" rel="noopener noreferrer" target="_blank">Check details ↗</a></p><p><strong>MoneyCATS:</strong> Free student financial wellness peer coaching. <a href="https://studentsuccess.uky.edu/financial-wellness/services" rel="noopener noreferrer" target="_blank">Explore services ↗</a></p><p><strong>UK Transportation:</strong> Check current campus transport options and schedules, then verify whether any option reaches your workplace. <a href="https://transportation.uky.edu/" rel="noopener noreferrer" target="_blank">Transportation ↗</a></p><p><strong>Student Success:</strong> Ask for help navigating support services. <a href="https://studentsuccess.uky.edu/get-help" rel="noopener noreferrer" target="_blank">Get help ↗</a></p></div></section><section class="card panel"><div class="miniheader">Privacy &amp; learning</div><h3>Built to help you think clearly</h3><p class="notice">One Breakdown is an independent educational planning tool, not an official University of Kentucky service. Estimates are based on information you provide and simplifying assumptions. They are not financial, tax, legal, academic, or transportation advice. No financial information is transmitted or stored on a server; the tool runs entirely in your browser. Export your plan to a JSON file if you want to keep it. Do not enter account numbers, passwords, or sensitive personal details.</p><p class="notice" style="margin-bottom:0">Copyright © 2026 Riya Patel. Licensed under the MIT License. Published on Globefin.</p></section><div class="page-controls"><button class="button ghost page-prev" data-to="compare" type="button">← Previous</button></div></section></div></div>
<!--
MIT License
Copyright (c) 2026 Riya Patel. Created with AI assistance and feedback from project collaborators.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->

<section aria-label="Printable recovery summary" class="summary-print" id="printSummary"></section><script>(()=>{'use strict';
const $=id=>document.getElementById(id),DAY=86400000,fmtMoney=v=>(v<0?'−':'')+'$'+Math.abs(v).toLocaleString('en-US',{minimumFractionDigits:0,maximumFractionDigits:2});
const isoDate=d=>new Date(d).toISOString().slice(0,10),today=()=>isoDate(new Date()),parseDate=s=>Date.parse(s+'T12:00:00Z'),addDays=(s,n)=>isoDate(parseDate(s)+n*DAY),distance=(a,b)=>Math.round((parseDate(b)-parseDate(a))/DAY),shortDate=s=>new Date(parseDate(s)).toLocaleDateString('en-US',{month:'short',day:'numeric',timeZone:'UTC'});
const validDate=s=>typeof s==='string'&&/^\d{4}-\d{2}-\d{2}$/.test(s)&&Number.isFinite(parseDate(s))&&isoDate(parseDate(s))===s;
const nonneg=(v,max=1000000)=>typeof v==='number'&&Number.isFinite(v)&&v>=0&&v<=max;
const int=(v,max=90)=>nonneg(v,max)&&Number.isInteger(v);
let dirty=false,selected='repair',chartFull=false,completed={};
const ids=['cash','reserve','startDate','horizon','repair','repairDate','shiftPay','ride','repairNowDate','repairNowShifts','repairNowRides','bridgeDate','bridgeShifts','bridgeRides','delayDate','delayShiftsCustom','delayRides','repairPaycheck','bridgePaycheck','delayPaycheck'];
const optionIds=['repair','bridge','delay'];
const optionFields={repair:['repairNowDate','repairNowShifts','repairNowRides','repairPaycheck'],bridge:['bridgeDate','bridgeShifts','bridgeRides','bridgePaycheck'],delay:['delayDate','delayShiftsCustom','delayRides','delayPaycheck']};
function sample(){const d=today();return {version:5,cash:560,reserve:150,startDate:d,horizon:60,repair:890,repairDate:addDays(d,2),shiftPay:95,ride:18,
 incomes:[{name:'Part-time paycheck',date:addDays(d,5),amount:470},{name:'Part-time paycheck',date:addDays(d,19),amount:530},{name:'Part-time paycheck',date:addDays(d,33),amount:480},{name:'Part-time paycheck',date:addDays(d,47),amount:530}],
 bills:[{name:'Rent',date:addDays(d,10),amount:550},{name:'Groceries',date:addDays(d,4),amount:90},{name:'Phone',date:addDays(d,13),amount:55},{name:'Groceries',date:addDays(d,18),amount:100},{name:'Rent',date:addDays(d,40),amount:550},{name:'Utilities',date:addDays(d,36),amount:80}],
 semester:[{name:'Tuition payment',date:addDays(d,25),amount:180,type:'expense'},{name:'Final exam week begins',date:addDays(d,34),amount:0,type:'milestone'},{name:'Financial aid refund (only if confirmed)',date:addDays(d,43),amount:250,type:'income'}],
 scenarios:{repair:{date:addDays(d,2),shifts:2,rides:0,payDate:addDays(d,5)},bridge:{date:addDays(d,2),shifts:0,rides:5,payDate:addDays(d,5)},delay:{date:addDays(d,16),shifts:3,rides:1,payDate:addDays(d,19)}},selected:'repair',completed:{}};}
function legacyToV4(x){if(x.version!==1)throw Error('Unsupported plan version.');const delay=Number.isFinite(Number(x.delay))?Number(x.delay):14;const sh=Number(x.shifts)||0;return {version:4,cash:Number(x.cash),reserve:Number(x.reserve),startDate:x.startDate,horizon:Number(x.horizon),repair:Number(x.repair),repairDate:x.repairDate,shiftPay:Number(x.shiftPay),ride:Number(x.ride),incomes:x.incomes,bills:x.bills,semester:[],scenarios:{repair:{date:x.repairDate,shifts:sh,rides:0},bridge:{date:x.repairDate,shifts:0,rides:Number(x.days)||0},delay:{date:addDays(x.repairDate,delay),shifts:sh+(Number(x.delayShifts)||0),rides:0}},selected:x.selected,completed:x.completed};}
function validate(x){if(!x||typeof x!=='object'||Array.isArray(x)||x.version!==5)throw Error('This is not a One Breakdown V5 plan.');for(const k of ['cash','reserve','repair','shiftPay','ride'])if(!nonneg(x[k]))throw Error('Invalid amount for '+k);if(!validDate(x.startDate)||!validDate(x.repairDate))throw Error('Invalid start or repair date.');if(distance(x.startDate,x.repairDate)<0)throw Error('Breakdown starts before forecast date.');if(![30,60,90].includes(x.horizon))throw Error('Forecast must be 30, 60, or 90 days.');
 for(const k of ['incomes','bills','semester']){if(!Array.isArray(x[k])||x[k].length>80)throw Error('Invalid '+k+' list.');for(const t of x[k]){if(!t||typeof t!=='object'||typeof t.name!=='string'||!t.name.trim()||t.name.length>100||!validDate(t.date)||!nonneg(t.amount))throw Error('Invalid item in '+k+'.');if(k==='semester'&&!['expense','income','milestone'].includes(t.type))throw Error('Invalid semester item type.');if(k==='semester'&&t.type==='milestone'&&t.amount!==0)throw Error('Academic milestones must have a $0 amount.');}}
 if(!x.scenarios||typeof x.scenarios!=='object')throw Error('Recovery options are missing.');for(const o of optionIds){const v=x.scenarios[o];if(!v||!validDate(v.date)||!int(v.shifts)||!int(v.rides))throw Error('Check the '+o+' recovery option.');if(distance(x.startDate,v.date)<0)throw Error('A repair date falls before the forecast begins.');if(v.shifts>0&&(!validDate(v.payDate)||!x.incomes.some(p=>p.date===v.payDate)))throw Error('Choose an expected paycheck for missed shifts in '+o+'.');if(v.payDate&&(!validDate(v.payDate)||!x.incomes.some(p=>p.date===v.payDate)))throw Error('Selected paycheck does not exist for '+o+'.');}
 if(x.selected!==undefined&&!optionIds.includes(x.selected))throw Error('Invalid selected option.');if(x.completed!==undefined&&(!x.completed||typeof x.completed!=='object'||Array.isArray(x.completed)))throw Error('Invalid action checklist.');return x;}
function convertToV5(data){
 if(data.version===5)return data;
 if(data.version===1)data=legacyToV4(data);
 if(data.version!==4)throw Error('Unsupported saved plan version.');
 const first=(data.incomes||[]).filter(v=>validDate(v.date)&&v.date>=data.repairDate).sort((a,b)=>a.date.localeCompare(b.date))[0];
 const x={...data,version:5,scenarios:{}};
 for(const o of optionIds){const sc=data.scenarios?.[o];if(!sc)throw Error('Missing recovery option');x.scenarios[o]={...sc,payDate:sc.payDate||(first?first.date:'')};}
 return x;
}
function status(t){$('saveStatus').textContent=t}
function eventNode(kind,v){const row=document.createElement('div');row.className='eventrow'+(kind==='semester'?' semester':'');const cols=[['name','text',v.name],['date','date',v.date]];if(kind==='semester')cols.push(['type','select',v.type]);cols.push(['amount','number',v.amount]);for(const [role,kindInput,value] of cols){let input;if(kindInput==='select'){input=document.createElement('select');for(const [key,label] of [['expense','Payment / cost'],['income','Aid / refund'],['milestone','Academic date']]){let option=document.createElement('option');option.value=key;option.textContent=label;input.append(option);}input.value=value;}else{input=document.createElement('input');input.type=kindInput;input.value=value;if(role==='name')input.maxLength=100;if(role==='amount'){input.min=0;input.max=1000000;input.step='0.01'}}input.dataset.role=role;input.setAttribute('aria-label',`${kind} ${role}`);input.addEventListener(kindInput==='select'?'change':'input',()=>{if(kind==='income')refreshPaychecks();if(role==='type'){const amount=row.querySelector('[data-role="amount"]');if(input.value==='milestone'){amount.value=0;amount.disabled=true}else{amount.disabled=false}}modified()});row.append(input)}if(kind==='semester'&&v.type==='milestone')row.querySelector('[data-role="amount"]').disabled=true;const remove=document.createElement('button');remove.className='remove';remove.type='button';remove.textContent='×';remove.setAttribute('aria-label','Remove '+kind);remove.addEventListener('click',()=>{row.remove();if(kind==='income')refreshPaychecks();modified()});row.append(remove);return row;}
function readEvents(kind){return [...$(kind+'Rows').querySelectorAll('.eventrow')].map(r=>({name:r.querySelector('[data-role="name"]').value,date:r.querySelector('[data-role="date"]').value,amount:r.querySelector('[data-role="amount"]').value.trim()===''?NaN:Number(r.querySelector('[data-role="amount"]').value),...(kind==='semester'?{type:r.querySelector('[data-role="type"]').value}:{})}));}
function readForm(){const x={version:5};for(const k of ['cash','reserve','horizon','repair','shiftPay','ride']){if($(k).value.trim()==='')throw Error('Enter '+k+'.');x[k]=Number($(k).value)}x.startDate=$('startDate').value;x.repairDate=$('repairDate').value;
 x.incomes=readEvents('income');x.bills=readEvents('bill');x.semester=readEvents('semester');x.scenarios={};for(const o of optionIds){const [d,s,r,p]=optionFields[o];if($(s).value.trim()===''||$(r).value.trim()==='')throw Error('Complete the '+o+' scenario.');x.scenarios[o]={date:$(d).value,shifts:Number($(s).value),rides:Number($(r).value),payDate:$(p).value};}x.selected=selected;x.completed={...completed};return validate(x);}
function refreshPaychecks(){let entries=readEvents('income').filter(v=>validDate(v.date)).sort((a,b)=>a.date.localeCompare(b.date));for(const o of optionIds){const p=optionFields[o][3],select=$(p),prior=select.value;select.replaceChildren();const empty=document.createElement('option');empty.value='';empty.textContent='Choose paycheck…';select.append(empty);for(const v of entries){const opt=document.createElement('option');opt.value=v.date;opt.textContent=`${shortDate(v.date)} · ${v.name} (${fmtMoney(Number.isFinite(v.amount)?v.amount:0)})`;select.append(opt)}if(entries.some(v=>v.date===prior))select.value=prior;}}
function load(x){validate(x);for(const k of ['cash','reserve','horizon','repair','shiftPay','ride','startDate','repairDate'])$(k).value=x[k];for(const k of ['income','bill','semester'])$(k+'Rows').replaceChildren(...x[k==='income'?'incomes':k==='bill'?'bills':'semester'].map(t=>eventNode(k,t)));refreshPaychecks();for(const o of optionIds){const [d,s,r,p]=optionFields[o];$(d).value=x.scenarios[o].date;$(s).value=x.scenarios[o].shifts;$(r).value=x.scenarios[o].rides;$(p).value=x.scenarios[o].payDate||'';}selected=optionIds.includes(x.selected)?x.selected:'repair';completed={};for(const [k,v] of Object.entries(x.completed||{})){if(k.length<=110&&typeof v==='boolean')completed[k]=v}dirty=false;render();status('Plan loaded — no unsaved changes');}
function modified(){dirty=true;status('Unsaved changes');render()}
function forecast(x,mode){
 const start=x.startDate,end=addDays(start,x.horizon),credits=new Map(),debits=new Map(),ledger=new Map();
 const add=(map,date,amount)=>map.set(date,Math.round(((map.get(date)||0)+amount)*100)/100);
 const log=(date,label,amount)=>{if(!ledger.has(date))ledger.set(date,[]);ledger.get(date).push({label,amount})};
 for(const v of x.incomes){add(credits,v.date,v.amount);log(v.date,'Paycheck: '+v.name,v.amount)}
 for(const v of x.bills){add(debits,v.date,v.amount);log(v.date,'Bill: '+v.name,-v.amount)}
 for(const v of x.semester){if(v.type==='income'){add(credits,v.date,v.amount);log(v.date,'Semester income: '+v.name,v.amount)}if(v.type==='expense'){add(debits,v.date,v.amount);log(v.date,'Semester expense: '+v.name,-v.amount)}}
 let repairCost=0,rideCost=0,plannedLoss=0,appliedLoss=0,unallocated=0,rideDays=0,costDate=null,payDate='';
 if(mode!=='baseline'){
  const opt=x.scenarios[mode];costDate=opt.date;payDate=opt.payDate||'';repairCost=x.repair;rideDays=opt.rides;rideCost=rideDays*x.ride;plannedLoss=opt.shifts*x.shiftPay;
  add(debits,costDate,repairCost);log(costDate,'Repair payment',-repairCost);
  for(let i=0;i<rideDays;i++){const date=addDays(x.repairDate,i);add(debits,date,x.ride);log(date,'Backup transportation',-x.ride)}
  // Only reduce earnings on the specific paycheck the student chooses. Multiple income entries on same date aggregate.
  const available=x.incomes.filter(v=>v.date===payDate).reduce((t,v)=>t+v.amount,0);
  appliedLoss=Math.min(available,plannedLoss);unallocated=Math.max(0,plannedLoss-appliedLoss);
  if(appliedLoss>0){add(credits,payDate,-appliedLoss);log(payDate,'Estimated missed take-home wages',-appliedLoss)}
 }
 let balance=x.cash,rows=[];
 for(let i=0;i<=x.horizon;i++){const date=addDays(start,i),incoming=credits.get(date)||0,outgoing=debits.get(date)||0;balance=Math.round((balance+incoming-outgoing)*100)/100;rows.push({date,balance,incoming,outgoing,transactions:ledger.get(date)||[]})}
 const lowest=rows.reduce((a,b)=>b.balance<a.balance?b:a),firstNegative=rows.find(v=>v.balance<0)||null,firstBelow=rows.find(v=>v.balance<x.reserve)||null;
 const essentials=[...x.bills,...x.semester.filter(v=>v.type==='expense')].filter(v=>v.date>=start&&v.date<=end).sort((a,b)=>a.date.localeCompare(b.date));
 const atRiskBill=essentials.find(v=>rows[distance(start,v.date)]?.balance<0)||null;
 const outOfRange=[...x.incomes.map(v=>({label:v.name,date:v.date,kind:'income'})),...x.bills.map(v=>({label:v.name,date:v.date,kind:'bill'})),...x.semester.filter(v=>v.type!=='milestone').map(v=>({label:v.name,date:v.date,kind:'semester'}))].filter(v=>v.date<start||v.date>end);
 if(mode!=='baseline'){
  if(costDate>end)outOfRange.push({label:'Repair payment',date:costDate,kind:'repair'});
  if(rideDays>0&&addDays(x.repairDate,rideDays-1)>end)outOfRange.push({label:'Backup transportation',date:addDays(x.repairDate,rideDays-1),kind:'rides'});
  if(plannedLoss>0&&payDate>end)outOfRange.push({label:'Lost wages at selected paycheck',date:payDate,kind:'wages'});
 }
 return {rows,lowest,firstNegative,firstBelow,atRiskBill,end:rows[rows.length-1],daysNegative:rows.filter(v=>v.balance<0).length,daysBelow:rows.filter(v=>v.balance<x.reserve).length,repairCost,rideCost,plannedLoss,appliedLoss,unallocated,totalImpact:repairCost+rideCost+plannedLoss,costDate,rideDays,payDate,outOfRange};
}
function drawChart(x,base,f){const rows=chartFull?f.rows:f.rows.slice(0,31),baseRows=chartFull?base.rows:base.rows.slice(0,31);let values=rows.concat(baseRows).map(p=>p.balance).concat([x.reserve,0]);let low=Math.min(...values)-45,hi=Math.max(...values)+45;if(hi-low<100){low-=50;hi+=50}const sx=i=>52+i/(rows.length-1)*674,sy=v=>184-(v-low)/(hi-low)*158,svg=$('balanceChart'),ns='http://www.w3.org/2000/svg';svg.replaceChildren();svg.setAttribute('viewBox','0 0 760 220');function el(t,a,text){let node=document.createElementNS(ns,t);Object.entries(a).forEach(([k,v])=>node.setAttribute(k,v));if(text!==undefined)node.textContent=text;svg.append(node)}for(let i=0;i<5;i++){const value=low+(hi-low)*i/4,y=sy(value);el('line',{x1:52,x2:726,y1:y,y2:y,stroke:'#dbe4ef','stroke-dasharray':'3 5'});el('text',{x:46,y:y+4,'text-anchor':'end','font-size':11,fill:'#6b7b91'},fmtMoney(value))}el('line',{x1:52,x2:726,y1:sy(x.reserve),y2:sy(x.reserve),stroke:'#c47a24','stroke-dasharray':'6 4'});for(const [arr,color] of [[baseRows,'#77a2df'],[rows,'#087e7b']])el('polyline',{points:arr.map((p,i)=>`${sx(i)},${sy(p.balance)}`).join(' '),fill:'none',stroke:color,'stroke-width':3,'stroke-linejoin':'round'});for(const i of [0,Math.floor((rows.length-1)/2),rows.length-1])el('text',{x:sx(i),y:209,'font-size':11,'text-anchor':i===0?'start':i===rows.length-1?'end':'middle',fill:'#617087'},shortDate(rows[i].date));$('chartNote').textContent=`Without a breakdown, the lowest projected balance is ${fmtMoney(base.lowest.balance)}. With ${scenarioLabel(selected).toLowerCase()}, it is ${fmtMoney(f.lowest.balance)}. Dates and amounts are estimates.`;}
function scenarioLabel(o){return {repair:'Repair now',bridge:'Repair + backup rides',delay:'Delay the repair'}[o]||o}
function affordability(x,f){const shortZero=Math.max(0,-f.lowest.balance),shortCushion=Math.max(0,x.reserve-f.lowest.balance),risk=f.firstNegative||f.firstBelow;let title,detail;
 if(shortZero>0){title='Your plan could run short of money.';detail=`Under “${scenarioLabel(selected)},” your projected balance reaches ${fmtMoney(f.lowest.balance)} on ${shortDate(f.lowest.date)}. An estimated ${fmtMoney(shortZero)} would be needed to stay at or above $0.`}
 else if(shortCushion>0){title='The bills may fit, but your safety cushion is at risk.';detail=`Your lowest forecast balance is ${fmtMoney(f.lowest.balance)} on ${shortDate(f.lowest.date)} — ${fmtMoney(shortCushion)} below your preferred cushion.`}
 else{title='Your entered expenses appear covered in this forecast.';detail=`Your balance stays at or above your ${fmtMoney(x.reserve)} safety cushion. This depends on your dates, paychecks, and costs being accurate.`}
 $('affordTitle').textContent=title;$('affordDetail').textContent=detail;$('shortZero').textContent=fmtMoney(shortZero);$('shortCushion').textContent=fmtMoney(shortCushion);$('billAtRisk').textContent=f.atRiskBill?`${f.atRiskBill.name} · ${shortDate(f.atRiskBill.date)}`:'None identified';$('panel-timeline').querySelector('.affordability').classList.toggle('is-risk',shortZero>0);
 const end=addDays(x.startDate,x.horizon);let caveats=[];if(f.unallocated>0)caveats.push(`${fmtMoney(f.unallocated)} of lost wages could not be matched to listed future paychecks.`);if(f.costDate>end)caveats.push('This option’s repair payment is outside your chosen forecast. Extend the forecast.');if(x.incomes.length===0)caveats.push('No upcoming paychecks listed.');if(!f.atRiskBill&&shortZero>0)caveats.push('A shortfall may occur even when no listed bill is due.');$('affordCaveat').textContent=caveats.join(' ')||'Educational estimate, not a guarantee of bill payment or transportation availability.';
 $('lowest').textContent=fmtMoney(f.lowest.balance);$('lowest').className='big '+(f.lowest.balance<0?'danger':f.lowest.balance<x.reserve?'danger':'ok');$('lowestDate').textContent='On '+shortDate(f.lowest.date);$('riskDay').textContent=f.firstBelow?shortDate(f.firstBelow.date):'None forecast';$('riskDay').className='big '+(f.firstBelow?'danger':'ok');$('riskAmt').textContent=f.firstBelow?`Below ${fmtMoney(x.reserve)} cushion`:'Above safety cushion';$('endBalance').textContent=fmtMoney(f.end.balance);$('endBalance').className='big '+(f.end.balance<0?'danger':'ok');$('endDate').textContent='On '+shortDate(f.end.date);}
function renderOptions(x,results){const explanations={repair:'Pay the repair estimate on the selected date, with your chosen lost shifts and backup rides.',bridge:'Model paid rides that may preserve shifts, plus any shifts that would still be missed.',delay:'Move the repair payment and set the total shifts and rides you expect to lose or use.'};$('scenarioCards').replaceChildren(...optionIds.map(o=>{const f=results[o],btn=document.createElement('button');btn.type='button';btn.className='scenario'+(o===selected?' chosen':'');btn.setAttribute('aria-pressed',String(o===selected));let title=document.createElement('b');title.textContent=scenarioLabel(o);let desc=document.createElement('span');desc.textContent=explanations[o];let number=document.createElement('strong');number.textContent=fmtMoney(f.lowest.balance);number.className=f.lowest.balance<x.reserve?'danger':'ok';let label=document.createElement('div');label.className='caption';label.textContent=f.outOfRange.length||f.unallocated>0?'Incomplete projected balance':'Lowest projected balance';let impact=document.createElement('div');impact.className='scenario-cost';impact.textContent=`Estimated total impact: ${fmtMoney(f.totalImpact)}`;let measures=document.createElement('div');measures.className='scenario-metrics';measures.textContent=`${f.daysNegative} day(s) below $0 · ${f.daysBelow} below cushion · ${fmtMoney(f.plannedLoss)} lost earnings`;btn.append(title,desc,number,label,impact,measures);btn.addEventListener('click',()=>{selected=o;modified()});return btn}));
 const f=results[selected],opt=x.scenarios[selected],end=addDays(x.startDate,x.horizon);let messages=[`${scenarioLabel(selected)}: ${fmtMoney(f.repairCost)} repair + ${fmtMoney(f.rideCost)} transportation + ${fmtMoney(f.plannedLoss)} lost take-home earnings.`,`Expected payment: ${shortDate(opt.date)}. ${opt.shifts} lost shifts, ${opt.rides} ride days.`];if(f.outOfRange.length)messages.push(`${f.outOfRange.length} item(s) fall outside your projection dates.`);if(f.unallocated>0)messages.push(`WARNING: ${fmtMoney(f.unallocated)} of lost wages could not be allocated to an expected paycheck. Add the missing paychecks.`);if(opt.date>end)messages.push('WARNING: repair payment falls beyond the forecast period, making the comparison incomplete.');messages.push('Confirm actual ride availability, repair quote, and paycheck timing before deciding.');$('scenarioInsight').textContent=messages.join(' ');}
function renderSteps(x,f){const todayDate=x.startDate,end=addDays(todayDate,x.horizon),actions=[];const add=(key,date,heading,detail,priority=2)=>actions.push({key,date,heading,detail,priority});
 if(f.firstNegative)add('cash',todayDate,'Prepare for a projected cash shortfall',`You may be ${fmtMoney(-f.lowest.balance)} below $0 at the lowest point. Revisit optional spending and contact the relevant biller before the due date.`,0);
 else if(f.firstBelow)add('cushion',todayDate,'Protect your emergency cushion',`The forecast dips ${fmtMoney(x.reserve-f.lowest.balance)} below your chosen cushion.`,1);
 if(f.atRiskBill)add('bill:'+f.atRiskBill.name+f.atRiskBill.date,todayDate,`Review ${f.atRiskBill.name} before it's due`,`The forecast shows a negative balance on this payment date. Contact the provider early if a payment arrangement may be possible.`,0);
 add('estimate',x.repairDate,'Confirm the repair estimate','Request a written quote and a realistic completion date; ask whether a second estimate is appropriate.',1);
 if(x.scenarios[selected].rides>0)add('rides',x.repairDate,'Confirm each backup ride','Check routes, operating hours, travel times and whether rides cover both your job and campus. Estimated rides are not guaranteed.',1);
 if(x.scenarios[selected].shifts>0)add('work',x.repairDate,'Confirm which shifts affect your paychecks',`${x.scenarios[selected].shifts} shifts at ${fmtMoney(x.shiftPay)} take-home each are included in this scenario. Check with your employer which paycheck will change.`,1);
 if(f.outOfRange.length)add('range',todayDate,'Review entries outside the forecast',`${f.outOfRange.length} dated items are not fully reflected. Adjust the horizon or dates before choosing an option.`,0);if(f.unallocated>0)add('wage',todayDate,'Add missing expected paychecks',`${fmtMoney(f.unallocated)} in lost wages is not yet reflected in the forecast, so the financial risk may be understated.`,0);
 if(x.scenarios[selected].date>end)add('outside',end,'Extend the forecast to include the repair bill','A delayed repair is outside your selected timeline. The current comparison is incomplete.',0);
 for(const v of x.semester.filter(v=>v.date>=todayDate&&v.date<=end).sort((a,b)=>a.date.localeCompare(b.date))){if(v.type==='milestone')add('semester:'+v.name+v.date,v.date,`Academic deadline: ${v.name}`,'Check transportation and class logistics ahead of this deadline.',2);else if(v.type==='expense')add('semester:'+v.name+v.date,v.date,`Prepare for ${v.name}`,`Scheduled amount: ${fmtMoney(v.amount)}. Ensure this payment is reflected in your plan.`,2);else add('semester:'+v.name+v.date,v.date,`Confirm ${v.name}`,`Projected income: ${fmtMoney(v.amount)}. Verify the amount and actual deposit date.`,2)}
 add('resources',todayDate,'Check UK emergency and transportation resources','Ask about eligibility and current availability. Emergency car repairs for commuters may qualify for review, but support is not guaranteed.',1);
 add('save',end,'Save your updated plan','Export a JSON copy and update it as repair costs, transport access, or pay dates change.',3);
 actions.sort((a,b)=>a.priority-b.priority||a.date.localeCompare(b.date));$('stepsOverview').textContent=`${actions.length} actions prioritized by financial urgency and date, including your semester deadlines. These are suggestions, not guaranteed assistance.`;
 $('steps').replaceChildren(...actions.map(a=>{const row=document.createElement('label');row.className='step'+(completed[a.key]?' done':'');const cb=document.createElement('input');cb.type='checkbox';cb.checked=!!completed[a.key];cb.setAttribute('aria-label','Complete '+a.heading);cb.addEventListener('change',()=>{completed[a.key]=cb.checked;dirty=true;status('Unsaved changes');renderSteps(x,f)});const body=document.createElement('span'),date=document.createElement('div');date.className='step-date';date.textContent=shortDate(a.date);const title=document.createElement('b');title.textContent=a.heading;const details=document.createElement('small');details.textContent=a.detail;body.append(date,title,details);row.append(cb,body);return row}));}
function explain(x,base,f){
 $('mathSummary').textContent=`Start with ${fmtMoney(x.cash)}. For each day, add money expected to arrive and subtract payments scheduled for that day. Under ${scenarioLabel(selected).toLowerCase()}, ${fmtMoney(f.plannedLoss)} in estimated missed wages is assigned to the ${f.payDate?shortDate(f.payDate):'unselected'} paycheck; ${fmtMoney(f.appliedLoss)} is reflected in the forecast.`;
 const items=[{label:'Money available at start',amount:x.cash},...f.rows.flatMap(r=>r.transactions.filter(v=>v.amount!==0).map(v=>({label:`${shortDate(r.date)} · ${v.label}`,amount:v.amount})) )];
 const wrapper=$('mathLedger');wrapper.replaceChildren(...items.slice(0,80).map(t=>{const line=document.createElement('div');line.className='explain-row';const l=document.createElement('span'),a=document.createElement('strong');l.textContent=t.label;a.textContent=(t.amount>=0?'+':'−')+fmtMoney(Math.abs(t.amount));line.append(l,a);return line}));
 if(items.length>80){const more=document.createElement('p');more.className='helper';more.textContent=`Showing 80 of ${items.length} entries. Save your plan for full inputs.`;wrapper.append(more)}
}
function quality(x,f){
 const warnings=[],end=addDays(x.startDate,x.horizon);
 if(f.unallocated>0)warnings.push(`${fmtMoney(f.unallocated)} in missed wages exceeds the selected paycheck amount and is not deducted from the timeline. Choose a larger valid paycheck or revise the missed-shift estimate.`);
 if(f.outOfRange.length)warnings.push(`${f.outOfRange.length} scheduled item(s) occur outside ${shortDate(x.startDate)}–${shortDate(end)}, including ${f.outOfRange.slice(0,2).map(v=>v.label).join(', ')}. These cannot be used to compare complete costs.`);
 if(!x.incomes.some(v=>v.date>=x.startDate&&v.date<=end))warnings.push('No expected paychecks fall within the forecast. Confirm your income dates.');
 if(x.semester.some(v=>v.type==='income'&&/aid|refund/i.test(v.name)))warnings.push('Financial aid and refund estimates are counted as income. Only include amounts and dates you reasonably expect to receive.');
 if(x.repair===0)warnings.push('Repair cost is $0. Enter a quote to compare meaningful emergency costs.');
 if(f.plannedLoss>0&&f.payDate<x.repairDate)warnings.push('The paycheck selected for missed wages comes before the breakdown date. Choose a later affected paycheck.');
 const box=$('qualityNotice');box.classList.toggle('okay',!warnings.length);box.replaceChildren();const title=document.createElement('strong');title.textContent=warnings.length?`Check ${warnings.length} assumption${warnings.length===1?'':'s'} before relying on this forecast`:'Forecast assumptions are complete for the selected dates';box.append(title);
 if(warnings.length){const ul=document.createElement('ul');for(const w of warnings){const li=document.createElement('li');li.textContent=w;ul.append(li)}box.append(ul)}else{const p=document.createElement('p');p.textContent='All entered transactions and selected recovery costs fit the forecast. Estimates still depend on the accuracy of your inputs.';box.append(p)}
 return warnings;
}
function preparePrint(x,f,warnings){const box=$('printSummary');box.replaceChildren();function para(tag,text){const e=document.createElement(tag);e.textContent=text;box.append(e)}
 para('h1','ONE BREAKDOWN · Recovery summary');para('p',`Prepared ${shortDate(x.startDate)} · Independent student-created educational planner`);
 para('h2','Selected recovery path');para('p',`${scenarioLabel(selected)} · Repair ${fmtMoney(f.repairCost)} scheduled ${shortDate(x.scenarios[selected].date)} · Backup rides ${fmtMoney(f.rideCost)} · Estimated lost wages ${fmtMoney(f.plannedLoss)}`);
 para('h2','Estimated cash impact');para('p',`Lowest projected balance: ${fmtMoney(f.lowest.balance)} on ${shortDate(f.lowest.date)}. Days below $0: ${f.daysNegative}. Days below cushion: ${f.daysBelow}. Gap to $0: ${fmtMoney(Math.max(0,-f.lowest.balance))}.`);
 if(warnings.length){para('h2','Important assumptions to verify');warnings.forEach(w=>para('p','• '+w))}
 para('h2','First next steps');const steps=[...$('steps').querySelectorAll('.step')].slice(0,5);const list=document.createElement('ol');steps.forEach(s=>{const li=document.createElement('li');li.textContent=s.innerText||s.textContent;list.append(li)});box.append(list);
 para('p','Educational estimates only. Confirm quotes, transportation, wages and university assistance eligibility. No guarantee of aid or financial outcomes. No personal data was uploaded.');
}
function render(){try{const x=readForm();const base=forecast(x,'baseline'),results={repair:forecast(x,'repair'),bridge:forecast(x,'bridge'),delay:forecast(x,'delay')},f=results[selected];let notice=$('errorNotice');if(notice)notice.remove();affordability(x,f);drawChart(x,base,f);renderOptions(x,results);renderSteps(x,f);explain(x,base,f);const warnings=quality(x,f);preparePrint(x,f,warnings);return true}catch(e){let notice=$('errorNotice');if(!notice){notice=document.createElement('p');notice.id='errorNotice';notice.className='error';notice.setAttribute('role','alert');document.querySelector('#panel-situation .input-card').prepend(notice)}console.error('Render failed:',e);notice.textContent='Please correct your information: '+e.message;return false}}
function save(){if(!render()){$('panel-situation').hidden=false;showTab('situation');return}const x=readForm();const text=JSON.stringify(x,null,2),url=URL.createObjectURL(new Blob([text],{type:'application/json'})),link=document.createElement('a');link.href=url;link.download='One_Breakdown_Plan_V5.json';document.body.append(link);link.click();link.remove();setTimeout(()=>URL.revokeObjectURL(url),1000);dirty=false;status('Plan downloaded — saved');}
const tabs=['situation','timeline','compare','steps'];function showTab(tab){if(!tabs.includes(tab))return;for(const p of document.querySelectorAll('.tab-panel')){const active=p.id==='panel-'+tab;p.hidden=!active;p.classList.toggle('is-active',active)}for(const b of document.querySelectorAll('.nav-tab')){const active=b.dataset.tab===tab;b.classList.toggle('is-active',active);b.setAttribute('aria-selected',String(active));b.tabIndex=active?0:-1}if(tab==='timeline')render();window.scrollTo(0,0)}
for(const id of ids){$(id).addEventListener('input',modified);$(id).addEventListener('change',modified)}
for(const kind of ['Income','Bill','Semester'])$('add'+kind).addEventListener('click',()=>{let type=kind.toLowerCase();$(type+'Rows').append(eventNode(type,type==='semester'?{name:'New semester item',date:$('startDate').value,amount:0,type:'milestone'}:{name:'New '+type,date:$('startDate').value,amount:0}));if(type==='income')refreshPaychecks();modified()});
$('chart30').addEventListener('click',()=>{chartFull=false;$('chart30').classList.add('active');$('chartAll').classList.remove('active');render()});$('chartAll').addEventListener('click',()=>{chartFull=true;$('chartAll').classList.add('active');$('chart30').classList.remove('active');render()});
$('saveBtn').addEventListener('click',save);$('printBtn').addEventListener('click',()=>window.print());$('resetBtn').addEventListener('click',()=>{if(dirty&&!confirm('Discard unsaved changes and reload example data?'))return;load(sample())});
$('openBtn').addEventListener('click',()=>{if(dirty&&!confirm('You have unsaved changes. Replace them with a saved plan?'))return;$('fileInput').click()});
$('fileInput').addEventListener('change',async e=>{const file=e.target.files[0];if(!file)return;try{if(file.size>200000)throw Error('File exceeds the 200 KB limit.');const data=JSON.parse(await file.text());const x=convertToV5(data);validate(x);load(x);status('Saved plan opened successfully');}catch(error){alert('Could not open that plan: '+error.message+' Your current data was not changed.')}finally{e.target.value=''}});
window.addEventListener('beforeunload',e=>{if(dirty){e.preventDefault();e.returnValue=''}});
for(const btn of document.querySelectorAll('[data-tab],[data-to]'))btn.addEventListener('click',()=>showTab(btn.dataset.tab||btn.dataset.to));document.querySelector('.app-nav').addEventListener('keydown',e=>{if(!['ArrowRight','ArrowLeft','ArrowDown','ArrowUp'].includes(e.key))return;e.preventDefault();const current=document.querySelector('.nav-tab.is-active').dataset.tab,dir=['ArrowRight','ArrowDown'].includes(e.key)?1:-1,next=tabs[(tabs.indexOf(current)+dir+tabs.length)%tabs.length];showTab(next);document.querySelector(`[data-tab="${next}"]`).focus()});
load(sample());status('Fictional sample loaded · Edit any field to begin');
// Explicit unit-test access without transmitting any data or loading external code.
window.OneBreakdownV5Test={forecast,validate,sample,readForm,convertToV5,quality};
})();
</script></body></html>

Reaches out to

Websites this page contacts when it runs — fonts, chart libraries, data. Found by reading its source.

  • studentsuccess.uky.edu
  • transportation.uky.edu
  • www.w3.org

Licence

Published on Globefin under the MIT License. You may copy, change, and reuse this page, including commercially — just keep the notice below with it.

Copyright © 2026 Riya Patel. Licensed under the MIT License. Published on Globefin.

Provided as is, without warranty. Any external libraries it loads keep their own licences. Terms →

Sandbox

Scripts run, but the demo has its own throwaway origin. It can't read your session or cookies, can't reach the page around it, and can't navigate your tab. Don't enter real passwords or personal data into any demo.