/* Monthsahead — the runway scale: a rounded bar that fills in the colour of its zone, with ticks at 1 month, 3 months and the target. */
:root {
  --bg: #fbf6ee; --paper: #ffffff; --fg: #1f1408; --muted: #7a6a58;
  --line: #eadfce; --accent: #b45309; --ink: #9a4507; --chip: #fde7cf; --on-accent: #ffffff;
  --red: #be123c; --amber: #b45309; --green: #047857; --on-zone: #ffffff;
  --track: rgba(31, 20, 8, 0.09); --shadow: rgba(120, 70, 20, 0.28);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15100a; --paper: #211a12; --fg: #fbf3e7; --muted: #c2b29e;
    --line: #3a2f22; --accent: #fdba74; --ink: #fdba74; --chip: #3a2410; --on-accent: #2a1505;
    --red: #fb7185; --amber: #fbbf24; --green: #34d399; --on-zone: #15100a;
    --track: rgba(255, 255, 255, 0.11); --shadow: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 48rem; margin: 0 auto; padding: 0 16px; }
.n, .big, table.data, .calc input, .runway .zoneline { font-variant-numeric: tabular-nums; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 0.9rem; }
.bar a { color: var(--muted); text-decoration: none; }
.bar a:hover { color: var(--fg); }
.bar .id { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.bar .id img { width: 26px; height: 26px; border-radius: 7px; display: block; }

.hero { padding: clamp(22px, 6vw, 48px) 0 10px; }
.kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; }
.kicker img { width: 44px; height: 44px; border-radius: 11px; }
h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.028em; margin: 0 0 14px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: clamp(1.28rem, 4vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.2; margin: 2em 0 0.5em; text-wrap: balance; }
h3 { font-size: 1.05rem; margin: 1.4em 0 0.4em; }
h4 { font-size: 0.95rem; margin: 0 0 0.3em; }
.sub { font-size: clamp(1.03rem, 3.2vw, 1.16rem); color: var(--muted); margin: 0 0 20px; max-width: 38rem; }
.soon { display: inline-block; background: var(--chip); color: var(--ink); font-weight: 650; padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; }
section { margin: 2.2em 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
li { margin: 0.4em 0; }
small { font-size: 0.82em; }
.reviewed { color: var(--muted); font-size: 0.85rem; }
footer { border-top: 1px solid var(--line); margin-top: 3em; padding: 20px 0 40px; color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 14px; }
footer a { color: var(--muted); }

/* Legal and help pages */
.doc h2 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }
.doc p, .doc li { line-height: 1.62; }
details { border-top: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; }

/* ------------------------------------------------------------------ cards and tables */
.card, .calc { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 12px 30px -20px var(--shadow); }
.calc h2, .card h2 { margin: 0 0 12px; font-size: 1.15rem; }
.tablewrap { overflow-x: auto; margin: 0.6em 0; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.94rem; background: var(--paper); }
table.data caption { text-align: left; color: var(--muted); font-size: 0.88rem; padding: 0 0 6px; }
table.data th, table.data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
table.data tbody th { font-weight: 650; }
table.data td.n, table.data td.num { white-space: nowrap; }
table.data th small, table.data td small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: normal; }
table.data tr.reached td, table.data tr.reached th { color: var(--muted); }
table.data td.warn { color: var(--red); font-weight: 600; }
table.grid th, table.grid td { padding: 7px 8px; text-align: right; font-variant-numeric: tabular-nums; }
table.grid th:first-child { text-align: left; white-space: nowrap; }
table.grid td { font-size: 0.9rem; }
table.grid td.below { color: var(--red); }

.answer { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 0 0 12px; }
.answer p { margin: 0.35em 0; }
cite { font-style: normal; color: var(--muted); font-size: 0.88rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.feature h3 { margin: 0 0 4px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tier { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--paper); }
.tier h3 { margin: 0 0 6px; font-size: 1.02rem; }
.tier.pro { border-color: var(--accent); }
.tier ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; }

.shots { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px 6px; margin: 0 -16px; }
.shots img { width: 220px; height: auto; border-radius: 18px; border: 1px solid var(--line); flex: none; }
.honest li b { display: inline; }

.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.more li { margin: 0; }
.more a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-decoration: none; color: var(--fg); height: 100%; }
.more a b { display: block; color: var(--ink); }
.more a span { color: var(--muted); font-size: 0.9rem; }

