/* Compoundify tools2.css — styles for new calculators and guides. Uses site tokens with fallbacks. */
.c2,.g2{--c2g:var(--g,#0a7a4b);--c2gd:var(--gd,#075c3a);--c2ln:var(--ln,var(--line,#dfe7e2));--c2ink:var(--ink,#14231c);--c2mu:var(--mu,#5b6b64)}
.c2{display:block;margin:20px 0}
.c2-top{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:20px;align-items:start}
.c2-chart:not(:empty),.c2-table:not(:empty){margin-top:20px}
.c2 .panel{min-width:0}
.c2-fields .fld{margin-bottom:16px}
.c2-fields select,.c2-fields input[type=text]{width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--c2ln);border-radius:12px;background:#fff;color:var(--c2ink);font:inherit}
.c2-fields h3{margin:18px 0 8px;font-size:15px;letter-spacing:.2px;color:var(--c2gd)}
.c2-fields h3:first-child{margin-top:0}
.c2-sub{font-size:12px;color:var(--c2mu);margin:4px 0 0}
.c2-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.c2-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 16px;border-radius:99px;border:1px solid var(--c2g);background:var(--c2g);color:#fff;font:inherit;font-size:14px;font-weight:650;cursor:pointer;text-decoration:none}
.c2-btn:hover{background:var(--c2gd)}
.c2-btn.alt{background:#fff;color:var(--c2gd);border-color:var(--c2ln)}
.c2-btn.alt:hover{border-color:var(--c2g)}
.c2-btn[aria-pressed=true]{background:var(--c2g);color:#fff;border-color:var(--c2g)}
.c2-btn:disabled{opacity:.6;cursor:default}
.c2-pills{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
.c2-out{min-width:0}
@media(min-width:821px){.c2-out{position:sticky;top:12px}}

.c2-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:10px;margin:0 0 12px}
.c2-stat{border:1px solid var(--c2ln);border-radius:14px;padding:12px 14px;background:#fff;min-width:0}
.c2-stat span{display:block;font-size:12px;font-weight:650;color:var(--c2mu);text-transform:uppercase;letter-spacing:.4px}
.c2-stat b{display:block;font-size:clamp(20px,3.4vw,26px);line-height:1.2;color:var(--c2gd);margin:4px 0 2px;letter-spacing:-.4px;overflow-wrap:anywhere}
.c2-stat small{display:block;font-size:12.5px;color:var(--c2mu);line-height:1.35}
.c2-stat.c2-big{grid-column:1/-1;background:#f1f8f4;border-color:#bfe0cd}
.c2-stat.neg b{color:#b3412f}
.c2-hl{background:#f1f8f4;border:1px solid #cfe6d8;border-radius:12px;padding:10px 14px;margin:8px 0;font-size:14.5px}
.c2-warn{background:#fff4e5;border:1px solid #f0cf9a;border-radius:12px;padding:10px 14px;margin:8px 0;font-size:14px;color:#6b4a0a}
.c2-sm{font-size:13px;color:var(--c2mu);margin:6px 0}
.c2-prog{height:14px;border-radius:99px;background:#e9eeea;overflow:hidden;margin:10px 0 4px}
.c2-prog i{display:block;height:100%;background:var(--c2g)}
.c2-stack{display:flex;height:22px;border-radius:99px;overflow:hidden;background:#e9eeea;margin:6px 0 12px}
.c2-stack i{display:block;height:100%}
.c2-chart,.c2-table{grid-column:1/-1}
.c2-chart{min-width:0}
.c2-chart:empty{display:none}
.c2-cw{position:relative;border:1px solid var(--c2ln);border-radius:14px;background:#fff;padding:8px}
.c2-cw svg{display:block;width:100%;height:auto;overflow:visible}
.c2-tip{position:absolute;top:8px;transform:translateX(-50%);background:#14231c;color:#fff;font-size:12px;line-height:1.5;padding:6px 10px;border-radius:8px;pointer-events:none;white-space:nowrap;z-index:2}
.c2-tip i,.c2-leg i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px}
.c2-leg{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;color:var(--c2mu);margin:8px 2px}
.c2-table h3{margin:6px 0 10px}
.c2-scroll{overflow-x:auto;margin:8px 0}
.c2-tbl{width:100%;border-collapse:collapse;font-size:14px;background:#fff;border:1px solid var(--c2ln);border-radius:12px;overflow:hidden}
.c2-tbl th,.c2-tbl td{padding:9px 12px;text-align:right;border-bottom:1px solid var(--c2ln);white-space:nowrap}
.c2-tbl th:first-child,.c2-tbl td:first-child{text-align:left}
.c2-tbl thead th{background:#f1f8f4;color:var(--c2gd);font-size:12px;text-transform:uppercase;letter-spacing:.4px}
.c2-tbl tbody th{font-weight:650}
.c2-tbl tr:last-child th,.c2-tbl tr:last-child td{border-bottom:0}
.c2-det{margin:12px 0}
.c2-det summary{cursor:pointer;font-weight:650;color:var(--c2gd);min-height:32px}
.c2-rows{display:grid;gap:10px;margin-bottom:10px}
.c2-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr)) 36px;gap:8px;align-items:end;border:1px solid var(--c2ln);border-radius:12px;padding:10px;background:#fcfdfc}
.c2-cell{display:block;min-width:0}
.c2-cell span{display:block;font-size:11px;font-weight:650;color:var(--c2mu);margin-bottom:3px}
.c2-cell input{width:100%;min-height:40px;padding:6px 10px;border:1px solid var(--c2ln);border-radius:10px;font:inherit;background:#fff;color:var(--c2ink)}
.c2-x{width:36px;height:40px;border:1px solid var(--c2ln);background:#fff;border-radius:10px;cursor:pointer;color:var(--c2mu);font:inherit}
.c2-x:hover{color:#b3412f;border-color:#e3a9a9}
.c2-sl-head{display:flex;justify-content:space-between;gap:8px}
/* guide widgets */
.g2{border:1px solid var(--c2ln);border-radius:18px;background:#fbfdfb;padding:18px;margin:22px 0}
.g2>h3{margin:0 0 4px}
.g2 .c2-w-sl{margin-bottom:14px}
.g2 .c2-w-sl label{display:flex;justify-content:space-between;gap:10px;font-size:13px;font-weight:650;margin-bottom:4px}
.g2 .c2-w-sl b{color:var(--c2gd)}
.g2 input[type=range]{width:100%;accent-color:var(--c2g)}
.c2-w-out{margin-top:6px}
.c2-checks{border:1px solid var(--c2ln);border-radius:12px;padding:10px 14px;margin:0 0 12px;background:#fff}
.c2-checks legend{font-weight:650;font-size:13px;padding:0 6px}
.c2-checks label{display:block;padding:6px 0;font-size:14.5px}
.c2-checks input{margin-right:8px;width:18px;height:18px;vertical-align:-3px;accent-color:var(--c2g)}
.c2-big-t{font-size:clamp(20px,4vw,28px);font-weight:750;color:var(--c2gd);margin:6px 0}
.c2-qz{margin-bottom:14px}.c2-qq{font-weight:650;margin:0 0 8px}
.c2-qo{display:grid;gap:8px}
.c2-qo button{min-height:44px;text-align:left;padding:10px 14px;border:1px solid var(--c2ln);border-radius:12px;background:#fff;color:var(--c2ink);font:inherit;cursor:pointer}
.c2-qo .ok{background:#e3f4e8;border-color:var(--c2g)}.c2-qo .no{background:#fdecec;border-color:#e3a9a9}
/* article layout */
.art-meta{font-size:13px;color:var(--c2mu,#5b6b64);margin:-4px 0 16px}
.toc{border:1px solid var(--ln,#dfe7e2);border-radius:14px;padding:12px 18px;background:#fbfdfb;margin:16px 0 24px;font-size:14.5px}
.toc b{display:block;margin-bottom:4px}.toc ol{margin:0;padding-left:20px}.toc a{text-decoration:none}
.keys{border-left:4px solid var(--g,#0a7a4b);background:#f1f8f4;border-radius:0 12px 12px 0;padding:12px 18px;margin:20px 0}
.keys h2{margin:0 0 6px;font-size:18px}.keys ul{margin:6px 0 0;padding-left:20px}
.src li{margin:4px 0}
.try{margin:22px 0}
.cta-row{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.cards.two{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.hub-h{margin-top:34px}
@media(max-width:820px){.c2-top{grid-template-columns:1fr}.c2-tbl th,.c2-tbl td{padding:8px 9px}}
@media print{header,footer,.c2-acts,.c2-add,.c2-x,.g2 input[type=range]{display:none!important}.c2,.c2-top{display:block}}

main.art>p,main.art>ul,main.art>ol,main.art>h2,main.art>h3{max-width:760px}

/* v2: stop calculator panels widening past small screens */
.c2-top{grid-template-columns:minmax(0,5fr) minmax(0,7fr)}.c2-top>*{min-width:0}
@media(max-width:820px){.c2-top{grid-template-columns:minmax(0,1fr)}}
.c2 .fl{flex-wrap:wrap}.c2 .fl label{flex:1 1 140px;min-width:0}.c2 .sl{max-width:100%;width:100%;box-sizing:border-box}

/* everyday decisions: roomier dynamic rows */
form.c2[data-c2="split"] .c2-row,form.c2[data-c2="subs"] .c2-row,form.c2[data-c2="perinfl"] .c2-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px}
form.c2[data-c2="workhrs"] .c2-row,form.c2[data-c2="bucket"] .c2-row{grid-template-columns:minmax(0,1fr) 40px}
form.c2[data-c2="split"] .c2-cell.wide,form.c2[data-c2="subs"] .c2-cell.wide,form.c2[data-c2="perinfl"] .c2-cell.wide,form.c2[data-c2="workhrs"] .c2-cell.wide,form.c2[data-c2="bucket"] .c2-cell.wide{grid-column:1/-1}
form.c2[data-c2="split"] .c2-row .c2-x,form.c2[data-c2="subs"] .c2-row .c2-x,form.c2[data-c2="perinfl"] .c2-row .c2-x,form.c2[data-c2="workhrs"] .c2-row .c2-x,form.c2[data-c2="bucket"] .c2-row .c2-x{grid-column:-2/-1;align-self:end}
/* Debt rows: name + remove on top, balance / APR / minimum below (fixes squeezed APR field on phones) */
form.c2[data-c2="debts"] .c2-row{grid-template-columns:repeat(3,minmax(0,1fr))}
form.c2[data-c2="debts"] .c2-row .c2-cell.wide{grid-column:1/3;grid-row:1}
form.c2[data-c2="debts"] .c2-row .c2-x{grid-column:3;grid-row:1;justify-self:end;align-self:end}

/* v62: tools2.js adds the debt/account/subscription rows after the page loads. Hold their space until then so nothing below jumps.
   Heights are the smallest a row ever is (n rows x row height + 10px gaps). */
form.c2 .c2-rows:empty{min-height:var(--rsv,0)}
form.c2[data-c2="debts"] .c2-rows:empty,form.c2[data-c2="bucket"] .c2-rows:empty,form.c2[data-c2="workhrs"] .c2-rows:empty{--rsv:698px}
form.c2[data-c2="perinfl"] .c2-rows:empty{--rsv:1229px}
form.c2[data-c2="split"] .c2-rows:empty{--rsv:344px}
form.c2[data-c2="subs"] .c2-rows:empty{--rsv:875px}
form.c2[data-c2="networth"] .c2-rows[data-g="a"]:empty{--rsv:500px}
form.c2[data-c2="networth"] .c2-rows[data-g="l"]:empty{--rsv:398px}
@media(max-width:374px){
  form.c2[data-c2="subs"] .c2-rows:empty{--rsv:960px}
  form.c2[data-c2="networth"] .c2-rows[data-g="a"]:empty{--rsv:810px}
  form.c2[data-c2="networth"] .c2-rows[data-g="l"]:empty{--rsv:714px}
}

/* v62: Deal Comparator, Fee Detector and Books fill their main area with script after load. Hold that space until then. */
#dc-t:empty{min-height:51px}
#dc-in:empty{min-height:870px}
@media(max-width:899px){#dc-in:empty{min-height:920px}}
@media(max-width:639px){#dc-t:empty{min-height:103px}#dc-in:empty{min-height:1770px}}
.fd-t:has(#fd-rows:empty){padding-bottom:182px}
#bk-v:empty{min-height:230px}
@media(max-width:767px){#bk-v:empty{min-height:300px}}
@media(max-width:640px){#bk-v:empty{min-height:400px}}

/* v62: Financial X-Ray "Recurring subscriptions and bills" was a 525px table on a phone, so Per year and Change were off-screen. Show each payment as a small card instead. */
@media(max-width:560px){
  .xr .xr-rec,.xr .xr-rec tbody{display:block;width:100%}
  .xr .xr-rec tr:first-child{display:none}
  .xr .xr-rec tr{display:grid;grid-template-columns:38px minmax(0,1fr) minmax(0,1fr);gap:8px 12px;align-items:start;padding:14px 2px;border-bottom:1px solid #e4ece7}
  .xr .xr-rec td{display:block;padding:0;border:0;text-align:left;white-space:normal;min-width:0}
  .xr .xr-rec td:nth-child(1){grid-row:1/4;grid-column:1;padding-top:1px}
  .xr .xr-rec td:nth-child(2){grid-column:2/4;font-weight:700;overflow-wrap:anywhere}
  .xr .xr-rec td:nth-child(2) small{font-weight:400;color:#5b6b63}
  .xr .xr-rec td[data-l]::before{content:attr(data-l);display:block;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#5b6b63;margin-bottom:1px}
}
.xr .xr-k{width:24px;height:24px;margin:0}

/* v62: scroll cue. A table that scrolls sideways fades at the edge where more is hidden (classes cue-l / cue-r set by menu.js). */
.c2-scroll.cue-r,.xr-t.cue-r,.scrl.cue-r{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 34px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 34px),transparent)}
.c2-scroll.cue-l,.xr-t.cue-l,.scrl.cue-l{-webkit-mask-image:linear-gradient(90deg,transparent,#000 34px);mask-image:linear-gradient(90deg,transparent,#000 34px)}
.c2-scroll.cue-l.cue-r,.xr-t.cue-l.cue-r,.scrl.cue-l.cue-r{-webkit-mask-image:linear-gradient(90deg,transparent,#000 34px,#000 calc(100% - 34px),transparent);mask-image:linear-gradient(90deg,transparent,#000 34px,#000 calc(100% - 34px),transparent)}
/*cf-dark*/@media screen{html[data-theme=dark] .c2-fields select,html[data-theme=dark] .c2-fields input[type=text]{background:#17211d;color:#d4e5e3}html[data-theme=dark] .c2-fields h3{color:#67e9bb}html[data-theme=dark] .c2-sub{color:#aabfba}html[data-theme=dark] .c2-btn{border:1px solid #08784e;background:#08784e;color:#fff}html[data-theme=dark] .c2-btn:hover{background:#075b3d}html[data-theme=dark] .c2-btn.alt{background:#17211d;color:#67e9bb}html[data-theme=dark] .c2-btn.alt:hover{border-color:#08784e}html[data-theme=dark] .c2-btn[aria-pressed=true]{background:#08784e;color:#fff;border-color:#08784e}html[data-theme=dark] .c2-stat{background:#17211d}html[data-theme=dark] .c2-stat span{color:#aabfba}html[data-theme=dark] .c2-stat b{color:#67e9bb}html[data-theme=dark] .c2-stat small{color:#aabfba}html[data-theme=dark] .c2-stat.c2-big{background:#111a16;border-color:#253d2f}html[data-theme=dark] .c2-stat.neg b{color:#d97c6e}html[data-theme=dark] .c2-hl{background:#111a16;border:1px solid #253e2f}html[data-theme=dark] .c2-warn{background:#111a16;border:1px solid #3c3324;color:#e9bd67}html[data-theme=dark] .c2-sm{color:#aabfba}html[data-theme=dark] .c2-prog{background:#202621}html[data-theme=dark] .c2-prog i{background:#08784e}html[data-theme=dark] .c2-stack{background:#202621}html[data-theme=dark] .c2-cw{background:#17211d}html[data-theme=dark] .c2-tip{color:#fff}html[data-theme=dark] .c2-leg{color:#aabfba}html[data-theme=dark] .c2-tbl{background:#17211d}html[data-theme=dark] .c2-tbl thead th{background:#111a16;color:#67e9bb}html[data-theme=dark] .c2-det summary{color:#67e9bb}html[data-theme=dark] .c2-row{background:#17211d}html[data-theme=dark] .c2-cell span{color:#aabfba}html[data-theme=dark] .c2-cell input{background:#17211d;color:#d4e5e3}html[data-theme=dark] .c2-x{background:#17211d;color:#aabfba}html[data-theme=dark] .c2-x:hover{color:#d97c6e;border-color:#3c2424}html[data-theme=dark] .g2{background:#17211d}html[data-theme=dark] .g2 .c2-w-sl b{color:#67e9bb}html[data-theme=dark] .c2-checks{background:#17211d}html[data-theme=dark] .c2-big-t{color:#67e9bb}html[data-theme=dark] .c2-qo button{background:#17211d;color:#d4e5e3}html[data-theme=dark] .c2-qo .ok{background:#1b2b20;border-color:#08784e}html[data-theme=dark] .c2-qo .no{background:#111a16;border-color:#3c2424}html[data-theme=dark] .art-meta{color:#aabfba}html[data-theme=dark] .toc{border:1px solid #2b3b31;background:#17211d}html[data-theme=dark] .keys{border-left:4px solid #08784e;background:#111a16}@media(max-width:560px){html[data-theme=dark] .xr .xr-rec tr{border-bottom:1px solid #2b3b31}html[data-theme=dark] .xr .xr-rec td:nth-child(2) small{color:#a4b2ab}html[data-theme=dark] .xr .xr-rec td[data-l]::before{color:#a4b2ab}}}/*cf-dark-end*/
