/* Debt Payoff Planner: only what is specific to this tool. Fonts, colours, header, buttons, inputs, tables and panels come from
   /shared/tw.css + /shared/tool.css (look standard 2026-11-19). One black-and-white page in print. */
:root{--page-w:72rem;--panel:var(--sub);--acc-soft:var(--soft);--field:var(--sub);--cur:var(--soft);--r:12px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.note{margin:0;color:var(--mut);font-size:.95rem}
#linknote{margin-top:12px;color:var(--fg);background:var(--soft);padding:6px 12px;border-radius:10px;display:inline-block}
.panel-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:10px}
.panel-head h2{margin:0}
.tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0}
h2:focus{outline:none}
h2.gap{margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}
h3{margin:22px 0 8px}
input[inputmode=decimal],input[inputmode=numeric]{font-variant-numeric:tabular-nums}
input[aria-invalid=true]{border-color:var(--bad);box-shadow:0 0 0 1px var(--bad)}
.btn.small,button.small{padding:6px 13px;min-height:38px;font-size:.92rem}
.btn.danger{color:var(--bad)}
.hint{margin:12px 0 0;max-width:60rem}
.hint.first{margin:0 0 14px}
.small{font-weight:400}
.formrow{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:16px 0 0}
.closing{margin:40px 0 0;max-width:46rem}
details.more-info.noprint{margin-top:20px;max-width:46rem}

.grid{gap:14px 16px;grid-template-columns:repeat(auto-fill,minmax(min(100%,9rem),1fr))}
#form>.grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,17rem),1fr))}
.fld{display:grid;gap:5px;font-size:.86rem;font-weight:550;color:var(--fg);grid-template-rows:1fr auto auto;align-items:end}
.fld>span:first-child{align-self:end;line-height:1.3}
.wide2{grid-column:span 2}
@media (max-width:560px){.wide2{grid-column:1/-1}}
.chk{display:flex;gap:9px;align-items:center;font-size:.92rem;min-height:40px;align-self:end;grid-column:span 2}
.debt input[type=date]{min-width:0}
.chk input{width:1.1rem;height:1.1rem;flex:none}
.pairin{display:flex;flex-wrap:wrap;gap:6px}
#startMonth{flex:2 1 9rem}#startYear{flex:1 1 5.5rem}
.pairin select{flex:1 1 7rem;min-width:0}
.err,.warn{display:block;font-size:.82rem;font-weight:600}
.err{color:var(--bad)}
.warn{color:var(--warn)}
.err:empty,.warn:empty{display:none}
.warn{font-weight:400;margin-top:6px}

ol.debts{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.debt{border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;background:var(--sub)}
.debt>fieldset{border:0;padding:0;margin:0;min-width:0}
.debt legend{font-weight:650;padding:0;margin-bottom:10px;float:left;width:100%}
.debt legend+*{clear:both}
.rowtools{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}
ul.oneoffs{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.oneoff{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center}
.oneoff .pairin{flex:0 1 18rem}
.oneoff .inline{display:flex;gap:8px;align-items:center;font-size:.9rem;color:var(--mut)}
.oneoff .inline input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]){width:8rem}
.oneoff .err,.oneoff .warn{flex-basis:100%;margin:0}