.app-note { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.app-note img.shot { width: 150px; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.app-note h2 { margin-top: 0; }
.app-note p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ the calculators */
.calc .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 14px; align-items: end; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); min-width: 0; }
.calc label > span:first-child { line-height: 1.25; }
.calc input, .calc select { font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); min-width: 0; max-width: 100%; width: 100%; }
.calc input:focus-visible, .calc select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc input::placeholder { color: var(--muted); opacity: 0.7; }
.calc .adorn { position: relative; display: block; }
.calc .adorn::before, .calc .adorn::after { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 1rem; }
.calc .adorn.money::before { content: "$"; left: 12px; }
.calc .adorn.money input { padding-left: 26px; }
.calc .adorn.pct::after { content: "%"; right: 12px; }
.calc .adorn.pct input { padding-right: 28px; }
.calc .wide { grid-column: 1 / -1; }
.calc .check { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); font-size: 0.92rem; }
.calc .check input { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); }
.calc h3 { margin: 18px 0 8px; font-size: 1rem; }
.calc h3.more-h { margin: 18px 0 8px; font-size: 1rem; }
.result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.result > :last-child { margin-bottom: 0; }
.result .big, .runway .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.result .big b { font-size: clamp(2.3rem, 11vw, 3.3rem); line-height: 1; color: var(--accent); letter-spacing: -0.03em; }
.result .big span { font-size: 1.05rem; font-weight: 600; }
.result p { margin: 0.35em 0; }
.result .line { color: var(--muted); }
.result .line b, .result .line .n { color: var(--fg); }
.result .sum { margin-bottom: 14px; }
.result .warn, .warns .warn { color: var(--red); font-weight: 600; }
.warns { list-style: none; padding: 0; margin: 0 0 10px; }
.warns li { margin: 0.3em 0; padding-left: 12px; border-left: 3px solid var(--red); font-size: 0.92rem; }
.hint { color: var(--muted); font-size: 0.9rem; }
.calc .result + .hint { margin-top: 14px; }
.calc .fields.single { grid-template-columns: minmax(0, 24rem); }
.sec::before { content: ""; display: inline-block; width: 30px; height: 8px; margin-right: 8px; vertical-align: 1px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) 0 56%, var(--track) 56% 100%); }
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; font: inherit; font-weight: 650; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 14px; font-size: 0.92rem; }
.btn:disabled { opacity: 0.45; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.nw { white-space: nowrap; }

/* the runway: number, scale, line */
.runway { margin: 0 0 6px; }
.runway .eyebrow, .eyebrow { font-size: 0.74rem; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.result .runway .big b { color: var(--zone, var(--accent)); }
.runway[data-zone="red"] { --zone: var(--red); }
.runway[data-zone="yellow"] { --zone: var(--amber); }
.runway[data-zone="green"] { --zone: var(--green); }
.runway .zoneline { color: var(--muted); margin: 6px 0 0; }
.scale { --zone: var(--accent); margin: 8px 0 2px; }
.scale[data-zone="red"] { --zone: var(--red); }
.scale[data-zone="yellow"] { --zone: var(--amber); }
.scale[data-zone="green"] { --zone: var(--green); }
.scale .track { position: relative; height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; }
.scale .fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 12px; border-radius: 999px; background: var(--zone); transition: width 0.25s ease; }
.scale .fill.empty { min-width: 0; width: 0 !important; }
.scale .tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--paper); }
.scale .marks { position: relative; height: 16px; margin-top: 6px; font: 600 11px/16px ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; color: var(--muted); }
.scale .marks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.scale .marks span.end { left: auto; right: 0; transform: none; }
.result .scale .marks, .result .scale { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .scale .fill { transition: none; } }

/* the ladder */
.ladder { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.ladder li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin: 0; padding: 13px 16px; border-top: 1px solid var(--line); }
.ladder li:first-child { border-top: 0; }
.ladder .mk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; border: 2px solid var(--line); color: var(--muted); margin-top: 1px; }
.ladder li[data-status="done"] .mk { background: var(--green); border-color: var(--green); color: var(--on-zone); }
.ladder li[data-status="done"] .mk::before { content: "\2713"; }
.ladder li[data-status="current"] .mk { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ladder li[data-status="current"] .mk::before { content: "\2192"; }
.ladder li[data-status="done"] .what b { color: var(--muted); }
.ladder p { margin: 0; }
.ladder .what { line-height: 1.35; }
.ladder .why { color: var(--muted); font-size: 0.92rem; margin-top: 3px; }
.ladder .when { color: var(--ink); font-size: 0.9rem; font-weight: 600; margin-top: 3px; }
.ladder .tag { display: inline-block; margin-left: 6px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); vertical-align: 2px; }
.ladder li[data-status="current"] .tag { background: var(--accent); color: var(--on-accent); }
.ladder.static .mk { background: var(--chip); border-color: var(--chip); color: var(--ink); }
.ladder-h { margin-top: 20px; }

