Repository navigation
Expand file tree
/
Copy path567compare.html
More file actions
717 lines (678 loc) · 58.8 KB
/
Copy path567compare.html
File metadata and controls
717 lines (678 loc) · 58.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>567 Ocean Avenue — Assessment Options Briefing</title>
<style>
:root{
--navy:#0d2440; --navy-2:#153a63; --ink:#16202b; --muted:#5b6b7c;
--line:#e2e8f0; --bg:#f5f7fa; --card:#ffffff;
--a:#0f766e; --a-soft:#d8f1ee; /* Option A - teal */
--b:#b45309; --b-soft:#fdeacf; /* Option B - amber */
--accent:#2563eb;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"Segoe UI",system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.55;-webkit-font-smoothing:antialiased}
h1,h2,h3{margin:0;line-height:1.25;font-weight:650;letter-spacing:-.01em}
a{color:var(--accent)}
.wrap{max-width:1180px;margin:0 auto;padding:0 28px}
/* ---------- Nav ---------- */
.nav{position:sticky;top:0;z-index:50;background:rgba(13,36,64,.97);backdrop-filter:blur(6px);border-bottom:1px solid rgba(255,255,255,.12)}
.nav .wrap{display:flex;align-items:center;gap:22px;height:54px}
.nav .brand{color:#fff;font-weight:650;font-size:14.5px;letter-spacing:.02em;white-space:nowrap}
.nav nav{display:flex;gap:4px;flex-wrap:wrap;margin-left:auto}
.nav a{color:#c8d6e6;text-decoration:none;font-size:13px;padding:6px 11px;border-radius:6px}
.nav a:hover{background:rgba(255,255,255,.12);color:#fff}
/* ---------- Hero ---------- */
.hero{background:linear-gradient(160deg,var(--navy) 0%,var(--navy-2) 100%);color:#fff;padding:52px 0 62px}
.eyebrow{font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:#8fb2d8;font-weight:600}
.hero h1{font-size:38px;margin:10px 0 12px}
.hero p.lede{max-width:760px;color:#cddcec;font-size:16.5px;margin:0}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:34px}
.kpi{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);border-radius:12px;padding:16px 18px}
.kpi .lab{font-size:11.5px;text-transform:uppercase;letter-spacing:.09em;color:#9fc0e2;font-weight:600}
.kpi .val{font-size:27px;font-weight:680;margin-top:6px;font-variant-numeric:tabular-nums}
.kpi .sub{font-size:12.5px;color:#a9c3dc;margin-top:2px}
/* ---------- Sections ---------- */
section{padding:52px 0}
section.alt{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.sec-head{margin-bottom:24px}
.sec-head .eyebrow{color:var(--accent)}
.sec-head h2{font-size:25px;margin-top:8px}
.sec-head p{color:var(--muted);max-width:780px;margin:8px 0 0;font-size:15px}
/* ---------- Option cards ---------- */
.opts{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.opt{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:24px;box-shadow:0 1px 3px rgba(16,32,55,.06)}
.opt.a{border-top:4px solid var(--a)}
.opt.b{border-top:4px solid var(--b)}
.tag{display:inline-block;font-size:11.5px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;padding:4px 10px;border-radius:999px}
.opt.a .tag{background:var(--a-soft);color:var(--a)}
.opt.b .tag{background:var(--b-soft);color:var(--b)}
.opt h3{font-size:20px;margin:12px 0 4px}
.opt .tot{font-size:32px;font-weight:700;font-variant-numeric:tabular-nums;margin:10px 0 2px}
.opt.a .tot{color:var(--a)} .opt.b .tot{color:var(--b)}
.opt .totsub{color:var(--muted);font-size:13px}
.facts{list-style:none;padding:0;margin:18px 0 0;border-top:1px solid var(--line)}
.facts li{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line);font-size:14px}
.facts li span:first-child{color:var(--muted)}
.facts li span:last-child{font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
.pros{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.pros h4{margin:0 0 6px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.pros ul{margin:0;padding-left:16px;font-size:13.5px;color:#2c3a48}
.pros li{margin-bottom:5px}
/* ---------- Charts ---------- */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:22px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:22px;box-shadow:0 1px 3px rgba(16,32,55,.06)}
.card h3{font-size:16px}
.card .hint{color:var(--muted);font-size:13px;margin:6px 0 14px}
svg{display:block;width:100%;height:auto;overflow:visible}
.legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12.5px;color:var(--muted);margin-top:10px}
.legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:6px;vertical-align:-1px}
/* ---------- Unit explorer ---------- */
.toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:18px}
input[type=search],select{font:inherit;font-size:14px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);min-width:190px}
input[type=search]:focus,select:focus{outline:2px solid var(--accent);outline-offset:1px}
button{font:inherit;font-size:13.5px;font-weight:600;padding:9px 15px;border-radius:9px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}
button:hover{background:#eef3f9}
button.primary{background:var(--navy);color:#fff;border-color:var(--navy)}
button.primary:hover{background:var(--navy-2)}
.count{color:var(--muted);font-size:13px;margin-left:auto}
.tbl-wrap{overflow:auto;max-height:560px;border:1px solid var(--line);border-radius:12px;background:#fff}
table{border-collapse:collapse;width:100%;font-size:13.5px}
thead th{position:sticky;top:0;background:#f1f5f9;z-index:2;text-align:right;padding:11px 12px;font-size:11.5px;letter-spacing:.05em;text-transform:uppercase;color:#42566b;border-bottom:1px solid var(--line);cursor:pointer;white-space:nowrap}
thead th:first-child{text-align:left}
thead th:hover{background:#e4ecf4}
thead th .ar{opacity:.4;font-size:10px;margin-left:3px}
tbody td{padding:9px 12px;text-align:right;border-bottom:1px solid #f0f4f8;font-variant-numeric:tabular-nums;white-space:nowrap}
tbody td:first-child{text-align:left;font-weight:600}
tbody tr:hover{background:#f7fafd}
tbody tr.sel{background:#e8f0fd}
.grp-a{background:rgba(15,118,110,.045)}
.grp-b{background:rgba(180,83,9,.045)}
.colgrp th{text-align:center!important;font-size:11px;letter-spacing:.09em;padding:7px 12px}
.colgrp th.ga{background:var(--a-soft);color:var(--a)}
.colgrp th.gb{background:var(--b-soft);color:var(--b)}
.pos{color:var(--b);font-weight:600}
tfoot td{position:sticky;bottom:0;background:#f1f5f9;font-weight:700;border-top:2px solid var(--line);padding:11px 12px;text-align:right;font-variant-numeric:tabular-nums}
tfoot td:first-child{text-align:left}
/* ---------- Unit detail ---------- */
.detail{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:22px}
.detail .pill{display:inline-block;background:#eef3f9;color:var(--muted);font-size:12px;padding:3px 10px;border-radius:999px;margin-bottom:8px}
.big{font-size:30px;font-weight:700;font-variant-numeric:tabular-nums}
.mini{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}
.mini div{background:#f7fafc;border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.mini .l{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600}
.mini .v{font-size:17px;font-weight:650;font-variant-numeric:tabular-nums}
details{background:#fff;border:1px solid var(--line);border-radius:12px;padding:0 20px;margin-top:20px}
details summary{cursor:pointer;padding:16px 0;font-weight:650;font-size:15px;list-style:none;display:flex;align-items:center;gap:10px}
details summary::-webkit-details-marker{display:none}
details summary:before{content:"›";font-size:22px;line-height:1;transform:rotate(0);transition:transform .15s;color:var(--muted)}
details[open] summary:before{transform:rotate(90deg)}
details .inner{padding-bottom:20px}
.callout{background:#fff8e6;border:1px solid #f4dfae;border-left:4px solid #d19b1d;border-radius:10px;padding:16px 18px;font-size:14px;color:#5d4a16;margin-top:26px}
.callout strong{color:#3f3210}
footer{background:var(--navy);color:#a8c2dc;font-size:13px;padding:30px 0;margin-top:0}
footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}
@media (max-width:900px){
.kpis{grid-template-columns:repeat(2,1fr)}
.opts,.grid2,.detail,.pros{grid-template-columns:1fr}
.hero h1{font-size:29px}
.nav nav{display:none}
}
@media print{
.nav,.toolbar,footer .no-print{display:none}
body{background:#fff}
.tbl-wrap{max-height:none}
section{padding:24px 0;break-inside:avoid}
details{break-inside:avoid}
details:not([open]) .inner{display:none}
}
/* ---------- Password gate ---------- */
#pw-gate{position:fixed;inset:0;z-index:9999;background:linear-gradient(160deg,var(--navy) 0%,var(--navy-2) 100%);display:flex;align-items:center;justify-content:center;padding:20px}
#pw-gate .box{background:#fff;border-radius:14px;padding:36px 32px;max-width:360px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.35);text-align:center}
#pw-gate h2{font-size:19px;margin-bottom:6px;color:var(--ink)}
#pw-gate p{color:var(--muted);font-size:13.5px;margin:0 0 18px}
#pw-gate input[type=password]{width:100%;font:inherit;font-size:15px;padding:11px 14px;border:1px solid var(--line);border-radius:9px;margin-bottom:12px;box-sizing:border-box}
#pw-gate input[type=password]:focus{outline:2px solid var(--accent);outline-offset:1px}
#pw-gate button{width:100%;background:var(--navy);color:#fff;border:none;border-radius:9px;padding:11px;font-size:14.5px;font-weight:650;cursor:pointer}
#pw-gate button:hover{background:var(--navy-2)}
#pw-gate .err{color:#b91c1c;font-size:13px;margin-top:10px;display:none}
</style>
</head>
<body>
<div id="pw-gate">
<div class="box">
<p>This briefing is password protected. Enter the password to continue.</p>
<form id="pw-form">
<input type="password" id="pw-input" placeholder="Password" autocomplete="off" autofocus>
<button type="submit">Unlock</button>
<div class="err" id="pw-err">Incorrect password. Try again.</div>
</form>
</div>
</div>
<div id="site-content" hidden>
<script>
(function(){
var PASSWORD = '567ocean';
var gate = document.getElementById('pw-gate');
var content = document.getElementById('site-content');
var form = document.getElementById('pw-form');
var input = document.getElementById('pw-input');
var err = document.getElementById('pw-err');
if (sessionStorage.getItem('ocean567-unlocked') === '1') {
gate.style.display = 'none';
content.hidden = false;
}
form.addEventListener('submit', function(e){
e.preventDefault();
if (input.value === PASSWORD) {
sessionStorage.setItem('ocean567-unlocked', '1');
gate.style.display = 'none';
content.hidden = false;
} else {
err.style.display = 'block';
input.value = '';
input.focus();
}
});
})();
</script>
<header class="nav">
<div class="wrap">
<div class="brand">567 OCEAN AVENUE · ASSESSMENT BRIEFING</div>
<nav>
<a href="#summary">Summary</a>
<a href="#options">The Two Options</a>
<a href="#charts">Cash Flow</a>
<a href="#units">My Unit</a>
<a href="#schedule">Loan Schedule</a>
<a href="#notes">Assumptions</a>
</nav>
</div>
</header>
<div class="hero">
<div class="wrap">
<div class="eyebrow">Board Briefing · Illustrative Example</div>
<h1>Funding an $800,000 Capital Need:<br>Two Paths, One Decision</h1>
<p class="lede">Both options raise exactly $800,000 for the building. The difference is <em>when</em> owners pay and <em>how much</em> the money ends up costing. This briefing lays out the trade-off at the building level and down to your individual unit.</p>
<div class="kpis">
<div class="kpi"><div class="lab">Capital Required</div><div class="val">$800,000</div><div class="sub">Identical under both options</div></div>
<div class="kpi"><div class="lab">Option A · Total Paid</div><div class="val">$800,000</div><div class="sub">Over 5 months, no interest</div></div>
<div class="kpi"><div class="lab">Option B · Total Paid</div><div class="val">$1.215M</div><div class="sub">Over 12 years, 7% fixed</div></div>
<div class="kpi"><div class="lab">Cost of Financing</div><div class="val">+$414,975</div><div class="sub">52% premium for Option B</div></div>
</div>
</div>
</div>
<section id="summary">
<div class="wrap">
<div class="sec-head">
<div class="eyebrow">Executive Summary</div>
<h2>The trade-off in one sentence</h2>
<p>Option A is <strong>cheaper but steeper</strong> — owners write large checks for five months and the matter is closed. Option B is <strong>gentler but longer</strong> — monthly amounts drop by roughly 94% in the early years, but owners collectively pay an extra $414,975 in interest and carry the obligation for twelve years.</p>
</div>
<div class="grid2">
<div class="card">
<h3>What every owner should weigh</h3>
<ul style="margin:14px 0 0;padding-left:18px;font-size:14.5px;color:#2c3a48">
<li style="margin-bottom:8px"><strong>Affordability today.</strong> Option A demands roughly 29× the early monthly amount of Option B. For a typical mid-size unit that's $1,184/month for five months versus about $27/month in Year 1.</li>
<li style="margin-bottom:8px"><strong>Total dollars out.</strong> Option A closes the book at 100% of the assessment. Option B costs 152% of it.</li>
<li style="margin-bottom:8px"><strong>Time horizon.</strong> Owners planning to sell inside 12 years may prefer the clean title and closed obligation Option A provides; a lien-free unit is simpler at closing.</li>
<li><strong>Flexibility.</strong> A line of credit only accrues interest on what is actually drawn, so if the project costs less than $800,000, Option B's cost falls with it.</li>
</ul>
</div>
<div class="card">
<h3>Building-level cost at a glance</h3>
<p class="hint">Total dollars collected from all owners under each option.</p>
<div id="chartTotals"></div>
<div class="legend"><span><i style="background:#0f766e"></i>Principal ($800,000)</span><span><i style="background:#b45309"></i>Interest ($414,975)</span></div>
</div>
</div>
</div>
</section>
<section class="alt" id="options">
<div class="wrap">
<div class="sec-head">
<div class="eyebrow">Side by Side</div>
<h2>The two options in detail</h2>
</div>
<div class="opts">
<div class="opt a">
<span class="tag">Option A</span>
<h3>Straight Special Assessment</h3>
<div class="tot">$800,000</div>
<div class="totsub">Total collected · no financing cost</div>
<ul class="facts">
<li><span>Collection window</span><span>Oct 2026 – Feb 2027</span></li>
<li><span>Duration</span><span>5 months</span></li>
<li><span>Building-wide monthly</span><span>$160,000</span></li>
<li><span>Interest rate</span><span>None</span></li>
<li><span>Total cost to owners</span><span>$800,000</span></li>
</ul>
<div class="pros">
<div><h4>Strengths</h4><ul><li>No interest — every dollar funds the work</li><li>Obligation closed within 5 months</li><li>No lender, covenants, or loan documents</li><li>Clean unit title for resale</li></ul></div>
<div><h4>Trade-offs</h4><ul><li>Large near-term cash demand on owners</li><li>Risk of delinquency or hardship cases</li><li>Full amount due before project spend occurs</li></ul></div>
</div>
</div>
<div class="opt b">
<span class="tag">Option B</span>
<h3>Line of Credit → 10-Year Term Loan</h3>
<div class="tot">$1,214,975</div>
<div class="totsub">Total collected · includes $414,975 interest</div>
<ul class="facts">
<li><span>Draw / interest-only period</span><span>Months 1 – 24</span></li>
<li><span>Amortizing term loan</span><span>Months 25 – 144</span></li>
<li><span>Duration</span><span>144 months (12 years)</span></li>
<li><span>Interest rate</span><span>7.00% fixed</span></li>
<li><span>Building-wide monthly (Yrs 3–12)</span><span>$9,289</span></li>
</ul>
<div class="pros">
<div><h4>Strengths</h4><ul><li>Monthly burden is a fraction of Option A</li><li>Draws match construction spend, not ahead of it</li><li>Interest accrues only on amounts drawn</li><li>Far lower hardship and delinquency risk</li></ul></div>
<div><h4>Trade-offs</h4><ul><li>$414,975 of interest — 52% premium</li><li>12-year obligation follows the unit on sale</li><li>Subject to bank underwriting and terms</li><li>Payment steps up sharply in Year 3</li></ul></div>
</div>
</div>
</div>
<div class="callout"><strong>Note on the Year 3 step-up.</strong> Under Option B the building pays interest only for the first two years (averaging $3,694/month in Year 1 and $4,667/month in Year 2). When the balance converts to a 10-year amortizing loan in month 25, the building-wide payment roughly doubles to $9,289/month and stays there through Year 12. Owners should budget for that step, not just the introductory amount.</div>
</div>
</section>
<section id="charts">
<div class="wrap">
<div class="sec-head">
<div class="eyebrow">Cash Flow</div>
<h2>What the money actually does over time</h2>
<p>All figures are building-wide. Individual unit amounts are each owner's ownership percentage of these totals.</p>
</div>
<div class="grid2">
<div class="card">
<h3>Annual amount collected from owners</h3>
<p class="hint">Option A is concentrated in a single five-month window. Option B spreads a smaller amount across twelve years.</p>
<div id="chartAnnual"></div>
<div class="legend"><span><i style="background:#0f766e"></i>Option A — Straight assessment</span><span><i style="background:#b45309"></i>Option B — LOC / term loan</span></div>
</div>
<div class="card">
<h3>Cumulative dollars paid</h3>
<p class="hint">Option A finishes at $800,000 in month 5. Option B keeps climbing, crossing Option A in month 100 and ending at $1.21M.</p>
<div id="chartCumul"></div>
<div class="legend"><span><i style="background:#0f766e"></i>Option A cumulative</span><span><i style="background:#b45309"></i>Option B cumulative</span></div>
</div>
</div>
<div class="grid2" style="margin-top:22px">
<div class="card">
<h3>Loan balance, months 1–144</h3>
<p class="hint">The balance ramps to $800,000 over the six-month draw, holds flat through the interest-only period, then amortizes to zero.</p>
<div id="chartBalance"></div>
<div class="legend"><span><i style="background:#153a63"></i>Outstanding balance</span><span><i style="background:#cbd5e1"></i>Draw & interest-only period (months 1–24)</span></div>
</div>
<div class="card">
<h3>Where each Option B payment goes</h3>
<p class="hint">Early payments are almost entirely interest. Principal overtakes interest around month 70. <strong style="color:var(--b)">Total interest paid: $414,975.</strong></p>
<div id="chartSplit"></div>
<div class="legend"><span><i style="background:#b45309"></i>Interest</span><span><i style="background:#0f766e"></i>Principal</span></div>
</div>
</div>
</div>
</section>
<section class="alt" id="units">
<div class="wrap">
<div class="sec-head">
<div class="eyebrow">Unit-Level Impact</div>
<h2>Find your unit</h2>
<p>Every unit's share is its percentage of ownership applied to the building-wide figures. Search for your unit below, or sort any column to see where you land.</p>
</div>
<div class="toolbar">
<input type="search" id="q" placeholder="Search unit (e.g. A305, TH01, B702)" aria-label="Search unit">
<select id="grp" aria-label="Filter by unit group">
<option value="">All unit groups</option>
<option value="A">A — Tower A</option>
<option value="B">B — Tower B</option>
<option value="TH">TH — Townhouses</option>
<option value="P">P — Parking</option>
<option value="CF">CF — Commercial / Other</option>
</select>
<button id="csv">Download CSV</button>
<button class="primary" onclick="window.print()">Print / Save PDF</button>
<span class="count" id="count"></span>
</div>
<div class="tbl-wrap">
<table id="tbl">
<thead>
<tr class="colgrp">
<th colspan="2" style="background:#f1f5f9"></th>
<th colspan="2" class="ga">Option A — Straight Assessment</th>
<th colspan="4" class="gb">Option B — LOC → Term Loan</th>
<th style="background:#f1f5f9"></th>
</tr>
<tr id="hdr"></tr>
</thead>
<tbody id="body"></tbody>
<tfoot id="foot"></tfoot>
</table>
</div>
<div class="detail">
<div class="card">
<span class="pill" id="dPill">Selected unit</span>
<h3 id="dTitle">Select a unit above</h3>
<p class="hint" id="dSub">Click any row in the table to see a side-by-side breakdown for that unit.</p>
<div class="mini" id="dMini"></div>
</div>
<div class="card">
<h3>Monthly payment, side by side</h3>
<p class="hint">What this unit pays each month under each option, by period.</p>
<div id="chartUnit"></div>
<div class="legend"><span><i style="background:#0f766e"></i>Option A</span><span><i style="background:#b45309"></i>Option B</span></div>
</div>
</div>
</div>
</section>
<section id="schedule">
<div class="wrap">
<div class="sec-head">
<div class="eyebrow">Supporting Detail</div>
<h2>Full building loan schedule</h2>
<p>The complete 144-month amortization behind Option B, month by month.</p>
</div>
<details>
<summary>Show all 144 months — draw, interest, principal and balance</summary>
<div class="inner">
<div class="toolbar" style="margin-bottom:12px">
<button id="csvSched">Download schedule CSV</button>
<span class="count" id="schedCount"></span>
</div>
<div class="tbl-wrap">
<table id="sched">
<thead><tr>
<th style="text-align:left">Month</th><th style="text-align:left">Phase</th>
<th>Beginning Balance</th><th>Draw</th><th>Interest</th><th>Principal</th>
<th>Total Building Payment</th><th>Ending Balance</th>
</tr></thead>
<tbody id="schedBody"></tbody>
</table>
</div>
</div>
</details>
</div>
</section>
<section class="alt" id="notes">
<div class="wrap">
<div class="sec-head">
<div class="eyebrow">Basis of Preparation</div>
<h2>Assumptions & caveats</h2>
</div>
<div class="grid2">
<div class="card">
<h3>Option B — Line of credit & term loan</h3>
<ul class="facts" style="margin-top:14px">
<li><span>Amount drawn</span><span>$800,000</span></li>
<li><span>Draw ramp period</span><span>6 months, $133,333/mo</span></li>
<li><span>Interest-only period</span><span>24 months</span></li>
<li><span>Rate — draw period</span><span>7.00% fixed</span></li>
<li><span>Rate — term loan</span><span>7.00% fixed</span></li>
<li><span>Term loan length</span><span>120 months</span></li>
<li><span>Amortized monthly P&I</span><span>$9,288.68</span></li>
</ul>
</div>
<div class="card">
<h3>Option A — Straight assessment</h3>
<ul class="facts" style="margin-top:14px">
<li><span>Assessment total</span><span>$800,000</span></li>
<li><span>Billing period</span><span>5 months</span></li>
<li><span>Start date</span><span>October 1, 2026</span></li>
<li><span>Monthly building-wide</span><span>$160,000</span></li>
<li><span>Financing cost</span><span>None</span></li>
</ul>
<p class="hint" style="margin-top:16px">Unit percentages of ownership are sourced from the 567 Ocean Tally — Annual Meeting 2025.</p>
</div>
</div>
<div class="callout"><strong>Illustrative only.</strong> These are example scenarios prepared to frame the decision. Actual bank terms, interest rates, draw schedules and board-approved figures may differ. Nothing here constitutes a final assessment, a board resolution, or financial advice. Owners with specific tax or financing questions should consult their own advisors.</div>
</div>
</section>
<footer>
<div class="wrap">
<div>567 Ocean Avenue Condominium · Assessment Options Briefing</div>
<div class="no-print">Self-contained document — all data embedded, no internet connection required.</div>
</div>
</footer>
</div>
<script>
const DATA = {"sched":[[1.0,"Draw / Interest-Only",0.0,133333.33,777.78,0,777.78,133333.33],[2.0,"Draw / Interest-Only",133333.33,133333.33,1555.56,0,1555.56,266666.67],[3.0,"Draw / Interest-Only",266666.67,133333.33,2333.33,0,2333.33,400000],[4.0,"Draw / Interest-Only",400000,133333.33,3111.11,0,3111.11,533333.33],[5.0,"Draw / Interest-Only",533333.33,133333.33,3888.89,0,3888.89,666666.67],[6.0,"Draw / Interest-Only",666666.67,133333.33,4666.67,0,4666.67,800000],[7.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[8.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[9.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[10.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[11.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[12.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[13.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[14.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[15.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[16.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[17.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[18.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[19.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[20.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[21.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[22.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[23.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[24.0,"Draw / Interest-Only",800000,0,4666.67,0,4666.67,800000],[25.0,"Term Loan (P&I)",800000,0,4666.67,4622.01,9288.68,795377.99],[26.0,"Term Loan (P&I)",795377.99,0,4639.7,4648.97,9288.68,790729.01],[27.0,"Term Loan (P&I)",790729.01,0,4612.59,4676.09,9288.68,786052.92],[28.0,"Term Loan (P&I)",786052.92,0,4585.31,4703.37,9288.68,781349.55],[29.0,"Term Loan (P&I)",781349.55,0,4557.87,4730.81,9288.68,776618.75],[30.0,"Term Loan (P&I)",776618.75,0,4530.28,4758.4,9288.68,771860.34],[31.0,"Term Loan (P&I)",771860.34,0,4502.52,4786.16,9288.68,767074.19],[32.0,"Term Loan (P&I)",767074.19,0,4474.6,4814.08,9288.68,762260.11],[33.0,"Term Loan (P&I)",762260.11,0,4446.52,4842.16,9288.68,757417.94],[34.0,"Term Loan (P&I)",757417.94,0,4418.27,4870.41,9288.68,752547.54],[35.0,"Term Loan (P&I)",752547.54,0,4389.86,4898.82,9288.68,747648.72],[36.0,"Term Loan (P&I)",747648.72,0,4361.28,4927.39,9288.68,742721.33],[37.0,"Term Loan (P&I)",742721.33,0,4332.54,4956.14,9288.68,737765.19],[38.0,"Term Loan (P&I)",737765.19,0,4303.63,4985.05,9288.68,732780.14],[39.0,"Term Loan (P&I)",732780.14,0,4274.55,5014.13,9288.68,727766.01],[40.0,"Term Loan (P&I)",727766.01,0,4245.3,5043.38,9288.68,722722.64],[41.0,"Term Loan (P&I)",722722.64,0,4215.88,5072.8,9288.68,717649.84],[42.0,"Term Loan (P&I)",717649.84,0,4186.29,5102.39,9288.68,712547.45],[43.0,"Term Loan (P&I)",712547.45,0,4156.53,5132.15,9288.68,707415.3],[44.0,"Term Loan (P&I)",707415.3,0,4126.59,5162.09,9288.68,702253.21],[45.0,"Term Loan (P&I)",702253.21,0,4096.48,5192.2,9288.68,697061.01],[46.0,"Term Loan (P&I)",697061.01,0,4066.19,5222.49,9288.68,691838.52],[47.0,"Term Loan (P&I)",691838.52,0,4035.72,5252.95,9288.68,686585.57],[48.0,"Term Loan (P&I)",686585.57,0,4005.08,5283.6,9288.68,681301.97],[49.0,"Term Loan (P&I)",681301.97,0,3974.26,5314.42,9288.68,675987.56],[50.0,"Term Loan (P&I)",675987.56,0,3943.26,5345.42,9288.68,670642.14],[51.0,"Term Loan (P&I)",670642.14,0,3912.08,5376.6,9288.68,665265.54],[52.0,"Term Loan (P&I)",665265.54,0,3880.72,5407.96,9288.68,659857.58],[53.0,"Term Loan (P&I)",659857.58,0,3849.17,5439.51,9288.68,654418.07],[54.0,"Term Loan (P&I)",654418.07,0,3817.44,5471.24,9288.68,648946.83],[55.0,"Term Loan (P&I)",648946.83,0,3785.52,5503.16,9288.68,643443.67],[56.0,"Term Loan (P&I)",643443.67,0,3753.42,5535.26,9288.68,637908.42],[57.0,"Term Loan (P&I)",637908.42,0,3721.13,5567.55,9288.68,632340.87],[58.0,"Term Loan (P&I)",632340.87,0,3688.66,5600.02,9288.68,626740.85],[59.0,"Term Loan (P&I)",626740.85,0,3655.99,5632.69,9288.68,621108.16],[60.0,"Term Loan (P&I)",621108.16,0,3623.13,5665.55,9288.68,615442.61],[61.0,"Term Loan (P&I)",615442.61,0,3590.08,5698.6,9288.68,609744.01],[62.0,"Term Loan (P&I)",609744.01,0,3556.84,5731.84,9288.68,604012.17],[63.0,"Term Loan (P&I)",604012.17,0,3523.4,5765.27,9288.68,598246.9],[64.0,"Term Loan (P&I)",598246.9,0,3489.77,5798.9,9288.68,592447.99],[65.0,"Term Loan (P&I)",592447.99,0,3455.95,5832.73,9288.68,586615.26],[66.0,"Term Loan (P&I)",586615.26,0,3421.92,5866.76,9288.68,580748.51],[67.0,"Term Loan (P&I)",580748.51,0,3387.7,5900.98,9288.68,574847.53],[68.0,"Term Loan (P&I)",574847.53,0,3353.28,5935.4,9288.68,568912.13],[69.0,"Term Loan (P&I)",568912.13,0,3318.65,5970.02,9288.68,562942.1],[70.0,"Term Loan (P&I)",562942.1,0,3283.83,6004.85,9288.68,556937.25],[71.0,"Term Loan (P&I)",556937.25,0,3248.8,6039.88,9288.68,550897.38],[72.0,"Term Loan (P&I)",550897.38,0,3213.57,6075.11,9288.68,544822.27],[73.0,"Term Loan (P&I)",544822.27,0,3178.13,6110.55,9288.68,538711.72],[74.0,"Term Loan (P&I)",538711.72,0,3142.49,6146.19,9288.68,532565.52],[75.0,"Term Loan (P&I)",532565.52,0,3106.63,6182.05,9288.68,526383.48],[76.0,"Term Loan (P&I)",526383.48,0,3070.57,6218.11,9288.68,520165.37],[77.0,"Term Loan (P&I)",520165.37,0,3034.3,6254.38,9288.68,513910.99],[78.0,"Term Loan (P&I)",513910.99,0,2997.81,6290.86,9288.68,507620.13],[79.0,"Term Loan (P&I)",507620.13,0,2961.12,6327.56,9288.68,501292.56],[80.0,"Term Loan (P&I)",501292.56,0,2924.21,6364.47,9288.68,494928.09],[81.0,"Term Loan (P&I)",494928.09,0,2887.08,6401.6,9288.68,488526.49],[82.0,"Term Loan (P&I)",488526.49,0,2849.74,6438.94,9288.68,482087.55],[83.0,"Term Loan (P&I)",482087.55,0,2812.18,6476.5,9288.68,475611.05],[84.0,"Term Loan (P&I)",475611.05,0,2774.4,6514.28,9288.68,469096.77],[85.0,"Term Loan (P&I)",469096.77,0,2736.4,6552.28,9288.68,462544.49],[86.0,"Term Loan (P&I)",462544.49,0,2698.18,6590.5,9288.68,455953.99],[87.0,"Term Loan (P&I)",455953.99,0,2659.73,6628.95,9288.68,449325.04],[88.0,"Term Loan (P&I)",449325.04,0,2621.06,6667.62,9288.68,442657.43],[89.0,"Term Loan (P&I)",442657.43,0,2582.17,6706.51,9288.68,435950.92],[90.0,"Term Loan (P&I)",435950.92,0,2543.05,6745.63,9288.68,429205.29],[91.0,"Term Loan (P&I)",429205.29,0,2503.7,6784.98,9288.68,422420.31],[92.0,"Term Loan (P&I)",422420.31,0,2464.12,6824.56,9288.68,415595.75],[93.0,"Term Loan (P&I)",415595.75,0,2424.31,6864.37,9288.68,408731.38],[94.0,"Term Loan (P&I)",408731.38,0,2384.27,6904.41,9288.68,401826.96],[95.0,"Term Loan (P&I)",401826.96,0,2343.99,6944.69,9288.68,394882.28],[96.0,"Term Loan (P&I)",394882.28,0,2303.48,6985.2,9288.68,387897.08],[97.0,"Term Loan (P&I)",387897.08,0,2262.73,7025.95,9288.68,380871.13],[98.0,"Term Loan (P&I)",380871.13,0,2221.75,7066.93,9288.68,373804.2],[99.0,"Term Loan (P&I)",373804.2,0,2180.52,7108.15,9288.68,366696.05],[100.0,"Term Loan (P&I)",366696.05,0,2139.06,7149.62,9288.68,359546.43],[101.0,"Term Loan (P&I)",359546.43,0,2097.35,7191.32,9288.68,352355.11],[102.0,"Term Loan (P&I)",352355.11,0,2055.4,7233.27,9288.68,345121.83],[103.0,"Term Loan (P&I)",345121.83,0,2013.21,7275.47,9288.68,337846.37],[104.0,"Term Loan (P&I)",337846.37,0,1970.77,7317.91,9288.68,330528.46],[105.0,"Term Loan (P&I)",330528.46,0,1928.08,7360.6,9288.68,323167.86],[106.0,"Term Loan (P&I)",323167.86,0,1885.15,7403.53,9288.68,315764.33],[107.0,"Term Loan (P&I)",315764.33,0,1841.96,7446.72,9288.68,308317.61],[108.0,"Term Loan (P&I)",308317.61,0,1798.52,7490.16,9288.68,300827.45],[109.0,"Term Loan (P&I)",300827.45,0,1754.83,7533.85,9288.68,293293.6],[110.0,"Term Loan (P&I)",293293.6,0,1710.88,7577.8,9288.68,285715.8],[111.0,"Term Loan (P&I)",285715.8,0,1666.68,7622.0,9288.68,278093.8],[112.0,"Term Loan (P&I)",278093.8,0,1622.21,7666.46,9288.68,270427.33],[113.0,"Term Loan (P&I)",270427.33,0,1577.49,7711.19,9288.68,262716.15],[114.0,"Term Loan (P&I)",262716.15,0,1532.51,7756.17,9288.68,254959.98],[115.0,"Term Loan (P&I)",254959.98,0,1487.27,7801.41,9288.68,247158.57],[116.0,"Term Loan (P&I)",247158.57,0,1441.76,7846.92,9288.68,239311.65],[117.0,"Term Loan (P&I)",239311.65,0,1395.98,7892.69,9288.68,231418.95],[118.0,"Term Loan (P&I)",231418.95,0,1349.94,7938.73,9288.68,223480.22],[119.0,"Term Loan (P&I)",223480.22,0,1303.63,7985.04,9288.68,215495.18],[120.0,"Term Loan (P&I)",215495.18,0,1257.06,8031.62,9288.68,207463.55],[121.0,"Term Loan (P&I)",207463.55,0,1210.2,8078.47,9288.68,199385.08],[122.0,"Term Loan (P&I)",199385.08,0,1163.08,8125.6,9288.68,191259.48],[123.0,"Term Loan (P&I)",191259.48,0,1115.68,8173.0,9288.68,183086.48],[124.0,"Term Loan (P&I)",183086.48,0,1068.0,8220.67,9288.68,174865.81],[125.0,"Term Loan (P&I)",174865.81,0,1020.05,8268.63,9288.68,166597.18],[126.0,"Term Loan (P&I)",166597.18,0,971.82,8316.86,9288.68,158280.32],[127.0,"Term Loan (P&I)",158280.32,0,923.3,8365.38,9288.68,149914.94],[128.0,"Term Loan (P&I)",149914.94,0,874.5,8414.17,9288.68,141500.77],[129.0,"Term Loan (P&I)",141500.77,0,825.42,8463.26,9288.68,133037.51],[130.0,"Term Loan (P&I)",133037.51,0,776.05,8512.63,9288.68,124524.88],[131.0,"Term Loan (P&I)",124524.88,0,726.4,8562.28,9288.68,115962.6],[132.0,"Term Loan (P&I)",115962.6,0,676.45,8612.23,9288.68,107350.37],[133.0,"Term Loan (P&I)",107350.37,0,626.21,8662.47,9288.68,98687.9],[134.0,"Term Loan (P&I)",98687.9,0,575.68,8713.0,9288.68,89974.9],[135.0,"Term Loan (P&I)",89974.9,0,524.85,8763.82,9288.68,81211.08],[136.0,"Term Loan (P&I)",81211.08,0,473.73,8814.95,9288.68,72396.13],[137.0,"Term Loan (P&I)",72396.13,0,422.31,8866.37,9288.68,63529.77],[138.0,"Term Loan (P&I)",63529.77,0,370.59,8918.09,9288.68,54611.68],[139.0,"Term Loan (P&I)",54611.68,0,318.57,8970.11,9288.68,45641.57],[140.0,"Term Loan (P&I)",45641.57,0,266.24,9022.44,9288.68,36619.13],[141.0,"Term Loan (P&I)",36619.13,0,213.61,9075.07,9288.68,27544.06],[142.0,"Term Loan (P&I)",27544.06,0,160.67,9128.0,9288.68,18416.06],[143.0,"Term Loan (P&I)",18416.06,0,107.43,9181.25,9288.68,9234.81],[144.0,"Term Loan (P&I)",9234.81,0,53.87,9234.81,9288.68,0.0]],"units":[["A101",0.0069,1104,5520,5.0,25.49166667,32.2,64.09188053,8383.325663,2863.325663],["A102",0.0094,1504,7520,5.0,34.72777778,43.86666667,87.31357637,11420.7625,3900.762498],["A103",0.0069,1104,5520,5.0,25.49166667,32.2,64.09188053,8383.325663,2863.325663],["A104",0.0049,784,3920,5.0,18.10277778,22.86666667,45.51452385,5953.376196,2033.376196],["A105",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A106",0.0153,2448,12240,5.0,56.525,71.4,142.1167786,18589.11343,6349.113428],["A107",0.007,1120,5600,5.0,25.86111111,32.66666667,65.02074836,8504.823137,2904.823137],["A201",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A202",0.0099,1584,7920,5.0,36.575,46.2,91.95791554,12028.24986,4108.249865],["A203",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A204",0.0039,624,3120,5.0,14.40833333,18.2,36.22584552,4738.401462,1618.401462],["A205",0.006,960,4800,5.0,22.16666667,28,55.73207002,7289.848403,2489.848403],["A206",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A207",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A208",0.0095,1520,7600,5.0,35.09722222,44.33333333,88.24244421,11542.25997,3942.259971],["A209",0.0078,1248,6240,5.0,28.81666667,36.4,72.45169103,9476.802924,3236.802924],["A210",0.0049,784,3920,5.0,18.10277778,22.86666667,45.51452385,5953.376196,2033.376196],["A211",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A301",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A302",0.0099,1584,7920,5.0,36.575,46.2,91.95791554,12028.24986,4108.249865],["A303",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A304",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A305",0.006,960,4800,5.0,22.16666667,28,55.73207002,7289.848403,2489.848403],["A306",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A307",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A308",0.0095,1520,7600,5.0,35.09722222,44.33333333,88.24244421,11542.25997,3942.259971],["A309",0.0078,1248,6240,5.0,28.81666667,36.4,72.45169103,9476.802924,3236.802924],["A310",0.0049,784,3920,5.0,18.10277778,22.86666667,45.51452385,5953.376196,2033.376196],["A311",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A401",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A402",0.0099,1584,7920,5.0,36.575,46.2,91.95791554,12028.24986,4108.249865],["A403",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A404",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A405",0.006,960,4800,5.0,22.16666667,28,55.73207002,7289.848403,2489.848403],["A406",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A407",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A408",0.0095,1520,7600,5.0,35.09722222,44.33333333,88.24244421,11542.25997,3942.259971],["A409",0.0078,1248,6240,5.0,28.81666667,36.4,72.45169103,9476.802924,3236.802924],["A410",0.0049,784,3920,5.0,18.10277778,22.86666667,45.51452385,5953.376196,2033.376196],["A411",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A501",0.0067,1072,5360,5.0,24.75277778,31.26666667,62.23414486,8140.330717,2780.330717],["A502",0.0099,1584,7920,5.0,36.575,46.2,91.95791554,12028.24986,4108.249865],["A503",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A504",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A505",0.006,960,4800,5.0,22.16666667,28,55.73207002,7289.848403,2489.848403],["A506",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A507",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A508",0.0095,1520,7600,5.0,35.09722222,44.33333333,88.24244421,11542.25997,3942.259971],["A509",0.0078,1248,6240,5.0,28.81666667,36.4,72.45169103,9476.802924,3236.802924],["A510",0.0049,784,3920,5.0,18.10277778,22.86666667,45.51452385,5953.376196,2033.376196],["A511",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A601",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A602",0.0099,1584,7920,5.0,36.575,46.2,91.95791554,12028.24986,4108.249865],["A603",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A604",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A605",0.006,960,4800,5.0,22.16666667,28,55.73207002,7289.848403,2489.848403],["A606",0.0058,928,4640,5.0,21.42777778,27.06666667,53.87433436,7046.853456,2406.853456],["A607",0.0045,720,3600,5.0,16.625,21,41.79905252,5467.386302,1867.386302],["A608",0.0095,1520,7600,5.0,35.09722222,44.33333333,88.24244421,11542.25997,3942.259971],["A609",0.0078,1248,6240,5.0,28.81666667,36.4,72.45169103,9476.802924,3236.802924],["A610",0.0049,784,3920,5.0,18.10277778,22.86666667,45.51452385,5953.376196,2033.376196],["A611",0.0074,1184,5920,5.0,27.33888889,34.53333333,68.7362197,8990.81303,3070.81303],["A701",0.0101,1616,8080,5.0,37.31388889,47.13333333,93.81565121,12271.24481,4191.244812],["A702",0.0146,2336,11680,5.0,53.93888889,68.13333333,135.6147037,17738.63111,6058.631114],["A703",0.0096,1536,7680,5.0,35.46666667,44.8,89.17131204,11663.75744,3983.757445],["A704",0.0102,1632,8160,5.0,37.68333333,47.6,94.74451904,12392.74229,4232.742285],["A705",0.0168,2688,13440,5.0,62.06666667,78.4,156.0497961,20411.57553,6971.575528],["A706",0.0088,1408,7040,5.0,32.51111111,41.06666667,81.74036937,10691.77766,3651.777658],["A801",0.0082,1312,6560,5.0,30.29444444,38.26666667,76.16716237,9962.792817,3402.792817],["A802",0.0187,2992,14960,5.0,69.08611111,87.26666667,173.6982849,22720.02752,7760.027523],["A803",0.0143,2288,11440,5.0,52.83055556,66.73333333,132.8281002,17374.13869,5934.138694],["A804",0.0148,2368,11840,5.0,54.67777778,69.06666667,137.4724394,17981.62606,6141.626061],["A805",0.0203,3248,16240,5.0,74.99722222,94.73333333,188.5601703,24663.9871,8423.987097],["A806",0.0091,1456,7280,5.0,33.61944444,42.46666667,84.52697287,11056.27008,3776.270078],["B101",0.0083,1328,6640,5.0,30.66388889,38.73333333,77.0960302,10084.29029,3444.290291],["B102",0.0128,2048,10240,5.0,47.28888889,59.73333333,118.8950827,15551.67659,5311.676593],["B103",0.0097,1552,7760,5.0,35.83611111,45.26666667,90.10017987,11785.25492,4025.254918],["B104",0.0078,1248,6240,5.0,28.81666667,36.4,72.45169103,9476.802924,3236.802924],["B201",0.0064,1024,5120,5.0,23.64444444,29.86666667,59.44754136,7775.838297,2655.838297],["B202",0.0093,1488,7440,5.0,34.35833333,43.4,86.38470854,11299.26502,3859.265025],["B203",0.0101,1616,8080,5.0,37.31388889,47.13333333,93.81565121,12271.24481,4191.244812],["B204",0.0093,1488,7440,5.0,34.35833333,43.4,86.38470854,11299.26502,3859.265025],["B301",0.0064,1024,5120,5.0,23.64444444,29.86666667,59.44754136,7775.838297,2655.838297],["B302",0.0094,1504,7520,5.0,34.72777778,43.86666667,87.31357637,11420.7625,3900.762498],["B303",0.0101,1616,8080,5.0,37.31388889,47.13333333,93.81565121,12271.24481,4191.244812],["B304",0.0092,1472,7360,5.0,33.98888889,42.93333333,85.4558407,11177.76755,3817.767551],["B401",0.0064,1024,5120,5.0,23.64444444,29.86666667,59.44754136,7775.838297,2655.838297],["B402",0.0093,1488,7440,5.0,34.35833333,43.4,86.38470854,11299.26502,3859.265025],["B403",0.0101,1616,8080,5.0,37.31388889,47.13333333,93.81565121,12271.24481,4191.244812],["B404",0.0092,1472,7360,5.0,33.98888889,42.93333333,85.4558407,11177.76755,3817.767551],["B501",0.0064,1024,5120,5.0,23.64444444,29.86666667,59.44754136,7775.838297,2655.838297],["B502",0.0093,1488,7440,5.0,34.35833333,43.4,86.38470854,11299.26502,3859.265025],["B503",0.0101,1616,8080,5.0,37.31388889,47.13333333,93.81565121,12271.24481,4191.244812],["B504",0.0092,1472,7360,5.0,33.98888889,42.93333333,85.4558407,11177.76755,3817.767551],["B601",0.0064,1024,5120,5.0,23.64444444,29.86666667,59.44754136,7775.838297,2655.838297],["B602",0.0093,1488,7440,5.0,34.35833333,43.4,86.38470854,11299.26502,3859.265025],["B603",0.0101,1616,8080,5.0,37.31388889,47.13333333,93.81565121,12271.24481,4191.244812],["B604",0.0092,1472,7360,5.0,33.98888889,42.93333333,85.4558407,11177.76755,3817.767551],["B701",0.0052,832,4160,5.0,19.21111111,24.26666667,48.30112735,6317.868616,2157.868616],["B702",0.0131,2096,10480,5.0,48.39722222,61.13333333,121.6816862,15916.16901,5436.169013],["B703",0.0135,2160,10800,5.0,49.875,63,125.3971576,16402.15891,5602.158907],["B801",0.0052,832,4160,5.0,19.21111111,24.26666667,48.30112735,6317.868616,2157.868616],["B802",0.0142,2272,11360,5.0,52.46111111,66.26666667,131.8992324,17252.64122,5892.64122],["B803",0.0127,2032,10160,5.0,46.91944444,59.26666667,117.9662149,15430.17912,5270.17912],["CF",0.03,4800,24000,5.0,110.8333333,140,278.6603501,36449.24201,12449.24201],["P01",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P02",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P03",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P04",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P05",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P06",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P07",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P08",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P09",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P10",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P11",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P12",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P13",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P14",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P15",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P16",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P17",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P18",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P19",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P20",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["P21",0.002,320,1600,5.0,7.388888889,9.333333333,18.57735667,2429.949468,829.9494677],["TH01",0.0195,3120,15600,5.0,72.04166667,91,181.1292276,23692.00731,8092.00731],["TH02",0.0168,2688,13440,5.0,62.06666667,78.4,156.0497961,20411.57553,6971.575528],["TH03",0.0141,2256,11280,5.0,52.09166667,65.8,130.9703646,17131.14375,5851.143747],["TH04",0.0204,3264,16320,5.0,75.36666667,95.2,189.4890381,24785.48457,8465.48457],["Total / Building",1,160000,800000,null,3694.444444,4666.666667,9288.678337,1214974.734,414974.7338]]};
const UNITS = DATA.units.filter(r => r[0] !== 'Total / Building');
const TOTAL = DATA.units.find(r => r[0] === 'Total / Building');
const SCHED = DATA.sched;
/* ---------- helpers ---------- */
const money = (v,d=0)=> v==null?'—':'$'+Number(v).toLocaleString('en-US',{minimumFractionDigits:d,maximumFractionDigits:d});
const pct = v => (v*100).toFixed(2)+'%';
const NS='http://www.w3.org/2000/svg';
function el(t,a={},p){const n=document.createElementNS(NS,t);for(const k in a)n.setAttribute(k,a[k]);if(p)p.appendChild(n);return n;}
function svg(mount,w,h){const host=document.getElementById(mount);host.innerHTML='';const s=el('svg',{viewBox:`0 0 ${w} ${h}`,preserveAspectRatio:'xMidYMid meet',role:'img'});host.appendChild(s);return s;}
function txt(p,x,y,s,o={}){const t=el('text',Object.assign({x,y,'font-size':o.size||11,fill:o.fill||'#5b6b7c','text-anchor':o.anchor||'start','font-weight':o.weight||400,'font-family':'Segoe UI, system-ui, sans-serif'},o.extra||{}),p);t.textContent=s;return t;}
/* ---------- 1. Total cost stacked bar ---------- */
(function(){
const W=620,H=250,L=90,R=30,T=20,B=48, pw=W-L-R, ph=H-T-B;
const s=svg('chartTotals',W,H);
const max=1300000, x=v=>L+v/max*pw;
[0,250000,500000,750000,1000000,1250000].forEach(g=>{
el('line',{x1:x(g),x2:x(g),y1:T,y2:T+ph,stroke:'#eef2f7'},s);
txt(s,x(g),T+ph+18,'$'+(g/1000)+'k',{anchor:'middle',size:10.5});
});
const rows=[['Option A',800000,0],['Option B',800000,414974.73]];
rows.forEach((r,i)=>{
const y=T+22+i*88, bh=46;
txt(s,L-12,y+bh/2+5,r[0],{anchor:'end',size:13,weight:600,fill:'#16202b'});
el('rect',{x:L,y,width:x(r[1])-L,height:bh,fill:'#0f766e',rx:3},s);
txt(s,L+(x(r[1])-L)/2,y+bh/2+5,money(r[1]),{anchor:'middle',size:12.5,weight:600,fill:'#fff'});
if(r[2]>0){
el('rect',{x:x(r[1]),y,width:x(r[1]+r[2])-x(r[1]),height:bh,fill:'#b45309',rx:3},s);
txt(s,x(r[1])+(x(r[1]+r[2])-x(r[1]))/2,y+bh/2+5,'+'+money(r[2]),{anchor:'middle',size:12,weight:600,fill:'#fff'});
}
txt(s,x(r[1]+r[2])+10,y+bh/2+5,money(r[1]+r[2]),{size:12.5,weight:700,fill:'#16202b'});
});
})();
/* ---------- 2. Annual collected grouped bars ---------- */
(function(){
const yrsB=[]; for(let i=0;i<12;i++){let t=0;for(let m=i*12;m<(i+1)*12;m++)t+=SCHED[m][6];yrsB.push(t);}
const yrsA=[800000,0,0,0,0,0,0,0,0,0,0,0]; // fully collected inside the first 12 months
const W=620,H=280,L=62,R=16,T=16,B=52,pw=W-L-R,ph=H-T-B;
const s=svg('chartAnnual',W,H);
const max=900000, y=v=>T+ph-v/max*ph;
[0,225000,450000,675000,900000].forEach(g=>{
el('line',{x1:L,x2:L+pw,y1:y(g),y2:y(g),stroke:'#eef2f7'},s);
txt(s,L-8,y(g)+4,'$'+(g/1000)+'k',{anchor:'end',size:10.5});
});
const step=pw/12, bw=step*0.34;
for(let i=0;i<12;i++){
const cx=L+step*i+step/2;
if(yrsA[i]>0){el('rect',{x:cx-bw-1,y:y(yrsA[i]),width:bw,height:ph-(y(yrsA[i])-T),fill:'#0f766e',rx:2},s);}
el('rect',{x:cx+1,y:y(yrsB[i]),width:bw,height:ph-(y(yrsB[i])-T),fill:'#b45309',rx:2},s);
txt(s,cx,T+ph+16,'Y'+(i+1),{anchor:'middle',size:10.5});
}
txt(s,L+step*0.5-bw/2-1,y(800000)-7,'$800k',{anchor:'middle',size:10,weight:700,fill:'#0f766e'});
txt(s,L+step*2.2,y(300000),'Option B levels at ~$111k per year from Year 3',{size:10.5,weight:600,fill:'#b45309'});
el('line',{x1:L+step*2.35,x2:L+step*2.6,y1:y(270000),y2:y(130000),stroke:'#b45309','stroke-width':1},s);
el('line',{x1:L,x2:L+pw,y1:T+ph,y2:T+ph,stroke:'#cbd5e1'},s);
txt(s,L+pw/2,H-10,'Year of program',{anchor:'middle',size:11});
})();
/* ---------- 3. Cumulative lines ---------- */
(function(){
const W=620,H=280,L=66,R=22,T=16,B=52,pw=W-L-R,ph=H-T-B;
const s=svg('chartCumul',W,H);
const n=144, max=1300000;
const x=m=>L+(m-1)/(n-1)*pw, y=v=>T+ph-v/max*ph;
[0,325000,650000,975000,1300000].forEach(g=>{
el('line',{x1:L,x2:L+pw,y1:y(g),y2:y(g),stroke:'#eef2f7'},s);
txt(s,L-8,y(g)+4,'$'+(g/1000)+'k',{anchor:'end',size:10.5});
});
let cb=0, pB=[], pA=[], ca=0;
for(let m=1;m<=n;m++){
cb+=SCHED[m-1][6]; pB.push(`${x(m)},${y(cb)}`);
if(m<=5) ca+=160000; pA.push(`${x(m)},${y(ca)}`);
}
el('polyline',{points:pA.join(' '),fill:'none',stroke:'#0f766e','stroke-width':2.6},s);
el('polyline',{points:pB.join(' '),fill:'none',stroke:'#b45309','stroke-width':2.6},s);
// crossover month 91
let cc=0,cross=0; for(let m=1;m<=n;m++){cc+=SCHED[m-1][6]; if(cc>=800000){cross=m;break;}}
el('line',{x1:x(cross),x2:x(cross),y1:y(800000),y2:T+ph,stroke:'#94a3b8','stroke-dasharray':'3 3'},s);
el('circle',{cx:x(cross),cy:y(800000),r:4,fill:'#fff',stroke:'#334155','stroke-width':2},s);
txt(s,x(cross)-8,y(800000)-34,'Option B passes $800k',{anchor:'end',size:10.5,weight:600,fill:'#334155'});
txt(s,x(cross)-8,y(800000)-21,'at month '+cross,{anchor:'end',size:10.5,weight:600,fill:'#334155'});
txt(s,x(144)-2,y(1214975)-9,'$1.21M',{anchor:'end',size:11,weight:700,fill:'#b45309'});
txt(s,x(8),y(800000)-9,'$800k — Option A complete (month 5)',{size:10.5,weight:600,fill:'#0f766e'});
[1,24,48,72,96,120,144].forEach(m=>txt(s,x(m),T+ph+16,'M'+m,{anchor:'middle',size:10.5}));
el('line',{x1:L,x2:L+pw,y1:T+ph,y2:T+ph,stroke:'#cbd5e1'},s);
txt(s,L+pw/2,H-10,'Month',{anchor:'middle',size:11});
})();
/* ---------- 4. Balance area ---------- */
(function(){
const W=620,H=270,L=66,R=22,T=16,B=52,pw=W-L-R,ph=H-T-B;
const s=svg('chartBalance',W,H);
const n=144,max=900000;
const x=m=>L+(m-1)/(n-1)*pw, y=v=>T+ph-v/max*ph;
el('rect',{x:L,y:T,width:x(24)-L,height:ph,fill:'#f1f5f9'},s);
txt(s,L+6,T+16,'Draw & interest-only',{size:10.5,fill:'#64748b',weight:600});
[0,200000,400000,600000,800000].forEach(g=>{
el('line',{x1:L,x2:L+pw,y1:y(g),y2:y(g),stroke:'#eef2f7'},s);
txt(s,L-8,y(g)+4,'$'+(g/1000)+'k',{anchor:'end',size:10.5});
});
const pts=SCHED.map(r=>`${x(r[0])},${y(r[7])}`);
el('polygon',{points:`${L},${y(0)} ${pts.join(' ')} ${x(144)},${y(0)}`,fill:'rgba(21,58,99,.12)'},s);
el('polyline',{points:pts.join(' '),fill:'none',stroke:'#153a63','stroke-width':2.6},s);
el('line',{x1:x(25),x2:x(25),y1:T,y2:T+ph,stroke:'#b45309','stroke-dasharray':'4 3','stroke-width':1.5},s);
txt(s,x(78),T+ph-46,'Month 25 — balance converts to a',{size:10.5,fill:'#b45309',weight:600});
txt(s,x(78),T+ph-33,'10-year amortizing term loan',{size:10.5,fill:'#b45309',weight:600});
el('line',{x1:x(76),x2:x(27),y1:T+ph-50,y2:T+ph-62,stroke:'#b45309','stroke-width':1},s);
[1,24,48,72,96,120,144].forEach(m=>txt(s,x(m),T+ph+16,'M'+m,{anchor:'middle',size:10.5}));
el('line',{x1:L,x2:L+pw,y1:T+ph,y2:T+ph,stroke:'#cbd5e1'},s);
txt(s,L+pw/2,H-10,'Month',{anchor:'middle',size:11});
})();
/* ---------- 5. Interest vs principal stacked ---------- */
(function(){
const W=620,H=270,L=58,R=22,T=16,B=52,pw=W-L-R,ph=H-T-B;
const s=svg('chartSplit',W,H);
const n=144,max=10000;
const x=m=>L+(m-1)/n*pw, bw=pw/n;
const y=v=>T+ph-v/max*ph;
[0,2500,5000,7500,10000].forEach(g=>{
el('line',{x1:L,x2:L+pw,y1:y(g),y2:y(g),stroke:'#eef2f7'},s);
txt(s,L-8,y(g)+4,'$'+(g/1000).toFixed(1)+'k',{anchor:'end',size:10.5});
});
SCHED.forEach(r=>{
const i=r[4], p=r[5];
el('rect',{x:x(r[0]),y:y(i),width:Math.max(bw-0.3,0.8),height:ph-(y(i)-T),fill:'#b45309'},s);
if(p>0) el('rect',{x:x(r[0]),y:y(i+p),width:Math.max(bw-0.3,0.8),height:(y(i)-y(i+p)),fill:'#0f766e'},s);
});
[1,24,48,72,96,120,144].forEach(m=>txt(s,x(m),T+ph+16,'M'+m,{anchor:'middle',size:10.5}));
el('line',{x1:L,x2:L+pw,y1:T+ph,y2:T+ph,stroke:'#cbd5e1'},s);
txt(s,L+pw/2,H-10,'Month',{anchor:'middle',size:11});
})();
/* ---------- Unit table ---------- */
const COLS=[
{k:0,t:'Unit',f:v=>v,n:false},
{k:1,t:'% Own.',f:pct},
{k:2,t:'Monthly',f:v=>money(v),cls:'grp-a'},
{k:3,t:'Total (5 mo)',f:v=>money(v),cls:'grp-a'},
{k:5,t:'Yr 1 /mo',f:v=>money(v,2),cls:'grp-b'},
{k:6,t:'Yr 2 /mo',f:v=>money(v,2),cls:'grp-b'},
{k:7,t:'Yrs 3–12 /mo',f:v=>money(v,2),cls:'grp-b'},
{k:8,t:'Total (12 yr)',f:v=>money(v),cls:'grp-b'},
{k:9,t:'B − A',f:v=>money(v),cls:'pos'}
];
let sortK=0, sortDir=1, view=UNITS.slice(), selected=null;
document.getElementById('hdr').innerHTML = COLS.map((c,i)=>
`<th data-i="${i}">${c.t}<span class="ar">${i===0?'▲':'⇅'}</span></th>`).join('');
document.getElementById('foot').innerHTML='<tr>'+COLS.map(c=>{
const v=TOTAL[c.k];
return `<td>${c.k===0?'Building Total':(c.k===1?'100.00%':c.f(v))}</td>`;
}).join('')+'</tr>';
function render(){
const q=document.getElementById('q').value.trim().toUpperCase();
const g=document.getElementById('grp').value;
view=UNITS.filter(r=>{
const u=String(r[0]).toUpperCase();
if(q && !u.includes(q)) return false;
if(!g) return true;
if(g==='CF') return u==='CF';
if(g==='TH') return u.startsWith('TH');
if(g==='P') return /^P\d/.test(u);
return u.startsWith(g) && !u.startsWith('TH');
});
const c=COLS[sortK];
view.sort((a,b)=>{
const x=a[c.k], y=b[c.k];
return (typeof x==='string' ? String(x).localeCompare(String(y)) : x-y) * sortDir;
});
document.getElementById('body').innerHTML = view.map(r=>
`<tr data-u="${r[0]}" class="${selected===r[0]?'sel':''}">`+
COLS.map(c=>`<td class="${c.cls||''}">${c.f(r[c.k])}</td>`).join('')+'</tr>').join('');
document.getElementById('count').textContent = view.length+' of '+UNITS.length+' units';
document.querySelectorAll('#hdr th .ar').forEach((a,i)=>a.textContent = i===sortK ? (sortDir>0?'▲':'▼') : '⇅');
}
document.getElementById('hdr').addEventListener('click',e=>{
const th=e.target.closest('th'); if(!th)return;
const i=+th.dataset.i;
if(i===sortK) sortDir*=-1; else {sortK=i; sortDir = i===0?1:-1;}
render();
});
document.getElementById('q').addEventListener('input',render);
document.getElementById('grp').addEventListener('change',render);
document.getElementById('body').addEventListener('click',e=>{
const tr=e.target.closest('tr'); if(!tr)return;
selectUnit(tr.dataset.u);
});
/* ---------- Unit detail ---------- */
function selectUnit(u){
const r=UNITS.find(x=>String(x[0])===String(u)); if(!r)return;
selected=r[0]; render();
document.getElementById('dPill').textContent='Unit '+r[0]+' · '+pct(r[1])+' ownership';
document.getElementById('dTitle').textContent='Option A costs '+money(r[3])+'. Option B costs '+money(r[8])+'.';
document.getElementById('dSub').textContent='Choosing Option B costs this unit an additional '+money(r[9])+' over twelve years — a '+Math.round(r[9]/r[3]*100)+'% premium — in exchange for a much lower monthly payment.';
document.getElementById('dMini').innerHTML=`
<div><div class="l">A · Monthly (5 mo)</div><div class="v" style="color:var(--a)">${money(r[2])}</div></div>
<div><div class="l">A · Total</div><div class="v" style="color:var(--a)">${money(r[3])}</div></div>
<div><div class="l">B · Year 1 monthly</div><div class="v" style="color:var(--b)">${money(r[5],2)}</div></div>
<div><div class="l">B · Year 2 monthly</div><div class="v" style="color:var(--b)">${money(r[6],2)}</div></div>
<div><div class="l">B · Years 3–12 monthly</div><div class="v" style="color:var(--b)">${money(r[7],2)}</div></div>
<div><div class="l">B · Total (12 yrs)</div><div class="v" style="color:var(--b)">${money(r[8])}</div></div>`;
drawUnitChart(r);
}
function drawUnitChart(r){
const W=560,H=250,L=58,R=24,T=18,B=54,pw=W-L-R,ph=H-T-B;
const s=svg('chartUnit',W,H);
const bars=[['Opt A\nMonths 1–5',r[2],'#0f766e'],['Opt B\nYear 1',r[5],'#b45309'],['Opt B\nYear 2',r[6],'#b45309'],['Opt B\nYears 3–12',r[7],'#b45309']];
const max=Math.max(...bars.map(b=>b[1]))*1.22;
const y=v=>T+ph-v/max*ph;
for(let i=0;i<=4;i++){const g=max/4*i;
el('line',{x1:L,x2:L+pw,y1:y(g),y2:y(g),stroke:'#eef2f7'},s);
txt(s,L-8,y(g)+4,'$'+Math.round(g).toLocaleString(),{anchor:'end',size:10.5});}
const step=pw/bars.length, bw=Math.min(step*0.5,70);
bars.forEach((b,i)=>{
const cx=L+step*i+step/2;
el('rect',{x:cx-bw/2,y:y(b[1]),width:bw,height:ph-(y(b[1])-T),fill:b[2],rx:3},s);
txt(s,cx,y(b[1])-7,money(b[1],2),{anchor:'middle',size:11,weight:700,fill:'#16202b'});
b[0].split('\n').forEach((line,j)=>txt(s,cx,T+ph+17+j*13,line,{anchor:'middle',size:10.5}));
});
el('line',{x1:L,x2:L+pw,y1:T+ph,y2:T+ph,stroke:'#cbd5e1'},s);
}
/* ---------- Schedule table ---------- */
document.getElementById('schedBody').innerHTML = SCHED.map(r=>
`<tr><td style="text-align:left">${r[0]}</td><td style="text-align:left;font-weight:400">${r[1]}</td>`+
`<td>${money(r[2],2)}</td><td>${r[3]?money(r[3],2):'—'}</td><td>${money(r[4],2)}</td>`+
`<td>${r[5]?money(r[5],2):'—'}</td><td><strong>${money(r[6],2)}</strong></td><td>${money(r[7],2)}</td></tr>`).join('');
document.getElementById('schedCount').textContent = SCHED.length+' months';
/* ---------- CSV ---------- */
function dl(name,rows){
const csv=rows.map(r=>r.map(v=>{const s=String(v??'');return /[",\n]/.test(s)?'"'+s.replace(/"/g,'""')+'"':s;}).join(',')).join('\n');
const a=document.createElement('a');
a.href=URL.createObjectURL(new Blob([csv],{type:'text/csv'}));
a.download=name; a.click(); URL.revokeObjectURL(a.href);
}
document.getElementById('csv').onclick=()=>dl('567_ocean_unit_comparison.csv',
[['Unit','% Ownership','A Monthly','A Total (5 mo)','B Yr1 /mo','B Yr2 /mo','B Yr3-12 /mo','B Total (12 yr)','Difference B-A'],
...view.map(r=>[r[0],r[1],r[2],r[3],r[5],r[6],r[7],r[8],r[9]])]);
document.getElementById('csvSched').onclick=()=>dl('567_ocean_loan_schedule.csv',
[['Month','Phase','Beginning Balance','Draw','Interest','Principal','Total Building Payment','Ending Balance'],...SCHED]);
/* ---------- init ---------- */
render();
selectUnit('A305');
</script>
</body>
</html>