.warnbox{background:var(--warn-bg);color:var(--warn);border-radius:10px;padding:8px 12px;font-weight:600;margin:0 0 6px}
#fixList{margin:0 0 4px}
.headline{font-size:1.12rem;font-weight:600;margin:0 0 14px;max-width:58rem}
.tablewrap{overflow:auto;max-inline-size:100%;container-type:inline-size;margin:0 0 16px;border:1px solid var(--line);border-radius:12px}
.tablewrap:focus-visible{outline-offset:0}
caption{text-align:start;font-weight:650;padding:10px 12px 4px;background:var(--card)}
table.nums tbody th,table.nums tfoot th{background:var(--card);color:var(--fg);font-size:.9rem}
table.nums td{text-align:end;font-variant-numeric:tabular-nums;white-space:nowrap}
tfoot th,tfoot td{font-weight:650;border-bottom:0}
#compare tr.cur>*{background:var(--cur)}
#compare .tag{font-weight:400;color:var(--mut);font-size:.86rem}
#each td:nth-child(3),#each td:nth-child(4){white-space:normal;text-align:start}
fieldset.pick{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 10px;padding:0;border:0;align-items:center}
fieldset.pick legend{font-weight:650;font-size:.95rem;margin-inline-end:8px;float:left;padding:8px 0}
fieldset.pick label{display:inline-flex;gap:7px;align-items:center;border:1px solid var(--line2);border-radius:9px;padding:6px 13px;min-height:38px;cursor:pointer;background:var(--card);font-size:.9rem;font-weight:500}
fieldset.pick label:has(input:checked){background:var(--soft);border-color:var(--acc);font-weight:600}
fieldset.pick label:has(input:focus-visible){outline:3px solid var(--acc);outline-offset:2px}
fieldset.pick input{margin:0}
ul.notes{margin:0 0 14px;padding-inline-start:1.2rem;max-width:62rem}
ul.notes li{margin:4px 0}
ul.notes:empty{display:none}
.years details{border-top:1px solid var(--line);padding:6px 0}
.years summary{cursor:pointer;padding:4px 0;font-variant-numeric:tabular-nums}
table.months{font-size:.86rem;width:auto;border-collapse:separate;border-spacing:0}
table.months th,table.months td{padding:4px 8px}
table.months col.g0{border-inline-start:1px solid var(--line)}
table.months thead th[scope=colgroup]{text-align:center;color:var(--fg);border-bottom-width:1px}
table.months tbody th,table.months thead tr:last-child th:first-child{position:sticky;inset-inline-start:0;background:var(--card);z-index:1;white-space:nowrap}
.how ul{padding-inline-start:1.2rem;max-width:62rem}
.how li{margin:8px 0;line-height:1.6}
.printonly{display:none}

/* narrow results: the two summary tables become one card per row, labelled from their headers */
@container (width < 560px){
  #compare,#compare tbody,#compare tr,#compare th,#compare td,#each,#each tbody,#each tfoot,#each tr,#each th,#each td{display:block}
  #compare thead,#each thead{display:none}
  #compare caption,#each caption{display:block}
  #compare tr,#each tr{border:1px solid var(--line);border-radius:8px;margin:0 0 8px;overflow:hidden}
  #compare th,#compare td,#each th,#each td{border-bottom:0;padding:3px 10px;text-align:start!important;white-space:normal!important}
  #compare tbody th,#each tbody th,#each tfoot th{background:var(--cur);padding-block:6px}
  #compare td::before,#each td::before{display:inline-block;min-width:8.5rem;color:var(--mut);font-size:.86rem}
  #compare td:nth-of-type(1)::before{content:"Debt-free: "}
  #compare td:nth-of-type(2)::before{content:"Months: "}
  #compare td:nth-of-type(3)::before{content:"Total interest: "}
  #compare td:nth-of-type(4)::before{content:"Vs minimums only: "}
  #compare td:nth-of-type(4):empty{display:none}
  #each td:nth-of-type(1)::before{content:"Owed at the start: "}
  #each td:nth-of-type(2)::before{content:"Rate: "}
  #each td:nth-of-type(3)::before{content:"Minimum: "}
  #each td:nth-of-type(4)::before{content:"Paid off: "}
  #each td:nth-of-type(5)::before{content:"Interest: "}
  #each tfoot td:nth-of-type(2){display:none}
}

@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

@media print{
  @page{margin:12mm}
  :root{color-scheme:light;--bg:#fff;--fg:#000;--mut:#333;--line:#999;--card:#fff;--cur:#fff;--acc:#000;--warn:#000;--warn-bg:#fff}
  body{font-size:10pt;background:#fff;color:#000}
  .skip,.note,form,.noprint,.how,#pick,#orderHint,footer.site,.closing,#fix,#empty,#linknote,.tool-hero>:not(h1){display:none!important}
  .printonly{display:block}
  main{max-width:none;padding:0}
  .tool-hero{padding:0;max-width:none}
  .tool-hero h1{font-size:15pt;margin:0 0 4pt}
  .panel{border:0;padding:0;margin:0}
  .panel h2{font-size:12pt;margin:0 0 4pt}.n{display:none}
  .headline{font-size:11pt;margin:0 0 8pt}
  #printHead{margin:0 0 6pt}
  .tablewrap{overflow:visible;container-type:normal;margin:0 0 8pt}
  table{font-size:9pt}
  th,td{padding:3pt 5pt}
  #compare tr.cur>*{font-weight:700}
  #compare .tag{display:none}
  .printonly.hint{font-size:8.5pt}
  ul.notes{font-size:9pt;margin:0 0 6pt}
  tr,li{break-inside:avoid}
}

/* guide pages */
.article .tablewrap{margin:12px 0 18px}
.article .cta{margin:18px 0}
.article .formula{font-family:ui-monospace,Consolas,monospace;font-size:.93rem}