.next { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 0 0 14px; }
.next .title { font-size: 1.12rem; font-weight: 650; margin: 0 0 4px; line-height: 1.3; }
.next p { margin: 0.2em 0; }
.next .when { color: var(--ink); font-weight: 600; font-size: 0.92rem; }
.problems { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.tile .amt { font-size: 1.25rem; font-weight: 650; margin: 0; font-variant-numeric: tabular-nums; }
.tile .amt.neg { color: var(--red); }
.sequence ol, .sequence ul { padding-left: 1.3em; margin: 0.3em 0 0.6em; }
.sequence small { color: var(--muted); }
.orders .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.orders .cols > div { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.orders ol { padding-left: 1.2em; margin: 0.2em 0 0.4em; font-size: 0.94rem; }
.orders small { color: var(--muted); }
.compare h3 { margin-top: 18px; }

/* the sources */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.rule { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.rule h3 { margin: 0 0 4px; font-size: 1rem; line-height: 1.3; }
.rule p { margin: 0 0 6px; color: var(--muted); font-size: 0.94rem; }
.rule p.kind { margin: 6px 0 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); }
.rule[data-kind="assumption"] p.kind, .rule[data-kind="sourced and assumed"] p.kind { color: var(--amber); }
.sources { padding-left: 1.2em; font-size: 0.94rem; }
.sources li { margin: 0.5em 0; }

.hide { display: none !important; }
.print-only { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the debt rows */
.debts { display: grid; gap: 10px; margin: 0 0 10px; }
.debt { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.debt .check { grid-column: 1 / -2; }
.debt .x { font: inherit; font-size: 0.85rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.debt .x:hover { color: var(--fg); }
.calc .debt input { background: var(--paper); }

/* month by month */
.schedule { font-size: 0.86rem; }
.schedule th, .schedule td { padding: 6px 10px; white-space: nowrap; }
.schedule thead th { position: sticky; top: 0; background: var(--paper); }
.sched-title { margin: 12px 0 0; }
.sched-scroll { max-height: 26rem; overflow: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 8px; }
.sched-scroll .tablewrap { margin: 0; overflow: visible; }

@media (max-width: 560px) {
  .app-note { grid-template-columns: 1fr; }
  .app-note img.shot { width: 60%; max-width: 220px; justify-self: center; }
  table.data th, table.data td { padding: 8px 7px; }
  table.data { font-size: 0.9rem; }
  .debt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .debt .f-name { grid-column: 1 / -1; }
  .debt .x { order: 1; justify-self: end; align-self: end; }
  .debt .check { order: 2; grid-column: 1 / -1; }
  .calc { padding: 14px; }
}
@media (max-width: 560px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack caption, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; }
  table.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  table.stack tbody th, table.stack td { border: 0; padding: 0; }
  table.stack tbody th { grid-column: 1 / -1; font-size: 1rem; }
  table.stack th small { display: inline; margin-left: 6px; }
  table.stack td::before { content: attr(data-label); display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
  table.stack td:last-child { grid-column: 1 / -1; margin-top: 4px; }
  table.stack td small { display: inline; margin-left: 6px; }
}
@media (max-width: 400px) {
  table.data th, table.data td { padding: 8px 5px; }
  table.data thead th { letter-spacing: 0.02em; }
}

/* ------------------------------------------------------------------ printable sheets
   The same markup is the preview on a page and the PDF: everything is in em, and the em is the width of
   the paper divided by 54, so a sheet looks the same at any size (192 mm of Letter is about 10 pt). */
.paper { container-type: inline-size; }
.paper.framed { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3.2% 3.6%; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 14px 32px -22px var(--shadow); }
.sheet { font-family: Arial, Helvetica, sans-serif; font-size: calc(100cqw / 54); line-height: 1.25; color: #111; background: #fff; width: 100%; text-align: left; font-variant-numeric: normal; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet *, .sheet *::before, .sheet *::after { box-sizing: border-box; }
.sheet h3.sheet-title { font-size: 1.9em; line-height: 1.1; margin: 0 0 0.15em; letter-spacing: 0; color: #111; text-wrap: initial; }
.sheet h4 { font-size: 1em; line-height: 1.2; margin: 0 0 0.3em; letter-spacing: 0; color: #111; }
.sheet p { margin: 0; }
.sheet-sub { color: #333; margin: 0 0 0.8em !important; }
.sheet-foot { margin-top: 0.8em !important; font-size: 0.78em; color: #333; line-height: 1.3; }
.sheet .small { font-size: 0.78em; color: #333; }
.sheet .ink { color: #1b3fa0; font-style: italic; }
.sheet .r { text-align: right; }
.sheet .c { text-align: center; }

.sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; font-size: 1em; margin: 0; }
.sheet th, .sheet td { border: 0.07em solid #444; padding: 0 0.4em; vertical-align: middle; text-align: left; font-size: 0.9em; color: #111; background: transparent; }
.sheet thead th { font-size: 0.72em; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; background: #ececec; text-align: center; padding: 0.35em 0.2em; line-height: 1.15; }
.sheet th.num { width: auto; text-align: center; font-weight: 400; background: #f6f6f6; color: #444; }
.sheet td.x { background: #f6f6f6; }
.sheet th.tot { text-align: right; text-transform: uppercase; font-size: 0.72em; letter-spacing: 0.04em; background: #ececec; }
.sheet td.tot { font-weight: 700; }

/* the debt list */
.sheet-debts col.c-num { width: 2.4em; }
.sheet-debts col.c-name { width: 15em; }
.sheet-debts col.c-rate { width: 5em; }
.sheet-debts col.c-order { width: 5.4em; }
.sheet-debts col.c-date { width: 7em; }
.sheet-debts tbody th, .sheet-debts tbody td, .sheet-debts tfoot th, .sheet-debts tfoot td { height: 3.3em; }
.sheet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin-top: 1em; }
.sheet-box { border: 0.07em solid #444; padding: 0.55em 0.7em 0.6em; }
.sheet-box.wide { margin-top: 1em; }
.sheet-box h4 { text-transform: uppercase; font-size: 0.75em; letter-spacing: 0.05em; margin-bottom: 0.5em; }
.sheet-box ol { margin: 0; padding-left: 1.4em; font-size: 0.92em; }
.sheet-box li { margin: 0.15em 0; }
.sheet .fill { display: flex; align-items: flex-end; gap: 0.5em; margin: 0.45em 0 0; font-size: 0.92em; line-height: 1.2; }
.sheet .fill > span:not(.w) { flex: 0 1 auto; }
.sheet .fill .w { flex: 1 1 4em; min-width: 4em; border-bottom: 0.07em solid #111; height: 1.5em; text-align: right; padding: 0 0.2em; }
.sheet .fill .w.short { flex: 0 0 3em; min-width: 3em; display: inline-block; }
.sheet .fill.sum { font-weight: 700; }
.sheet .choice { display: flex; gap: 0.6em; align-items: flex-start; margin: 0.45em 0 0; font-size: 0.9em; }
.sheet .tick { flex: none; width: 1.25em; height: 1.25em; border: 0.1em solid #111; margin-top: 0.05em; position: relative; }
.sheet .tick.on::after { content: ""; position: absolute; left: 0.34em; top: 0.02em; width: 0.4em; height: 0.8em; border: solid #1b3fa0; border-width: 0 0.16em 0.16em 0; transform: rotate(40deg); }

/* the payoff log */
.sheet-progress { margin: 0 0 0.9em; }
.sheet .boxes { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0.35em; list-style: none; margin: 0.55em 0 0.3em; padding: 0; }
.sheet .boxes li { border: 0.1em solid #111; height: 2.3em; position: relative; margin: 0; }
.sheet .boxes li span { position: absolute; left: 0.3em; bottom: 0.2em; font-size: 0.68em; color: #444; }
.sheet-grid col.c-month { width: 3.9em; }
.sheet-grid col.c-date { width: 5.4em; }
.sheet-grid col.c-total { width: 6.6em; }
.sheet-grid tbody th, .sheet-grid tbody td { height: 2.35em; }
.sheet-grid tr.names td { height: 1.7em; font-size: 0.78em; background: #fafafa; }
.sheet-grid tr.start th, .sheet-grid tr.start td { background: #f6f6f6; }
.sheet-grid td.name { text-align: left; }
.sheet-grid th.num { font-size: 0.8em; }

/* the expenses worksheet */
.sheet-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5em 1.3em; align-items: start; }
.sheet .sheet-group { margin: 0; }
.sheet-group h4 { background: #ececec; border: 0.07em solid #444; padding: 0.35em 0.5em; margin: 0; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.8em; }
.sheet-group h4 .no { display: inline-block; min-width: 1.4em; text-align: center; margin-right: 0.3em; border: 0.07em solid #111; border-radius: 50%; line-height: 1.3; }
.sheet-group .def { font-size: 0.78em; color: #333; margin: 0.3em 0 0.1em; line-height: 1.25; min-height: 2.5em; }
.sheet-group .rows { list-style: none; margin: 0; padding: 0; }
.sheet-group .rows li { display: flex; align-items: flex-end; gap: 0.4em; height: 2.3em; margin: 0; border-bottom: 0.05em solid #c4c4c4; }
.sheet-group .rows .lab { flex: 1 1 auto; font-size: 0.82em; line-height: 1; padding-bottom: 0.2em; min-width: 0; }
.sheet-group .rows .w { flex: 0 0 5.6em; height: 1.35em; border-bottom: 0.07em solid #111; }
.sheet-expenses .w { position: relative; }
.sheet-expenses .w::before { content: "$"; position: absolute; left: 0.1em; bottom: 0.1em; color: #555; font-size: 0.85em; }
.sheet-expenses .sheet-group .fill { margin-top: 0.4em; }
.sheet-yearly th { font-size: 0.68em; }
.sheet-yearly tbody td { height: 2.3em; font-size: 0.8em; }
.sheet-yearly td.w::before { content: none; }
.sheet-yearly td .lab { font-size: 0.9em; line-height: 1.1; }
.sheet-yearly col.c-cost { width: 38%; }
.sheet-yearly col.c-year, .sheet-yearly col.c-month { width: 19%; }
.sheet-result { border: 0.12em solid #111; margin-top: 1.5em; padding: 0.8em 0.9em 1em; }
.sheet-result h4 { margin-top: 0.9em; text-transform: uppercase; font-size: 0.78em; letter-spacing: 0.05em; }
.sheet-result .eq { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6em; font-size: 0.95em; }
.sheet-result .eq .term { display: inline-flex; align-items: flex-end; gap: 0.4em; }
.sheet-result .eq .term .w { width: 6.4em; flex: none; height: 1.5em; border-bottom: 0.07em solid #111; }
.sheet-result .eq.big { margin-top: 0.55em; font-size: 1.15em; }
.sheet-result .eq.big .term .w { width: 10em; }
.sheet-result .eq .op { font-weight: 700; font-size: 1.2em; line-height: 1.2; }

/* the printables' pages: the download buttons and the previews of the sheets */
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 8px; }
.downloads .btn { padding: 12px 22px; }
.filefacts { color: var(--muted); font-size: 0.9rem; margin: 0 0 4px; }
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px 18px; align-items: start; }
.previews.one { grid-template-columns: minmax(0, 1fr); }
.previews figure { margin: 0; min-width: 0; }
.previews figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.previews figcaption b { color: var(--fg); }
.preview { min-width: 0; }
@media (max-width: 560px) {
  .preview { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .preview .paper { min-width: 34rem; }
}

/* ------------------------------------------------------------------ on paper: only the result */
@media print {
  :root { --bg: #fff; --paper: #fff; --fg: #000; --muted: #333; --line: #bbb; --accent: #000; --ink: #000; --chip: #eee; --red: #000; --amber: #000; --green: #000; --track: #ddd; --on-accent: #fff; --on-zone: #fff; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .bar, footer, .app-note, .more, .actions, .shots, .no-print, .calc .fields, .calc .debts, .calc #add-debt, .calc .editor-actions, .calc label, .tiers { display: none !important; }
  .print-only { display: block; }
  .calc, .card { border: 0; box-shadow: none; padding: 0; }
  .calc > h2 { display: none; }
  .result { border-top: 0; }
  .sched-scroll { max-height: none; overflow: visible; border: 0; }
  .schedule thead { display: table-header-group; }
  .schedule tr, .ladder li { break-inside: avoid; }
  .schedule thead th { position: static; }
  a { color: #000; text-decoration: none; }
  h2, h3 { break-after: avoid; }
}
