/* ONE LOOK FOR EVERY CALCULATOR (mockup, Nov 10 2026). The Retirement Plan page is the model (the order page):
   - the answer and its chart stay put on the left, on white
   - one 448px column scrolls on the right: the tool's name, three numbers, then short sections of inputs
   - a bar along the bottom keeps the answer and the main button in reach
   - tables and notes sit under the fold in centred bands
   This file lays that over the Backtester, the Forecaster and the Roth Calculator without touching their engines.
   The small moves in the page (which block sits where, the bottom bar) are in calc-std.js. */
body.calc-std{--colw:448px;--barh:76px}
body.calc-std .nav{position:sticky;top:0}
body.calc-std .foot{padding-bottom:calc(var(--barh) + 24px)}
body.calc-std .callbar{display:none!important}

/* ---------- shared pieces ---------- */
.cs-eb{margin:0 0 10px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--gray)}
.cs-title{margin:6px 0 6px;font-family:var(--disp);font-weight:600;font-size:40px;line-height:1.05;letter-spacing:-.015em;text-align:center}
.cs-sub{margin:0;font-size:14px;line-height:20px;color:var(--gray);text-align:center}
.cs-bar{position:fixed;z-index:50;left:0;right:0;bottom:0;height:var(--barh);background:#fff;box-shadow:0 -1px 0 var(--rule),0 -8px 24px rgba(0,0,0,.04);display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 var(--side)}
.cs-bar-l{min-width:0}
.cs-bar-t{font-family:var(--disp);font-size:20px;font-weight:500;white-space:nowrap}
.cs-bar-s{margin-top:2px;font-size:12.5px;color:var(--gray);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-bar-r{display:flex;align-items:center;gap:28px;flex:none}
.cs-bar-k{text-align:right}
.cs-bar-v{font-family:var(--disp);font-size:24px;font-weight:600;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.cs-bar-vl{margin-top:4px;font-size:12px;color:var(--gray);white-space:nowrap}
.cs-bar-b{display:flex;gap:8px}
.cs-bar .btn{min-width:0;width:auto;padding:0 28px;height:40px}
.cs-bar .btn.cs-main{min-width:200px;background:var(--blue);color:#fff}
.cs-bar .btn.cs-main:hover{background:var(--blue-h)}
.cs-bar .btn.cs-2nd{background:var(--card);color:var(--ink2)}
.cs-bar .btn.cs-2nd:hover{background:var(--hover)}

/* =====================================================================
   BACKTESTER
   ===================================================================== */
body.calc-std #bt .stage{display:flex;align-items:flex-start;height:auto;min-height:0;max-height:none;background:#fff;overflow:visible}
body.calc-std #bt .canvas{position:sticky;top:56px;inset:auto;top:56px;height:calc(100vh - 56px);flex:1 1 auto;min-width:0;padding:20px 40px calc(var(--barh) + 16px) var(--side)}
body.calc-std #bt .cv-head{display:block}
body.calc-std #bt .cv-title h2{font-family:var(--disp);font-weight:600;font-size:clamp(24px,2.3vw,34px);line-height:1.12;letter-spacing:-.01em;max-width:760px}
body.calc-std #bt .cv-title h2 b:last-of-type{color:var(--gold-dark)}
body.calc-std #bt .cv-title p{margin-top:8px;font-size:13px;line-height:19px}
body.calc-std #bt .plot{margin-top:12px;min-height:200px}
body.calc-std #bt .lgd button{background:var(--card);box-shadow:none}
body.calc-std #bt .brush{background:var(--card);box-shadow:none}
body.calc-std #bt .ctl{right:40px;bottom:calc(var(--barh) + 150px)}
body.calc-std #bt .ctl button{background:var(--card);box-shadow:none}
body.calc-std #bt .ctl button[aria-pressed="true"]{background:var(--ink)}
/* the dates sit under the chart, centred, like the Retirement Plan's views */
body.calc-std #bt .per{order:9;align-self:center;margin-top:12px;padding:4px;gap:2px;border-radius:4px;background:var(--card);flex-wrap:nowrap}
body.calc-std #bt .per button{height:32px;min-width:42px;padding:0 12px;background:transparent;font-size:13px}
body.calc-std #bt .per button:hover{background:var(--hover)}
body.calc-std #bt .per button[aria-pressed="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
/* the column */
body.calc-std #bt .panel{position:static;flex:0 0 var(--colw);width:var(--colw);box-shadow:none;border-radius:0;overflow:visible;padding:28px 40px calc(var(--barh) + 64px)}
body.calc-std #bt .panel h1{margin:6px 0 6px;font-family:var(--disp);font-weight:600;font-size:40px;line-height:1.05;letter-spacing:-.015em;text-align:center}
body.calc-std #bt .asof{margin:0;font-size:14px;text-align:center}
body.calc-std #bt #btOpen .col-open{text-align:center}
body.calc-std #bt .example{margin-top:22px}
body.calc-std #bt .kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:26px 0 0}
body.calc-std #bt .kpi{background:none;box-shadow:none;border-radius:0;padding:0 0 0 14px;border-left:1px solid var(--line);min-width:0}
body.calc-std #bt .kpi:first-child{border-left:0;padding-left:0}
body.calc-std #bt .kpi:nth-child(2){display:none}
body.calc-std #bt .kpi:nth-child(3){border-left:1px solid var(--line)}
body.calc-std #bt .kpi b{font-size:var(--kfs,25px);line-height:1.05}
body.calc-std #bt .kpi span{margin-top:5px;font-size:12px;color:var(--ink);white-space:normal}
body.calc-std #bt .kpi small{font-size:11.5px;color:var(--gray);white-space:normal}
body.calc-std #bt .car{margin-top:22px;background:var(--card);border-radius:4px;padding:12px 14px}
body.calc-std #bt .car-h h2{font-size:16px;line-height:22px}
body.calc-std #bt .seg-row{display:block;margin-top:0}
body.calc-std #bt .seg-row>span,body.calc-std #bt .blk h3{display:block;margin:48px 0 14px;font-family:var(--disp);font-weight:500;font-size:22px;line-height:28px;letter-spacing:-.005em;text-align:center}
body.calc-std #bt .blk h3 .tot{display:block;margin-top:2px}
body.calc-std #bt .hint#modeHint{text-align:center}
body.calc-std #bt .blk{margin-top:0;padding-top:0;border-top:0;scroll-margin-top:72px}
body.calc-std #bt .panel .in{height:44px;font-size:15px}
body.calc-std #bt .acts{display:none}
body.calc-std #bt .fine{margin-top:40px}
body.calc-std #bt .grab{display:none}
/* under the fold: centred bands */
body.calc-std #bt .rep,body.calc-std #wf .rep{max-width:1232px}
body.calc-std #bt .rsec>.eb,body.calc-std #wf .rsec>.eb{text-align:center}
body.calc-std #bt .rsec>h2,body.calc-std #wf .rsec>h2{text-align:center;font-weight:600;font-size:clamp(28px,3vw,40px);line-height:1.1;letter-spacing:-.015em}
body.calc-std #bt .rsec>.lede,body.calc-std #wf .rsec>.lede{text-align:center;margin-left:auto;margin-right:auto}

/* =====================================================================
   FORECASTER
   ===================================================================== */
body.calc-std #wf .calc{display:flex;align-items:flex-start;max-width:none;margin:0;padding:0;text-align:left}
body.calc-std #wf .cs-stage{position:sticky;top:56px;height:calc(100vh - 56px);flex:1 1 auto;min-width:0;display:flex;flex-direction:column;padding:20px 40px calc(var(--barh) + 16px) var(--side)}
body.calc-std #wf .cs-col{flex:0 0 var(--colw);width:var(--colw);padding:28px 40px calc(var(--barh) + 64px);text-align:left}
body.calc-std #wf .cs-h{margin:0;font-family:var(--disp);font-weight:600;font-size:clamp(24px,2.3vw,34px);line-height:1.12;letter-spacing:-.01em;max-width:760px}
body.calc-std #wf .cs-h b{font-weight:600;color:var(--gold-dark)}
body.calc-std #wf .oline{margin:8px 0 0;font-size:13px;line-height:19px;color:var(--gray);text-align:left;max-width:760px}
body.calc-std #wf .viz{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;margin-top:12px}
body.calc-std #wf .plot{flex:1 1 auto;min-height:220px;height:auto}
body.calc-std #wf .lgd{flex:none;justify-content:flex-start}
body.calc-std #wf .tabs{order:9;align-self:center;flex:none;margin-top:12px;width:auto}
body.calc-std #wf .tabs button{padding:0 18px}
body.calc-std #wf .hd{text-align:center}
body.calc-std #wf .hd h1{font-size:40px;line-height:1.05;letter-spacing:-.015em;margin:6px 0 6px;flex-wrap:wrap;justify-content:center}
body.calc-std #wf .hd .sub{font-weight:400}
body.calc-std #wf .outs{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:26px 0 0;text-align:left}
body.calc-std #wf .o{padding:0 0 0 14px;border-left:1px solid var(--line);min-width:0}
body.calc-std #wf .o:first-child{border-left:0;padding-left:0}
body.calc-std #wf .o b{font-size:25px;line-height:1.05;font-weight:500}
body.calc-std #wf .o span{margin-top:5px;font-size:12px;color:var(--ink)}
body.calc-std #wf .o small{font-size:11.5px}
body.calc-std #wf .cs-sec{margin:48px 0 6px;font-family:var(--disp);font-weight:500;font-size:22px;line-height:28px;letter-spacing:-.005em;text-align:center}
body.calc-std #wf .ins{display:block;margin:0;max-width:none}
body.calc-std #wf .ins>*{margin-top:18px}
body.calc-std #wf .ins .in{height:44px;font-size:15px}
body.calc-std #wf .note{text-align:left;margin-top:12px}
body.calc-std #wf .more-t{display:none}
body.calc-std #wf .more{display:block!important;max-width:none;margin:0;padding:0;background:none}
body.calc-std #wf .more[hidden]{display:block!important}
body.calc-std #wf .more .mgrid{display:block}
body.calc-std #wf .more .mgrid[hidden]{display:none}
body.calc-std #wf .more .col{width:auto;padding:0;flex:none}
body.calc-std #wf .more .col+.col{margin-top:18px}
body.calc-std #wf .more .in{background:var(--card);height:44px;font-size:15px}
body.calc-std #wf .tl{display:none}

/* =====================================================================
   ROTH CALCULATOR
   ===================================================================== */
body.calc-std #roth .rq{grid-template-columns:minmax(0,1fr) var(--colw);height:calc(100vh - 56px - var(--barh))}
body.calc-std #roth .stage{background:#fff;align-items:stretch;justify-content:flex-start;text-align:left;padding:20px 40px 24px var(--side)}
body.calc-std #roth .stage .eb{position:static;margin:0 0 10px}
body.calc-std #roth .restart{top:18px;right:40px}
body.calc-std #roth .cs-h{margin:0;font-family:var(--disp);font-weight:600;font-size:clamp(24px,2.3vw,34px);line-height:1.12;letter-spacing:-.01em;max-width:680px}
body.calc-std #roth .cs-mid{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:var(--card);border-radius:8px;margin-top:20px;padding:32px 24px}
body.calc-std #roth .sb{padding:28px 40px 28px}
body.calc-std #roth .cs-title{font-size:36px}
body.calc-std #roth .cs-sub{margin-bottom:28px}
body.calc-std #roth .foot{position:fixed;z-index:50;left:0;right:0;bottom:0;height:var(--barh);background:#fff;box-shadow:0 -1px 0 var(--rule),0 -8px 24px rgba(0,0,0,.04);display:flex;align-items:center;justify-content:space-between;gap:24px;padding:0 var(--side);border:0;margin:0}
body.calc-std #roth .foot .btn{min-width:160px}
body.calc-std #roth .foot .btn-blue{min-width:200px}
body.calc-std #roth .tally{font-family:var(--disp)}

/* =====================================================================
   PORTFOLIO PROPOSAL
   ===================================================================== */
body.calc-std .promo{display:none}
body.calc-std #pp{grid-template-columns:minmax(0,1fr) var(--colw);gap:0;padding:0;height:calc(100vh - 56px - var(--barh));min-height:560px}
body.calc-std #pp .stage{margin:0;border-radius:0;background:#fff;overflow:visible;display:flex;flex-direction:column;padding:20px 40px 16px var(--side)}
body.calc-std #pp .cs-h{margin:0;font-family:var(--disp);font-weight:600;font-size:clamp(24px,2.3vw,34px);line-height:1.12;letter-spacing:-.01em;max-width:760px}
body.calc-std #pp .cs-h b{font-weight:600;color:var(--gold-dark)}
body.calc-std #pp .cs-s{margin:8px 0 0;font-size:13px;line-height:19px;color:var(--gray);max-width:760px}
body.calc-std #pp .cs-views{position:relative;flex:1 1 auto;min-height:0;margin-top:14px;border-radius:8px;overflow:hidden}
body.calc-std #pp .cs-views.on-prop{background:var(--card)}
body.calc-std #pp .fan-cap{display:none}
body.calc-std #pp .cv{padding:0}
body.calc-std #pp .cv-h{justify-content:flex-end;min-height:20px}
body.calc-std #pp .cv-h>div:first-child{display:none}
body.calc-std #pp .plot{margin-top:6px}
body.calc-std #pp .stats div{background:var(--card)}
body.calc-std #pp .building{background:var(--card)}
/* the views sit under the picture, centred, like the Retirement Plan's */
body.calc-std #pp .tabs{position:static;transform:none;align-self:center;flex:none;margin-top:12px;gap:2px;background:var(--card);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;border-radius:4px}
body.calc-std #pp .tabs button{padding:0 18px}
body.calc-std #pp .tabs button[aria-selected="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
/* the column */
body.calc-std #pp .side{padding:28px 40px 40px}
body.calc-std #pp .side h1{margin:6px 0 6px;font-weight:600;font-size:40px;line-height:1.05;letter-spacing:-.015em}
body.calc-std #pp .side .sub{margin:0 auto;max-width:none;font-size:14px;line-height:20px;color:var(--gray)}
.cs-trio{display:grid;grid-template-columns:repeat(3,1fr);margin:26px 0 0}
.cs-trio[hidden]{display:none}
.cs-trio div{min-width:0;padding-left:14px;border-left:1px solid var(--line)}
.cs-trio div:first-child{padding-left:0;border-left:0}
.cs-trio b{display:block;font-family:var(--disp);font-size:25px;line-height:1.05;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.cs-trio b.gold{color:var(--gold-dark)}.cs-trio b.neg{color:var(--red)}
.cs-trio span{display:block;margin-top:5px;font-size:12px;line-height:16px}
body.calc-std #pp .blk{margin-top:48px}
body.calc-std #pp .blk h2{font-size:22px;line-height:28px;letter-spacing:-.005em;text-align:center}
body.calc-std #pp .blk h2+.hint,body.calc-std #pp .blk h2+div>.hint:first-child{text-align:center}
body.calc-std #pp .in{height:44px;font-size:15px}
body.calc-std #pp .in.big{height:48px;font-size:22px}
/* the bar */
body.calc-std #pp .foot-bar{position:fixed;z-index:50;left:0;right:0;bottom:0;height:var(--barh);margin:0;padding:0 var(--side);display:flex;align-items:center;justify-content:space-between;gap:28px;background:#fff;box-shadow:0 -1px 0 var(--rule),0 -8px 24px rgba(0,0,0,.04)}
body.calc-std #pp .foot-bar .row{display:none}
body.calc-std #pp .foot-bar .cs-bar-l{margin-right:auto}
body.calc-std #pp .foot-bar .cs-bar-k[hidden]{display:none}
body.calc-std #pp .foot-bar .btns{flex:none}
body.calc-std #pp .foot-bar .btn{flex:none;min-width:0;height:40px;padding:0 28px}
body.calc-std #pp .foot-bar #build{min-width:200px}
body.calc-std #pp .foot-bar #chris{background:var(--card);box-shadow:none}
body.calc-std #pp .foot-bar #chris:hover{background:var(--hover)}
body.calc-std #pp .foot-bar .err,body.calc-std #pp .foot-bar .done{position:absolute;right:var(--side);bottom:calc(100% + 10px);margin:0;max-width:440px;padding:10px 14px;border-radius:6px;background:#fff;box-shadow:0 4px 20px rgba(0,0,0,.14)}
@media (max-width:1280px){body.calc-std #pp .stage{padding-left:32px;padding-right:28px}body.calc-std #pp .side{padding-left:32px;padding-right:32px}}
@media (max-width:899px){
  body.calc-std[data-page="proposal"]{padding-bottom:0}
  body.calc-std #pp{display:block;height:auto;min-height:0}
  body.calc-std #pp .stage{height:auto;margin:0;padding:20px var(--side) 20px}
  body.calc-std #pp .cs-views{flex:none;height:min(96vw,440px)}
  body.calc-std #pp .side{max-width:560px;margin:0 auto;padding:20px var(--side) calc(var(--barh) + 40px)}
  body.calc-std #pp .foot-bar{padding:0 var(--side)}
}
@media (max-width:767px){
  body.calc-std #pp .side h1{font-size:30px}
  body.calc-std #pp .foot-bar{gap:8px}
  body.calc-std #pp .foot-bar .cs-bar-l{display:none}
  body.calc-std #pp .foot-bar .btns{flex:1;display:flex;gap:8px}
  body.calc-std #pp .foot-bar .btn,body.calc-std #pp .foot-bar #build{flex:1;min-width:0;padding:0 10px}
  body.calc-std #pp .foot-bar .err,body.calc-std #pp .foot-bar .done{left:var(--side);max-width:none}
  body.calc-std #pp .tabs{align-self:stretch}
  body.calc-std #pp .tabs button{flex:1;padding:0 6px}
}

/* ---------- narrower screens: the stage on top, the column under it, the bar stays ---------- */
@media (max-width:1280px){body.calc-std{--colw:408px}
  body.calc-std #bt .canvas,body.calc-std #wf .cs-stage{padding-left:32px;padding-right:28px}
  body.calc-std #bt .panel,body.calc-std #wf .cs-col{padding-left:32px;padding-right:32px}}
@media (max-width:1100px){
  body.calc-std #bt .stage,body.calc-std #wf .calc{display:block}
  body.calc-std #bt .canvas,body.calc-std #wf .cs-stage{position:relative;top:auto;height:auto;padding:20px var(--side) 24px}
  body.calc-std #bt .plot,body.calc-std #wf .plot{flex:none;height:min(52vh,420px);min-height:260px}
  body.calc-std #bt .panel,body.calc-std #wf .cs-col{width:auto;max-width:560px;margin:0 auto;padding:20px var(--side) calc(var(--barh) + 40px)}
  body.calc-std #bt .ctl{position:static;flex-direction:row;justify-content:flex-end;margin-top:10px;order:10}
  body.calc-std #roth .rq{grid-template-columns:1fr;height:auto;min-height:0}
  body.calc-std #roth .stage{padding:20px var(--side) 20px}
  body.calc-std #roth .cs-mid{min-height:260px}
  body.calc-std #roth .side{max-width:560px;width:100%;margin:0 auto}
  body.calc-std #roth .sb{padding:20px var(--side) calc(var(--barh) + 32px);overflow:visible}
}
@media (max-width:767px){
  body.calc-std{--barh:68px}
  .cs-title,body.calc-std #bt .panel h1,body.calc-std #wf .hd h1{font-size:30px}
  .cs-bar{gap:12px}
  .cs-bar-t{font-size:16px}.cs-bar-s{display:none}
  .cs-bar-k{display:none}
  .cs-bar .btn.cs-2nd{display:none}
  .cs-bar .btn.cs-main{min-width:0;padding:0 20px}
  body.calc-std #bt .per{align-self:stretch;overflow-x:auto}
  body.calc-std #bt .per button{flex:1 1 0;min-width:0;padding:0;font-size:11.5px}
  body.calc-std #bt .plot,body.calc-std #wf .plot{height:300px}
  body.calc-std #wf .tabs{align-self:stretch}
  body.calc-std #wf .tabs button{flex:1;padding:0 6px}
  body.calc-std #roth .foot .btn,body.calc-std #roth .foot .btn-blue{min-width:0;padding:0 22px}
  body.calc-std #roth .cs-title{font-size:28px}
}
/* Roth, once answered: the bar holds the one next step, on the right */
body.calc-std #roth .foot .ansb{margin-left:auto;flex:0 0 auto}
body.calc-std #roth .foot .ansb .btn{flex:0 0 auto;width:auto;min-width:200px;color:#fff}
/* Forecaster: the title now sits in the right column, so its info note opens to the left and stays on the screen */
body.calc-std #wf .info .pop{left:auto;right:-12px;transform:none}

/* ---------- Nov 22 2026, Chris's picks from the options sheet (BT2, BT3, FC4) ---------- */
/* BT2: the Backtester's Portfolio choice is the grey control the "Each month" choice uses */
body.calc-std #bt .seg-row .seg{display:flex;width:100%;background:var(--card);border-radius:4px;padding:4px;gap:2px}
body.calc-std #bt .seg-row .seg button{flex:1;min-width:0;height:36px;padding:0 6px;border-radius:4px;font-size:14px;font-weight:500;color:var(--ink2);box-shadow:none}
body.calc-std #bt .seg-row .seg button[aria-checked="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
/* BT3: the accounts without the dots and dotted line beside them */
body.calc-std #bt .route .f{padding-left:0}
body.calc-std #bt .route .f::before,body.calc-std #bt .route .f+.f::after{display:none}
/* Nov 22 2026 (Chris picked A): with the dots gone, "Add a 401(k)", "Each month" and "Amount a month" (and "Add a fund"
   in Your model + Bull Run) line up with the account boxes instead of sitting 26px in */
body.calc-std #bt .f.emo,body.calc-std #bt #mcRow,body.calc-std #bt .links{padding-left:0}
/* FC4: the Forecaster's chart key looks like the Backtester's: grey chips, no black boxes; off = faint, value crossed out */
body.calc-std #wf .lgd button,body.calc-std #wf .lgd button[aria-pressed="true"]{background:var(--card);box-shadow:none}
body.calc-std #wf .lgd button[aria-pressed="false"]{opacity:.45}
body.calc-std #wf .lgd button[aria-pressed="false"] b{text-decoration:line-through}
